aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonard Crestez <leonard.crestez@nxp.com>2018-07-13 06:01:15 -0400
committerShawn Guo <shawnguo@kernel.org>2018-07-17 02:12:14 -0400
commit69c04aee3482415cff52061a3ccad4943662e81d (patch)
treefd074b711b7082188ee9678594e35ff6b8a177ed
parent5507ec5126df5cad778af22b13fc8c278ad977ea (diff)
soc: imx6qp: Use GENPD_FLAG_ALWAYS_ON for PU errata
This is functionally identical but simpler and slightly faster. The PU domain is turned on at boot time and never turned off. In the current implementation the pm core will repeatedly call power_off when the domain is unused and get -EBUSY back. If the domain is marked as "always on" instead the pm core won't even attempt to turn it off. In theory on 6qp it is safe to turn PU off in suspend, however that is best accomplished with a new core flag. Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
-rw-r--r--drivers/soc/imx/gpc.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/soc/imx/gpc.c b/drivers/soc/imx/gpc.c
index 13ff983f8b69..403f3f2f43bd 100644
--- a/drivers/soc/imx/gpc.c
+++ b/drivers/soc/imx/gpc.c
@@ -47,7 +47,6 @@ struct imx_pm_domain {
47 unsigned int reg_offs; 47 unsigned int reg_offs;
48 signed char cntr_pdn_bit; 48 signed char cntr_pdn_bit;
49 unsigned int ipg_rate_mhz; 49 unsigned int ipg_rate_mhz;
50 unsigned int flags;
51}; 50};
52 51
53static inline struct imx_pm_domain * 52static inline struct imx_pm_domain *
@@ -62,9 +61,6 @@ static int imx6_pm_domain_power_off(struct generic_pm_domain *genpd)
62 int iso, iso2sw; 61 int iso, iso2sw;
63 u32 val; 62 u32 val;
64 63
65 if (pd->flags & PGC_DOMAIN_FLAG_NO_PD)
66 return -EBUSY;
67
68 /* Read ISO and ISO2SW power down delays */ 64 /* Read ISO and ISO2SW power down delays */
69 regmap_read(pd->regmap, pd->reg_offs + GPC_PGC_PUPSCR_OFFS, &val); 65 regmap_read(pd->regmap, pd->reg_offs + GPC_PGC_PUPSCR_OFFS, &val);
70 iso = val & 0x3f; 66 iso = val & 0x3f;
@@ -418,8 +414,8 @@ static int imx_gpc_probe(struct platform_device *pdev)
418 414
419 /* Disable PU power down in normal operation if ERR009619 is present */ 415 /* Disable PU power down in normal operation if ERR009619 is present */
420 if (of_id_data->err009619_present) 416 if (of_id_data->err009619_present)
421 imx_gpc_domains[GPC_PGC_DOMAIN_PU].flags |= 417 imx_gpc_domains[GPC_PGC_DOMAIN_PU].base.flags |=
422 PGC_DOMAIN_FLAG_NO_PD; 418 GENPD_FLAG_ALWAYS_ON;
423 419
424 /* Keep DISP always on if ERR006287 is present */ 420 /* Keep DISP always on if ERR006287 is present */
425 if (of_id_data->err006287_present) 421 if (of_id_data->err006287_present)