summaryrefslogtreecommitdiffstats
path: root/arch/x86/cpu/timer.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2013-04-17 16:13:36 +0000
committerSimon Glass <sjg@chromium.org>2013-05-13 13:33:21 -0700
commite761ecdbb83e3151ffea5b531523256c57e62527 (patch)
treecbd44285af8784933d8c09caba2f0f8208d1856b /arch/x86/cpu/timer.c
parent7949703a9582ec60cf841c595acd3bbe86933cd3 (diff)
downloadblackbird-obmc-uboot-e761ecdbb83e3151ffea5b531523256c57e62527.tar.gz
blackbird-obmc-uboot-e761ecdbb83e3151ffea5b531523256c57e62527.zip
x86: Add TSC timer
This timer runs at a rate that can be calculated, well over 100MHz. It is ideal for accurate timing and does not need interrupt servicing. Tidy up some old broken and unneeded implementations at the same time. To provide a consistent view of boot time, we use the same time base as coreboot. Use the base timestamp supplied by coreboot as U-Boot's base time. Signed-off-by: Simon Glass <sjg@chromium.org>base Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/x86/cpu/timer.c')
-rw-r--r--arch/x86/cpu/timer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/cpu/timer.c b/arch/x86/cpu/timer.c
index 149109d4f4..f95fce5132 100644
--- a/arch/x86/cpu/timer.c
+++ b/arch/x86/cpu/timer.c
@@ -10,8 +10,11 @@
#include <common.h>
+/* Temporary patch to maintain bisectability, removed in next commit */
+#ifndef CONFIG_SYS_X86_TSC_TIMER
unsigned long timer_get_us(void)
{
printf("timer_get_us used but not implemented.\n");
return 0;
}
+#endif
OpenPOWER on IntegriCloud