Commit 894cf56b authored by Russell King's avatar Russell King

ARM: nuc: 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 avatarWan zongshun <mcuos.com@gmail.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent da797478
...@@ -153,7 +153,6 @@ static struct clocksource clocksource_nuc900 = { ...@@ -153,7 +153,6 @@ static struct clocksource clocksource_nuc900 = {
.rating = 200, .rating = 200,
.read = nuc900_get_cycles, .read = nuc900_get_cycles,
.mask = CLOCKSOURCE_MASK(TDR_SHIFT), .mask = CLOCKSOURCE_MASK(TDR_SHIFT),
.shift = 10,
.flags = CLOCK_SOURCE_IS_CONTINUOUS, .flags = CLOCK_SOURCE_IS_CONTINUOUS,
}; };
...@@ -176,9 +175,7 @@ static void __init nuc900_clocksource_init(void) ...@@ -176,9 +175,7 @@ static void __init nuc900_clocksource_init(void)
val |= (COUNTEN | PERIOD | PRESCALE); val |= (COUNTEN | PERIOD | PRESCALE);
__raw_writel(val, REG_TCSR1); __raw_writel(val, REG_TCSR1);
clocksource_nuc900.mult = clocksource_register_hz(&clocksource_nuc900, rate);
clocksource_khz2mult((rate / 1000), clocksource_nuc900.shift);
clocksource_register(&clocksource_nuc900);
} }
static void __init nuc900_timer_init(void) static void __init nuc900_timer_init(void)
......
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