Re: [coreboot] [PATCH]make emulation/qemu-x86 slightly more standard

2010-01-11 Thread Stefan Reinauer
On 1/10/10 10:48 PM, Patrick Georgi wrote:
> attached patch makes qemu use the udelay function in
> src/pc80/udelay_io.c instead of the equivalent copy in
> src/cpu/emulation/qemu-x86/northbridge.c.
> Similar changes can be done for AMD boards (just with UDELAY_LAPIC), I
> think.
>
> Signed-off-by: Patrick Georgi 
>   
Acked-by: Stefan Reinauer 

Stefan

-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot


[coreboot] [PATCH]make emulation/qemu-x86 slightly more standard

2010-01-10 Thread Patrick Georgi
Hi,

attached patch makes qemu use the udelay function in
src/pc80/udelay_io.c instead of the equivalent copy in
src/cpu/emulation/qemu-x86/northbridge.c.
Similar changes can be done for AMD boards (just with UDELAY_LAPIC), I
think.

Signed-off-by: Patrick Georgi 

Patrick
Index: src/mainboard/emulation/qemu-x86/Kconfig
===
--- src/mainboard/emulation/qemu-x86/Kconfig(Revision 5005)
+++ src/mainboard/emulation/qemu-x86/Kconfig(Arbeitskopie)
@@ -22,13 +22,3 @@
int
default 6
depends on BOARD_EMULATION_QEMU_X86
-
-config HAVE_INIT_TIMER
-   bool
-   default n
-   depends on BOARD_EMULATION_QEMU_X86
-
-config UDELAY_IO
-   bool
-   default n
-   depends on BOARD_EMULATION_QEMU_X86
Index: src/mainboard/emulation/qemu-x86/Options.lb
===
--- src/mainboard/emulation/qemu-x86/Options.lb (Revision 5005)
+++ src/mainboard/emulation/qemu-x86/Options.lb (Arbeitskopie)
@@ -47,6 +47,8 @@
 uses CONFIG_DEFAULT_CONSOLE_LOGLEVEL
 uses CONFIG_MAXIMUM_CONSOLE_LOGLEVEL
 
+uses CONFIG_UDELAY_IO
+default CONFIG_UDELAY_IO=1
 
 default CONFIG_CONSOLE_SERIAL8250=1
 default CONFIG_DEFAULT_CONSOLE_LOGLEVEL=8
Index: src/cpu/emulation/qemu-x86/northbridge.c
===
--- src/cpu/emulation/qemu-x86/northbridge.c(Revision 5005)
+++ src/cpu/emulation/qemu-x86/northbridge.c(Arbeitskopie)
@@ -157,12 +157,3 @@
CHIP_NAME("QEMU Northbridge")
.enable_dev = enable_dev,
 };
-
-void udelay(unsigned usecs)
-{
-   unsigned i;
-   for(i = 0; i < usecs; i++)
-   inb(0x80);
-}
-
-
-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot