diff options
author | Fabio Estevam <fabio.estevam@nxp.com> | 2016-10-22 08:20:55 -0400 |
---|---|---|
committer | Shawn Guo <shawnguo@kernel.org> | 2016-10-24 03:12:57 -0400 |
commit | eef0b282bb586259d35548851cf6a4ce847bb804 (patch) | |
tree | cd9f0caeca23cd484a64dfdab9e250e4e2d0bb2a /arch/arm/mach-imx/gpc.c | |
parent | 6a34e0e6b49f50d2626c15ed75b76031f12bd637 (diff) |
ARM: imx: gpc: Initialize all power domains
Since commit 0159ec670763dd ("PM / Domains: Verify the PM domain is present
when adding a provider") the following regression is observed on imx6:
imx-gpc: probe of 20dc000.gpc failed with error -22
The gpc probe fails because of_genpd_add_provider_onecell() now checks
if all the domains are initialized via pm_genpd_present() function
and it fails because not all the power domains are initialized.
In order to fix this error, initialize all the power domains from
imx_gpc_domains[], not only the imx6q_pu_domain.base one.
Reported-by: Olof's autobooter <build@lixom.net>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Diffstat (limited to 'arch/arm/mach-imx/gpc.c')
-rw-r--r-- | arch/arm/mach-imx/gpc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/mach-imx/gpc.c b/arch/arm/mach-imx/gpc.c index 0df062d8b2c9..d0463e9d8a08 100644 --- a/arch/arm/mach-imx/gpc.c +++ b/arch/arm/mach-imx/gpc.c | |||
@@ -430,7 +430,8 @@ static int imx_gpc_genpd_init(struct device *dev, struct regulator *pu_reg) | |||
430 | if (!IS_ENABLED(CONFIG_PM_GENERIC_DOMAINS)) | 430 | if (!IS_ENABLED(CONFIG_PM_GENERIC_DOMAINS)) |
431 | return 0; | 431 | return 0; |
432 | 432 | ||
433 | pm_genpd_init(&imx6q_pu_domain.base, NULL, false); | 433 | for (i = 0; i < ARRAY_SIZE(imx_gpc_domains); i++) |
434 | pm_genpd_init(imx_gpc_domains[i], NULL, false); | ||
434 | return of_genpd_add_provider_onecell(dev->of_node, | 435 | return of_genpd_add_provider_onecell(dev->of_node, |
435 | &imx_gpc_onecell_data); | 436 | &imx_gpc_onecell_data); |
436 | 437 | ||