aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/pci/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/pci/common.c')
-rw-r--r--arch/x86/pci/common.c77
1 files changed, 55 insertions, 22 deletions
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
index 2a4d751818b7..6e64aaf00d1d 100644
--- a/arch/x86/pci/common.c
+++ b/arch/x86/pci/common.c
@@ -77,17 +77,48 @@ int pcibios_scanned;
77 */ 77 */
78DEFINE_SPINLOCK(pci_config_lock); 78DEFINE_SPINLOCK(pci_config_lock);
79 79
80static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev) 80static int __devinit can_skip_ioresource_align(const struct dmi_system_id *d)
81{ 81{
82 struct resource *rom_r = &dev->resource[PCI_ROM_RESOURCE]; 82 pci_probe |= PCI_CAN_SKIP_ISA_ALIGN;
83 83 printk(KERN_INFO "PCI: %s detected, can skip ISA alignment\n", d->ident);
84 if (rom_r->parent) 84 return 0;
85 return; 85}
86 if (rom_r->start) 86
87 /* we deal with BIOS assigned ROM later */ 87static struct dmi_system_id can_skip_pciprobe_dmi_table[] __devinitdata = {
88 return; 88/*
89 if (!(pci_probe & PCI_ASSIGN_ROMS)) 89 * Systems where PCI IO resource ISA alignment can be skipped
90 rom_r->start = rom_r->end = rom_r->flags = 0; 90 * when the ISA enable bit in the bridge control is not set
91 */
92 {
93 .callback = can_skip_ioresource_align,
94 .ident = "IBM System x3800",
95 .matches = {
96 DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
97 DMI_MATCH(DMI_PRODUCT_NAME, "x3800"),
98 },
99 },
100 {
101 .callback = can_skip_ioresource_align,
102 .ident = "IBM System x3850",
103 .matches = {
104 DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
105 DMI_MATCH(DMI_PRODUCT_NAME, "x3850"),
106 },
107 },
108 {
109 .callback = can_skip_ioresource_align,
110 .ident = "IBM System x3950",
111 .matches = {
112 DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
113 DMI_MATCH(DMI_PRODUCT_NAME, "x3950"),
114 },
115 },
116 {}
117};
118
119void __init dmi_check_skip_isa_align(void)
120{
121 dmi_check_system(can_skip_pciprobe_dmi_table);
91} 122}
92 123
93/* 124/*
@@ -97,11 +128,7 @@ static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev)
97 128
98void __devinit pcibios_fixup_bus(struct pci_bus *b) 129void __devinit pcibios_fixup_bus(struct pci_bus *b)
99{ 130{
100 struct pci_dev *dev;
101
102 pci_read_bridge_bases(b); 131 pci_read_bridge_bases(b);
103 list_for_each_entry(dev, &b->devices, bus_list)
104 pcibios_fixup_device_resources(dev);
105} 132}
106 133
107/* 134/*
@@ -275,18 +302,18 @@ static struct dmi_system_id __devinitdata pciprobe_dmi_table[] = {
275 }, 302 },
276 { 303 {
277 .callback = set_bf_sort, 304 .callback = set_bf_sort,
278 .ident = "HP ProLiant DL385 G2", 305 .ident = "HP ProLiant DL360",
279 .matches = { 306 .matches = {
280 DMI_MATCH(DMI_SYS_VENDOR, "HP"), 307 DMI_MATCH(DMI_SYS_VENDOR, "HP"),
281 DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL385 G2"), 308 DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL360"),
282 }, 309 },
283 }, 310 },
284 { 311 {
285 .callback = set_bf_sort, 312 .callback = set_bf_sort,
286 .ident = "HP ProLiant DL585 G2", 313 .ident = "HP ProLiant DL380",
287 .matches = { 314 .matches = {
288 DMI_MATCH(DMI_SYS_VENDOR, "HP"), 315 DMI_MATCH(DMI_SYS_VENDOR, "HP"),
289 DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL585 G2"), 316 DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL380"),
290 }, 317 },
291 }, 318 },
292#ifdef __i386__ 319#ifdef __i386__
@@ -318,13 +345,16 @@ static struct dmi_system_id __devinitdata pciprobe_dmi_table[] = {
318 {} 345 {}
319}; 346};
320 347
348void __init dmi_check_pciprobe(void)
349{
350 dmi_check_system(pciprobe_dmi_table);
351}
352
321struct pci_bus * __devinit pcibios_scan_root(int busnum) 353struct pci_bus * __devinit pcibios_scan_root(int busnum)
322{ 354{
323 struct pci_bus *bus = NULL; 355 struct pci_bus *bus = NULL;
324 struct pci_sysdata *sd; 356 struct pci_sysdata *sd;
325 357
326 dmi_check_system(pciprobe_dmi_table);
327
328 while ((bus = pci_find_next_bus(bus)) != NULL) { 358 while ((bus = pci_find_next_bus(bus)) != NULL) {
329 if (bus->number == busnum) { 359 if (bus->number == busnum) {
330 /* Already scanned */ 360 /* Already scanned */
@@ -462,6 +492,9 @@ char * __devinit pcibios_setup(char *str)
462 } else if (!strcmp(str, "routeirq")) { 492 } else if (!strcmp(str, "routeirq")) {
463 pci_routeirq = 1; 493 pci_routeirq = 1;
464 return NULL; 494 return NULL;
495 } else if (!strcmp(str, "skip_isa_align")) {
496 pci_probe |= PCI_CAN_SKIP_ISA_ALIGN;
497 return NULL;
465 } 498 }
466 return str; 499 return str;
467} 500}
@@ -489,7 +522,7 @@ void pcibios_disable_device (struct pci_dev *dev)
489 pcibios_disable_irq(dev); 522 pcibios_disable_irq(dev);
490} 523}
491 524
492struct pci_bus *pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node) 525struct pci_bus * __devinit pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node)
493{ 526{
494 struct pci_bus *bus = NULL; 527 struct pci_bus *bus = NULL;
495 struct pci_sysdata *sd; 528 struct pci_sysdata *sd;
@@ -512,7 +545,7 @@ struct pci_bus *pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node)
512 return bus; 545 return bus;
513} 546}
514 547
515struct pci_bus *pci_scan_bus_with_sysdata(int busno) 548struct pci_bus * __devinit pci_scan_bus_with_sysdata(int busno)
516{ 549{
517 return pci_scan_bus_on_node(busno, &pci_root_ops, -1); 550 return pci_scan_bus_on_node(busno, &pci_root_ops, -1);
518} 551}