Commit 8da8bd53 authored by Lucas Stach's avatar Lucas Stach Committed by Shawn Guo

soc: imx: gpcv2: allow to disable individual 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: default avatarLucas Stach <l.stach@pengutronix.de>
Reviewed-By: default avatarTim Harvey <tharvey@gateworks.com>
Tested-By: default avatarTim Harvey <tharvey@gateworks.com>
Signed-off-by: default avatarShawn Guo <shawnguo@kernel.org>
parent f617a871
...@@ -990,6 +990,9 @@ static int imx_gpcv2_probe(struct platform_device *pdev) ...@@ -990,6 +990,9 @@ static int imx_gpcv2_probe(struct platform_device *pdev)
struct imx_pgc_domain *domain; struct imx_pgc_domain *domain;
u32 domain_index; u32 domain_index;
if (!of_device_is_available(np))
continue;
ret = of_property_read_u32(np, "reg", &domain_index); ret = of_property_read_u32(np, "reg", &domain_index);
if (ret) { if (ret) {
dev_err(dev, "Failed to read 'reg' property\n"); dev_err(dev, "Failed to read 'reg' property\n");
......
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