diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-05-08 09:09:47 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-05-23 13:04:51 -0400 |
commit | 234b6ceddb4fc2a4bc5b9a7670f070f6e69e0868 (patch) | |
tree | 891f57ca663b5ec0bb61bb3e38c5306e0d13d2bd /arch/arm/mach-lpc32xx/timer.c | |
parent | 442c8176d2efa468577738e3a99a6e051f6e8e55 (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-lpc32xx/timer.c')
-rw-r--r-- | arch/arm/mach-lpc32xx/timer.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/arch/arm/mach-lpc32xx/timer.c b/arch/arm/mach-lpc32xx/timer.c index 6162ac308c20..b42c909bbeeb 100644 --- a/arch/arm/mach-lpc32xx/timer.c +++ b/arch/arm/mach-lpc32xx/timer.c | |||
@@ -31,19 +31,6 @@ | |||
31 | #include <mach/platform.h> | 31 | #include <mach/platform.h> |
32 | #include "common.h" | 32 | #include "common.h" |
33 | 33 | ||
34 | static cycle_t lpc32xx_clksrc_read(struct clocksource *cs) | ||
35 | { | ||
36 | return (cycle_t)__raw_readl(LCP32XX_TIMER_TC(LPC32XX_TIMER1_BASE)); | ||
37 | } | ||
38 | |||
39 | static struct clocksource lpc32xx_clksrc = { | ||
40 | .name = "lpc32xx_clksrc", | ||
41 | .rating = 300, | ||
42 | .read = lpc32xx_clksrc_read, | ||
43 | .mask = CLOCKSOURCE_MASK(32), | ||
44 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | ||
45 | }; | ||
46 | |||
47 | static int lpc32xx_clkevt_next_event(unsigned long delta, | 34 | static int lpc32xx_clkevt_next_event(unsigned long delta, |
48 | struct clock_event_device *dev) | 35 | struct clock_event_device *dev) |
49 | { | 36 | { |
@@ -170,7 +157,9 @@ static void __init lpc32xx_timer_init(void) | |||
170 | __raw_writel(0, LCP32XX_TIMER_MCR(LPC32XX_TIMER1_BASE)); | 157 | __raw_writel(0, LCP32XX_TIMER_MCR(LPC32XX_TIMER1_BASE)); |
171 | __raw_writel(LCP32XX_TIMER_CNTR_TCR_EN, | 158 | __raw_writel(LCP32XX_TIMER_CNTR_TCR_EN, |
172 | LCP32XX_TIMER_TCR(LPC32XX_TIMER1_BASE)); | 159 | LCP32XX_TIMER_TCR(LPC32XX_TIMER1_BASE)); |
173 | clocksource_register_hz(&lpc32xx_clksrc, clkrate); | 160 | |
161 | clocksource_mmio_init(LCP32XX_TIMER_TC(LPC32XX_TIMER1_BASE), | ||
162 | "lpc32xx_clksrc", clkrate, 300, 32, clocksource_mmio_readl_up); | ||
174 | } | 163 | } |
175 | 164 | ||
176 | struct sys_timer lpc32xx_timer = { | 165 | struct sys_timer lpc32xx_timer = { |