aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-12-13 08:19:11 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-12-22 17:44:35 -0500
commitf62ae0ce4369effc432ea25df09c88d7aa08965e (patch)
tree04152cd6c4f8f62ca459282843457bee0b84b641 /arch
parent8437c25e78c3af2b31bf6c8942494e34e267f446 (diff)
ARM: PXA: 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. Tested-by: Eric Miao <eric.y.miao@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-pxa/time.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c
index 293e40aeaf29..caf92c0bfba5 100644
--- a/arch/arm/mach-pxa/time.c
+++ b/arch/arm/mach-pxa/time.c
@@ -127,7 +127,6 @@ static struct clocksource cksrc_pxa_oscr0 = {
127 .rating = 200, 127 .rating = 200,
128 .read = pxa_read_oscr, 128 .read = pxa_read_oscr,
129 .mask = CLOCKSOURCE_MASK(32), 129 .mask = CLOCKSOURCE_MASK(32),
130 .shift = 20,
131 .flags = CLOCK_SOURCE_IS_CONTINUOUS, 130 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
132}; 131};
133 132
@@ -155,12 +154,9 @@ static void __init pxa_timer_init(void)
155 clockevent_delta2ns(MIN_OSCR_DELTA * 2, &ckevt_pxa_osmr0) + 1; 154 clockevent_delta2ns(MIN_OSCR_DELTA * 2, &ckevt_pxa_osmr0) + 1;
156 ckevt_pxa_osmr0.cpumask = cpumask_of(0); 155 ckevt_pxa_osmr0.cpumask = cpumask_of(0);
157 156
158 cksrc_pxa_oscr0.mult =
159 clocksource_hz2mult(clock_tick_rate, cksrc_pxa_oscr0.shift);
160
161 setup_irq(IRQ_OST0, &pxa_ost0_irq); 157 setup_irq(IRQ_OST0, &pxa_ost0_irq);
162 158
163 clocksource_register(&cksrc_pxa_oscr0); 159 clocksource_register_hz(&cksrc_pxa_oscr0, clock_tick_rate);
164 clockevents_register_device(&ckevt_pxa_osmr0); 160 clockevents_register_device(&ckevt_pxa_osmr0);
165} 161}
166 162