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/mach-realview | |
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/mach-realview')
-rw-r--r-- | arch/arm/mach-realview/realview_eb.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-realview/realview_pb1176.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-realview/realview_pb11mp.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-realview/realview_pba8.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-realview/realview_pbx.c | 11 |
5 files changed, 25 insertions, 22 deletions
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c index f2697106f809..241bcbc73f61 100644 --- a/arch/arm/mach-realview/realview_eb.c +++ b/arch/arm/mach-realview/realview_eb.c | |||
@@ -365,20 +365,20 @@ static void __init gic_init_irq(void) | |||
365 | 365 | ||
366 | /* core tile GIC, primary */ | 366 | /* core tile GIC, primary */ |
367 | gic_cpu_base_addr = __io_address(REALVIEW_EB11MP_GIC_CPU_BASE); | 367 | gic_cpu_base_addr = __io_address(REALVIEW_EB11MP_GIC_CPU_BASE); |
368 | gic_dist_init(0, __io_address(REALVIEW_EB11MP_GIC_DIST_BASE), 29); | 368 | gic_init(0, 29, __io_address(REALVIEW_EB11MP_GIC_DIST_BASE), |
369 | gic_cpu_init(0, gic_cpu_base_addr); | 369 | gic_cpu_base_addr); |
370 | 370 | ||
371 | #ifndef CONFIG_REALVIEW_EB_ARM11MP_REVB | 371 | #ifndef CONFIG_REALVIEW_EB_ARM11MP_REVB |
372 | /* board GIC, secondary */ | 372 | /* board GIC, secondary */ |
373 | gic_dist_init(1, __io_address(REALVIEW_EB_GIC_DIST_BASE), 64); | 373 | gic_init(1, 64, __io_address(REALVIEW_EB_GIC_DIST_BASE), |
374 | gic_cpu_init(1, __io_address(REALVIEW_EB_GIC_CPU_BASE)); | 374 | __io_address(REALVIEW_EB_GIC_CPU_BASE)); |
375 | gic_cascade_irq(1, IRQ_EB11MP_EB_IRQ1); | 375 | gic_cascade_irq(1, IRQ_EB11MP_EB_IRQ1); |
376 | #endif | 376 | #endif |
377 | } else { | 377 | } else { |
378 | /* board GIC, primary */ | 378 | /* board GIC, primary */ |
379 | gic_cpu_base_addr = __io_address(REALVIEW_EB_GIC_CPU_BASE); | 379 | gic_cpu_base_addr = __io_address(REALVIEW_EB_GIC_CPU_BASE); |
380 | gic_dist_init(0, __io_address(REALVIEW_EB_GIC_DIST_BASE), 29); | 380 | gic_init(0, 29, __io_address(REALVIEW_EB_GIC_DIST_BASE), |
381 | gic_cpu_init(0, gic_cpu_base_addr); | 381 | gic_cpu_base_addr); |
382 | } | 382 | } |
383 | } | 383 | } |
384 | 384 | ||
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c index a4125619d71b..8047b198f847 100644 --- a/arch/arm/mach-realview/realview_pb1176.c +++ b/arch/arm/mach-realview/realview_pb1176.c | |||
@@ -305,12 +305,14 @@ static void __init gic_init_irq(void) | |||
305 | { | 305 | { |
306 | /* ARM1176 DevChip GIC, primary */ | 306 | /* ARM1176 DevChip GIC, primary */ |
307 | gic_cpu_base_addr = __io_address(REALVIEW_DC1176_GIC_CPU_BASE); | 307 | gic_cpu_base_addr = __io_address(REALVIEW_DC1176_GIC_CPU_BASE); |
308 | gic_dist_init(0, __io_address(REALVIEW_DC1176_GIC_DIST_BASE), IRQ_DC1176_GIC_START); | 308 | gic_init(0, IRQ_DC1176_GIC_START, |
309 | gic_cpu_init(0, gic_cpu_base_addr); | 309 | __io_address(REALVIEW_DC1176_GIC_DIST_BASE), |
310 | gic_cpu_base_addr); | ||
310 | 311 | ||
311 | /* board GIC, secondary */ | 312 | /* board GIC, secondary */ |
312 | gic_dist_init(1, __io_address(REALVIEW_PB1176_GIC_DIST_BASE), IRQ_PB1176_GIC_START); | 313 | gic_init(1, IRQ_PB1176_GIC_START, |
313 | gic_cpu_init(1, __io_address(REALVIEW_PB1176_GIC_CPU_BASE)); | 314 | __io_address(REALVIEW_PB1176_GIC_DIST_BASE), |
315 | __io_address(REALVIEW_PB1176_GIC_CPU_BASE)); | ||
314 | gic_cascade_irq(1, IRQ_DC1176_PB_IRQ1); | 316 | gic_cascade_irq(1, IRQ_DC1176_PB_IRQ1); |
315 | } | 317 | } |
316 | 318 | ||
diff --git a/arch/arm/mach-realview/realview_pb11mp.c b/arch/arm/mach-realview/realview_pb11mp.c index 117b95b2ca15..61204265b4e4 100644 --- a/arch/arm/mach-realview/realview_pb11mp.c +++ b/arch/arm/mach-realview/realview_pb11mp.c | |||
@@ -310,12 +310,13 @@ static void __init gic_init_irq(void) | |||
310 | 310 | ||
311 | /* ARM11MPCore test chip GIC, primary */ | 311 | /* ARM11MPCore test chip GIC, primary */ |
312 | gic_cpu_base_addr = __io_address(REALVIEW_TC11MP_GIC_CPU_BASE); | 312 | gic_cpu_base_addr = __io_address(REALVIEW_TC11MP_GIC_CPU_BASE); |
313 | gic_dist_init(0, __io_address(REALVIEW_TC11MP_GIC_DIST_BASE), 29); | 313 | gic_init(0, 29, __io_address(REALVIEW_TC11MP_GIC_DIST_BASE), |
314 | gic_cpu_init(0, gic_cpu_base_addr); | 314 | gic_cpu_base_addr); |
315 | 315 | ||
316 | /* board GIC, secondary */ | 316 | /* board GIC, secondary */ |
317 | gic_dist_init(1, __io_address(REALVIEW_PB11MP_GIC_DIST_BASE), IRQ_PB11MP_GIC_START); | 317 | gic_init(1, IRQ_PB11MP_GIC_START, |
318 | gic_cpu_init(1, __io_address(REALVIEW_PB11MP_GIC_CPU_BASE)); | 318 | __io_address(REALVIEW_PB11MP_GIC_DIST_BASE), |
319 | __io_address(REALVIEW_PB11MP_GIC_CPU_BASE)); | ||
319 | gic_cascade_irq(1, IRQ_TC11MP_PB_IRQ1); | 320 | gic_cascade_irq(1, IRQ_TC11MP_PB_IRQ1); |
320 | } | 321 | } |
321 | 322 | ||
diff --git a/arch/arm/mach-realview/realview_pba8.c b/arch/arm/mach-realview/realview_pba8.c index 929b8dc12e81..90f492a35d4f 100644 --- a/arch/arm/mach-realview/realview_pba8.c +++ b/arch/arm/mach-realview/realview_pba8.c | |||
@@ -274,8 +274,9 @@ static void __init gic_init_irq(void) | |||
274 | { | 274 | { |
275 | /* ARM PB-A8 on-board GIC */ | 275 | /* ARM PB-A8 on-board GIC */ |
276 | gic_cpu_base_addr = __io_address(REALVIEW_PBA8_GIC_CPU_BASE); | 276 | gic_cpu_base_addr = __io_address(REALVIEW_PBA8_GIC_CPU_BASE); |
277 | gic_dist_init(0, __io_address(REALVIEW_PBA8_GIC_DIST_BASE), IRQ_PBA8_GIC_START); | 277 | gic_init(0, IRQ_PBA8_GIC_START, |
278 | gic_cpu_init(0, __io_address(REALVIEW_PBA8_GIC_CPU_BASE)); | 278 | __io_address(REALVIEW_PBA8_GIC_DIST_BASE), |
279 | __io_address(REALVIEW_PBA8_GIC_CPU_BASE)); | ||
279 | } | 280 | } |
280 | 281 | ||
281 | static void __init realview_pba8_timer_init(void) | 282 | static void __init realview_pba8_timer_init(void) |
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c index b9f9e20031a7..86f28f725a23 100644 --- a/arch/arm/mach-realview/realview_pbx.c +++ b/arch/arm/mach-realview/realview_pbx.c | |||
@@ -314,14 +314,13 @@ static void __init gic_init_irq(void) | |||
314 | /* ARM PBX on-board GIC */ | 314 | /* ARM PBX on-board GIC */ |
315 | if (core_tile_pbx11mp() || core_tile_pbxa9mp()) { | 315 | if (core_tile_pbx11mp() || core_tile_pbxa9mp()) { |
316 | gic_cpu_base_addr = __io_address(REALVIEW_PBX_TILE_GIC_CPU_BASE); | 316 | gic_cpu_base_addr = __io_address(REALVIEW_PBX_TILE_GIC_CPU_BASE); |
317 | gic_dist_init(0, __io_address(REALVIEW_PBX_TILE_GIC_DIST_BASE), | 317 | gic_init(0, 29, __io_address(REALVIEW_PBX_TILE_GIC_DIST_BASE), |
318 | 29); | 318 | __io_address(REALVIEW_PBX_TILE_GIC_CPU_BASE)); |
319 | gic_cpu_init(0, __io_address(REALVIEW_PBX_TILE_GIC_CPU_BASE)); | ||
320 | } else { | 319 | } else { |
321 | gic_cpu_base_addr = __io_address(REALVIEW_PBX_GIC_CPU_BASE); | 320 | gic_cpu_base_addr = __io_address(REALVIEW_PBX_GIC_CPU_BASE); |
322 | gic_dist_init(0, __io_address(REALVIEW_PBX_GIC_DIST_BASE), | 321 | gic_init(0, IRQ_PBX_GIC_START, |
323 | IRQ_PBX_GIC_START); | 322 | __io_address(REALVIEW_PBX_GIC_DIST_BASE), |
324 | gic_cpu_init(0, __io_address(REALVIEW_PBX_GIC_CPU_BASE)); | 323 | __io_address(REALVIEW_PBX_GIC_CPU_BASE)); |
325 | } | 324 | } |
326 | } | 325 | } |
327 | 326 | ||