From c4082d499fa2c90c089830700e34b64e3b924bb8 Mon Sep 17 00:00:00 2001 From: R Sricharan Date: Tue, 5 Jun 2012 16:31:06 +0530 Subject: ARM: omap2+: board-generic: clean up the irq data from board file Move the irq_match arrays and the irq init functions of OMAP 2,3 and 4 based boards out of board-generic.c file and also rename the irq init function to match the interrupt controller present in the SOCs. This is a preparatory patch to add the OMAP5 evm board's irq init support with device tree. Signed-off-by: R Sricharan Signed-off-by: Santosh Shilimkar --- arch/arm/mach-omap2/irq.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'arch/arm/mach-omap2/irq.c') diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c index d5b34febd82d..8467beb122b5 100644 --- a/arch/arm/mach-omap2/irq.c +++ b/arch/arm/mach-omap2/irq.c @@ -21,6 +21,7 @@ #include #include #include +#include #include @@ -258,7 +259,7 @@ asmlinkage void __exception_irq_entry omap2_intc_handle_irq(struct pt_regs *regs omap_intc_handle_irq(base_addr, regs); } -int __init omap_intc_of_init(struct device_node *node, +int __init intc_of_init(struct device_node *node, struct device_node *parent) { struct resource res; @@ -280,6 +281,16 @@ int __init omap_intc_of_init(struct device_node *node, return 0; } +static struct of_device_id irq_match[] __initdata = { + { .compatible = "ti,omap2-intc", .data = intc_of_init, }, + { } +}; + +void __init omap_intc_of_init(void) +{ + of_irq_init(irq_match); +} + #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM33XX) static struct omap3_intc_regs intc_context[ARRAY_SIZE(irq_banks)]; -- cgit v1.2.2