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-netx | |
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-netx')
-rw-r--r-- | arch/arm/mach-netx/time.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/arch/arm/mach-netx/time.c b/arch/arm/mach-netx/time.c index f12f22d09b6c..e24c141ba489 100644 --- a/arch/arm/mach-netx/time.c +++ b/arch/arm/mach-netx/time.c | |||
@@ -104,19 +104,6 @@ static struct irqaction netx_timer_irq = { | |||
104 | .handler = netx_timer_interrupt, | 104 | .handler = netx_timer_interrupt, |
105 | }; | 105 | }; |
106 | 106 | ||
107 | cycle_t netx_get_cycles(struct clocksource *cs) | ||
108 | { | ||
109 | return readl(NETX_GPIO_COUNTER_CURRENT(TIMER_CLOCKSOURCE)); | ||
110 | } | ||
111 | |||
112 | static struct clocksource clocksource_netx = { | ||
113 | .name = "netx_timer", | ||
114 | .rating = 200, | ||
115 | .read = netx_get_cycles, | ||
116 | .mask = CLOCKSOURCE_MASK(32), | ||
117 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | ||
118 | }; | ||
119 | |||
120 | /* | 107 | /* |
121 | * Set up timer interrupt | 108 | * Set up timer interrupt |
122 | */ | 109 | */ |
@@ -150,7 +137,8 @@ static void __init netx_timer_init(void) | |||
150 | writel(NETX_GPIO_COUNTER_CTRL_RUN, | 137 | writel(NETX_GPIO_COUNTER_CTRL_RUN, |
151 | NETX_GPIO_COUNTER_CTRL(TIMER_CLOCKSOURCE)); | 138 | NETX_GPIO_COUNTER_CTRL(TIMER_CLOCKSOURCE)); |
152 | 139 | ||
153 | clocksource_register_hz(&clocksource_netx, CLOCK_TICK_RATE); | 140 | clocksource_mmio_init(NETX_GPIO_COUNTER_CURRENT(TIMER_CLOCKSOURCE), |
141 | "netx_timer", CLOCK_TICK_RATE, 200, 32, clocksource_mmio_readl_up); | ||
154 | 142 | ||
155 | netx_clockevent.mult = div_sc(CLOCK_TICK_RATE, NSEC_PER_SEC, | 143 | netx_clockevent.mult = div_sc(CLOCK_TICK_RATE, NSEC_PER_SEC, |
156 | netx_clockevent.shift); | 144 | netx_clockevent.shift); |