aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arc/kernel/irq.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arc/kernel/irq.c')
-rw-r--r--arch/arc/kernel/irq.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/arch/arc/kernel/irq.c b/arch/arc/kernel/irq.c
index 551c10dff481..8115fa531575 100644
--- a/arch/arc/kernel/irq.c
+++ b/arch/arc/kernel/irq.c
@@ -11,6 +11,8 @@
11#include <linux/module.h> 11#include <linux/module.h>
12#include <linux/of.h> 12#include <linux/of.h>
13#include <linux/irqdomain.h> 13#include <linux/irqdomain.h>
14#include <linux/irqchip.h>
15#include "../../drivers/irqchip/irqchip.h"
14#include <asm/sections.h> 16#include <asm/sections.h>
15#include <asm/irq.h> 17#include <asm/irq.h>
16#include <asm/mach_desc.h> 18#include <asm/mach_desc.h>
@@ -26,7 +28,7 @@
26 * -Disable all IRQs (on CPU side) 28 * -Disable all IRQs (on CPU side)
27 * -Optionally, setup the High priority Interrupts as Level 2 IRQs 29 * -Optionally, setup the High priority Interrupts as Level 2 IRQs
28 */ 30 */
29void __init arc_init_IRQ(void) 31void __cpuinit arc_init_IRQ(void)
30{ 32{
31 int level_mask = 0; 33 int level_mask = 0;
32 34
@@ -97,15 +99,13 @@ static const struct irq_domain_ops arc_intc_domain_ops = {
97 99
98static struct irq_domain *root_domain; 100static struct irq_domain *root_domain;
99 101
100void __init init_onchip_IRQ(void) 102static int __init
103init_onchip_IRQ(struct device_node *intc, struct device_node *parent)
101{ 104{
102 struct device_node *intc = NULL; 105 if (parent)
106 panic("DeviceTree incore intc not a root irq controller\n");
103 107
104 intc = of_find_compatible_node(NULL, NULL, "snps,arc700-intc"); 108 root_domain = irq_domain_add_legacy(intc, NR_CPU_IRQS, 0, 0,
105 if(!intc)
106 panic("DeviceTree Missing incore intc\n");
107
108 root_domain = irq_domain_add_legacy(intc, NR_IRQS, 0, 0,
109 &arc_intc_domain_ops, NULL); 109 &arc_intc_domain_ops, NULL);
110 110
111 if (!root_domain) 111 if (!root_domain)
@@ -113,8 +113,12 @@ void __init init_onchip_IRQ(void)
113 113
114 /* with this we don't need to export root_domain */ 114 /* with this we don't need to export root_domain */
115 irq_set_default_host(root_domain); 115 irq_set_default_host(root_domain);
116
117 return 0;
116} 118}
117 119
120IRQCHIP_DECLARE(arc_intc, "snps,arc700-intc", init_onchip_IRQ);
121
118/* 122/*
119 * Late Interrupt system init called from start_kernel for Boot CPU only 123 * Late Interrupt system init called from start_kernel for Boot CPU only
120 * 124 *
@@ -123,12 +127,13 @@ void __init init_onchip_IRQ(void)
123 */ 127 */
124void __init init_IRQ(void) 128void __init init_IRQ(void)
125{ 129{
126 init_onchip_IRQ();
127
128 /* Any external intc can be setup here */ 130 /* Any external intc can be setup here */
129 if (machine_desc->init_irq) 131 if (machine_desc->init_irq)
130 machine_desc->init_irq(); 132 machine_desc->init_irq();
131 133
134 /* process the entire interrupt tree in one go */
135 irqchip_init();
136
132#ifdef CONFIG_SMP 137#ifdef CONFIG_SMP
133 /* Master CPU can initialize it's side of IPI */ 138 /* Master CPU can initialize it's side of IPI */
134 if (machine_desc->init_smp) 139 if (machine_desc->init_smp)