@@ -30,7 +30,6 @@ extern struct pl08x_platform_data pl080_plat_data;
void __init spear_setup_of_timer(void);
void __init spear3xx_clk_init(void);
void __init spear3xx_map_io(void);
-void __init spear3xx_dt_init_irq(void);
void spear_restart(char, const char *);
@@ -15,7 +15,7 @@
#include <linux/amba/pl08x.h>
#include <linux/of_platform.h>
-#include <asm/hardware/vic.h>
+#include <linux/irqchip.h>
#include <asm/mach/arch.h>
#include <plat/shirq.h>
#include <mach/generic.h>
@@ -315,8 +315,7 @@ static void __init spear300_map_io(void)
DT_MACHINE_START(SPEAR300_DT, "ST SPEAr300 SoC with Flattened Device Tree")
.map_io = spear300_map_io,
- .init_irq = spear3xx_dt_init_irq,
- .handle_irq = vic_handle_irq,
+ .init_irq = irqchip_init,
.timer = &spear3xx_timer,
.init_machine = spear300_dt_init,
.restart = spear_restart,
@@ -15,8 +15,8 @@
#include <linux/amba/pl08x.h>
#include <linux/amba/serial.h>
+#include <linux/irqchip.h>
#include <linux/of_platform.h>
-#include <asm/hardware/vic.h>
#include <asm/mach/arch.h>
#include <plat/shirq.h>
#include <mach/generic.h>
@@ -456,8 +456,7 @@ static void __init spear310_map_io(void)
DT_MACHINE_START(SPEAR310_DT, "ST SPEAr310 SoC with Flattened Device Tree")
.map_io = spear310_map_io,
- .init_irq = spear3xx_dt_init_irq,
- .handle_irq = vic_handle_irq,
+ .init_irq = irqchip_init,
.timer = &spear3xx_timer,
.init_machine = spear310_dt_init,
.restart = spear_restart,
@@ -13,11 +13,11 @@
#define pr_fmt(fmt) "SPEAr320: " fmt
+#include <linux/irqchip.h>
#include <linux/amba/pl022.h>
#include <linux/amba/pl08x.h>
#include <linux/amba/serial.h>
#include <linux/of_platform.h>
-#include <asm/hardware/vic.h>
#include <asm/mach/arch.h>
#include <plat/shirq.h>
#include <mach/generic.h>
@@ -471,8 +471,7 @@ static void __init spear320_map_io(void)
DT_MACHINE_START(SPEAR320_DT, "ST SPEAr320 SoC with Flattened Device Tree")
.map_io = spear320_map_io,
- .init_irq = spear3xx_dt_init_irq,
- .handle_irq = vic_handle_irq,
+ .init_irq = irqchip_init,
.timer = &spear3xx_timer,
.init_machine = spear320_dt_init,
.restart = spear_restart,
@@ -118,13 +118,3 @@ static void __init spear3xx_timer_init(void)
struct sys_timer spear3xx_timer = {
.init = spear3xx_timer_init,
};
-
-static const struct of_device_id vic_of_match[] __initconst = {
- { .compatible = "arm,pl190-vic", .data = vic_of_init, },
- { /* Sentinel */ }
-};
-
-void __init spear3xx_dt_init_irq(void)
-{
- of_irq_init(vic_of_match);
-}
Now that we have a common irqchip infrastructure, use it on the spear3xx platform: * Use irqchip_init() as the ->irq_init() machine function. The irqchip infrastructure already knows about the compatible strings for the VIC IRQ controller driver. * No longer needed to set ->handle_irq() in the machine structure, as it will be set by the VIC IRQ controller driver. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> --- arch/arm/mach-spear3xx/include/mach/generic.h | 1 - arch/arm/mach-spear3xx/spear300.c | 5 ++--- arch/arm/mach-spear3xx/spear310.c | 5 ++--- arch/arm/mach-spear3xx/spear320.c | 5 ++--- arch/arm/mach-spear3xx/spear3xx.c | 10 ---------- 5 files changed, 6 insertions(+), 20 deletions(-)