system will be stuck in readl_relaxed function when UUU tool flash image

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

system will be stuck in readl_relaxed function when UUU tool flash image

309 Views
CoolSean
Contributor I

I created a new function imx8mp opp_check_temp_grading() and read the efuse data(1.png), but the system gets stuck on readl_relaxed when flash the image by UUU tool .

 

0 Kudos
Reply
3 Replies

290 Views
Alejandro_Salas
NXP TechSupport
NXP TechSupport

Hello @CoolSean 

I hope you are doing well.

Could you please share the logs of issue in UUU tool?

Are you able to flash successfully without your custom functions?

 

Best regards,

Salas. 

0 Kudos
Reply

269 Views
CoolSean
Contributor I

Could you please share the logs of issue in UUU tool?

There are no errors in log. It get stuck on readl_relaxed when system reboot to copy DTS and kernel image to /run/media/mmcblk2p1

Are you able to flash successfully without your custom functions?

Yes, it will flash successfully without readl_relaxed. There are no errors in of_find_compatible_node and of_iomap functions.

And I found the same code in sources/linux-imx/drivers/soc/imx/soc-imx8m.c, which can success to readl / writel to efuse (0x30350000)

 

np = of_find_compatible_node(NULL, NULL, "fsl,imx8mm-ocotp");
        if (!np)
                return;

ocotp_base = of_iomap(np, 0);
WARN_ON(!ocotp_base);
clk = of_clk_get_by_name(np, NULL);
if (IS_ERR(clk)) {
       WARN_ON(IS_ERR(clk));
       return;
}

clk_prepare_enable(clk);

soc_uid = readl_relaxed(ocotp_base + OCOTP_UID_HIGH + offset);
soc_uid <<= 32;
soc_uid |= readl_relaxed(ocotp_base + OCOTP_UID_LOW + offset);

if (offset) {
       soc_uid_h = readl_relaxed(ocotp_base + IMX8MP_OCOTP_UID_HIGH + 0x10);
       soc_uid_h <<= 32;
       soc_uid_h |= readl_relaxed(ocotp_base + IMX8MP_OCOTP_UID_HIGH);
}

 

 

My function add in sources/linux-imx/drivers/thermal/imx8mm_thermal.c , but it cannot read efuse memory successfully

0 Kudos
Reply

232 Views
CoolSean
Contributor I

Hi @Alejandro_Salas 

Have any suggestion?

0 Kudos
Reply