* [PATCH v2 1/1] ARM: mach-imx: imx6ul: populates platform device at .init_machine
@ 2016-08-16 2:05 Peter Chen
2016-08-17 15:02 ` Shawn Guo
0 siblings, 1 reply; 2+ messages in thread
From: Peter Chen @ 2016-08-16 2:05 UTC (permalink / raw)
To: linux-arm-kernel
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.
Cc: Anson Huang <anson.huang@nxp.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Rob Herring <robh@kernel.org>
Cc: <stable@vger.kernel.org>
Fixes: 850bea2335e4 ("arm: Remove unnecessary of_platform_populate
with default match table")
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
---
Changes for v2:
- Add Fabio's Reviewed-by tag
- Using the correct commit-id for "Fixes" tag
arch/arm/mach-imx/mach-imx6ul.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-imx/mach-imx6ul.c b/arch/arm/mach-imx/mach-imx6ul.c
index 5d9bfab..6bb7d9c 100644
--- a/arch/arm/mach-imx/mach-imx6ul.c
+++ b/arch/arm/mach-imx/mach-imx6ul.c
@@ -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();
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH v2 1/1] ARM: mach-imx: imx6ul: populates platform device at .init_machine
2016-08-16 2:05 [PATCH v2 1/1] ARM: mach-imx: imx6ul: populates platform device at .init_machine Peter Chen
@ 2016-08-17 15:02 ` Shawn Guo
0 siblings, 0 replies; 2+ messages in thread
From: Shawn Guo @ 2016-08-17 15:02 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Aug 16, 2016 at 10:05:15AM +0800, Peter Chen wrote:
> 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.
>
> Cc: Anson Huang <anson.huang@nxp.com>
> Cc: Fabio Estevam <fabio.estevam@nxp.com>
> Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
> Cc: Rob Herring <robh@kernel.org>
> Cc: <stable@vger.kernel.org>
The regression is only introduced in v4.8-rc1, and v4.7 is just fine.
That said, the stable tag shouldn't be added here.
Dropped the stable tag and applied it as a fix for v4.8-rc.
Shawn
> Fixes: 850bea2335e4 ("arm: Remove unnecessary of_platform_populate
> with default match table")
>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>
> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
> ---
>
> Changes for v2:
> - Add Fabio's Reviewed-by tag
> - Using the correct commit-id for "Fixes" tag
>
> arch/arm/mach-imx/mach-imx6ul.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm/mach-imx/mach-imx6ul.c b/arch/arm/mach-imx/mach-imx6ul.c
> index 5d9bfab..6bb7d9c 100644
> --- a/arch/arm/mach-imx/mach-imx6ul.c
> +++ b/arch/arm/mach-imx/mach-imx6ul.c
> @@ -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();
> --
> 1.9.1
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-17 15:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-16 2:05 [PATCH v2 1/1] ARM: mach-imx: imx6ul: populates platform device at .init_machine Peter Chen
2016-08-17 15:02 ` Shawn Guo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).