diff options
Diffstat (limited to 'arch/arm/mach-ux500/cpu.c')
-rw-r--r-- | arch/arm/mach-ux500/cpu.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c index 6242e88e5fd3..d11f3892a27d 100644 --- a/arch/arm/mach-ux500/cpu.c +++ b/arch/arm/mach-ux500/cpu.c | |||
@@ -16,6 +16,8 @@ | |||
16 | #include <linux/err.h> | 16 | #include <linux/err.h> |
17 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
18 | #include <linux/stat.h> | 18 | #include <linux/stat.h> |
19 | #include <linux/of.h> | ||
20 | #include <linux/of_irq.h> | ||
19 | 21 | ||
20 | #include <asm/hardware/gic.h> | 22 | #include <asm/hardware/gic.h> |
21 | #include <asm/mach/map.h> | 23 | #include <asm/mach/map.h> |
@@ -28,6 +30,11 @@ | |||
28 | 30 | ||
29 | void __iomem *_PRCMU_BASE; | 31 | void __iomem *_PRCMU_BASE; |
30 | 32 | ||
33 | static const struct of_device_id ux500_dt_irq_match[] = { | ||
34 | { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, }, | ||
35 | {}, | ||
36 | }; | ||
37 | |||
31 | void __init ux500_init_irq(void) | 38 | void __init ux500_init_irq(void) |
32 | { | 39 | { |
33 | void __iomem *dist_base; | 40 | void __iomem *dist_base; |
@@ -42,7 +49,12 @@ void __init ux500_init_irq(void) | |||
42 | } else | 49 | } else |
43 | ux500_unknown_soc(); | 50 | ux500_unknown_soc(); |
44 | 51 | ||
45 | gic_init(0, 29, dist_base, cpu_base); | 52 | #ifdef CONFIG_OF |
53 | if (of_have_populated_dt()) | ||
54 | of_irq_init(ux500_dt_irq_match); | ||
55 | else | ||
56 | #endif | ||
57 | gic_init(0, 29, dist_base, cpu_base); | ||
46 | 58 | ||
47 | /* | 59 | /* |
48 | * Init clocks here so that they are available for system timer | 60 | * Init clocks here so that they are available for system timer |