Skip to content

Commit

Permalink
ARM: lpc32xx: update clock source registration
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Russell King committed Dec 22, 2010
1 parent b7c7c50 commit 594cbf2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions arch/arm/mach-lpc32xx/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ static cycle_t lpc32xx_clksrc_read(struct clocksource *cs)

static struct clocksource lpc32xx_clksrc = {
.name = "lpc32xx_clksrc",
.shift = 24,
.rating = 300,
.read = lpc32xx_clksrc_read,
.mask = CLOCKSOURCE_MASK(32),
Expand Down Expand Up @@ -171,9 +170,7 @@ static void __init lpc32xx_timer_init(void)
__raw_writel(0, LCP32XX_TIMER_MCR(LPC32XX_TIMER1_BASE));
__raw_writel(LCP32XX_TIMER_CNTR_TCR_EN,
LCP32XX_TIMER_TCR(LPC32XX_TIMER1_BASE));
lpc32xx_clksrc.mult = clocksource_hz2mult(clkrate,
lpc32xx_clksrc.shift);
clocksource_register(&lpc32xx_clksrc);
clocksource_register_hz(&lpc32xx_clksrc, clkrate);
}

struct sys_timer lpc32xx_timer = {
Expand Down

0 comments on commit 594cbf2

Please sign in to comment.