Commit fadf79a0 authored by Lucas Stach's avatar Lucas Stach Committed by Shawn Guo

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: default avatarLucas Stach <l.stach@pengutronix.de>
Reviewed-by: default avatarPeng Fan <peng.fan@nxp.com>
Signed-off-by: default avatarShawn Guo <shawnguo@kernel.org>
parent 2b2f106e
...@@ -898,6 +898,10 @@ static int imx_pgc_domain_probe(struct platform_device *pdev) ...@@ -898,6 +898,10 @@ static int imx_pgc_domain_probe(struct platform_device *pdev)
goto out_domain_unmap; 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, ret = of_genpd_add_provider_simple(domain->dev->of_node,
&domain->genpd); &domain->genpd);
if (ret) { if (ret) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment