Skip to content

Commit 1df88c6

Browse files
committed
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>
2 parents 85a03fe + 69c04ae commit 1df88c6

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

‎drivers/soc/imx/gpc.c‎

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ struct imx_pm_domain {
4747
unsigned int reg_offs;
4848
signed char cntr_pdn_bit;
4949
unsigned int ipg_rate_mhz;
50-
unsigned int flags;
5150
};
5251

5352
static inline struct imx_pm_domain *
@@ -62,9 +61,6 @@ static int imx6_pm_domain_power_off(struct generic_pm_domain *genpd)
6261
int iso, iso2sw;
6362
u32 val;
6463

65-
if (pd->flags & PGC_DOMAIN_FLAG_NO_PD)
66-
return -EBUSY;
67-
6864
/* Read ISO and ISO2SW power down delays */
6965
regmap_read(pd->regmap, pd->reg_offs + GPC_PGC_PUPSCR_OFFS, &val);
7066
iso = val & 0x3f;
@@ -288,26 +284,31 @@ static struct imx_pm_domain imx_gpc_domains[] = {
288284
struct imx_gpc_dt_data {
289285
int num_domains;
290286
bool err009619_present;
287+
bool err006287_present;
291288
};
292289

293290
static const struct imx_gpc_dt_data imx6q_dt_data = {
294291
.num_domains = 2,
295292
.err009619_present = false,
293+
.err006287_present = false,
296294
};
297295

298296
static const struct imx_gpc_dt_data imx6qp_dt_data = {
299297
.num_domains = 2,
300298
.err009619_present = true,
299+
.err006287_present = false,
301300
};
302301

303302
static const struct imx_gpc_dt_data imx6sl_dt_data = {
304303
.num_domains = 3,
305304
.err009619_present = false,
305+
.err006287_present = true,
306306
};
307307

308308
static const struct imx_gpc_dt_data imx6sx_dt_data = {
309309
.num_domains = 4,
310310
.err009619_present = false,
311+
.err006287_present = false,
311312
};
312313

313314
static const struct of_device_id imx_gpc_dt_ids[] = {
@@ -413,8 +414,13 @@ static int imx_gpc_probe(struct platform_device *pdev)
413414

414415
/* Disable PU power down in normal operation if ERR009619 is present */
415416
if (of_id_data->err009619_present)
416-
imx_gpc_domains[GPC_PGC_DOMAIN_PU].flags |=
417-
PGC_DOMAIN_FLAG_NO_PD;
417+
imx_gpc_domains[GPC_PGC_DOMAIN_PU].base.flags |=
418+
GENPD_FLAG_ALWAYS_ON;
419+
420+
/* Keep DISP always on if ERR006287 is present */
421+
if (of_id_data->err006287_present)
422+
imx_gpc_domains[GPC_PGC_DOMAIN_DISPLAY].base.flags |=
423+
GENPD_FLAG_ALWAYS_ON;
418424

419425
if (!pgc_node) {
420426
ret = imx_gpc_old_dt_init(&pdev->dev, regmap,

0 commit comments

Comments
 (0)