]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
frv/PCI: convert to pci_scan_root_bus() for correct root bus resources
authorBjorn Helgaas <bhelgaas@google.com>
Fri, 28 Oct 2011 22:26:21 +0000 (16:26 -0600)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Fri, 6 Jan 2012 20:10:57 +0000 (12:10 -0800)
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.

Note that peer root buses are scanned with pci_scan_bus() (which is now
deprecated), so they have the default ioport_resource and iomem_resource
resources.  This is unchanged from before, but these resources are
incorrect, and I don't know how to discover the correct ones.

CC: David Howells <dhowells@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
arch/frv/mb93090-mb00/pci-vdk.c

index f8dd37e495353f978ca3c4725e330909384d7a58..6b0b82ff4419e70e806fa835b9d7327b9642ac52 100644 (file)
@@ -327,11 +327,6 @@ void __init pcibios_fixup_bus(struct pci_bus *bus)
        printk("### PCIBIOS_FIXUP_BUS(%d)\n",bus->number);
 #endif
 
        printk("### PCIBIOS_FIXUP_BUS(%d)\n",bus->number);
 #endif
 
-       if (bus->number == 0) {
-               bus->resource[0] = &pci_ioport_resource;
-               bus->resource[1] = &pci_iomem_resource;
-       }
-
        pci_read_bridge_bases(bus);
 
        if (bus->number == 0) {
        pci_read_bridge_bases(bus);
 
        if (bus->number == 0) {
@@ -357,6 +352,7 @@ void __init pcibios_fixup_bus(struct pci_bus *bus)
 int __init pcibios_init(void)
 {
        struct pci_ops *dir = NULL;
 int __init pcibios_init(void)
 {
        struct pci_ops *dir = NULL;
+       LIST_HEAD(resources);
 
        if (!mb93090_mb00_detected)
                return -ENXIO;
 
        if (!mb93090_mb00_detected)
                return -ENXIO;
@@ -420,7 +416,10 @@ int __init pcibios_init(void)
        }
 
        printk("PCI: Probing PCI hardware\n");
        }
 
        printk("PCI: Probing PCI hardware\n");
-       pci_root_bus = pci_scan_bus(0, pci_root_ops, 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_root_ops, NULL,
+                                        &resources);
 
        pcibios_irq_init();
        pcibios_fixup_peer_bridges();
 
        pcibios_irq_init();
        pcibios_fixup_peer_bridges();