aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/irqchip/exynos-combiner.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/irqchip/exynos-combiner.c')
-rw-r--r--drivers/irqchip/exynos-combiner.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/irqchip/exynos-combiner.c b/drivers/irqchip/exynos-combiner.c
index 7fcdeee869ce..acb9c74b070a 100644
--- a/drivers/irqchip/exynos-combiner.c
+++ b/drivers/irqchip/exynos-combiner.c
@@ -18,7 +18,9 @@
18#include <linux/of_irq.h> 18#include <linux/of_irq.h>
19#include <asm/mach/irq.h> 19#include <asm/mach/irq.h>
20 20
21#ifdef CONFIG_EXYNOS_ATAGS
21#include <plat/cpu.h> 22#include <plat/cpu.h>
23#endif
22 24
23#include "irqchip.h" 25#include "irqchip.h"
24 26
@@ -182,8 +184,12 @@ static struct irq_domain_ops combiner_irq_domain_ops = {
182 .map = combiner_irq_domain_map, 184 .map = combiner_irq_domain_map,
183}; 185};
184 186
185static unsigned int exynos4x12_combiner_extra_irq(int group) 187static unsigned int combiner_lookup_irq(int group)
186{ 188{
189#ifdef CONFIG_EXYNOS_ATAGS
190 if (group < EXYNOS4210_MAX_COMBINER_NR || soc_is_exynos5250())
191 return IRQ_SPI(group);
192
187 switch (group) { 193 switch (group) {
188 case 16: 194 case 16:
189 return IRQ_SPI(107); 195 return IRQ_SPI(107);
@@ -193,9 +199,9 @@ static unsigned int exynos4x12_combiner_extra_irq(int group)
193 return IRQ_SPI(48); 199 return IRQ_SPI(48);
194 case 19: 200 case 19:
195 return IRQ_SPI(42); 201 return IRQ_SPI(42);
196 default:
197 return 0;
198 } 202 }
203#endif
204 return 0;
199} 205}
200 206
201void __init combiner_init(void __iomem *combiner_base, 207void __init combiner_init(void __iomem *combiner_base,
@@ -228,14 +234,13 @@ void __init combiner_init(void __iomem *combiner_base,
228 } 234 }
229 235
230 for (i = 0; i < max_nr; i++) { 236 for (i = 0; i < max_nr; i++) {
231 if (i < EXYNOS4210_MAX_COMBINER_NR || soc_is_exynos5250())
232 irq = IRQ_SPI(i);
233 else
234 irq = exynos4x12_combiner_extra_irq(i);
235#ifdef CONFIG_OF 237#ifdef CONFIG_OF
236 if (np) 238 if (np)
237 irq = irq_of_parse_and_map(np, i); 239 irq = irq_of_parse_and_map(np, i);
240 else
238#endif 241#endif
242 irq = combiner_lookup_irq(i);
243
239 combiner_init_one(&combiner_data[i], i, 244 combiner_init_one(&combiner_data[i], i,
240 combiner_base + (i >> 2) * 0x10, irq); 245 combiner_base + (i >> 2) * 0x10, irq);
241 combiner_cascade_irq(&combiner_data[i], irq); 246 combiner_cascade_irq(&combiner_data[i], irq);