diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-12-04 10:55:14 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-12-14 14:21:30 -0500 |
commit | b580b899dd05a007ad232ee49a07b32d91876462 (patch) | |
tree | 72def6f195ca02a5f9eb5e082930603b85349b0e /arch/arm/common | |
parent | e745a6676c76280f9721adeec79b08a0f2dfcc21 (diff) |
ARM: GIC: provide a single initialization function for boot CPU
Provide gic_init() which initializes the GIC distributor and current
CPU's GIC interface for the boot (or single) CPU.
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/common')
-rw-r--r-- | arch/arm/common/gic.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c index e6388dcd8cfa..8eab2f34a7fa 100644 --- a/arch/arm/common/gic.c +++ b/arch/arm/common/gic.c | |||
@@ -213,8 +213,8 @@ void __init gic_cascade_irq(unsigned int gic_nr, unsigned int irq) | |||
213 | set_irq_chained_handler(irq, gic_handle_cascade_irq); | 213 | set_irq_chained_handler(irq, gic_handle_cascade_irq); |
214 | } | 214 | } |
215 | 215 | ||
216 | void __init gic_dist_init(unsigned int gic_nr, void __iomem *base, | 216 | static void __init gic_dist_init(unsigned int gic_nr, void __iomem *base, |
217 | unsigned int irq_start) | 217 | unsigned int irq_start) |
218 | { | 218 | { |
219 | unsigned int gic_irqs, irq_limit, i; | 219 | unsigned int gic_irqs, irq_limit, i; |
220 | u32 cpumask = 1 << smp_processor_id(); | 220 | u32 cpumask = 1 << smp_processor_id(); |
@@ -314,6 +314,13 @@ void __cpuinit gic_cpu_init(unsigned int gic_nr, void __iomem *base) | |||
314 | writel(1, base + GIC_CPU_CTRL); | 314 | writel(1, base + GIC_CPU_CTRL); |
315 | } | 315 | } |
316 | 316 | ||
317 | void __init gic_init(unsigned int gic_nr, unsigned int irq_start, | ||
318 | void __iomem *dist_base, void __iomem *cpu_base) | ||
319 | { | ||
320 | gic_dist_init(gic_nr, dist_base, irq_start); | ||
321 | gic_cpu_init(gic_nr, cpu_base); | ||
322 | } | ||
323 | |||
317 | #ifdef CONFIG_SMP | 324 | #ifdef CONFIG_SMP |
318 | void gic_raise_softirq(const struct cpumask *mask, unsigned int irq) | 325 | void gic_raise_softirq(const struct cpumask *mask, unsigned int irq) |
319 | { | 326 | { |