aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2012-01-10 14:39:26 -0500
committerMarc Zyngier <marc.zyngier@arm.com>2012-03-13 09:27:50 -0400
commit81e46f7b6dcec485bcb1f988ba4dc5b20189573c (patch)
tree13e8da9addc2c1428ae3ac308e5a9223efc29a8a /arch/arm/include/asm
parent0ef330e10dcdbca8f4566e9eaf77015f8ce039d3 (diff)
ARM: smp_twd: add runtime registration support
Add support for the new registration interface to smp_twd. Platforms can populate a struct twd_local_timer with MMIO and IRQ resources, and then call twd_local_timer_register() to have the timer registered with the core. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm/include/asm')
-rw-r--r--arch/arm/include/asm/smp_twd.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/arch/arm/include/asm/smp_twd.h b/arch/arm/include/asm/smp_twd.h
index bf8449da480..16c89b793f9 100644
--- a/arch/arm/include/asm/smp_twd.h
+++ b/arch/arm/include/asm/smp_twd.h
@@ -18,10 +18,26 @@
18#define TWD_TIMER_CONTROL_PERIODIC (1 << 1) 18#define TWD_TIMER_CONTROL_PERIODIC (1 << 1)
19#define TWD_TIMER_CONTROL_IT_ENABLE (1 << 2) 19#define TWD_TIMER_CONTROL_IT_ENABLE (1 << 2)
20 20
21#include <linux/ioport.h>
22
21struct clock_event_device; 23struct clock_event_device;
22 24
23extern void __iomem *twd_base; 25extern void __iomem *twd_base;
24 26
25void twd_timer_setup(struct clock_event_device *); 27int twd_timer_setup(struct clock_event_device *);
28
29struct twd_local_timer {
30 struct resource res[2];
31};
32
33#define DEFINE_TWD_LOCAL_TIMER(name,base,irq) \
34struct twd_local_timer name __initdata = { \
35 .res = { \
36 DEFINE_RES_MEM(base, 0x10), \
37 DEFINE_RES_IRQ(irq), \
38 }, \
39};
40
41int twd_local_timer_register(struct twd_local_timer *);
26 42
27#endif 43#endif