]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/pci/common.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm
[linux-2.6-omap-h63xx.git] / arch / x86 / pci / common.c
index 07d5223442bf2ca09073fd7b4e84312a239f37ef..52deabc72a6facaf7975436a7bba1cf5c99d403f 100644 (file)
@@ -29,12 +29,14 @@ struct pci_raw_ops *raw_pci_ops;
 
 static int pci_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *value)
 {
-       return raw_pci_ops->read(0, bus->number, devfn, where, size, value);
+       return raw_pci_ops->read(pci_domain_nr(bus), bus->number,
+                                devfn, where, size, value);
 }
 
 static int pci_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 value)
 {
-       return raw_pci_ops->write(0, bus->number, devfn, where, size, value);
+       return raw_pci_ops->write(pci_domain_nr(bus), bus->number,
+                                 devfn, where, size, value);
 }
 
 struct pci_ops pci_root_ops = {
@@ -107,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.
@@ -114,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);
 }
 
 /*
@@ -287,6 +306,48 @@ static struct dmi_system_id __devinitdata pciprobe_dmi_table[] = {
                        DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL685c G1"),
                },
        },
+       {
+               .callback = set_bf_sort,
+               .ident = "HP ProLiant DL385 G2",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "HP"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL385 G2"),
+               },
+       },
+       {
+               .callback = set_bf_sort,
+               .ident = "HP ProLiant DL585 G2",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "HP"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL585 G2"),
+               },
+       },
+#ifdef __i386__
+       {
+               .callback = assign_all_busses,
+               .ident = "Compaq EVO N800c",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Compaq"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "EVO N800c"),
+               },
+       },
+#endif
+       {
+               .callback = set_bf_sort,
+               .ident = "HP ProLiant DL385 G2",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "HP"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL385 G2"),
+               },
+       },
+       {
+               .callback = set_bf_sort,
+               .ident = "HP ProLiant DL585 G2",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "HP"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL585 G2"),
+               },
+       },
        {}
 };
 
@@ -426,6 +487,9 @@ char * __devinit  pcibios_setup(char *str)
        } else if (!strcmp(str, "assign-busses")) {
                pci_probe |= PCI_ASSIGN_ALL_BUSSES;
                return NULL;
+       } else if (!strcmp(str, "use_crs")) {
+               pci_probe |= PCI_USE__CRS;
+               return NULL;
        } else if (!strcmp(str, "routeirq")) {
                pci_routeirq = 1;
                return NULL;