aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/config/Options.lb5
-rw-r--r--src/mainboard/densitron/dpx114/Options.lb6
-rw-r--r--src/mainboard/digitallogic/adl855pc/Options.lb6
-rw-r--r--src/mainboard/via/epia/Options.lb6
-rw-r--r--src/pc80/Config.lb5
-rw-r--r--src/pc80/udelay_io.c9
6 files changed, 37 insertions, 0 deletions
diff --git a/src/config/Options.lb b/src/config/Options.lb
index 857dce8c69..61b85f37b7 100644
--- a/src/config/Options.lb
+++ b/src/config/Options.lb
@@ -784,6 +784,11 @@ define CONFIG_UDELAY_TSC
export used
comment "Implement udelay with the x86 time stamp counter"
end
+define CONFIG_UDELAY_IO
+ default 0
+ export used
+ comment "Implement udelay with x86 io registers"
+end
define FAKE_SPDROM
default 0
export always
diff --git a/src/mainboard/densitron/dpx114/Options.lb b/src/mainboard/densitron/dpx114/Options.lb
index 0b48b69260..2073c081e1 100644
--- a/src/mainboard/densitron/dpx114/Options.lb
+++ b/src/mainboard/densitron/dpx114/Options.lb
@@ -31,6 +31,7 @@ uses CROSS_COMPILE
uses CC
uses HOSTCC
uses OBJCOPY
+uses CONFIG_UDELAY_IO
## ROM_SIZE is the size of boot ROM that this board will use.
default ROM_SIZE = 256*1024
@@ -55,6 +56,11 @@ default HAVE_MP_TABLE=0
default HAVE_HARD_RESET=1
##
+## use io based udelay function
+##
+default CONFIG_UDELAY_IO=1
+
+##
## Build code to export a programmable irq routing table
##
default HAVE_PIRQ_TABLE=1
diff --git a/src/mainboard/digitallogic/adl855pc/Options.lb b/src/mainboard/digitallogic/adl855pc/Options.lb
index 9549c3def7..dc85a6ff17 100644
--- a/src/mainboard/digitallogic/adl855pc/Options.lb
+++ b/src/mainboard/digitallogic/adl855pc/Options.lb
@@ -6,6 +6,7 @@ uses HAVE_HARD_RESET
uses HAVE_OPTION_TABLE
uses USE_OPTION_TABLE
uses CONFIG_ROM_STREAM
+uses CONFIG_UDELAY_IO
uses IRQ_SLOT_COUNT
uses MAINBOARD
uses MAINBOARD_VENDOR
@@ -59,6 +60,11 @@ default HAVE_MP_TABLE=0
default HAVE_HARD_RESET=1
##
+## use io based udelay function
+##
+default CONFIG_UDELAY_IO=1
+
+##
## Build code to export a programmable irq routing table
##
default HAVE_PIRQ_TABLE=1
diff --git a/src/mainboard/via/epia/Options.lb b/src/mainboard/via/epia/Options.lb
index 259acfbc24..97b5ad3859 100644
--- a/src/mainboard/via/epia/Options.lb
+++ b/src/mainboard/via/epia/Options.lb
@@ -10,6 +10,7 @@ uses HAVE_PIRQ_TABLE
uses USE_FALLBACK_IMAGE
uses HAVE_FALLBACK_BOOT
uses HAVE_HARD_RESET
+uses CONFIG_UDELAY_IO
uses HAVE_OPTION_TABLE
uses USE_OPTION_TABLE
uses CONFIG_ROM_STREAM
@@ -82,6 +83,11 @@ default HAVE_MP_TABLE=0
default HAVE_HARD_RESET=1
##
+## use io based udelay function
+##
+default CONFIG_UDELAY_IO=1
+
+##
## Build code to export a programmable irq routing table
##
default HAVE_PIRQ_TABLE=1
diff --git a/src/pc80/Config.lb b/src/pc80/Config.lb
index 1750a83bde..7eb32b239f 100644
--- a/src/pc80/Config.lb
+++ b/src/pc80/Config.lb
@@ -1,11 +1,16 @@
uses CONFIG_IDE
uses CONFIG_CONSOLE_VGA
+uses CONFIG_UDELAY_IO
object mc146818rtc.o
object isa-dma.o
object i8259.o
#object udelay_timer2.o CONFIG_UDELAY_TIMER2
+if CONFIG_UDELAY_IO
+ object udelay_io.o
+end
+
if CONFIG_IDE
dir ide
end
diff --git a/src/pc80/udelay_io.c b/src/pc80/udelay_io.c
new file mode 100644
index 0000000000..870af079cf
--- /dev/null
+++ b/src/pc80/udelay_io.c
@@ -0,0 +1,9 @@
+#include <arch/io.h>
+
+void udelay(int usecs)
+{
+ int i;
+ for(i = 0; i < usecs; i++)
+ outb(i&0xff, 0x80);
+}
+