Skip to content

Commit a139723

Browse files
John Stultzjohnstultz-work
authored andcommitted
clocksource: xtensa: Convert to clocksource_register_hz/khz
This converts the xtensa clocksource to use clocksource_register_hz/khz This is untested, so any assistance in testing would be appreciated! CC: Chris Zankel <chris@zankel.net> CC: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: John Stultz <johnstul@us.ibm.com>
1 parent 60d687e commit a139723

1 file changed

Lines changed: 1 addition & 12 deletions

File tree

‎arch/xtensa/kernel/time.c‎

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,6 @@ static struct clocksource ccount_clocksource = {
4141
.rating = 200,
4242
.read = ccount_read,
4343
.mask = CLOCKSOURCE_MASK(32),
44-
/*
45-
* With a shift of 22 the lower limit of the cpu clock is
46-
* 1MHz, where NSEC_PER_CCOUNT is 1000 or a bit less than
47-
* 2^10: Since we have 32 bits and the multiplicator can
48-
* already take up as much as 10 bits, this leaves us with
49-
* remaining upper 22 bits.
50-
*/
51-
.shift = 22,
5244
};
5345

5446
static irqreturn_t timer_interrupt(int irq, void *dev_id);
@@ -66,10 +58,7 @@ void __init time_init(void)
6658
printk("%d.%02d MHz\n", (int)ccount_per_jiffy/(1000000/HZ),
6759
(int)(ccount_per_jiffy/(10000/HZ))%100);
6860
#endif
69-
ccount_clocksource.mult =
70-
clocksource_hz2mult(CCOUNT_PER_JIFFY * HZ,
71-
ccount_clocksource.shift);
72-
clocksource_register(&ccount_clocksource);
61+
clocksource_register_hz(&ccount_clocksource, CCOUNT_PER_JIFFY * HZ);
7362

7463
/* Initialize the linux timer interrupt. */
7564

0 commit comments

Comments
 (0)