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-vexpress/ct-ca9x4.c | |
parent | a45c983f85328be9d0540a6b8250609dbf16872c (diff) | |
download | talos-op-linux-7c380f273cf09b202e4bc9cbe137aef1870b8a20.tar.gz talos-op-linux-7c380f273cf09b202e4bc9cbe137aef1870b8a20.zip |
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-vexpress/ct-ca9x4.c')
-rw-r--r-- | arch/arm/mach-vexpress/ct-ca9x4.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/arch/arm/mach-vexpress/ct-ca9x4.c b/arch/arm/mach-vexpress/ct-ca9x4.c index a2f7d5d3ca40..e5abe85fefa0 100644 --- a/arch/arm/mach-vexpress/ct-ca9x4.c +++ b/arch/arm/mach-vexpress/ct-ca9x4.c @@ -42,15 +42,26 @@ static struct map_desc ct_ca9x4_io_desc[] __initdata = { static void __init ct_ca9x4_map_io(void) { iotable_init(ct_ca9x4_io_desc, ARRAY_SIZE(ct_ca9x4_io_desc)); -#ifdef CONFIG_LOCAL_TIMERS - twd_base = ioremap(A9_MPCORE_TWD, SZ_32); -#endif } +#ifdef CONFIG_HAVE_ARM_TWD +static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, A9_MPCORE_TWD, IRQ_LOCALTIMER); + +static void __init ca9x4_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 ca9x4_twd_init() do {} while(0) +#endif + static void __init ct_ca9x4_init_irq(void) { gic_init(0, 29, ioremap(A9_MPCORE_GIC_DIST, SZ_4K), ioremap(A9_MPCORE_GIC_CPU, SZ_256)); + ca9x4_twd_init(); } static void ct_ca9x4_clcd_enable(struct clcd_fb *fb) |