From 7c380f273cf09b202e4bc9cbe137aef1870b8a20 Mon Sep 17 00:00:00 2001 From: Marc Zyngier Date: Thu, 4 Aug 2011 11:57:04 +0100 Subject: 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 --- arch/arm/mach-vexpress/ct-ca9x4.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'arch/arm/mach-vexpress') 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) -- cgit v1.2.3