Commit e9c515589df7731591d15e506ba6d69713faae41
1 parent
44430ec068
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
ARM: spear: use common irqchip_init function
Convert spear DT irq initialization over to use common irqchip_init function. Signed-off-by: Rob Herring <rob.herring@calxeda.com> Cc: Viresh Kumar <viresh.linux@gmail.com> Cc: Shiraz Hashim <shiraz.hashim@st.com> Cc: Rajeev Kumar <rajeev-dlh.kumar@st.com>
Showing 7 changed files with 13 additions and 33 deletions Side-by-side Diff
arch/arm/mach-spear3xx/include/mach/generic.h
arch/arm/mach-spear3xx/spear300.c
... | ... | @@ -14,6 +14,7 @@ |
14 | 14 | #define pr_fmt(fmt) "SPEAr300: " fmt |
15 | 15 | |
16 | 16 | #include <linux/amba/pl08x.h> |
17 | +#include <linux/irqchip.h> | |
17 | 18 | #include <linux/of_platform.h> |
18 | 19 | #include <asm/mach/arch.h> |
19 | 20 | #include <mach/generic.h> |
... | ... | @@ -211,7 +212,7 @@ |
211 | 212 | |
212 | 213 | DT_MACHINE_START(SPEAR300_DT, "ST SPEAr300 SoC with Flattened Device Tree") |
213 | 214 | .map_io = spear300_map_io, |
214 | - .init_irq = spear3xx_dt_init_irq, | |
215 | + .init_irq = irqchip_init, | |
215 | 216 | .timer = &spear3xx_timer, |
216 | 217 | .init_machine = spear300_dt_init, |
217 | 218 | .restart = spear_restart, |
arch/arm/mach-spear3xx/spear310.c
... | ... | @@ -15,6 +15,7 @@ |
15 | 15 | |
16 | 16 | #include <linux/amba/pl08x.h> |
17 | 17 | #include <linux/amba/serial.h> |
18 | +#include <linux/irqchip.h> | |
18 | 19 | #include <linux/of_platform.h> |
19 | 20 | #include <asm/mach/arch.h> |
20 | 21 | #include <mach/generic.h> |
... | ... | @@ -253,7 +254,7 @@ |
253 | 254 | |
254 | 255 | DT_MACHINE_START(SPEAR310_DT, "ST SPEAr310 SoC with Flattened Device Tree") |
255 | 256 | .map_io = spear310_map_io, |
256 | - .init_irq = spear3xx_dt_init_irq, | |
257 | + .init_irq = irqchip_init, | |
257 | 258 | .timer = &spear3xx_timer, |
258 | 259 | .init_machine = spear310_dt_init, |
259 | 260 | .restart = spear_restart, |
arch/arm/mach-spear3xx/spear320.c
... | ... | @@ -16,6 +16,7 @@ |
16 | 16 | #include <linux/amba/pl022.h> |
17 | 17 | #include <linux/amba/pl08x.h> |
18 | 18 | #include <linux/amba/serial.h> |
19 | +#include <linux/irqchip.h> | |
19 | 20 | #include <linux/of_platform.h> |
20 | 21 | #include <asm/mach/arch.h> |
21 | 22 | #include <mach/generic.h> |
... | ... | @@ -267,7 +268,7 @@ |
267 | 268 | |
268 | 269 | DT_MACHINE_START(SPEAR320_DT, "ST SPEAr320 SoC with Flattened Device Tree") |
269 | 270 | .map_io = spear320_map_io, |
270 | - .init_irq = spear3xx_dt_init_irq, | |
271 | + .init_irq = irqchip_init, | |
271 | 272 | .timer = &spear3xx_timer, |
272 | 273 | .init_machine = spear320_dt_init, |
273 | 274 | .restart = spear_restart, |
arch/arm/mach-spear3xx/spear3xx.c
... | ... | @@ -15,11 +15,8 @@ |
15 | 15 | |
16 | 16 | #include <linux/amba/pl022.h> |
17 | 17 | #include <linux/amba/pl08x.h> |
18 | -#include <linux/irqchip/spear-shirq.h> | |
19 | -#include <linux/of_irq.h> | |
20 | 18 | #include <linux/io.h> |
21 | 19 | #include <asm/hardware/pl080.h> |
22 | -#include <asm/hardware/vic.h> | |
23 | 20 | #include <plat/pl080.h> |
24 | 21 | #include <mach/generic.h> |
25 | 22 | #include <mach/spear.h> |
... | ... | @@ -119,17 +116,4 @@ |
119 | 116 | struct sys_timer spear3xx_timer = { |
120 | 117 | .init = spear3xx_timer_init, |
121 | 118 | }; |
122 | - | |
123 | -static const struct of_device_id vic_of_match[] __initconst = { | |
124 | - { .compatible = "arm,pl190-vic", .data = vic_of_init, }, | |
125 | - { .compatible = "st,spear300-shirq", .data = spear300_shirq_of_init, }, | |
126 | - { .compatible = "st,spear310-shirq", .data = spear310_shirq_of_init, }, | |
127 | - { .compatible = "st,spear320-shirq", .data = spear320_shirq_of_init, }, | |
128 | - { /* Sentinel */ } | |
129 | -}; | |
130 | - | |
131 | -void __init spear3xx_dt_init_irq(void) | |
132 | -{ | |
133 | - of_irq_init(vic_of_match); | |
134 | -} |
arch/arm/mach-spear6xx/spear6xx.c
... | ... | @@ -16,12 +16,11 @@ |
16 | 16 | #include <linux/amba/pl08x.h> |
17 | 17 | #include <linux/clk.h> |
18 | 18 | #include <linux/err.h> |
19 | +#include <linux/irqchip.h> | |
19 | 20 | #include <linux/of.h> |
20 | 21 | #include <linux/of_address.h> |
21 | -#include <linux/of_irq.h> | |
22 | 22 | #include <linux/of_platform.h> |
23 | 23 | #include <asm/hardware/pl080.h> |
24 | -#include <asm/hardware/vic.h> | |
25 | 24 | #include <asm/mach/arch.h> |
26 | 25 | #include <asm/mach/time.h> |
27 | 26 | #include <asm/mach/map.h> |
28 | 27 | |
... | ... | @@ -425,19 +424,9 @@ |
425 | 424 | NULL |
426 | 425 | }; |
427 | 426 | |
428 | -static const struct of_device_id vic_of_match[] __initconst = { | |
429 | - { .compatible = "arm,pl190-vic", .data = vic_of_init, }, | |
430 | - { /* Sentinel */ } | |
431 | -}; | |
432 | - | |
433 | -static void __init spear6xx_dt_init_irq(void) | |
434 | -{ | |
435 | - of_irq_init(vic_of_match); | |
436 | -} | |
437 | - | |
438 | 427 | DT_MACHINE_START(SPEAR600_DT, "ST SPEAr600 (Flattened Device Tree)") |
439 | 428 | .map_io = spear6xx_map_io, |
440 | - .init_irq = spear6xx_dt_init_irq, | |
429 | + .init_irq = irqchip_init, | |
441 | 430 | .timer = &spear6xx_timer, |
442 | 431 | .init_machine = spear600_dt_init, |
443 | 432 | .restart = spear_restart, |
drivers/irqchip/spear-shirq.c
... | ... | @@ -25,6 +25,8 @@ |
25 | 25 | #include <linux/of_irq.h> |
26 | 26 | #include <linux/spinlock.h> |
27 | 27 | |
28 | +#include "irqchip.h" | |
29 | + | |
28 | 30 | static DEFINE_SPINLOCK(lock); |
29 | 31 | |
30 | 32 | /* spear300 shared irq registers offsets and masks */ |
... | ... | @@ -300,6 +302,7 @@ |
300 | 302 | return shirq_init(spear300_shirq_blocks, |
301 | 303 | ARRAY_SIZE(spear300_shirq_blocks), np); |
302 | 304 | } |
305 | +IRQCHIP_DECLARE(spear300_shirq, "st,spear300-shirq", spear300_shirq_of_init); | |
303 | 306 | |
304 | 307 | int __init spear310_shirq_of_init(struct device_node *np, |
305 | 308 | struct device_node *parent) |
... | ... | @@ -307,6 +310,7 @@ |
307 | 310 | return shirq_init(spear310_shirq_blocks, |
308 | 311 | ARRAY_SIZE(spear310_shirq_blocks), np); |
309 | 312 | } |
313 | +IRQCHIP_DECLARE(spear310_shirq, "st,spear310-shirq", spear310_shirq_of_init); | |
310 | 314 | |
311 | 315 | int __init spear320_shirq_of_init(struct device_node *np, |
312 | 316 | struct device_node *parent) |
... | ... | @@ -314,4 +318,5 @@ |
314 | 318 | return shirq_init(spear320_shirq_blocks, |
315 | 319 | ARRAY_SIZE(spear320_shirq_blocks), np); |
316 | 320 | } |
321 | +IRQCHIP_DECLARE(spear320_shirq, "st,spear320-shirq", spear320_shirq_of_init); |