Skip to content

Commit

Permalink
clocksource: tile: convert to use clocksource_register_hz
Browse files Browse the repository at this point in the history
Convert tile to use clocksource_register_hz.

CC: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
  • Loading branch information
John Stultz authored and Chris Metcalf committed Jun 3, 2011
1 parent 55922c9 commit 9f14517
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions arch/tile/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand All @@ -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)
Expand All @@ -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();
Expand Down

0 comments on commit 9f14517

Please sign in to comment.