aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mmp
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-12-13 08:18:04 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-12-22 17:44:32 -0500
commit5975f496e07e0f1e396939308b815f99907440ea (patch)
treefbe9f77bb9144df44745b374988909fa30dd4219 /arch/arm/mach-mmp
parent594cbf2f4ceaaacc706eb1302ff139a61092ec6f (diff)
ARM: mmp: update clock source registration
In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new interfaces were added which simplify (and optimize) the selection of the divisor shift/mult constants. Switch over to using this new interface. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-mmp')
-rw-r--r--arch/arm/mach-mmp/time.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c
index 66528193f939..0c0ab0931735 100644
--- a/arch/arm/mach-mmp/time.c
+++ b/arch/arm/mach-mmp/time.c
@@ -146,7 +146,6 @@ static cycle_t clksrc_read(struct clocksource *cs)
146 146
147static struct clocksource cksrc = { 147static struct clocksource cksrc = {
148 .name = "clocksource", 148 .name = "clocksource",
149 .shift = 20,
150 .rating = 200, 149 .rating = 200,
151 .read = clksrc_read, 150 .read = clksrc_read,
152 .mask = CLOCKSOURCE_MASK(32), 151 .mask = CLOCKSOURCE_MASK(32),
@@ -193,10 +192,8 @@ void __init timer_init(int irq)
193 ckevt.min_delta_ns = clockevent_delta2ns(MIN_DELTA, &ckevt); 192 ckevt.min_delta_ns = clockevent_delta2ns(MIN_DELTA, &ckevt);
194 ckevt.cpumask = cpumask_of(0); 193 ckevt.cpumask = cpumask_of(0);
195 194
196 cksrc.mult = clocksource_hz2mult(CLOCK_TICK_RATE, cksrc.shift);
197
198 setup_irq(irq, &timer_irq); 195 setup_irq(irq, &timer_irq);
199 196
200 clocksource_register(&cksrc); 197 clocksource_register_hz(&cksrc, CLOCK_TICK_RATE);
201 clockevents_register_device(&ckevt); 198 clockevents_register_device(&ckevt);
202} 199}