aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-exynos/common.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2013-04-10 15:17:47 +0200
committerArnd Bergmann <arnd@arndb.de>2013-04-19 23:00:40 +0200
commit6761dcfe8c42b55076753bc8bea7b5dcbfb445c0 (patch)
tree1fff09aea689b937c15ac5f6178d173ac3f062c5 /arch/arm/mach-exynos/common.c
parent30269ddff13f417677a27e37086c97a57f1cf2da (diff)
irqchip: exynos: pass max combiner number to combiner_init
We can find out the number of combined IRQs from the device tree, but in case of ATAGS boot, the driver currently uses hardcoded values based on the SoC type. We can't do that in general for a multiplatform kernel, so let's instead pass this information from platform code directly in case of ATAGS boot. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/arm/mach-exynos/common.c')
-rw-r--r--arch/arm/mach-exynos/common.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c
index a453991ce90..368fa4b01e7 100644
--- a/arch/arm/mach-exynos/common.c
+++ b/arch/arm/mach-exynos/common.c
@@ -420,6 +420,19 @@ void __init exynos_init_time(void)
}
}
+static unsigned int max_combiner_nr(void)
+{
+ if (soc_is_exynos5250())
+ return EXYNOS5_MAX_COMBINER_NR;
+ else if (soc_is_exynos4412())
+ return EXYNOS4412_MAX_COMBINER_NR;
+ else if (soc_is_exynos4212())
+ return EXYNOS4212_MAX_COMBINER_NR;
+ else
+ return EXYNOS4210_MAX_COMBINER_NR;
+}
+
+
void __init exynos4_init_irq(void)
{
unsigned int gic_bank_offset;
@@ -434,7 +447,7 @@ void __init exynos4_init_irq(void)
#endif
if (!of_have_populated_dt())
- combiner_init(S5P_VA_COMBINER_BASE, NULL);
+ combiner_init(S5P_VA_COMBINER_BASE, NULL, max_combiner_nr());
/*
* The parameters of s5p_init_irq() are for VIC init.