diff options
author | Tony Prisk <linux@prisktech.co.nz> | 2013-03-23 21:12:25 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2013-04-13 01:43:24 -0400 |
commit | 06ff14c05426ec7b7600521c4e1ae19732797e15 (patch) | |
tree | b2c209e9024f49e62ee6d2b9d43ccacaa52a04b5 | |
parent | 26b2da5ae5041e4a6d11a3d9cb1d1097c447d90d (diff) |
irqchip: vt8500: Convert arch-vt8500 to new irqchip infrastructure
This patch moves the arch-vt8500 irq code to drivers/irqchip and converts
it to use the new IRQCHIP_DECLARE and irqchip_init. This allows the removal
of some more functions from common.h
Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
Signed-off-by: Olof Johansson <olof@lixom.net>
-rw-r--r-- | arch/arm/mach-vt8500/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-vt8500/common.h | 6 | ||||
-rw-r--r-- | arch/arm/mach-vt8500/vt8500.c | 14 | ||||
-rw-r--r-- | drivers/irqchip/Makefile | 1 | ||||
-rw-r--r-- | drivers/irqchip/irq-vt8500.c (renamed from arch/arm/mach-vt8500/irq.c) | 6 |
5 files changed, 10 insertions, 19 deletions
diff --git a/arch/arm/mach-vt8500/Makefile b/arch/arm/mach-vt8500/Makefile index 92ceb2436b60..4c8a84637594 100644 --- a/arch/arm/mach-vt8500/Makefile +++ b/arch/arm/mach-vt8500/Makefile | |||
@@ -1 +1 @@ | |||
obj-$(CONFIG_ARCH_VT8500) += irq.o vt8500.o | obj-$(CONFIG_ARCH_VT8500) += vt8500.o | ||
diff --git a/arch/arm/mach-vt8500/common.h b/arch/arm/mach-vt8500/common.h index 77611a6968d6..087787af62f1 100644 --- a/arch/arm/mach-vt8500/common.h +++ b/arch/arm/mach-vt8500/common.h | |||
@@ -18,13 +18,7 @@ | |||
18 | 18 | ||
19 | #include <linux/of.h> | 19 | #include <linux/of.h> |
20 | 20 | ||
21 | int __init vt8500_irq_init(struct device_node *node, | ||
22 | struct device_node *parent); | ||
23 | |||
24 | /* defined in drivers/clk/clk-vt8500.c */ | 21 | /* defined in drivers/clk/clk-vt8500.c */ |
25 | void __init vtwm_clk_init(void __iomem *pmc_base); | 22 | void __init vtwm_clk_init(void __iomem *pmc_base); |
26 | 23 | ||
27 | /* defined in irq.c */ | ||
28 | asmlinkage void vt8500_handle_irq(struct pt_regs *regs); | ||
29 | |||
30 | #endif | 24 | #endif |
diff --git a/arch/arm/mach-vt8500/vt8500.c b/arch/arm/mach-vt8500/vt8500.c index 49e80053d828..1dd281efc020 100644 --- a/arch/arm/mach-vt8500/vt8500.c +++ b/arch/arm/mach-vt8500/vt8500.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include <linux/clocksource.h> | 21 | #include <linux/clocksource.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/irqchip.h> | ||
23 | #include <linux/pm.h> | 24 | #include <linux/pm.h> |
24 | 25 | ||
25 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
@@ -166,16 +167,6 @@ void __init vt8500_init(void) | |||
166 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 167 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
167 | } | 168 | } |
168 | 169 | ||
169 | static const struct of_device_id vt8500_irq_match[] __initconst = { | ||
170 | { .compatible = "via,vt8500-intc", .data = vt8500_irq_init, }, | ||
171 | { /* sentinel */ }, | ||
172 | }; | ||
173 | |||
174 | static void __init vt8500_init_irq(void) | ||
175 | { | ||
176 | of_irq_init(vt8500_irq_match); | ||
177 | }; | ||
178 | |||
179 | static const char * const vt8500_dt_compat[] = { | 170 | static const char * const vt8500_dt_compat[] = { |
180 | "via,vt8500", | 171 | "via,vt8500", |
181 | "wm,wm8650", | 172 | "wm,wm8650", |
@@ -187,10 +178,9 @@ static const char * const vt8500_dt_compat[] = { | |||
187 | DT_MACHINE_START(WMT_DT, "VIA/Wondermedia SoC (Device Tree Support)") | 178 | DT_MACHINE_START(WMT_DT, "VIA/Wondermedia SoC (Device Tree Support)") |
188 | .dt_compat = vt8500_dt_compat, | 179 | .dt_compat = vt8500_dt_compat, |
189 | .map_io = vt8500_map_io, | 180 | .map_io = vt8500_map_io, |
190 | .init_irq = vt8500_init_irq, | 181 | .init_irq = irqchip_init, |
191 | .init_machine = vt8500_init, | 182 | .init_machine = vt8500_init, |
192 | .init_time = clocksource_of_init, | 183 | .init_time = clocksource_of_init, |
193 | .restart = vt8500_restart, | 184 | .restart = vt8500_restart, |
194 | .handle_irq = vt8500_handle_irq, | ||
195 | MACHINE_END | 185 | MACHINE_END |
196 | 186 | ||
diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile index acf98953272a..48fbdf978494 100644 --- a/drivers/irqchip/Makefile +++ b/drivers/irqchip/Makefile | |||
@@ -12,3 +12,4 @@ obj-$(CONFIG_ARM_VIC) += irq-vic.o | |||
12 | obj-$(CONFIG_RENESAS_INTC_IRQPIN) += irq-renesas-intc-irqpin.o | 12 | obj-$(CONFIG_RENESAS_INTC_IRQPIN) += irq-renesas-intc-irqpin.o |
13 | obj-$(CONFIG_RENESAS_IRQC) += irq-renesas-irqc.o | 13 | obj-$(CONFIG_RENESAS_IRQC) += irq-renesas-irqc.o |
14 | obj-$(CONFIG_VERSATILE_FPGA_IRQ) += irq-versatile-fpga.o | 14 | obj-$(CONFIG_VERSATILE_FPGA_IRQ) += irq-versatile-fpga.o |
15 | obj-$(CONFIG_ARCH_VT8500) += irq-vt8500.o | ||
diff --git a/arch/arm/mach-vt8500/irq.c b/drivers/irqchip/irq-vt8500.c index b9cf5ce9efbb..d97059550a2c 100644 --- a/arch/arm/mach-vt8500/irq.c +++ b/drivers/irqchip/irq-vt8500.c | |||
@@ -37,6 +37,9 @@ | |||
37 | 37 | ||
38 | #include <asm/irq.h> | 38 | #include <asm/irq.h> |
39 | #include <asm/exception.h> | 39 | #include <asm/exception.h> |
40 | #include <asm/mach/irq.h> | ||
41 | |||
42 | #include "irqchip.h" | ||
40 | 43 | ||
41 | #define VT8500_ICPC_IRQ 0x20 | 44 | #define VT8500_ICPC_IRQ 0x20 |
42 | #define VT8500_ICPC_FIQ 0x24 | 45 | #define VT8500_ICPC_FIQ 0x24 |
@@ -225,6 +228,8 @@ int __init vt8500_irq_init(struct device_node *node, struct device_node *parent) | |||
225 | goto out; | 228 | goto out; |
226 | } | 229 | } |
227 | 230 | ||
231 | set_handle_irq(vt8500_handle_irq); | ||
232 | |||
228 | vt8500_init_irq_hw(intc[active_cnt].base); | 233 | vt8500_init_irq_hw(intc[active_cnt].base); |
229 | 234 | ||
230 | pr_info("vt8500-irq: Added interrupt controller\n"); | 235 | pr_info("vt8500-irq: Added interrupt controller\n"); |
@@ -251,3 +256,4 @@ out: | |||
251 | return 0; | 256 | return 0; |
252 | } | 257 | } |
253 | 258 | ||
259 | IRQCHIP_DECLARE(vt8500_irq, "via,vt8500-intc", vt8500_irq_init); | ||