clocksource: Convert tcb_clksrc to use clocksource_register_hz/khz
authorJohn Stultz <john.stultz@linaro.org>
Fri, 20 May 2011 23:45:37 +0000 (16:45 -0700)
committerJohn Stultz <john.stultz@linaro.org>
Tue, 22 Nov 2011 03:01:42 +0000 (19:01 -0800)
Convert tcb_clksrc to use clocksource_register_hz.

CC: Nikolaus Voss <n.voss@weinmann.de>
CC: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Nikolaus Voss <n.voss@weinmann.de>
Signed-off-by: John Stultz <john.stultz@linaro.org>
drivers/clocksource/tcb_clksrc.c

index 79c47e8..55d0f95 100644 (file)
@@ -59,7 +59,6 @@ static struct clocksource clksrc = {
        .rating         = 200,
        .read           = tc_get_cycles,
        .mask           = CLOCKSOURCE_MASK(32),
-       .shift          = 18,
        .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
 };
 
@@ -256,7 +255,6 @@ static int __init tcb_clksrc_init(void)
                best_divisor_idx = i;
        }
 
-       clksrc.mult = clocksource_hz2mult(divided_rate, clksrc.shift);
 
        printk(bootinfo, clksrc.name, CONFIG_ATMEL_TCB_CLKSRC_BLOCK,
                        divided_rate / 1000000,
@@ -292,7 +290,7 @@ static int __init tcb_clksrc_init(void)
        __raw_writel(ATMEL_TC_SYNC, tcaddr + ATMEL_TC_BCR);
 
        /* and away we go! */
-       clocksource_register(&clksrc);
+       clocksource_register_hz(&clksrc, divided_rate);
 
        /* channel 2:  periodic and oneshot timer support */
        setup_clkevents(tc, clk32k_divisor_idx);