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>
This commit is contained in:
parent
e33b67523f
commit
1451756479
5 changed files with 14 additions and 0 deletions
|
@ -66,6 +66,7 @@ unsigned int imx_get_soc_revision(void);
|
|||
void imx_init_revision_from_anatop(void);
|
||||
struct device *imx_soc_device_init(void);
|
||||
void imx6_enable_rbc(bool enable);
|
||||
void imx_gpc_check_dt(void);
|
||||
void imx_gpc_set_arm_power_in_lpm(bool power_off);
|
||||
void imx_gpc_set_arm_power_up_timing(u32 sw2iso, u32 sw);
|
||||
void imx_gpc_set_arm_power_down_timing(u32 sw2iso, u32 sw);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -387,6 +387,7 @@ static void __init imx6q_map_io(void)
|
|||
|
||||
static void __init imx6q_init_irq(void)
|
||||
{
|
||||
imx_gpc_check_dt();
|
||||
imx_init_revision_from_anatop();
|
||||
imx_init_l2cache();
|
||||
imx_src_init();
|
||||
|
|
|
@ -61,6 +61,7 @@ static void __init imx6sl_init_machine(void)
|
|||
|
||||
static void __init imx6sl_init_irq(void)
|
||||
{
|
||||
imx_gpc_check_dt();
|
||||
imx_init_revision_from_anatop();
|
||||
imx_init_l2cache();
|
||||
imx_src_init();
|
||||
|
|
|
@ -81,6 +81,7 @@ static void __init imx6sx_init_machine(void)
|
|||
|
||||
static void __init imx6sx_init_irq(void)
|
||||
{
|
||||
imx_gpc_check_dt();
|
||||
imx_init_revision_from_anatop();
|
||||
imx_init_l2cache();
|
||||
imx_src_init();
|
||||
|
|
Loading…
Reference in a new issue