]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ARM: shmobile: r8a7779: split r8a7779_init_irq_extpin() for DT
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Wed, 2 Oct 2013 08:38:23 +0000 (01:38 -0700)
committerSimon Horman <horms+renesas@verge.net.au>
Tue, 8 Oct 2013 00:53:01 +0000 (09:53 +0900)
r8a7779 INTC needs IRL pin mode settings to determine
behavior of IRQ0 - IRQ3, and r8a7779_init_irq_extpin()
is controlling it via irlm parameter.
But this function registers renesas_intc_irqpin driver
if irlm was set, and this value depends on platform.
This is not good for DT.
This patch splits r8a7779_init_irq_extpin() function
into "mode settings" and "funtion register" parts

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
arch/arm/mach-shmobile/include/mach/r8a7779.h
arch/arm/mach-shmobile/setup-r8a7779.c

index 31e87b92a9c310d148562799d4c8fa4e109c15e7..17af34ed89c801553b248f12f0d3c39336553854 100644 (file)
@@ -33,6 +33,7 @@ static inline struct r8a7779_pm_ch *to_r8a7779_ch(struct generic_pm_domain *d)
 
 extern void r8a7779_init_delay(void);
 extern void r8a7779_init_irq_extpin(int irlm);
+extern void r8a7779_init_irq_extpin_dt(int irlm);
 extern void r8a7779_init_irq_dt(void);
 extern void r8a7779_map_io(void);
 extern void r8a7779_earlytimer_init(void);
index eacb2f783693e079e74caffbbb3fc091810b2a5b..13049e9d691ca17d7be5d5d3dc9b8b565b42a3e3 100644 (file)
@@ -98,7 +98,7 @@ static struct resource irqpin0_resources[] __initdata = {
        DEFINE_RES_IRQ(gic_spi(30)), /* IRQ3 */
 };
 
-void __init r8a7779_init_irq_extpin(int irlm)
+void __init r8a7779_init_irq_extpin_dt(int irlm)
 {
        void __iomem *icr0 = ioremap_nocache(0xfe780000, PAGE_SIZE);
        u32 tmp;
@@ -116,7 +116,11 @@ void __init r8a7779_init_irq_extpin(int irlm)
        tmp |= (1 << 21); /* LVLMODE = 1 */
        iowrite32(tmp, icr0);
        iounmap(icr0);
+}
 
+void __init r8a7779_init_irq_extpin(int irlm)
+{
+       r8a7779_init_irq_extpin_dt(irlm);
        if (irlm)
                platform_device_register_resndata(
                        &platform_bus, "renesas_intc_irqpin", -1,