diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2011-08-04 11:57:04 +0100 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2012-03-13 13:29:58 +0000 |
commit | 7c380f273cf09b202e4bc9cbe137aef1870b8a20 (patch) | |
tree | 1731276247100c90a24462f08bf1c722e1573c39 /arch/arm/mach-realview/realview_pbx.c | |
parent | a45c983f85328be9d0540a6b8250609dbf16872c (diff) |
ARM: plat-versatile: convert to twd_local_timer_register() interface
Add support for the new smp_twd runtime registration interface
to the RealView/VE platforms, and remove the old compile-time support.
Tested on EB11MP.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm/mach-realview/realview_pbx.c')
-rw-r--r-- | arch/arm/mach-realview/realview_pbx.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c index ac715645b86..6ddcc6147bf 100644 --- a/arch/arm/mach-realview/realview_pbx.c +++ b/arch/arm/mach-realview/realview_pbx.c @@ -298,6 +298,21 @@ static void __init gic_init_irq(void) } } +#ifdef CONFIG_HAVE_ARM_TWD +static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, + REALVIEW_PBX_TILE_TWD_BASE, + IRQ_LOCALTIMER); + +static void __init realview_pbx_twd_init(void) +{ + int err = twd_local_timer_register(&twd_local_timer); + if (err) + pr_err("twd_local_timer_register failed %d\n", err); +} +#else +#define realview_pbx_twd_init() do { } while(0) +#endif + static void __init realview_pbx_timer_init(void) { timer0_va_base = __io_address(REALVIEW_PBX_TIMER0_1_BASE); @@ -305,11 +320,8 @@ static void __init realview_pbx_timer_init(void) timer2_va_base = __io_address(REALVIEW_PBX_TIMER2_3_BASE); timer3_va_base = __io_address(REALVIEW_PBX_TIMER2_3_BASE) + 0x20; -#ifdef CONFIG_LOCAL_TIMERS - if (core_tile_pbx11mp() || core_tile_pbxa9mp()) - twd_base = __io_address(REALVIEW_PBX_TILE_TWD_BASE); -#endif realview_timer_init(IRQ_PBX_TIMER0_1); + realview_pbx_twd_init(); } static struct sys_timer realview_pbx_timer = { |