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
This commit is contained in:
parent
a09ab6dc53
commit
453dfdfdaf
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
@ -54,6 +55,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
|
||||
##
|
||||
|
|
|
@ -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
|
||||
|
@ -58,6 +59,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
|
||||
##
|
||||
|
|
|
@ -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
|
||||
|
@ -81,6 +82,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
|
||||
##
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
#include <arch/io.h>
|
||||
|
||||
void udelay(int usecs)
|
||||
{
|
||||
int i;
|
||||
for(i = 0; i < usecs; i++)
|
||||
outb(i&0xff, 0x80);
|
||||
}
|
||||
|
Loading…
Reference in New Issue