aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/soc/imx/gpcv2.c
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2021-10-02 02:59:40 +0200
committerShawn Guo <shawnguo@kernel.org>2021-10-06 20:13:23 +0800
commitfadf79a07b48af66e367b49c3a445a1282148fcf (patch)
tree6204e799f75cb81313f5e9d380b3c97e6df7c485 /drivers/soc/imx/gpcv2.c
parentRevert "soc: imx: gpcv2: move reset assert after requesting domain power up" (diff)
downloadlinux-dev-fadf79a07b48af66e367b49c3a445a1282148fcf.tar.xz
linux-dev-fadf79a07b48af66e367b49c3a445a1282148fcf.zip
soc: imx: gpcv2: add lockdep annotation
Some of the GPCv2 power domains are nested inside each other without visibility to lockdep at the genpd level, as they are in separate driver instances and don't have a parent/child power-domain relationship. Add a subclass annotation to the nested domains to let lockdep know that it is okay to take the genpd lock in a nested fashion. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Diffstat (limited to 'drivers/soc/imx/gpcv2.c')
-rw-r--r--drivers/soc/imx/gpcv2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c
index 7fbf1f25b48e..fcea95317287 100644
--- a/drivers/soc/imx/gpcv2.c
+++ b/drivers/soc/imx/gpcv2.c
@@ -898,6 +898,10 @@ static int imx_pgc_domain_probe(struct platform_device *pdev)
goto out_domain_unmap;
}
+ if (IS_ENABLED(CONFIG_LOCKDEP) &&
+ of_property_read_bool(domain->dev->of_node, "power-domains"))
+ lockdep_set_subclass(&domain->genpd.mlock, 1);
+
ret = of_genpd_add_provider_simple(domain->dev->of_node,
&domain->genpd);
if (ret) {