diff options
author | Lucas Stach <l.stach@pengutronix.de> | 2021-10-02 14:43:27 +0200 |
---|---|---|
committer | Lucas Stach <l.stach@pengutronix.de> | 2021-10-02 14:46:24 +0200 |
commit | 6cfa56fa54b287c867dbd8be392618239ce522d6 (patch) | |
tree | 1b2e9720c002170e7292dc415e039754b80d4a9e | |
parent | f5a8f41084c3955ba26d89abe0a64fccf901dbbd (diff) | |
download | linux-6cfa56fa54b287c867dbd8be392618239ce522d6.tar.gz linux-6cfa56fa54b287c867dbd8be392618239ce522d6.tar.xz |
soc: imx: gpcv2: allow to disable individual power domainsimx8m-power-domains
Some board designs don't supply power to all of the power domains,
as they are not used anyways. In that case we must make sure to
not touch those power domains at all, as trying to power up a
domain that has no power supplied to it will obviously end in a
system crash. Allow to disable those domains via the standard DT
status property.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
-rw-r--r-- | drivers/soc/imx/gpcv2.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c index 811e9d29a079..b8d52d8d29db 100644 --- a/drivers/soc/imx/gpcv2.c +++ b/drivers/soc/imx/gpcv2.c @@ -1035,6 +1035,9 @@ static int imx_gpcv2_probe(struct platform_device *pdev) struct imx_pgc_domain *domain; u32 domain_index; + if (!of_device_is_available(np)) + continue; + ret = of_property_read_u32(np, "reg", &domain_index); if (ret) { dev_err(dev, "Failed to read 'reg' property\n"); |