Commit 2218543f authored by Russell King's avatar Russell King

ARM: stmp: update clock source registration

In d7e81c26 (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: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 1d0ac3cd
...@@ -89,7 +89,6 @@ static struct clocksource cksrc_stmp3xxx = { ...@@ -89,7 +89,6 @@ static struct clocksource cksrc_stmp3xxx = {
.rating = 250, .rating = 250,
.read = stmp3xxx_clock_read, .read = stmp3xxx_clock_read,
.mask = CLOCKSOURCE_MASK(16), .mask = CLOCKSOURCE_MASK(16),
.shift = 10,
.flags = CLOCK_SOURCE_IS_CONTINUOUS, .flags = CLOCK_SOURCE_IS_CONTINUOUS,
}; };
...@@ -106,8 +105,6 @@ static struct irqaction stmp3xxx_timer_irq = { ...@@ -106,8 +105,6 @@ static struct irqaction stmp3xxx_timer_irq = {
*/ */
static void __init stmp3xxx_init_timer(void) static void __init stmp3xxx_init_timer(void)
{ {
cksrc_stmp3xxx.mult = clocksource_hz2mult(CLOCK_TICK_RATE,
cksrc_stmp3xxx.shift);
ckevt_timrot.mult = div_sc(CLOCK_TICK_RATE, NSEC_PER_SEC, ckevt_timrot.mult = div_sc(CLOCK_TICK_RATE, NSEC_PER_SEC,
ckevt_timrot.shift); ckevt_timrot.shift);
ckevt_timrot.min_delta_ns = clockevent_delta2ns(2, &ckevt_timrot); ckevt_timrot.min_delta_ns = clockevent_delta2ns(2, &ckevt_timrot);
...@@ -140,7 +137,7 @@ static void __init stmp3xxx_init_timer(void) ...@@ -140,7 +137,7 @@ static void __init stmp3xxx_init_timer(void)
setup_irq(IRQ_TIMER0, &stmp3xxx_timer_irq); setup_irq(IRQ_TIMER0, &stmp3xxx_timer_irq);
clocksource_register(&cksrc_stmp3xxx); clocksource_register_hz(&cksrc_stmp3xxx, CLOCK_TICK_RATE);
clockevents_register_device(&ckevt_timrot); clockevents_register_device(&ckevt_timrot);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment