From 453dfdfdafbc2d10ec9289699a22e8c4fd8c2ad6 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Sun, 4 Dec 2005 17:50:32 +0000 Subject: implement io based udelay function for all mainboards that lack an apic timer (or just failed otherwise due to missing udelay) git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2131 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/pc80/Config.lb | 5 +++++ src/pc80/udelay_io.c | 9 +++++++++ 2 files changed, 14 insertions(+) create mode 100644 src/pc80/udelay_io.c (limited to 'src/pc80') 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 + +void udelay(int usecs) +{ + int i; + for(i = 0; i < usecs; i++) + outb(i&0xff, 0x80); +} + -- cgit v1.2.3