aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-05-08 09:06:52 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-05-23 13:04:51 -0400
commit442c8176d2efa468577738e3a99a6e051f6e8e55 (patch)
treefcf309e5f23b60b96e95ef22d70bb5f0e473c512 /include
parent1ba4c3cb171d9899a3eaa2e45fa171e0704c1377 (diff)
clocksource: add common mmio clocksource
Add a generic mmio clocksource, covering both 32-bit and 16-bit register access sizes, for up or down counters. This can be used to easily create clocksources for simple counter-based implementations. Cc: Alessandro Rubini <rubini@unipv.it> Cc: Colin Cross <ccross@android.com> Cc: Eric Miao <eric.y.miao@gmail.com> Cc: Erik Gilling <konkers@android.com> Acked-by: "Hans J. Koch" <hjk@hansjkoch.de> Cc: Imre Kaloz <kaloz@openwrt.org> Cc: Krzysztof Halasa <khc@pm.waw.pl> Cc: Kukjin Kim <kgene.kim@samsung.com> Cc: Lennert Buytenhek <kernel@wantstofly.org> Cc: Linus Walleij <linus.walleij@stericsson.com> Cc: linux-omap@vger.kernel.org Acked-by: Nicolas Pitre <nico@fluxnic.net> Cc: Olof Johansson <olof@lixom.net> Tested-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Tony Lindgren <tony@atomide.com> Reviewed-by: Viresh Kumar <viresh.kumar@st.com> Cc: Wan ZongShun <mcuos.com@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include')
-rw-r--r--include/linux/clocksource.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
index c918fbd33ee5..d4646b48dc4a 100644
--- a/include/linux/clocksource.h
+++ b/include/linux/clocksource.h
@@ -337,6 +337,14 @@ static inline void update_vsyscall_tz(void)
337 337
338extern void timekeeping_notify(struct clocksource *clock); 338extern void timekeeping_notify(struct clocksource *clock);
339 339
340extern cycle_t clocksource_mmio_readl_up(struct clocksource *);
341extern cycle_t clocksource_mmio_readl_down(struct clocksource *);
342extern cycle_t clocksource_mmio_readw_up(struct clocksource *);
343extern cycle_t clocksource_mmio_readw_down(struct clocksource *);
344
345extern int clocksource_mmio_init(void __iomem *, const char *,
346 unsigned long, int, unsigned, cycle_t (*)(struct clocksource *));
347
340extern int clocksource_i8253_init(void); 348extern int clocksource_i8253_init(void);
341 349
342#endif /* _LINUX_CLOCKSOURCE_H */ 350#endif /* _LINUX_CLOCKSOURCE_H */