net: get mac address from environment and use eth util funcs
[oweals/u-boot.git] / lib_i386 / bios_setup.c
index bc9781550dc60dfac3871c20a930f27120bbac2c..33c842c6a0aba7e8c54f12b7196b48776282575b 100644 (file)
@@ -36,6 +36,8 @@
 #include <asm/realmode.h>
 #include <asm/io.h>
 
+DECLARE_GLOBAL_DATA_PTR;
+
 #define NUMVECTS       256
 
 #define BIOS_DATA        ((char*)0x400)
@@ -136,11 +138,11 @@ static void setvector(int vector, u16 segment, void *handler)
 
 int bios_setup(void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
        static int done=0;
        int vector;
+#ifdef CONFIG_PCI
        struct pci_controller *pri_hose;
-
+#endif
        if (done) {
                return 0;
        }
@@ -222,12 +224,13 @@ int bios_setup(void)
         * (This, ofcause break on multi hose systems,
         *  but our PCI BIOS only support one hose anyway)
         */
+#ifdef CONFIG_PCI
        pri_hose = pci_bus_to_hose(0);
        if (NULL != pri_hose) {
                /* fill in last pci bus number for use by the realmode
                 * PCI BIOS */
                RELOC_16_BYTE(0xf000, pci_last_bus) = pri_hose->last_busno;
        }
-
+#endif
        return 0;
 }