diff options
Diffstat (limited to 'arch/xtensa/kernel/irq.c')
-rw-r--r-- | arch/xtensa/kernel/irq.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/xtensa/kernel/irq.c b/arch/xtensa/kernel/irq.c index e90d78211195..6f4f9749cff7 100644 --- a/arch/xtensa/kernel/irq.c +++ b/arch/xtensa/kernel/irq.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/irq.h> | 19 | #include <linux/irq.h> |
20 | #include <linux/kernel_stat.h> | 20 | #include <linux/kernel_stat.h> |
21 | #include <linux/irqdomain.h> | 21 | #include <linux/irqdomain.h> |
22 | #include <linux/of.h> | ||
22 | 23 | ||
23 | #include <asm/uaccess.h> | 24 | #include <asm/uaccess.h> |
24 | #include <asm/platform.h> | 25 | #include <asm/platform.h> |
@@ -199,8 +200,17 @@ void __init init_IRQ(void) | |||
199 | cached_irq_mask = 0; | 200 | cached_irq_mask = 0; |
200 | set_sr(~0, intclear); | 201 | set_sr(~0, intclear); |
201 | 202 | ||
203 | #ifdef CONFIG_OF | ||
204 | /* The interrupt controller device node is mandatory */ | ||
205 | intc = of_find_compatible_node(NULL, NULL, "xtensa,pic"); | ||
206 | BUG_ON(!intc); | ||
207 | |||
208 | root_domain = irq_domain_add_linear(intc, NR_IRQS, | ||
209 | &xtensa_irq_domain_ops, NULL); | ||
210 | #else | ||
202 | root_domain = irq_domain_add_legacy(intc, NR_IRQS, 0, 0, | 211 | root_domain = irq_domain_add_legacy(intc, NR_IRQS, 0, 0, |
203 | &xtensa_irq_domain_ops, NULL); | 212 | &xtensa_irq_domain_ops, NULL); |
213 | #endif | ||
204 | irq_set_default_host(root_domain); | 214 | irq_set_default_host(root_domain); |
205 | 215 | ||
206 | variant_init_irq(); | 216 | variant_init_irq(); |