aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2015-05-27 10:10:26 +0200
committerShawn Guo <shawn.guo@linaro.org>2015-05-27 16:33:46 +0800
commitb17c70cd9211e9bbcd77a489f9c60f3d1bd4c392 (patch)
tree034dfde037c325883abdcb3bd93c0aaaf0bacdd7 /arch
parentARM: imx6: allow booting with old DT (diff)
downloadlinux-dev-b17c70cd9211e9bbcd77a489f9c60f3d1bd4c392.tar.xz
linux-dev-b17c70cd9211e9bbcd77a489f9c60f3d1bd4c392.zip
ARM: imx6: gpc: don't register power domain if DT data is missing
If the devicetree is too old and does not provide the regulator and clocks for the power domain, we need to avoid registering the power domain. Otherwise runtime PM will try to control the domain, which will lead to machine hangs without the proper DT configuration data. This restores functionality to the kernel 4.0 level if an old DT is detected, where the power domain is constantly powered on. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-imx/gpc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/gpc.c b/arch/arm/mach-imx/gpc.c
index bbf015056221..6d0893a3828e 100644
--- a/arch/arm/mach-imx/gpc.c
+++ b/arch/arm/mach-imx/gpc.c
@@ -449,6 +449,10 @@ static int imx_gpc_probe(struct platform_device *pdev)
struct regulator *pu_reg;
int ret;
+ /* bail out if DT too old and doesn't provide the necessary info */
+ if (!of_property_read_bool(pdev->dev.of_node, "#power-domain-cells"))
+ return 0;
+
pu_reg = devm_regulator_get_optional(&pdev->dev, "pu");
if (PTR_ERR(pu_reg) == -ENODEV)
pu_reg = NULL;