reboot after running “poweroff” command on imx8mm with Linux5.10.72

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

reboot after running “poweroff” command on imx8mm with Linux5.10.72

跳至解决方案
2,493 次查看
Eddy1
Contributor V

Hi:

At present, I am testing the "poweroff" function, but after executing the "poweoff" command, the system will automatically restart.Can you give me some suggestions?

Eddy1_0-1661421355765.png

 

标签 (1)
0 项奖励
回复
1 解答
2,485 次查看
Eddy1
Contributor V

Hi:

I have solved this problem.There are some bugs in the latest ATF. Make the following modifications:


diff --git a/plat/imx/imx8m/imx8m_psci_common.c b/plat/imx/imx8m/imx8m_psci_common.c
index 018ec3f3e..17933e661 100644
--- a/plat/imx/imx8m/imx8m_psci_common.c
+++ b/plat/imx/imx8m/imx8m_psci_common.c
@@ -203,8 +203,10 @@ void __dead2 imx_system_reset(void)
void __dead2 imx_system_off(void)
{
mmio_write_32(IMX_SNVS_BASE + SNVS_LPCR, SNVS_LPCR_SRTC_ENV |
- SNVS_LPCR_DP_EN | SNVS_LPCR_TOP | SNVS_LPCR_LPTA_EN | SNVS_LPCR_LPWUI_EN);
+ SNVS_LPCR_DP_EN | SNVS_LPCR_TOP);
+ //SNVS_LPCR_DP_EN | SNVS_LPCR_TOP | SNVS_LPCR_LPTA_EN | SNVS_LPCR_LPWUI_EN);

+ INFO("poweroff\n");
while (1)
;
}

在原帖中查看解决方案

3 回复数
2,110 次查看
Eximius
Contributor III

Hello! 

Same problem in the latest lf_v2.6 branch with the IMX8MP. This commit is to blame: https://github.com/nxp-imx/imx-atf/commit/cc5f3575c801897eeda40e486de3f9a517a1b460

Could perhaps someone from NXP take care of this?

Thanks!

Regards,

Ian

0 项奖励
回复
2,486 次查看
Eddy1
Contributor V

Hi:

I have solved this problem.There are some bugs in the latest ATF. Make the following modifications:


diff --git a/plat/imx/imx8m/imx8m_psci_common.c b/plat/imx/imx8m/imx8m_psci_common.c
index 018ec3f3e..17933e661 100644
--- a/plat/imx/imx8m/imx8m_psci_common.c
+++ b/plat/imx/imx8m/imx8m_psci_common.c
@@ -203,8 +203,10 @@ void __dead2 imx_system_reset(void)
void __dead2 imx_system_off(void)
{
mmio_write_32(IMX_SNVS_BASE + SNVS_LPCR, SNVS_LPCR_SRTC_ENV |
- SNVS_LPCR_DP_EN | SNVS_LPCR_TOP | SNVS_LPCR_LPTA_EN | SNVS_LPCR_LPWUI_EN);
+ SNVS_LPCR_DP_EN | SNVS_LPCR_TOP);
+ //SNVS_LPCR_DP_EN | SNVS_LPCR_TOP | SNVS_LPCR_LPTA_EN | SNVS_LPCR_LPWUI_EN);

+ INFO("poweroff\n");
while (1)
;
}

2,386 次查看
oprata
Contributor II

Hi!

It's work for u-boot-imx but when I trying to use the poweroff from linux console it doesn't work. The system still reboot.

Any idea how to fix it?

Thanks in advance.

0 项奖励
回复