diff options
author | Bastian Hecht <hechtb@gmail.com> | 2013-04-17 06:34:04 -0400 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2013-06-04 03:49:19 -0400 |
commit | f9b4df4a4d7d1124c450f0713a7a1939c7f1a205 (patch) | |
tree | 2a33e52929b4ab809082786970d49f2e38fb5ab6 /arch | |
parent | c7788792a5e7b0d5d7f96d0766b4cb6112d47d75 (diff) |
ARM: shmobile: r8a7740: Add OF support to initialze the GIC
We add a variant to initalize the interrupt controller in case we describe
the GIC using the Device Tree and not platform data.
Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/r8a7740.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/intc-r8a7740.c | 24 |
2 files changed, 19 insertions, 6 deletions
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7740.h b/arch/arm/mach-shmobile/include/mach/r8a7740.h index abdc4d4efa28..19c0423108f5 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7740.h +++ b/arch/arm/mach-shmobile/include/mach/r8a7740.h | |||
@@ -534,6 +534,7 @@ enum { | |||
534 | 534 | ||
535 | extern void r8a7740_meram_workaround(void); | 535 | extern void r8a7740_meram_workaround(void); |
536 | extern void r8a7740_init_irq(void); | 536 | extern void r8a7740_init_irq(void); |
537 | extern void r8a7740_init_irq_of(void); | ||
537 | extern void r8a7740_map_io(void); | 538 | extern void r8a7740_map_io(void); |
538 | extern void r8a7740_add_early_devices(void); | 539 | extern void r8a7740_add_early_devices(void); |
539 | extern void r8a7740_add_standard_devices(void); | 540 | extern void r8a7740_add_standard_devices(void); |
diff --git a/arch/arm/mach-shmobile/intc-r8a7740.c b/arch/arm/mach-shmobile/intc-r8a7740.c index b741c8409a5a..8871f7717dc8 100644 --- a/arch/arm/mach-shmobile/intc-r8a7740.c +++ b/arch/arm/mach-shmobile/intc-r8a7740.c | |||
@@ -20,19 +20,15 @@ | |||
20 | 20 | ||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/irqchip.h> | ||
23 | #include <linux/irqchip/arm-gic.h> | 24 | #include <linux/irqchip/arm-gic.h> |
24 | 25 | ||
25 | void __init r8a7740_init_irq(void) | 26 | static void __init r8a7740_init_irq_common(void) |
26 | { | 27 | { |
27 | void __iomem *gic_dist_base = ioremap_nocache(0xc2800000, 0x1000); | ||
28 | void __iomem *gic_cpu_base = ioremap_nocache(0xc2000000, 0x1000); | ||
29 | void __iomem *intc_prio_base = ioremap_nocache(0xe6900010, 0x10); | 28 | void __iomem *intc_prio_base = ioremap_nocache(0xe6900010, 0x10); |
30 | void __iomem *intc_msk_base = ioremap_nocache(0xe6900040, 0x10); | 29 | void __iomem *intc_msk_base = ioremap_nocache(0xe6900040, 0x10); |
31 | void __iomem *pfc_inta_ctrl = ioremap_nocache(0xe605807c, 0x4); | 30 | void __iomem *pfc_inta_ctrl = ioremap_nocache(0xe605807c, 0x4); |
32 | 31 | ||
33 | /* initialize the Generic Interrupt Controller PL390 r0p0 */ | ||
34 | gic_init(0, 29, gic_dist_base, gic_cpu_base); | ||
35 | |||
36 | /* route signals to GIC */ | 32 | /* route signals to GIC */ |
37 | iowrite32(0x0, pfc_inta_ctrl); | 33 | iowrite32(0x0, pfc_inta_ctrl); |
38 | 34 | ||
@@ -54,3 +50,19 @@ void __init r8a7740_init_irq(void) | |||
54 | iounmap(intc_msk_base); | 50 | iounmap(intc_msk_base); |
55 | iounmap(pfc_inta_ctrl); | 51 | iounmap(pfc_inta_ctrl); |
56 | } | 52 | } |
53 | |||
54 | void __init r8a7740_init_irq_of(void) | ||
55 | { | ||
56 | irqchip_init(); | ||
57 | r8a7740_init_irq_common(); | ||
58 | } | ||
59 | |||
60 | void __init r8a7740_init_irq(void) | ||
61 | { | ||
62 | void __iomem *gic_dist_base = ioremap_nocache(0xc2800000, 0x1000); | ||
63 | void __iomem *gic_cpu_base = ioremap_nocache(0xc2000000, 0x1000); | ||
64 | |||
65 | /* initialize the Generic Interrupt Controller PL390 r0p0 */ | ||
66 | gic_init(0, 29, gic_dist_base, gic_cpu_base); | ||
67 | r8a7740_init_irq_common(); | ||
68 | } | ||