summaryrefslogtreecommitdiff
path: root/arch/arm/mach-imx/gpc.c
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2015-03-13 16:05:37 +0000
committerShawn Guo <shawn.guo@linaro.org>2015-03-30 16:43:51 +0800
commit14517564795a5cd22e2da3119037f9883383fae9 (patch)
tree3c0d182b371855866cfd09a5110adab26b6479a4 /arch/arm/mach-imx/gpc.c
parente33b67523f556aa7ddb09f1c7fa4de5c080670c9 (diff)
ARM: imx6: Warn when an old DT is detected
Now that the GPC has been converted to be a full blown irqchip (and not a mole on the side of the GIC), booting a new kernel with an old DT is likely to result in a rough ride for the user. This patch makes sure such a situation is promptly detected and the user made aware that a DT update is in order. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Acked-by: Jason Cooper <jason@lakedaemon.net> 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.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/gpc.c b/arch/arm/mach-imx/gpc.c
index 5d32e35fbe47..4d60005e9277 100644
--- a/arch/arm/mach-imx/gpc.c
+++ b/arch/arm/mach-imx/gpc.c
@@ -275,6 +275,16 @@ static int __init imx_gpc_init(struct device_node *node,
*/
OF_DECLARE_2(irqchip, imx_gpc, "fsl,imx6q-gpc", imx_gpc_init);
+void __init imx_gpc_check_dt(void)
+{
+ struct device_node *np;
+
+ np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpc");
+ if (WARN_ON(!np ||
+ !of_find_property(np, "interrupt-controller", NULL)))
+ pr_warn("Outdated DT detected, system is about to crash!!!\n");
+}
+
#ifdef CONFIG_PM_GENERIC_DOMAINS
static void _imx6q_pm_pu_power_off(struct generic_pm_domain *genpd)