]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/pci/common.c
PCI: remove default PCI expansion ROM memory allocation
[linux-2.6-omap-h63xx.git] / arch / x86 / pci / common.c
index 862746390666daa6da34942889321d6eebcbe9b2..52deabc72a6facaf7975436a7bba1cf5c99d403f 100644 (file)
@@ -109,6 +109,19 @@ static void __devinit pcibios_fixup_ghosts(struct pci_bus *b)
        }
 }
 
+static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev)
+{
+       struct resource *rom_r = &dev->resource[PCI_ROM_RESOURCE];
+
+       if (rom_r->parent)
+               return;
+       if (rom_r->start)
+               /* we deal with BIOS assigned ROM later */
+               return;
+       if (!(pci_probe & PCI_ASSIGN_ROMS))
+               rom_r->start = rom_r->end = rom_r->flags = 0;
+}
+
 /*
  *  Called after each bus is probed, but before its children
  *  are examined.
@@ -116,8 +129,12 @@ static void __devinit pcibios_fixup_ghosts(struct pci_bus *b)
 
 void __devinit  pcibios_fixup_bus(struct pci_bus *b)
 {
+       struct pci_dev *dev;
+
        pcibios_fixup_ghosts(b);
        pci_read_bridge_bases(b);
+       list_for_each_entry(dev, &b->devices, bus_list)
+               pcibios_fixup_device_resources(dev);
 }
 
 /*