x86: Add quick TSC calibration via PIT
PATCH v2 3/4 x86: Add quick TSC calibration via PIT
Use the same way that Linux does for quick TSC calibration via PIT when calibration via MSR fails.
Signed-off-by Bin Meng <[email protected]>
Acked-by Simon Glass <[email protected]>
--- arch/x86/include/asm/i8254.h | 3 + arch/x86/lib/tsc_timer.c | 155 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 158 insertions(+)
arch/x86/include/asm/i8254.h +3 -0
@@ -36,4 +36,7 @@#define PIT_CMD_MODE4 0x08/* Select mode 4 */ #define PIT_CMD_MODE5 0x0A/* Select mode 5 */ +/* The clock frequency of the i8253/i8254 PIT */ +#define PIT_TICK_RATE 1193182ul +#endif
arch/x86/lib/tsc_timer.c +155 -0
167 lines not on this page · raw message
Signature · 1 line
1.8.2.1
PATCH v2 3/4 x86: Add quick TSC calibration via PIT
Quoted 5 lines · Bin Meng
Use the same way that Linux does for quick TSC calibration via PIT when calibration via MSR fails.
Signed-off-by Bin Meng <[email protected]>Acked-by Simon Glass <[email protected]>
Applied to u-boot-x86/master, thanks!