diff options
author | Michal Simek <michal.simek@xilinx.com> | 2013-08-27 04:49:00 -0400 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2013-09-03 05:24:48 -0400 |
commit | 8a9e90a12816d0d26ccfb98cf6ac224a5a45d453 (patch) | |
tree | f66d10e7556a0df30ada3e9853bcf9ce2553e99c /arch/microblaze/kernel | |
parent | 968674bd456a126dc22c0e34ba8231f3be258b04 (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/kernel')
-rw-r--r-- | arch/microblaze/kernel/intc.c | 12 | ||||
-rw-r--r-- | arch/microblaze/kernel/irq.c | 7 |
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 @@ | |||
18 | 18 | ||
19 | #include <asm/prom.h> | 19 | #include <asm/prom.h> |
20 | #include <asm/irq.h> | 20 | #include <asm/irq.h> |
21 | #include "../../drivers/irqchip/irqchip.h" | ||
21 | 22 | ||
22 | static unsigned int intc_baseaddr; | 23 | static unsigned int intc_baseaddr; |
23 | 24 | ||
@@ -115,13 +116,10 @@ static const struct irq_domain_ops xintc_irq_domain_ops = { | |||
115 | .map = xintc_map, | 116 | .map = xintc_map, |
116 | }; | 117 | }; |
117 | 118 | ||
118 | void __init init_IRQ(void) | 119 | static int __init xilinx_intc_of_init(struct device_node *intc, |
120 | struct device_node *parent) | ||
119 | { | 121 | { |
120 | u32 nr_irq, intr_mask; | 122 | u32 nr_irq, intr_mask; |
121 | struct device_node *intc = NULL; | ||
122 | |||
123 | intc = of_find_compatible_node(NULL, NULL, "xlnx,xps-intc-1.00.a"); | ||
124 | BUG_ON(!intc); | ||
125 | 123 | ||
126 | intc_baseaddr = be32_to_cpup(of_get_property(intc, "reg", NULL)); | 124 | intc_baseaddr = be32_to_cpup(of_get_property(intc, "reg", NULL)); |
127 | intc_baseaddr = (unsigned long) ioremap(intc_baseaddr, PAGE_SIZE); | 125 | intc_baseaddr = (unsigned long) ioremap(intc_baseaddr, PAGE_SIZE); |
@@ -155,4 +153,8 @@ void __init init_IRQ(void) | |||
155 | (void *)intr_mask); | 153 | (void *)intr_mask); |
156 | 154 | ||
157 | irq_set_default_host(root_domain); | 155 | irq_set_default_host(root_domain); |
156 | |||
157 | return 0; | ||
158 | } | 158 | } |
159 | |||
160 | 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 @@ | |||
17 | #include <linux/seq_file.h> | 17 | #include <linux/seq_file.h> |
18 | #include <linux/kernel_stat.h> | 18 | #include <linux/kernel_stat.h> |
19 | #include <linux/irq.h> | 19 | #include <linux/irq.h> |
20 | #include <linux/irqchip.h> | ||
20 | #include <linux/of_irq.h> | 21 | #include <linux/of_irq.h> |
21 | 22 | ||
22 | static u32 concurrent_irq; | 23 | static u32 concurrent_irq; |
@@ -44,3 +45,9 @@ next_irq: | |||
44 | set_irq_regs(old_regs); | 45 | set_irq_regs(old_regs); |
45 | trace_hardirqs_on(); | 46 | trace_hardirqs_on(); |
46 | } | 47 | } |
48 | |||
49 | void __init init_IRQ(void) | ||
50 | { | ||
51 | /* process the entire interrupt tree in one go */ | ||
52 | irqchip_init(); | ||
53 | } | ||