From 14517564795a5cd22e2da3119037f9883383fae9 Mon Sep 17 00:00:00 2001 From: Marc Zyngier Date: Fri, 13 Mar 2015 16:05:37 +0000 Subject: 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 Acked-by: Jason Cooper Signed-off-by: Shawn Guo --- arch/arm/mach-imx/gpc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'arch/arm/mach-imx/gpc.c') 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) -- cgit v1.2.3