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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

1,649 次查看
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 项奖励
回复
3 回复数

1,630 次查看
Manuel_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 项奖励
回复

1,609 次查看
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 项奖励
回复

1,572 次查看
CoolSean
Contributor I

Hi @Manuel_Salas 

Have any suggestion?

0 项奖励
回复