aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/gpc.c
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2015-05-26 12:43:36 -0400
committerShawn Guo <shawn.guo@linaro.org>2015-05-27 03:04:40 -0400
commit634a603760c26d163ff92751d91ac7b859e879c4 (patch)
tree6dc02c7e2f1e281cfc70499d76047cee7b9cf13f /arch/arm/mach-imx/gpc.c
parente46b5a6470a5e2c8e1096f8f60887ac19949055b (diff)
ARM: imx6: allow booting with old DT
The GPC rewrite to IRQ domains has been on the premise that it may break suspend/resume for new kernels on old DT, but otherwise keep things working from a user perspective. This was an accepted compromise to be able to move the GIC cleanup forward. What actually happened was that booting a new kernel on an old DT crashes before even the console is up, so the user does not even see the warning that the DT is too old. The warning message suggests that this has been known before, which is clearly unacceptable. Fix the early crash by mapping the GPC memory space if the IRQ controller doesn't claim it. This keeps at least CPUidle and the needed CPU wakeup workarounds working. With this fixed the system is able to boot up properly minus the expected suspend/resume breakage. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'arch/arm/mach-imx/gpc.c')
-rw-r--r--arch/arm/mach-imx/gpc.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/arm/mach-imx/gpc.c b/arch/arm/mach-imx/gpc.c
index 4d60005e9277..bbf015056221 100644
--- a/arch/arm/mach-imx/gpc.c
+++ b/arch/arm/mach-imx/gpc.c
@@ -280,9 +280,15 @@ void __init imx_gpc_check_dt(void)
280 struct device_node *np; 280 struct device_node *np;
281 281
282 np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpc"); 282 np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpc");
283 if (WARN_ON(!np || 283 if (WARN_ON(!np))
284 !of_find_property(np, "interrupt-controller", NULL))) 284 return;
285 pr_warn("Outdated DT detected, system is about to crash!!!\n"); 285
286 if (WARN_ON(!of_find_property(np, "interrupt-controller", NULL))) {
287 pr_warn("Outdated DT detected, suspend/resume will NOT work\n");
288
289 /* map GPC, so that at least CPUidle and WARs keep working */
290 gpc_base = of_iomap(np, 0);
291 }
286} 292}
287 293
288#ifdef CONFIG_PM_GENERIC_DOMAINS 294#ifdef CONFIG_PM_GENERIC_DOMAINS