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-tcc8k/time.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-tcc8k/time.c')
-rw-r--r-- | arch/arm/mach-tcc8k/time.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/arch/arm/mach-tcc8k/time.c b/arch/arm/mach-tcc8k/time.c index e0a8d609afe1..a96babe83771 100644 --- a/arch/arm/mach-tcc8k/time.c +++ b/arch/arm/mach-tcc8k/time.c | |||
@@ -25,19 +25,6 @@ | |||
25 | 25 | ||
26 | static void __iomem *timer_base; | 26 | static void __iomem *timer_base; |
27 | 27 | ||
28 | static cycle_t tcc_get_cycles(struct clocksource *cs) | ||
29 | { | ||
30 | return __raw_readl(timer_base + TC32MCNT_OFFS); | ||
31 | } | ||
32 | |||
33 | static struct clocksource clocksource_tcc = { | ||
34 | .name = "tcc_tc32", | ||
35 | .rating = 200, | ||
36 | .read = tcc_get_cycles, | ||
37 | .mask = CLOCKSOURCE_MASK(32), | ||
38 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | ||
39 | }; | ||
40 | |||
41 | static int tcc_set_next_event(unsigned long evt, | 28 | static int tcc_set_next_event(unsigned long evt, |
42 | struct clock_event_device *unused) | 29 | struct clock_event_device *unused) |
43 | { | 30 | { |
@@ -102,7 +89,8 @@ static int __init tcc_clockevent_init(struct clk *clock) | |||
102 | { | 89 | { |
103 | unsigned int c = clk_get_rate(clock); | 90 | unsigned int c = clk_get_rate(clock); |
104 | 91 | ||
105 | clocksource_register_hz(&clocksource_tcc, c); | 92 | clocksource_mmio_init(timer_base + TC32MCNT_OFFS, "tcc_tc32", c, |
93 | 200, 32, clocksource_mmio_readl_up); | ||
106 | 94 | ||
107 | clockevent_tcc.mult = div_sc(c, NSEC_PER_SEC, | 95 | clockevent_tcc.mult = div_sc(c, NSEC_PER_SEC, |
108 | clockevent_tcc.shift); | 96 | clockevent_tcc.shift); |