]> Pileus Git - ~andy/linux/commitdiff
ARM: nuc: update clock source registration
authorRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 13 Dec 2010 13:20:06 +0000 (13:20 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 22 Dec 2010 22:44:38 +0000 (22:44 +0000)
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.

Acked-by: Wan zongshun <mcuos.com@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-w90x900/time.c

index b80f769bc1356509ca4fb36b198c5db13f245593..4b089cb930dc8f7dbcaddb3dc86a473bd03f4518 100644 (file)
@@ -153,7 +153,6 @@ static struct clocksource clocksource_nuc900 = {
        .rating = 200,
        .read   = nuc900_get_cycles,
        .mask   = CLOCKSOURCE_MASK(TDR_SHIFT),
-       .shift  = 10,
        .flags  = CLOCK_SOURCE_IS_CONTINUOUS,
 };
 
@@ -176,9 +175,7 @@ static void __init nuc900_clocksource_init(void)
        val |= (COUNTEN | PERIOD | PRESCALE);
        __raw_writel(val, REG_TCSR1);
 
-       clocksource_nuc900.mult =
-               clocksource_khz2mult((rate / 1000), clocksource_nuc900.shift);
-       clocksource_register(&clocksource_nuc900);
+       clocksource_register_hz(&clocksource_nuc900, rate);
 }
 
 static void __init nuc900_timer_init(void)