ARM: mach-imx: imx6ul: populates platform device at .init_machine
PATCH 1/1 ARM: mach-imx: imx6ul: populates platform device at .init_machine
At imx6ul_init_machine, it calls imx6ul_pm_init which needs to find platform device for ocram, but the default populate platform device is at of_platform_default_populate_init, which is located at arch_initcall_sync, and called later than arch_initcall (.init_machine is located at that). So below warning message will be showed during boots up:
imx6q_suspend_init: failed to find ocram device!
imx6_pm_common_init: No DDR LPM support with suspend -19!
Due to lack of ocram device, the suspend mode "mem" which needs ocram to store suspend routine code is invalid.
This commit populates platform device before imx6ul_pm_init like other imx6 platforms do, and the suspend mode "mem" can work successfully.
--- arch/arm/mach-imx/mach-imx6ul.c | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-imx/mach-imx6ul.c +1 -0
@@ -64,6 +64,7 @@ static void __init imx6ul_init_machine(void)if (parent ==NULL )pr_warn ("failed to initialize soc device\n" ); +of_platform_default_populate (NULL ,NULL , parent);imx6ul_enet_init ();imx_anatop_init ();imx6ul_pm_init ();
Signature · 1 line
1.9.1
Fabio Estevam
reviewerPATCH 1/1 ARM: mach-imx: imx6ul: populates platform device at .init_machine
Hi Peter,
Quoted 15 lines · Peter Chen
At
imx6ul_init_machine, it callsimx6ul_pm_initwhich needs to find platform device for ocram, but the default populate platform device is atof_platform_default_populate_init, which is located atarch_initcall_sync, and called later thanarch_initcall(.init_machine is located at that). So below warning message will be showed during boots up:
imx6q_suspend_init: failed to find ocram device!
imx6_pm_common_init: No DDR LPM support with suspend -19!Due to lack of ocram device, the suspend mode "mem" which needs ocram to store suspend routine code is invalid.
This commit populates platform device before
imx6ul_pm_initlike other imx6 platforms do, and the suspend mode "mem" can work successfully.
Quoted 6 lines
Cc Anson Huang <[email protected]>Cc Fabio Estevam <[email protected]>Cc <[email protected]>Fixes ee4a5f838c84 ("ARM: imx: add suspend/resume support for i.mx6ul")Signed-off-by Peter Chen <[email protected]>
Thanks for the fix:
PATCH 1/1 ARM: mach-imx: imx6ul: populates platform device at .init_machine
In reply to Peter Chen+ Kefeng and Rob
Quoted 12 lines · Peter Chen
At
imx6ul_init_machine, it callsimx6ul_pm_initwhich needs to find platform device for ocram, but the default populate platform device is atof_platform_default_populate_init, which is located atarch_initcall_sync, and called later thanarch_initcall(.init_machine is located at that). So below warning message will be showed during boots up:
imx6q_suspend_init: failed to find ocram device!
imx6_pm_common_init: No DDR LPM support with suspend -19!Due to lack of ocram device, the suspend mode "mem" which needs ocram to store suspend routine code is invalid.
Quoted 7 lines
This commit populates platform device before
imx6ul_pm_initlike other imx6 platforms do, and the suspend mode "mem" can work successfully.Cc Anson Huang <[email protected]>Cc Fabio Estevam <[email protected]>Cc <[email protected]>Fixes ee4a5f838c84 ("ARM: imx: add suspend/resume support for i.mx6ul")
It's actually a regression caused by commit 850bea2335e4 (arm: Remove unnecessary of_platform_populate with default match table), which should be on the Fixes: tag.
Shawn
Quoted 26 lines
Signed-off-by Peter Chen <[email protected]>--- arch/arm/mach-imx/mach-imx6ul.c | 1 + 1 file changed, 1 insertion(+)arch/arm/mach-imx/mach-imx6ul.c +1
-0@@ -64,6 +64,7 @@ static void __init imx6ul_init_machine(void)if (parent ==NULL )pr_warn ("failed to initialize soc device\n" ); +of_platform_default_populate (NULL ,NULL , parent);imx6ul_enet_init ();imx_anatop_init ();imx6ul_pm_init ();Signature · 7 lines
1.9.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel