summaryrefslogtreecommitdiff
path: root/src/include/delay.h
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2019-07-01 10:12:45 +0300
committerPatrick Georgi <pgeorgi@google.com>2019-09-19 09:28:55 +0000
commit5a157176dd8787aed39a8d14691ba536bee08dcf (patch)
treef67cd11dcf0d1855cf38438b06ac7440f05d1a0b /src/include/delay.h
parent7841a7f82416e6ad1d00610cca43a3fa9cc6b320 (diff)
downloadcoreboot-5a157176dd8787aed39a8d14691ba536bee08dcf.tar.xz
cpu/x86/lapic: Refactor timer_fsb()
Common apic_timer code in cpu/x86 should not depend on intel header files. Change-Id: Ib099921d4b8e561daea47219385762bb00fc4548 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/34091 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/include/delay.h')
-rw-r--r--src/include/delay.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/include/delay.h b/src/include/delay.h
index 8f894d2d30..1c481be917 100644
--- a/src/include/delay.h
+++ b/src/include/delay.h
@@ -1,6 +1,17 @@
#ifndef DELAY_H
#define DELAY_H
+#include <stdint.h>
+
+#if CONFIG_UDELAY_LAPIC_FIXED_FSB != 0
+static inline u32 get_timer_fsb(void)
+{
+ return CONFIG_UDELAY_LAPIC_FIXED_FSB;
+}
+#else
+u32 get_timer_fsb(void);
+#endif
+
void init_timer(void);
void udelay(unsigned int usecs);