aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ixp4xx
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-05-08 09:09:47 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-05-23 13:04:51 -0400
commit234b6ceddb4fc2a4bc5b9a7670f070f6e69e0868 (patch)
tree891f57ca663b5ec0bb61bb3e38c5306e0d13d2bd /arch/arm/mach-ixp4xx
parent442c8176d2efa468577738e3a99a6e051f6e8e55 (diff)
clocksource: convert ARM 32-bit up counting clocksources
Convert ixp4xx, lpc32xx, mxc, netx, pxa, sa1100, tcc8k, tegra and u300 to use the generic mmio clocksource recently introduced. Cc: Imre Kaloz <kaloz@openwrt.org> Cc: Krzysztof Halasa <khc@pm.waw.pl> Acked-by: Eric Miao <eric.y.miao@gmail.com> Acked-by: "Hans J. Koch" <hjk@hansjkoch.de> Acked-by: Colin Cross <ccross@android.com> Cc: Erik Gilling <konkers@android.com> Cc: Olof Johansson <olof@lixom.net> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-ixp4xx')
-rw-r--r--arch/arm/mach-ixp4xx/common.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index ed19bc314318..74ed81a3cb1a 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -419,26 +419,14 @@ static void notrace ixp4xx_update_sched_clock(void)
419/* 419/*
420 * clocksource 420 * clocksource
421 */ 421 */
422static cycle_t ixp4xx_get_cycles(struct clocksource *cs)
423{
424 return *IXP4XX_OSTS;
425}
426
427static struct clocksource clocksource_ixp4xx = {
428 .name = "OSTS",
429 .rating = 200,
430 .read = ixp4xx_get_cycles,
431 .mask = CLOCKSOURCE_MASK(32),
432 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
433};
434
435unsigned long ixp4xx_timer_freq = IXP4XX_TIMER_FREQ; 422unsigned long ixp4xx_timer_freq = IXP4XX_TIMER_FREQ;
436EXPORT_SYMBOL(ixp4xx_timer_freq); 423EXPORT_SYMBOL(ixp4xx_timer_freq);
437static void __init ixp4xx_clocksource_init(void) 424static void __init ixp4xx_clocksource_init(void)
438{ 425{
439 init_sched_clock(&cd, ixp4xx_update_sched_clock, 32, ixp4xx_timer_freq); 426 init_sched_clock(&cd, ixp4xx_update_sched_clock, 32, ixp4xx_timer_freq);
440 427
441 clocksource_register_hz(&clocksource_ixp4xx, ixp4xx_timer_freq); 428 clocksource_mmio_init(&IXP4XX_OSTS, "OSTS", ixp4xx_timer_freq, 200, 32,
429 clocksource_mmio_readl_up);
442} 430}
443 431
444/* 432/*