diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2011-08-04 06:57:04 -0400 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2012-03-13 09:29:58 -0400 |
commit | 7c380f273cf09b202e4bc9cbe137aef1870b8a20 (patch) | |
tree | 1731276247100c90a24462f08bf1c722e1573c39 /arch/arm/mach-vexpress/ct-ca9x4.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-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 = { | |||
42 | static void __init ct_ca9x4_map_io(void) | 42 | static void __init ct_ca9x4_map_io(void) |
43 | { | 43 | { |
44 | iotable_init(ct_ca9x4_io_desc, ARRAY_SIZE(ct_ca9x4_io_desc)); | 44 | iotable_init(ct_ca9x4_io_desc, ARRAY_SIZE(ct_ca9x4_io_desc)); |
45 | #ifdef CONFIG_LOCAL_TIMERS | ||
46 | twd_base = ioremap(A9_MPCORE_TWD, SZ_32); | ||
47 | #endif | ||
48 | } | 45 | } |
49 | 46 | ||
47 | #ifdef CONFIG_HAVE_ARM_TWD | ||
48 | static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, A9_MPCORE_TWD, IRQ_LOCALTIMER); | ||
49 | |||
50 | static void __init ca9x4_twd_init(void) | ||
51 | { | ||
52 | int err = twd_local_timer_register(&twd_local_timer); | ||
53 | if (err) | ||
54 | pr_err("twd_local_timer_register failed %d\n", err); | ||
55 | } | ||
56 | #else | ||
57 | #define ca9x4_twd_init() do {} while(0) | ||
58 | #endif | ||
59 | |||
50 | static void __init ct_ca9x4_init_irq(void) | 60 | static void __init ct_ca9x4_init_irq(void) |
51 | { | 61 | { |
52 | gic_init(0, 29, ioremap(A9_MPCORE_GIC_DIST, SZ_4K), | 62 | gic_init(0, 29, ioremap(A9_MPCORE_GIC_DIST, SZ_4K), |
53 | ioremap(A9_MPCORE_GIC_CPU, SZ_256)); | 63 | ioremap(A9_MPCORE_GIC_CPU, SZ_256)); |
64 | ca9x4_twd_init(); | ||
54 | } | 65 | } |
55 | 66 | ||
56 | static void ct_ca9x4_clcd_enable(struct clcd_fb *fb) | 67 | static void ct_ca9x4_clcd_enable(struct clcd_fb *fb) |