Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+13 -33
-1
arch/arm/mach-spear3xx/include/mach/generic.h
··· 30 30 void __init spear_setup_of_timer(void); 31 31 void __init spear3xx_clk_init(void); 32 32 void __init spear3xx_map_io(void); 33 - void __init spear3xx_dt_init_irq(void); 34 33 35 34 void spear_restart(char, const char *); 36 35
+2 -1
arch/arm/mach-spear3xx/spear300.c
··· 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> ··· 212 211 213 212 DT_MACHINE_START(SPEAR300_DT, "ST SPEAr300 SoC with Flattened Device Tree") 214 213 .map_io = spear300_map_io, 215 - .init_irq = spear3xx_dt_init_irq, 214 + .init_irq = irqchip_init, 216 215 .timer = &spear3xx_timer, 217 216 .init_machine = spear300_dt_init, 218 217 .restart = spear_restart,
+2 -1
arch/arm/mach-spear3xx/spear310.c
··· 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> ··· 254 253 255 254 DT_MACHINE_START(SPEAR310_DT, "ST SPEAr310 SoC with Flattened Device Tree") 256 255 .map_io = spear310_map_io, 257 - .init_irq = spear3xx_dt_init_irq, 256 + .init_irq = irqchip_init, 258 257 .timer = &spear3xx_timer, 259 258 .init_machine = spear310_dt_init, 260 259 .restart = spear_restart,
+2 -1
arch/arm/mach-spear3xx/spear320.c
··· 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> ··· 268 267 269 268 DT_MACHINE_START(SPEAR320_DT, "ST SPEAr320 SoC with Flattened Device Tree") 270 269 .map_io = spear320_map_io, 271 - .init_irq = spear3xx_dt_init_irq, 270 + .init_irq = irqchip_init, 272 271 .timer = &spear3xx_timer, 273 272 .init_machine = spear320_dt_init, 274 273 .restart = spear_restart,
-16
arch/arm/mach-spear3xx/spear3xx.c
··· 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> ··· 116 119 struct sys_timer spear3xx_timer = { 117 120 .init = spear3xx_timer_init, 118 121 }; 119 - 120 - static const struct of_device_id vic_of_match[] __initconst = { 121 - { .compatible = "arm,pl190-vic", .data = vic_of_init, }, 122 - { .compatible = "st,spear300-shirq", .data = spear300_shirq_of_init, }, 123 - { .compatible = "st,spear310-shirq", .data = spear310_shirq_of_init, }, 124 - { .compatible = "st,spear320-shirq", .data = spear320_shirq_of_init, }, 125 - { /* Sentinel */ } 126 - }; 127 - 128 - void __init spear3xx_dt_init_irq(void) 129 - { 130 - of_irq_init(vic_of_match); 131 - }
+2 -13
arch/arm/mach-spear6xx/spear6xx.c
··· 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> ··· 424 425 NULL 425 426 }; 426 427 427 - static const struct of_device_id vic_of_match[] __initconst = { 428 - { .compatible = "arm,pl190-vic", .data = vic_of_init, }, 429 - { /* Sentinel */ } 430 - }; 431 - 432 - static void __init spear6xx_dt_init_irq(void) 433 - { 434 - of_irq_init(vic_of_match); 435 - } 436 - 437 428 DT_MACHINE_START(SPEAR600_DT, "ST SPEAr600 (Flattened Device Tree)") 438 429 .map_io = spear6xx_map_io, 439 - .init_irq = spear6xx_dt_init_irq, 430 + .init_irq = irqchip_init, 440 431 .timer = &spear6xx_timer, 441 432 .init_machine = spear600_dt_init, 442 433 .restart = spear_restart,
+5
drivers/irqchip/spear-shirq.c
··· 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 */ ··· 302 300 return shirq_init(spear300_shirq_blocks, 303 301 ARRAY_SIZE(spear300_shirq_blocks), np); 304 302 } 303 + IRQCHIP_DECLARE(spear300_shirq, "st,spear300-shirq", spear300_shirq_of_init); 305 304 306 305 int __init spear310_shirq_of_init(struct device_node *np, 307 306 struct device_node *parent) ··· 310 307 return shirq_init(spear310_shirq_blocks, 311 308 ARRAY_SIZE(spear310_shirq_blocks), np); 312 309 } 310 + IRQCHIP_DECLARE(spear310_shirq, "st,spear310-shirq", spear310_shirq_of_init); 313 311 314 312 int __init spear320_shirq_of_init(struct device_node *np, 315 313 struct device_node *parent) ··· 318 314 return shirq_init(spear320_shirq_blocks, 319 315 ARRAY_SIZE(spear320_shirq_blocks), np); 320 316 } 317 + IRQCHIP_DECLARE(spear320_shirq, "st,spear320-shirq", spear320_shirq_of_init);