aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Abraham <thomas.abraham@linaro.org>2011-11-02 06:14:37 -0400
committerKukjin Kim <kgene.kim@samsung.com>2011-12-22 20:06:53 -0500
commitf983575aa90ceeb2cc7923223882dcf1debf5aa2 (patch)
tree088e44219fa918d067d36a1eaaa2c7dc3255a3f2
parent1fb3726cf33a7402d797231fdba6ba49ed5eba75 (diff)
ARM: EXYNOS: Enable conversion of GIC dt irq specifier to linux virq
Enable conversion of device tree interrupt specifier to linux virq domain for GIC controller. Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
-rw-r--r--arch/arm/mach-exynos/cpu.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/arch/arm/mach-exynos/cpu.c b/arch/arm/mach-exynos/cpu.c
index 90ec247f3b37..0eb7b6a6903d 100644
--- a/arch/arm/mach-exynos/cpu.c
+++ b/arch/arm/mach-exynos/cpu.c
@@ -10,6 +10,8 @@
10 10
11#include <linux/sched.h> 11#include <linux/sched.h>
12#include <linux/sysdev.h> 12#include <linux/sysdev.h>
13#include <linux/of.h>
14#include <linux/of_irq.h>
13 15
14#include <asm/mach/map.h> 16#include <asm/mach/map.h>
15#include <asm/mach/irq.h> 17#include <asm/mach/irq.h>
@@ -218,13 +220,26 @@ static void exynos4_gic_irq_fix_base(struct irq_data *d)
218 (gic_bank_offset * smp_processor_id()); 220 (gic_bank_offset * smp_processor_id());
219} 221}
220 222
223#ifdef CONFIG_OF
224static const struct of_device_id exynos4_dt_irq_match[] = {
225 { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, },
226 {},
227};
228#endif
229
221void __init exynos4_init_irq(void) 230void __init exynos4_init_irq(void)
222{ 231{
223 int irq; 232 int irq;
224 233
225 gic_bank_offset = soc_is_exynos4412() ? 0x4000 : 0x8000; 234 gic_bank_offset = soc_is_exynos4412() ? 0x4000 : 0x8000;
226 235
227 gic_init(0, IRQ_PPI(0), S5P_VA_GIC_DIST, S5P_VA_GIC_CPU); 236 if (!of_have_populated_dt())
237 gic_init(0, IRQ_PPI(0), S5P_VA_GIC_DIST, S5P_VA_GIC_CPU);
238#ifdef CONFIG_OF
239 else
240 of_irq_init(exynos4_dt_irq_match);
241#endif
242
228 gic_arch_extn.irq_eoi = exynos4_gic_irq_fix_base; 243 gic_arch_extn.irq_eoi = exynos4_gic_irq_fix_base;
229 gic_arch_extn.irq_unmask = exynos4_gic_irq_fix_base; 244 gic_arch_extn.irq_unmask = exynos4_gic_irq_fix_base;
230 gic_arch_extn.irq_mask = exynos4_gic_irq_fix_base; 245 gic_arch_extn.irq_mask = exynos4_gic_irq_fix_base;