X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=arch%2Fx86%2Flib%2Fpci.c;h=71878dd7dcbed21c6a4f1adf6bd4534c0be5bb36;hb=a76fc70ee190416e0c161efebdb955a5fac904d3;hp=e791e88bd421107adbbd28112a5bb09c96f3d5f8;hpb=fea25720013f84427a0ba8833a38614fcaf488ba;p=u-boot diff --git a/arch/x86/lib/pci.c b/arch/x86/lib/pci.c index e791e88bd4..71878dd7dc 100644 --- a/arch/x86/lib/pci.c +++ b/arch/x86/lib/pci.c @@ -1,6 +1,6 @@ /* * (C) Copyright 2002 - * Daniel Engström, Omicron Ceti AB, + * Daniel Engström, Omicron Ceti AB, * * See file CREDITS for list of people who contributed to this * project. @@ -42,11 +42,13 @@ int pci_shadow_rom(pci_dev_t dev, unsigned char *dest) u16 device; u32 class_code; + u32 pci_data; + hose = pci_bus_to_hose(PCI_BUS(dev)); -#if 0 - printf("pci_shadow_rom() asked to shadow device %x to %x\n", + + debug("pci_shadow_rom() asked to shadow device %x to %x\n", dev, (u32)dest); -#endif + pci_read_config_word(dev, PCI_VENDOR_ID, &vendor); pci_read_config_word(dev, PCI_DEVICE_ID, &device); pci_read_config_dword(dev, PCI_CLASS_REVISION, &class_code); @@ -67,7 +69,7 @@ int pci_shadow_rom(pci_dev_t dev, unsigned char *dest) return -1; } - size = (~(addr_reg&PCI_ROM_ADDRESS_MASK))+1; + size = (~(addr_reg&PCI_ROM_ADDRESS_MASK)) + 1; debug("ROM is %d bytes\n", size); @@ -80,27 +82,25 @@ int pci_shadow_rom(pci_dev_t dev, unsigned char *dest) |PCI_ROM_ADDRESS_ENABLE); - for (i=rom_addr;i