lkml.org 
[lkml]   [2011]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 6/6] clocksource: tile: convert to use clocksource_register_hz
    Date
    From: John Stultz <johnstul@us.ibm.com>

    Convert tile to use clocksource_register_hz.

    Untested. Help from maintainers would be appreciated.

    CC: Chris Metcalf <cmetcalf@tilera.com>
    CC: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: John Stultz <johnstul@us.ibm.com>
    ---
    arch/tile/kernel/time.c | 5 +----
    1 files changed, 1 insertions(+), 4 deletions(-)

    diff --git a/arch/tile/kernel/time.c b/arch/tile/kernel/time.c
    index c4be58c..f6f50f2a 100644
    --- a/arch/tile/kernel/time.c
    +++ b/arch/tile/kernel/time.c
    @@ -78,7 +78,6 @@ static struct clocksource cycle_counter_cs = {
    .rating = 300,
    .read = clocksource_get_cycles,
    .mask = CLOCKSOURCE_MASK(64),
    - .shift = 22, /* typical value, e.g. x86 tsc uses this */
    .flags = CLOCK_SOURCE_IS_CONTINUOUS,
    };

    @@ -91,8 +90,6 @@ void __init setup_clock(void)
    cycles_per_sec = hv_sysconf(HV_SYSCONF_CPU_SPEED);
    sched_clock_mult =
    clocksource_hz2mult(cycles_per_sec, SCHED_CLOCK_SHIFT);
    - cycle_counter_cs.mult =
    - clocksource_hz2mult(cycles_per_sec, cycle_counter_cs.shift);
    }

    void __init calibrate_delay(void)
    @@ -107,7 +104,7 @@ void __init calibrate_delay(void)
    void __init time_init(void)
    {
    /* Initialize and register the clock source. */
    - clocksource_register(&cycle_counter_cs);
    + clocksource_register_hz(&cycle_counter_cs, cycles_per_sec);

    /* Start up the tile-timer interrupt source on the boot cpu. */
    setup_tile_timer();
    --
    1.7.3.2.146.gca209


    \
     
     \ /
      Last update: 2011-06-01 09:37    [W:0.023 / U:0.060 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site