summaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/localtimer.h
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2012-01-10 19:26:45 +0000
committerMarc Zyngier <marc.zyngier@arm.com>2012-03-13 13:27:50 +0000
commit0ef330e10dcdbca8f4566e9eaf77015f8ce039d3 (patch)
treeb6adfb473921a37bf73372dd3dfec23a1e450d67 /arch/arm/include/asm/localtimer.h
parentabde710ca8776f851e41c3dfe78ad7dcafa26dc9 (diff)
downloadlinux-0ef330e10dcdbca8f4566e9eaf77015f8ce039d3.tar.bz2
ARM: local timers: introduce a new registration interface
In order to switch to a runtime selectable local timer, add a registration interface that timer drivers can use to register to the core. local_timer_setup() and local_timer_stop() are made weak symbols in order not to break existing setups. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm/include/asm/localtimer.h')
-rw-r--r--arch/arm/include/asm/localtimer.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/include/asm/localtimer.h b/arch/arm/include/asm/localtimer.h
index 7e1b2c5f7d17..f088d63b92c7 100644
--- a/arch/arm/include/asm/localtimer.h
+++ b/arch/arm/include/asm/localtimer.h
@@ -15,6 +15,11 @@
struct clock_event_device;
+struct local_timer_ops {
+ int (*setup)(struct clock_event_device *);
+ void (*stop)(struct clock_event_device *);
+};
+
/*
* Setup a per-cpu timer, whether it be a local timer or dummy broadcast
*/
@@ -38,6 +43,11 @@ void local_timer_stop(struct clock_event_device *);
*/
int local_timer_setup(struct clock_event_device *);
+/*
+ * Register a local timer driver
+ */
+int local_timer_register(struct local_timer_ops *);
+
#else
static inline int local_timer_setup(struct clock_event_device *evt)
@@ -48,6 +58,11 @@ static inline int local_timer_setup(struct clock_event_device *evt)
static inline void local_timer_stop(struct clock_event_device *evt)
{
}
+
+static inline int local_timer_register(struct local_timer_ops *ops)
+{
+ return -ENXIO;
+}
#endif
#endif