]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: shmobile: r8a7740: Add OF support to initialze the GIC
authorBastian Hecht <hechtb@gmail.com>
Wed, 17 Apr 2013 10:34:04 +0000 (12:34 +0200)
committerSimon Horman <horms+renesas@verge.net.au>
Wed, 22 May 2013 12:44:25 +0000 (21:44 +0900)
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>
arch/arm/mach-shmobile/include/mach/r8a7740.h
arch/arm/mach-shmobile/intc-r8a7740.c

index abdc4d4efa28938bdb3b37ab494787e4ba22e540..19c0423108f5f774693fdac2810578c50fcaae42 100644 (file)
@@ -534,6 +534,7 @@ enum {
 
 extern void r8a7740_meram_workaround(void);
 extern void r8a7740_init_irq(void);
+extern void r8a7740_init_irq_of(void);
 extern void r8a7740_map_io(void);
 extern void r8a7740_add_early_devices(void);
 extern void r8a7740_add_standard_devices(void);
index b741c8409a5a5e0f9eb219ee8dba3d0ad3147dc4..8871f7717dc8ff7d05b631b2c2b5d027dd5eff4b 100644 (file)
 
 #include <linux/init.h>
 #include <linux/io.h>
+#include <linux/irqchip.h>
 #include <linux/irqchip/arm-gic.h>
 
-void __init r8a7740_init_irq(void)
+static void __init r8a7740_init_irq_common(void)
 {
-       void __iomem *gic_dist_base = ioremap_nocache(0xc2800000, 0x1000);
-       void __iomem *gic_cpu_base = ioremap_nocache(0xc2000000, 0x1000);
        void __iomem *intc_prio_base = ioremap_nocache(0xe6900010, 0x10);
        void __iomem *intc_msk_base = ioremap_nocache(0xe6900040, 0x10);
        void __iomem *pfc_inta_ctrl = ioremap_nocache(0xe605807c, 0x4);
 
-       /* initialize the Generic Interrupt Controller PL390 r0p0 */
-       gic_init(0, 29, gic_dist_base, gic_cpu_base);
-
        /* route signals to GIC */
        iowrite32(0x0, pfc_inta_ctrl);
 
@@ -54,3 +50,19 @@ void __init r8a7740_init_irq(void)
        iounmap(intc_msk_base);
        iounmap(pfc_inta_ctrl);
 }
+
+void __init r8a7740_init_irq_of(void)
+{
+       irqchip_init();
+       r8a7740_init_irq_common();
+}
+
+void __init r8a7740_init_irq(void)
+{
+       void __iomem *gic_dist_base = ioremap_nocache(0xc2800000, 0x1000);
+       void __iomem *gic_cpu_base = ioremap_nocache(0xc2000000, 0x1000);
+
+       /* initialize the Generic Interrupt Controller PL390 r0p0 */
+       gic_init(0, 29, gic_dist_base, gic_cpu_base);
+       r8a7740_init_irq_common();
+}