diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2013-08-02 02:39:34 -0400 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2013-08-05 22:18:40 -0400 |
commit | 693ac41df314289d655123e6ded519244fa1d951 (patch) | |
tree | 14f0539c2df236126d04329e060a40afb00341b0 | |
parent | 15645581a9401cf2370d2c975e2673d289d5e561 (diff) |
ARM: shmobile: marzen: Use DT for GIC
Current Marzen is using DT booting,
and r8a7779.dtsi already has GIC settings.
So, we can remove the C version of the GIC setup code,
instead rely on GIC information provided by DT.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-rw-r--r-- | arch/arm/mach-shmobile/board-marzen.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/r8a7779.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/intc-r8a7779.c | 22 |
3 files changed, 5 insertions, 21 deletions
diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c index bcd07c065224..f3027295f60c 100644 --- a/arch/arm/mach-shmobile/board-marzen.c +++ b/arch/arm/mach-shmobile/board-marzen.c | |||
@@ -247,8 +247,7 @@ DT_MACHINE_START(MARZEN, "marzen") | |||
247 | .smp = smp_ops(r8a7779_smp_ops), | 247 | .smp = smp_ops(r8a7779_smp_ops), |
248 | .map_io = r8a7779_map_io, | 248 | .map_io = r8a7779_map_io, |
249 | .init_early = r8a7779_add_early_devices, | 249 | .init_early = r8a7779_add_early_devices, |
250 | .nr_irqs = NR_IRQS_LEGACY, | 250 | .init_irq = r8a7779_init_irq_dt, |
251 | .init_irq = r8a7779_init_irq, | ||
252 | .init_machine = marzen_init, | 251 | .init_machine = marzen_init, |
253 | .init_late = r8a7779_init_late, | 252 | .init_late = r8a7779_init_late, |
254 | .dt_compat = marzen_boards_compat_dt, | 253 | .dt_compat = marzen_boards_compat_dt, |
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7779.h b/arch/arm/mach-shmobile/include/mach/r8a7779.h index fc47073c7ba9..c62252f77c85 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7779.h +++ b/arch/arm/mach-shmobile/include/mach/r8a7779.h | |||
@@ -25,7 +25,6 @@ static inline struct r8a7779_pm_ch *to_r8a7779_ch(struct generic_pm_domain *d) | |||
25 | } | 25 | } |
26 | 26 | ||
27 | extern void r8a7779_init_delay(void); | 27 | extern void r8a7779_init_delay(void); |
28 | extern void r8a7779_init_irq(void); | ||
29 | extern void r8a7779_init_irq_extpin(int irlm); | 28 | extern void r8a7779_init_irq_extpin(int irlm); |
30 | extern void r8a7779_init_irq_dt(void); | 29 | extern void r8a7779_init_irq_dt(void); |
31 | extern void r8a7779_map_io(void); | 30 | extern void r8a7779_map_io(void); |
diff --git a/arch/arm/mach-shmobile/intc-r8a7779.c b/arch/arm/mach-shmobile/intc-r8a7779.c index b86dc8908724..8a082f032414 100644 --- a/arch/arm/mach-shmobile/intc-r8a7779.c +++ b/arch/arm/mach-shmobile/intc-r8a7779.c | |||
@@ -90,15 +90,18 @@ void __init r8a7779_init_irq_extpin(int irlm) | |||
90 | pr_warn("r8a7779: unable to setup external irq pin mode\n"); | 90 | pr_warn("r8a7779: unable to setup external irq pin mode\n"); |
91 | } | 91 | } |
92 | 92 | ||
93 | #ifdef CONFIG_OF | ||
93 | static int r8a7779_set_wake(struct irq_data *data, unsigned int on) | 94 | static int r8a7779_set_wake(struct irq_data *data, unsigned int on) |
94 | { | 95 | { |
95 | return 0; /* always allow wakeup */ | 96 | return 0; /* always allow wakeup */ |
96 | } | 97 | } |
97 | 98 | ||
98 | static void __init r8a7779_init_irq_common(void) | 99 | void __init r8a7779_init_irq_dt(void) |
99 | { | 100 | { |
100 | gic_arch_extn.irq_set_wake = r8a7779_set_wake; | 101 | gic_arch_extn.irq_set_wake = r8a7779_set_wake; |
101 | 102 | ||
103 | irqchip_init(); | ||
104 | |||
102 | /* route all interrupts to ARM */ | 105 | /* route all interrupts to ARM */ |
103 | __raw_writel(0xffffffff, INT2NTSR0); | 106 | __raw_writel(0xffffffff, INT2NTSR0); |
104 | __raw_writel(0x3fffffff, INT2NTSR1); | 107 | __raw_writel(0x3fffffff, INT2NTSR1); |
@@ -109,23 +112,6 @@ static void __init r8a7779_init_irq_common(void) | |||
109 | __raw_writel(0xfffbffdf, INT2SMSKCR2); | 112 | __raw_writel(0xfffbffdf, INT2SMSKCR2); |
110 | __raw_writel(0xbffffffc, INT2SMSKCR3); | 113 | __raw_writel(0xbffffffc, INT2SMSKCR3); |
111 | __raw_writel(0x003fee3f, INT2SMSKCR4); | 114 | __raw_writel(0x003fee3f, INT2SMSKCR4); |
112 | } | ||
113 | |||
114 | void __init r8a7779_init_irq(void) | ||
115 | { | ||
116 | void __iomem *gic_dist_base = IOMEM(0xf0001000); | ||
117 | void __iomem *gic_cpu_base = IOMEM(0xf0000100); | ||
118 | 115 | ||
119 | /* use GIC to handle interrupts */ | ||
120 | gic_init(0, 29, gic_dist_base, gic_cpu_base); | ||
121 | |||
122 | r8a7779_init_irq_common(); | ||
123 | } | ||
124 | |||
125 | #ifdef CONFIG_OF | ||
126 | void __init r8a7779_init_irq_dt(void) | ||
127 | { | ||
128 | irqchip_init(); | ||
129 | r8a7779_init_irq_common(); | ||
130 | } | 116 | } |
131 | #endif | 117 | #endif |