summaryrefslogtreecommitdiffstats
path: root/drivers/soc/imx
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2018-07-22 00:05:16 +0200
committerOlof Johansson <olof@lixom.net>2018-07-22 00:05:16 +0200
commit1df88c683ea376a0499e195c2301eb8ce9668b77 (patch)
treec81ce36eaaedde699d09bb748bf5cb17e30c867c /drivers/soc/imx
parentMerge tag 'reset-for-4.19' of git://git.pengutronix.de/git/pza/linux into nex... (diff)
parentsoc: imx6qp: Use GENPD_FLAG_ALWAYS_ON for PU errata (diff)
downloadlinux-1df88c683ea376a0499e195c2301eb8ce9668b77.tar.xz
linux-1df88c683ea376a0499e195c2301eb8ce9668b77.zip
Merge tag 'imx-drivers-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/drivers
i.MX drivers update for 4.19: - Handle i.MX6SL chip errata ERR006287 in the safest possible way by keeping the DISP domain always-on, because Upon resuming from power gating, the modules in the display power domain (eLCDIF, EPDC, PXP and SPDC) might fail to perform register reads correctly. - Use GENPD_FLAG_ALWAYS_ON flag for i.MX6QP PU ERR009619 handling. It is functionally identical to the exsiting implementation but simpler and slightly faster. * tag 'imx-drivers-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: soc: imx6qp: Use GENPD_FLAG_ALWAYS_ON for PU errata soc: imx: gpc: Disable 6sl display power gating for ERR006287 Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers/soc/imx')
-rw-r--r--drivers/soc/imx/gpc.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/soc/imx/gpc.c b/drivers/soc/imx/gpc.c
index 32f0748fd067..403f3f2f43bd 100644
--- a/drivers/soc/imx/gpc.c
+++ b/drivers/soc/imx/gpc.c
@@ -47,7 +47,6 @@ struct imx_pm_domain {
unsigned int reg_offs;
signed char cntr_pdn_bit;
unsigned int ipg_rate_mhz;
- unsigned int flags;
};
static inline struct imx_pm_domain *
@@ -62,9 +61,6 @@ static int imx6_pm_domain_power_off(struct generic_pm_domain *genpd)
int iso, iso2sw;
u32 val;
- if (pd->flags & PGC_DOMAIN_FLAG_NO_PD)
- return -EBUSY;
-
/* Read ISO and ISO2SW power down delays */
regmap_read(pd->regmap, pd->reg_offs + GPC_PGC_PUPSCR_OFFS, &val);
iso = val & 0x3f;
@@ -288,26 +284,31 @@ static struct imx_pm_domain imx_gpc_domains[] = {
struct imx_gpc_dt_data {
int num_domains;
bool err009619_present;
+ bool err006287_present;
};
static const struct imx_gpc_dt_data imx6q_dt_data = {
.num_domains = 2,
.err009619_present = false,
+ .err006287_present = false,
};
static const struct imx_gpc_dt_data imx6qp_dt_data = {
.num_domains = 2,
.err009619_present = true,
+ .err006287_present = false,
};
static const struct imx_gpc_dt_data imx6sl_dt_data = {
.num_domains = 3,
.err009619_present = false,
+ .err006287_present = true,
};
static const struct imx_gpc_dt_data imx6sx_dt_data = {
.num_domains = 4,
.err009619_present = false,
+ .err006287_present = false,
};
static const struct of_device_id imx_gpc_dt_ids[] = {
@@ -413,8 +414,13 @@ static int imx_gpc_probe(struct platform_device *pdev)
/* Disable PU power down in normal operation if ERR009619 is present */
if (of_id_data->err009619_present)
- imx_gpc_domains[GPC_PGC_DOMAIN_PU].flags |=
- PGC_DOMAIN_FLAG_NO_PD;
+ imx_gpc_domains[GPC_PGC_DOMAIN_PU].base.flags |=
+ GENPD_FLAG_ALWAYS_ON;
+
+ /* Keep DISP always on if ERR006287 is present */
+ if (of_id_data->err006287_present)
+ imx_gpc_domains[GPC_PGC_DOMAIN_DISPLAY].base.flags |=
+ GENPD_FLAG_ALWAYS_ON;
if (!pgc_node) {
ret = imx_gpc_old_dt_init(&pdev->dev, regmap,