aboutsummaryrefslogtreecommitdiff
path: root/arch/microblaze
diff options
context:
space:
mode:
authorMichal Simek2013-08-27 10:49:00 +0200
committerMichal Simek2013-09-03 11:24:48 +0200
commit8a9e90a12816d0d26ccfb98cf6ac224a5a45d453 (patch)
treef66d10e7556a0df30ada3e9853bcf9ce2553e99c /arch/microblaze
parent968674bd456a126dc22c0e34ba8231f3be258b04 (diff)
microblaze: intc: Using irqchip
- Move init_IRQ to irq.c - Use IRQCHIP_DECLARE macro Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'arch/microblaze')
-rw-r--r--arch/microblaze/kernel/intc.c12
-rw-r--r--arch/microblaze/kernel/irq.c7
2 files changed, 14 insertions, 5 deletions
diff --git a/arch/microblaze/kernel/intc.c b/arch/microblaze/kernel/intc.c
index ed056a092b82..07be937b3d9a 100644
--- a/arch/microblaze/kernel/intc.c
+++ b/arch/microblaze/kernel/intc.c
@@ -18,6 +18,7 @@
#include <asm/prom.h>
#include <asm/irq.h>
+#include "../../drivers/irqchip/irqchip.h"
static unsigned int intc_baseaddr;
@@ -115,13 +116,10 @@ static const struct irq_domain_ops xintc_irq_domain_ops = {
.map = xintc_map,
};
-void __init init_IRQ(void)
+static int __init xilinx_intc_of_init(struct device_node *intc,
+ struct device_node *parent)
{
u32 nr_irq, intr_mask;
- struct device_node *intc = NULL;
-
- intc = of_find_compatible_node(NULL, NULL, "xlnx,xps-intc-1.00.a");
- BUG_ON(!intc);
intc_baseaddr = be32_to_cpup(of_get_property(intc, "reg", NULL));
intc_baseaddr = (unsigned long) ioremap(intc_baseaddr, PAGE_SIZE);
@@ -155,4 +153,8 @@ void __init init_IRQ(void)
(void *)intr_mask);
irq_set_default_host(root_domain);
+
+ return 0;
}
+
+IRQCHIP_DECLARE(xilinx_intc, "xlnx,xps-intc-1.00.a", xilinx_intc_of_init);
diff --git a/arch/microblaze/kernel/irq.c b/arch/microblaze/kernel/irq.c
index b205b90ed110..11e24de91aa4 100644
--- a/arch/microblaze/kernel/irq.c
+++ b/arch/microblaze/kernel/irq.c
@@ -17,6 +17,7 @@
#include <linux/seq_file.h>
#include <linux/kernel_stat.h>
#include <linux/irq.h>
+#include <linux/irqchip.h>
#include <linux/of_irq.h>
static u32 concurrent_irq;
@@ -44,3 +45,9 @@ next_irq:
set_irq_regs(old_regs);
trace_hardirqs_on();
}
+
+void __init init_IRQ(void)
+{
+ /* process the entire interrupt tree in one go */
+ irqchip_init();
+}