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:29:16 -0400 |
commit | 90e27a05f64b8b4b6021cd996bef957656a8c8ab (patch) | |
tree | 0cdf54445edd36663d5fd22f280b97e7df745924 | |
parent | f564244fb14e0b8b3d8268efbac2e9506644c19f (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>
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/r8a7779.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/setup-r8a7779.c | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7779.h b/arch/arm/mach-shmobile/include/mach/r8a7779.h index 31e87b92a9c3..17af34ed89c8 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7779.h +++ b/arch/arm/mach-shmobile/include/mach/r8a7779.h | |||
@@ -33,6 +33,7 @@ static inline struct r8a7779_pm_ch *to_r8a7779_ch(struct generic_pm_domain *d) | |||
33 | 33 | ||
34 | extern void r8a7779_init_delay(void); | 34 | extern void r8a7779_init_delay(void); |
35 | extern void r8a7779_init_irq_extpin(int irlm); | 35 | extern void r8a7779_init_irq_extpin(int irlm); |
36 | extern void r8a7779_init_irq_extpin_dt(int irlm); | ||
36 | extern void r8a7779_init_irq_dt(void); | 37 | extern void r8a7779_init_irq_dt(void); |
37 | extern void r8a7779_map_io(void); | 38 | extern void r8a7779_map_io(void); |
38 | extern void r8a7779_earlytimer_init(void); | 39 | extern void r8a7779_earlytimer_init(void); |
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, |