Lines Matching full:tsc
4 * TSC calibration codes are adapted from Linux kernel
5 * arch/x86/kernel/tsc_msr.c and arch/x86/kernel/tsc.c
74 * TSC on Intel Atom SoCs capable of determining TSC frequency by MSR is
79 * TSC, so we have no other choice than to trust it.
81 * Returns the TSC frequency in MHz or 0 if HW does not provide it.
118 /* TSC frequency = maximum resolved freq * maximum resolved bus ratio */ in cpu_mhz_from_msr()
120 debug("TSC runs at %lu MHz\n", res); in cpu_mhz_from_msr()
141 * see the same MSB (and overhead like doing a single TSC
157 * use the TSC value at the transitions to calculate a pretty
158 * good value for the TSC frequencty.
171 u64 tsc = 0, prev_tsc = 0; in pit_expect_msb() local
176 prev_tsc = tsc; in pit_expect_msb()
177 tsc = rdtsc(); in pit_expect_msb()
180 *tscp = tsc; in pit_expect_msb()
184 * will be based on the error terms on the TSC values. in pit_expect_msb()
201 u64 tsc, delta; in quick_pit_calibrate() local
230 if (pit_expect_msb(0xff, &tsc, &d1)) { in quick_pit_calibrate()
238 delta -= tsc; in quick_pit_calibrate()
244 * all TSC reads were stable wrt the PIT. in quick_pit_calibrate()
254 debug("Fast TSC calibration failed\n"); in quick_pit_calibrate()
264 * any odd delays anywhere, and the TSC reads are in quick_pit_calibrate()
273 debug("Fast TSC calibration using PIT\n"); in quick_pit_calibrate()
277 /* Get the speed of the TSC timer in MHz */
348 panic("TSC frequency is ZERO"); in tsc_timer_probe()
362 { .compatible = "x86,tsc-timer", },