diff options
Diffstat (limited to 'arch/x86/pci/common.c')
-rw-r--r-- | arch/x86/pci/common.c | 69 |
1 files changed, 51 insertions, 18 deletions
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index 2a4d751818b7..8545c8a9d107 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c | |||
@@ -77,17 +77,48 @@ int pcibios_scanned; | |||
77 | */ | 77 | */ |
78 | DEFINE_SPINLOCK(pci_config_lock); | 78 | DEFINE_SPINLOCK(pci_config_lock); |
79 | 79 | ||
80 | static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev) | 80 | static 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 */ | 87 | static 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 | |||
119 | void __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 | ||
98 | void __devinit pcibios_fixup_bus(struct pci_bus *b) | 129 | void __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 | /* |
@@ -318,13 +345,16 @@ static struct dmi_system_id __devinitdata pciprobe_dmi_table[] = { | |||
318 | {} | 345 | {} |
319 | }; | 346 | }; |
320 | 347 | ||
348 | void __init dmi_check_pciprobe(void) | ||
349 | { | ||
350 | dmi_check_system(pciprobe_dmi_table); | ||
351 | } | ||
352 | |||
321 | struct pci_bus * __devinit pcibios_scan_root(int busnum) | 353 | struct 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 | ||
492 | struct pci_bus *pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node) | 525 | struct 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 | ||
515 | struct pci_bus *pci_scan_bus_with_sysdata(int busno) | 548 | struct 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 | } |