x86: tsc: Try hardware calibration first
authorBin Meng <bmeng.cn@gmail.com>
Fri, 10 Aug 2018 09:39:36 +0000 (02:39 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Mon, 20 Aug 2018 05:52:49 +0000 (13:52 +0800)
commit165db7c426f1946376c3643fd635afd6b167e3ee
tree21f553e20ef034c2094be8ac9717aabec5e92cd0
parent1cf6825a681c289032f6309d3ac5eab2fd71a703
x86: tsc: Try hardware calibration first

At present if TSC frequency is provided in the device tree, it takes
precedence over hardware calibration result. This swaps the order to
try hardware calibration first and uses device tree as last resort.

This can be helpful when a generic dts (eg: coreboot/efi payload) is
supposed to work on as many hardware as possible, including emulators
like QEMU where TSC hardware calibration sometimes fails.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
drivers/timer/tsc_timer.c