kexec feature for imx6ul

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

kexec feature for imx6ul

648 Views
caozou
Contributor II

Hi:

   I find it isn't a good support for kexec in imx6ul with sdk 3.14.52,  i have worked in the feature of kexec for some time, it is almost successful,  the only failed place is in the code:

   drivers/thermal/imx_thermal.c:    --->

         function: imx_get_sensor_data: --->

             ret = regmap_read(map, IMX6_OCOTP_ANA1, &val);  --> cpu stopped here.

i know my description is not very summary, i find it will cause the cpu halt for reading some regs,

for this:

"

         function: imx_get_sensor_data: --->

             ret = regmap_read(map, IMX6_OCOTP_ANA1, &val);  --> cpu stopped here.

"

what condition  it need to read the reg of IMX6_OCOTP_ANA1, cpu stop here, it need to enable some clk after i run the command "kexec -e".

Labels (1)
Tags (2)
0 Kudos
2 Replies

457 Views
Yuri
NXP Employee
NXP Employee

Hello,

  is it possible to check the issue with the recent Linux release ?

i.MX 6 Series Software and Development Tool|NXP

Have a great day,

Yuri

------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

------------------------------------------------------------------------------

0 Kudos

457 Views
caozou
Contributor II

no, thanks, a clk should be enabled after command "kexec -e":

diff --git a/arch/arm/mach-imx/clk-imx6ul.c b/arch/arm/mach-imx/clk-imx6ul.c

index 7bd0a60..ae815bc 100644

--- a/arch/arm/mach-imx/clk-imx6ul.c

+++ b/arch/arm/mach-imx/clk-imx6ul.c

@@ -401,6 +401,15 @@ static void __init imx6ul_clocks_init(struct

device_node *ccm_node)

/* mask handshake of mmdc */

writel_relaxed(BM_CCM_CCDR_MMDC_CH0_MASK, base + CCDR);

+ /*

+ * As some of the modules need to access ocotp in MSL,

+ * need to make sure ocotp clk(CCM_CCGR2_CG6) is enabled

+ * during MSL, as on i.MX6UL, accessing OCOTP registers

+ * needs its clk on, it will be disabled by clk late

+ * init and managed by ocotp driver.

+ */

+ writel_relaxed(readl_relaxed(base + 0x70) | 1 << 12, base + 0x70);

+

for (i = 0; i < ARRAY_SIZE(clks); i++)

if (IS_ERR(clks[i]))

pr_err("i.MX6UL clk %d: register failed with

%ld\n", i, PTR_ERR(clks[i]));

Regards,

czou