diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2013-10-02 04:38:23 -0400 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2013-10-07 20:53:01 -0400 |
commit | 31e4e292f85189f01949124b04aabb3b50ba3e86 (patch) | |
tree | 6c696224deac48d492f31aa21147b3ea40bb54d6 /arch/arm/mach-shmobile/setup-r8a7779.c | |
parent | 2238577b2c91587daf5f87ce414ef5b3703f81af (diff) |
ARM: shmobile: r8a7779: split r8a7779_init_irq_extpin() for DT
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>
Diffstat (limited to 'arch/arm/mach-shmobile/setup-r8a7779.c')
-rw-r--r-- | arch/arm/mach-shmobile/setup-r8a7779.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c index eacb2f783693..13049e9d691c 100644 --- a/arch/arm/mach-shmobile/setup-r8a7779.c +++ b/arch/arm/mach-shmobile/setup-r8a7779.c | |||
@@ -98,7 +98,7 @@ static struct resource irqpin0_resources[] __initdata = { | |||
98 | DEFINE_RES_IRQ(gic_spi(30)), /* IRQ3 */ | 98 | DEFINE_RES_IRQ(gic_spi(30)), /* IRQ3 */ |
99 | }; | 99 | }; |
100 | 100 | ||
101 | void __init r8a7779_init_irq_extpin(int irlm) | 101 | void __init r8a7779_init_irq_extpin_dt(int irlm) |
102 | { | 102 | { |
103 | void __iomem *icr0 = ioremap_nocache(0xfe780000, PAGE_SIZE); | 103 | void __iomem *icr0 = ioremap_nocache(0xfe780000, PAGE_SIZE); |
104 | u32 tmp; | 104 | u32 tmp; |
@@ -116,7 +116,11 @@ void __init r8a7779_init_irq_extpin(int irlm) | |||
116 | tmp |= (1 << 21); /* LVLMODE = 1 */ | 116 | tmp |= (1 << 21); /* LVLMODE = 1 */ |
117 | iowrite32(tmp, icr0); | 117 | iowrite32(tmp, icr0); |
118 | iounmap(icr0); | 118 | iounmap(icr0); |
119 | } | ||
119 | 120 | ||
121 | void __init r8a7779_init_irq_extpin(int irlm) | ||
122 | { | ||
123 | r8a7779_init_irq_extpin_dt(irlm); | ||
120 | if (irlm) | 124 | if (irlm) |
121 | platform_device_register_resndata( | 125 | platform_device_register_resndata( |
122 | &platform_bus, "renesas_intc_irqpin", -1, | 126 | &platform_bus, "renesas_intc_irqpin", -1, |