diff options
Diffstat (limited to 'arch/arc/kernel/intc-compact.c')
-rw-r--r-- | arch/arc/kernel/intc-compact.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/arch/arc/kernel/intc-compact.c b/arch/arc/kernel/intc-compact.c index 224d1c3aa9c4..c5cceca36118 100644 --- a/arch/arc/kernel/intc-compact.c +++ b/arch/arc/kernel/intc-compact.c | |||
@@ -14,6 +14,8 @@ | |||
14 | #include <linux/irqchip.h> | 14 | #include <linux/irqchip.h> |
15 | #include <asm/irq.h> | 15 | #include <asm/irq.h> |
16 | 16 | ||
17 | #define TIMER0_IRQ 3 /* Fixed by ISA */ | ||
18 | |||
17 | /* | 19 | /* |
18 | * Early Hardware specific Interrupt setup | 20 | * Early Hardware specific Interrupt setup |
19 | * -Platform independent, needed for each CPU (not foldable into init_IRQ) | 21 | * -Platform independent, needed for each CPU (not foldable into init_IRQ) |
@@ -79,8 +81,9 @@ static struct irq_chip onchip_intc = { | |||
79 | static int arc_intc_domain_map(struct irq_domain *d, unsigned int irq, | 81 | static int arc_intc_domain_map(struct irq_domain *d, unsigned int irq, |
80 | irq_hw_number_t hw) | 82 | irq_hw_number_t hw) |
81 | { | 83 | { |
82 | switch (irq) { | 84 | switch (hw) { |
83 | case TIMER0_IRQ: | 85 | case TIMER0_IRQ: |
86 | irq_set_percpu_devid(irq); | ||
84 | irq_set_chip_and_handler(irq, &onchip_intc, handle_percpu_irq); | 87 | irq_set_chip_and_handler(irq, &onchip_intc, handle_percpu_irq); |
85 | break; | 88 | break; |
86 | default: | 89 | default: |
@@ -94,21 +97,23 @@ static const struct irq_domain_ops arc_intc_domain_ops = { | |||
94 | .map = arc_intc_domain_map, | 97 | .map = arc_intc_domain_map, |
95 | }; | 98 | }; |
96 | 99 | ||
97 | static struct irq_domain *root_domain; | ||
98 | |||
99 | static int __init | 100 | static int __init |
100 | init_onchip_IRQ(struct device_node *intc, struct device_node *parent) | 101 | init_onchip_IRQ(struct device_node *intc, struct device_node *parent) |
101 | { | 102 | { |
103 | struct irq_domain *root_domain; | ||
104 | |||
102 | if (parent) | 105 | if (parent) |
103 | panic("DeviceTree incore intc not a root irq controller\n"); | 106 | panic("DeviceTree incore intc not a root irq controller\n"); |
104 | 107 | ||
105 | root_domain = irq_domain_add_legacy(intc, NR_CPU_IRQS, 0, 0, | 108 | root_domain = irq_domain_add_linear(intc, NR_CPU_IRQS, |
106 | &arc_intc_domain_ops, NULL); | 109 | &arc_intc_domain_ops, NULL); |
107 | |||
108 | if (!root_domain) | 110 | if (!root_domain) |
109 | panic("root irq domain not avail\n"); | 111 | panic("root irq domain not avail\n"); |
110 | 112 | ||
111 | /* with this we don't need to export root_domain */ | 113 | /* |
114 | * Needed for primary domain lookup to succeed | ||
115 | * This is a primary irqchip, and can never have a parent | ||
116 | */ | ||
112 | irq_set_default_host(root_domain); | 117 | irq_set_default_host(root_domain); |
113 | 118 | ||
114 | return 0; | 119 | return 0; |