summaryrefslogtreecommitdiff
path: root/src/cpu/x86
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/x86')
-rw-r--r--src/cpu/x86/Kconfig3
-rw-r--r--src/cpu/x86/lapic/Makefile.inc1
-rw-r--r--src/cpu/x86/lapic/apic_timer.c13
3 files changed, 16 insertions, 1 deletions
diff --git a/src/cpu/x86/Kconfig b/src/cpu/x86/Kconfig
index 4300c3d0e4..ae3241e8b3 100644
--- a/src/cpu/x86/Kconfig
+++ b/src/cpu/x86/Kconfig
@@ -11,6 +11,9 @@ config UDELAY_LAPIC
bool
default n
+config UDELAY_LAPIC_FIXED_FSB
+ int
+
config UDELAY_TSC
bool
default n
diff --git a/src/cpu/x86/lapic/Makefile.inc b/src/cpu/x86/lapic/Makefile.inc
index f3fcadc0a7..6663c12880 100644
--- a/src/cpu/x86/lapic/Makefile.inc
+++ b/src/cpu/x86/lapic/Makefile.inc
@@ -1,5 +1,6 @@
ramstage-y += lapic.c
ramstage-y += lapic_cpu_init.c
ramstage-y += secondary.S
+romstage-$(CONFIG_UDELAY_LAPIC) += apic_timer.c
ramstage-$(CONFIG_UDELAY_LAPIC) += apic_timer.c
ramstage-y += boot_cpu.c
diff --git a/src/cpu/x86/lapic/apic_timer.c b/src/cpu/x86/lapic/apic_timer.c
index 562c79c2e8..53209fbbff 100644
--- a/src/cpu/x86/lapic/apic_timer.c
+++ b/src/cpu/x86/lapic/apic_timer.c
@@ -20,7 +20,9 @@
#include <stdint.h>
#include <delay.h>
+#include <arch/io.h>
#include <arch/cpu.h>
+#include <cpu/x86/car.h>
#include <cpu/x86/msr.h>
#include <cpu/x86/lapic.h>
@@ -28,7 +30,15 @@
* memory init.
*/
-static u32 timer_fsb = 0;
+#if CONFIG_UDELAY_LAPIC_FIXED_FSB
+static const u32 timer_fsb = CONFIG_UDELAY_LAPIC_FIXED_FSB;
+
+static int set_timer_fsb(void)
+{
+ return 0;
+}
+#else
+static u32 timer_fsb CAR_GLOBAL = 0;
static int set_timer_fsb(void)
{
@@ -60,6 +70,7 @@ static int set_timer_fsb(void)
return 0;
}
+#endif
void init_timer(void)
{