Commit 6b46340a authored by Russell King's avatar Russell King

ARM: tcc8k: 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 2c760b5b
......@@ -35,7 +35,6 @@ static struct clocksource clocksource_tcc = {
.rating = 200,
.read = tcc_get_cycles,
.mask = CLOCKSOURCE_MASK(32),
.shift = 28,
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};
......@@ -103,9 +102,7 @@ static int __init tcc_clockevent_init(struct clk *clock)
{
unsigned int c = clk_get_rate(clock);
clocksource_tcc.mult = clocksource_hz2mult(c,
clocksource_tcc.shift);
clocksource_register(&clocksource_tcc);
clocksource_register_hz(&clocksource_tcc, c);
clockevent_tcc.mult = div_sc(c, NSEC_PER_SEC,
clockevent_tcc.shift);
......
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