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.c58
1 files changed, 54 insertions, 4 deletions
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
index 2a4d751818b7..bfa72a9475b3 100644
--- a/arch/x86/pci/common.c
+++ b/arch/x86/pci/common.c
@@ -90,6 +90,50 @@ static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev)
90 rom_r->start = rom_r->end = rom_r->flags = 0; 90 rom_r->start = rom_r->end = rom_r->flags = 0;
91} 91}
92 92
93static int __devinit can_skip_ioresource_align(const struct dmi_system_id *d)
94{
95 pci_probe |= PCI_CAN_SKIP_ISA_ALIGN;
96 printk(KERN_INFO "PCI: %s detected, can skip ISA alignment\n", d->ident);
97 return 0;
98}
99
100static struct dmi_system_id can_skip_pciprobe_dmi_table[] __devinitdata = {
101/*
102 * Systems where PCI IO resource ISA alignment can be skipped
103 * when the ISA enable bit in the bridge control is not set
104 */
105 {
106 .callback = can_skip_ioresource_align,
107 .ident = "IBM System x3800",
108 .matches = {
109 DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
110 DMI_MATCH(DMI_PRODUCT_NAME, "x3800"),
111 },
112 },
113 {
114 .callback = can_skip_ioresource_align,
115 .ident = "IBM System x3850",
116 .matches = {
117 DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
118 DMI_MATCH(DMI_PRODUCT_NAME, "x3850"),
119 },
120 },
121 {
122 .callback = can_skip_ioresource_align,
123 .ident = "IBM System x3950",
124 .matches = {
125 DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
126 DMI_MATCH(DMI_PRODUCT_NAME, "x3950"),
127 },
128 },
129 {}
130};
131
132void __init dmi_check_skip_isa_align(void)
133{
134 dmi_check_system(can_skip_pciprobe_dmi_table);
135}
136
93/* 137/*
94 * Called after each bus is probed, but before its children 138 * Called after each bus is probed, but before its children
95 * are examined. 139 * are examined.
@@ -318,13 +362,16 @@ static struct dmi_system_id __devinitdata pciprobe_dmi_table[] = {
318 {} 362 {}
319}; 363};
320 364
365void __init dmi_check_pciprobe(void)
366{
367 dmi_check_system(pciprobe_dmi_table);
368}
369
321struct pci_bus * __devinit pcibios_scan_root(int busnum) 370struct pci_bus * __devinit pcibios_scan_root(int busnum)
322{ 371{
323 struct pci_bus *bus = NULL; 372 struct pci_bus *bus = NULL;
324 struct pci_sysdata *sd; 373 struct pci_sysdata *sd;
325 374
326 dmi_check_system(pciprobe_dmi_table);
327
328 while ((bus = pci_find_next_bus(bus)) != NULL) { 375 while ((bus = pci_find_next_bus(bus)) != NULL) {
329 if (bus->number == busnum) { 376 if (bus->number == busnum) {
330 /* Already scanned */ 377 /* Already scanned */
@@ -462,6 +509,9 @@ char * __devinit pcibios_setup(char *str)
462 } else if (!strcmp(str, "routeirq")) { 509 } else if (!strcmp(str, "routeirq")) {
463 pci_routeirq = 1; 510 pci_routeirq = 1;
464 return NULL; 511 return NULL;
512 } else if (!strcmp(str, "skip_isa_align")) {
513 pci_probe |= PCI_CAN_SKIP_ISA_ALIGN;
514 return NULL;
465 } 515 }
466 return str; 516 return str;
467} 517}
@@ -489,7 +539,7 @@ void pcibios_disable_device (struct pci_dev *dev)
489 pcibios_disable_irq(dev); 539 pcibios_disable_irq(dev);
490} 540}
491 541
492struct pci_bus *pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node) 542struct pci_bus * __devinit pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node)
493{ 543{
494 struct pci_bus *bus = NULL; 544 struct pci_bus *bus = NULL;
495 struct pci_sysdata *sd; 545 struct pci_sysdata *sd;
@@ -512,7 +562,7 @@ struct pci_bus *pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node)
512 return bus; 562 return bus;
513} 563}
514 564
515struct pci_bus *pci_scan_bus_with_sysdata(int busno) 565struct pci_bus * __devinit pci_scan_bus_with_sysdata(int busno)
516{ 566{
517 return pci_scan_bus_on_node(busno, &pci_root_ops, -1); 567 return pci_scan_bus_on_node(busno, &pci_root_ops, -1);
518} 568}