Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1d0ac3cd authored by Russell King's avatar Russell King
Browse files

ARM: orion: 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.

Acked-by: default avatarNicolas Pitre <nico@fluxnic.net>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent e0387320
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -102,7 +102,6 @@ static cycle_t orion_clksrc_read(struct clocksource *cs)


static struct clocksource orion_clksrc = {
static struct clocksource orion_clksrc = {
	.name		= "orion_clocksource",
	.name		= "orion_clocksource",
	.shift		= 20,
	.rating		= 300,
	.rating		= 300,
	.read		= orion_clksrc_read,
	.read		= orion_clksrc_read,
	.mask		= CLOCKSOURCE_MASK(32),
	.mask		= CLOCKSOURCE_MASK(32),
@@ -245,8 +244,7 @@ void __init orion_time_init(unsigned int irq, unsigned int tclk)
	writel(u & ~BRIDGE_INT_TIMER0, BRIDGE_MASK);
	writel(u & ~BRIDGE_INT_TIMER0, BRIDGE_MASK);
	u = readl(TIMER_CTRL);
	u = readl(TIMER_CTRL);
	writel(u | TIMER0_EN | TIMER0_RELOAD_EN, TIMER_CTRL);
	writel(u | TIMER0_EN | TIMER0_RELOAD_EN, TIMER_CTRL);
	orion_clksrc.mult = clocksource_hz2mult(tclk, orion_clksrc.shift);
	clocksource_register_hz(&orion_clksrc, tclk);
	clocksource_register(&orion_clksrc);


	/*
	/*
	 * Setup clockevent timer (interrupt-driven.)
	 * Setup clockevent timer (interrupt-driven.)