ARM: imx6ul: populates platform device at .init_machine
authorPeter Chen <peter.chen@nxp.com>
Tue, 16 Aug 2016 02:05:15 +0000 (10:05 +0800)
committerShawn Guo <shawnguo@kernel.org>
Wed, 17 Aug 2016 14:43:05 +0000 (22:43 +0800)
commitcfee6b5874654fe4e7388bc3112d3afb76cd8b9e
tree67ec5a48052e38464684dd79d7aa427d8b710409
parentf5a49057c71433e35a4712ab8d8f00641b3e1ec0
ARM: 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.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
Fixes: 850bea2335e4 ("arm: Remove unnecessary of_platform_populate with default match table")
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>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm/mach-imx/mach-imx6ul.c