Commit 9a458001 authored by Bjorn Helgaas's avatar Bjorn Helgaas Committed by Jesse Barnes

mn10300/PCI: convert to pci_scan_root_bus() for correct root bus resources

Convert from pci_scan_bus() to pci_scan_root_bus() and remove root bus
resource fixups.  This fixes the problem of "early" and "header" quirks
seeing incorrect root bus resources.

CC: David Howells <dhowells@redhat.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
parent 7c090e5b
...@@ -380,11 +380,6 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus) ...@@ -380,11 +380,6 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus)
{ {
struct pci_dev *dev; struct pci_dev *dev;
if (bus->number == 0) {
bus->resource[0] = &pci_ioport_resource;
bus->resource[1] = &pci_iomem_resource;
}
if (bus->self) { if (bus->self) {
pci_read_bridge_bases(bus); pci_read_bridge_bases(bus);
pcibios_fixup_device_resources(bus->self); pcibios_fixup_device_resources(bus->self);
...@@ -402,6 +397,8 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus) ...@@ -402,6 +397,8 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus)
*/ */
static int __init pcibios_init(void) static int __init pcibios_init(void)
{ {
LIST_HEAD(resources);
ioport_resource.start = 0xA0000000; ioport_resource.start = 0xA0000000;
ioport_resource.end = 0xDFFFFFFF; ioport_resource.end = 0xDFFFFFFF;
iomem_resource.start = 0xA0000000; iomem_resource.start = 0xA0000000;
...@@ -423,7 +420,10 @@ static int __init pcibios_init(void) ...@@ -423,7 +420,10 @@ static int __init pcibios_init(void)
printk(KERN_INFO "PCI: Probing PCI hardware [mempage %08x]\n", printk(KERN_INFO "PCI: Probing PCI hardware [mempage %08x]\n",
MEM_PAGING_REG); MEM_PAGING_REG);
pci_root_bus = pci_scan_bus(0, &pci_direct_ampci, NULL); pci_add_resource(&resources, &pci_ioport_resource);
pci_add_resource(&resources, &pci_iomem_resource);
pci_root_bus = pci_scan_root_bus(NULL, 0, &pci_direct_ampci, NULL,
&resources);
pcibios_irq_init(); pcibios_irq_init();
pcibios_fixup_irqs(); pcibios_fixup_irqs();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment