diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2015-03-13 12:05:37 -0400 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2015-03-30 04:43:51 -0400 |
commit | 14517564795a5cd22e2da3119037f9883383fae9 (patch) | |
tree | 3c0d182b371855866cfd09a5110adab26b6479a4 | |
parent | e33b67523f556aa7ddb09f1c7fa4de5c080670c9 (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>
-rw-r--r-- | arch/arm/mach-imx/common.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-imx/gpc.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-imx6q.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-imx6sl.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-imx6sx.c | 1 |
5 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h index 2fbdc283bc99..0f04e30b726d 100644 --- a/arch/arm/mach-imx/common.h +++ b/arch/arm/mach-imx/common.h | |||
@@ -66,6 +66,7 @@ unsigned int imx_get_soc_revision(void); | |||
66 | void imx_init_revision_from_anatop(void); | 66 | void imx_init_revision_from_anatop(void); |
67 | struct device *imx_soc_device_init(void); | 67 | struct device *imx_soc_device_init(void); |
68 | void imx6_enable_rbc(bool enable); | 68 | void imx6_enable_rbc(bool enable); |
69 | void imx_gpc_check_dt(void); | ||
69 | void imx_gpc_set_arm_power_in_lpm(bool power_off); | 70 | void imx_gpc_set_arm_power_in_lpm(bool power_off); |
70 | void imx_gpc_set_arm_power_up_timing(u32 sw2iso, u32 sw); | 71 | void imx_gpc_set_arm_power_up_timing(u32 sw2iso, u32 sw); |
71 | void imx_gpc_set_arm_power_down_timing(u32 sw2iso, u32 sw); | 72 | void imx_gpc_set_arm_power_down_timing(u32 sw2iso, u32 sw); |
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, | |||
275 | */ | 275 | */ |
276 | OF_DECLARE_2(irqchip, imx_gpc, "fsl,imx6q-gpc", imx_gpc_init); | 276 | OF_DECLARE_2(irqchip, imx_gpc, "fsl,imx6q-gpc", imx_gpc_init); |
277 | 277 | ||
278 | void __init imx_gpc_check_dt(void) | ||
279 | { | ||
280 | struct device_node *np; | ||
281 | |||
282 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpc"); | ||
283 | if (WARN_ON(!np || | ||
284 | !of_find_property(np, "interrupt-controller", NULL))) | ||
285 | pr_warn("Outdated DT detected, system is about to crash!!!\n"); | ||
286 | } | ||
287 | |||
278 | #ifdef CONFIG_PM_GENERIC_DOMAINS | 288 | #ifdef CONFIG_PM_GENERIC_DOMAINS |
279 | 289 | ||
280 | static void _imx6q_pm_pu_power_off(struct generic_pm_domain *genpd) | 290 | static void _imx6q_pm_pu_power_off(struct generic_pm_domain *genpd) |
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 6fc2b7e89c6b..e21a693fc984 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c | |||
@@ -387,6 +387,7 @@ static void __init imx6q_map_io(void) | |||
387 | 387 | ||
388 | static void __init imx6q_init_irq(void) | 388 | static void __init imx6q_init_irq(void) |
389 | { | 389 | { |
390 | imx_gpc_check_dt(); | ||
390 | imx_init_revision_from_anatop(); | 391 | imx_init_revision_from_anatop(); |
391 | imx_init_l2cache(); | 392 | imx_init_l2cache(); |
392 | imx_src_init(); | 393 | imx_src_init(); |
diff --git a/arch/arm/mach-imx/mach-imx6sl.c b/arch/arm/mach-imx/mach-imx6sl.c index d39c274910c5..12a1b098fc6a 100644 --- a/arch/arm/mach-imx/mach-imx6sl.c +++ b/arch/arm/mach-imx/mach-imx6sl.c | |||
@@ -61,6 +61,7 @@ static void __init imx6sl_init_machine(void) | |||
61 | 61 | ||
62 | static void __init imx6sl_init_irq(void) | 62 | static void __init imx6sl_init_irq(void) |
63 | { | 63 | { |
64 | imx_gpc_check_dt(); | ||
64 | imx_init_revision_from_anatop(); | 65 | imx_init_revision_from_anatop(); |
65 | imx_init_l2cache(); | 66 | imx_init_l2cache(); |
66 | imx_src_init(); | 67 | imx_src_init(); |
diff --git a/arch/arm/mach-imx/mach-imx6sx.c b/arch/arm/mach-imx/mach-imx6sx.c index 8595f9ea30a0..f17b7004c24b 100644 --- a/arch/arm/mach-imx/mach-imx6sx.c +++ b/arch/arm/mach-imx/mach-imx6sx.c | |||
@@ -81,6 +81,7 @@ static void __init imx6sx_init_machine(void) | |||
81 | 81 | ||
82 | static void __init imx6sx_init_irq(void) | 82 | static void __init imx6sx_init_irq(void) |
83 | { | 83 | { |
84 | imx_gpc_check_dt(); | ||
84 | imx_init_revision_from_anatop(); | 85 | imx_init_revision_from_anatop(); |
85 | imx_init_l2cache(); | 86 | imx_init_l2cache(); |
86 | imx_src_init(); | 87 | imx_src_init(); |