aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2011-10-28 18:26:16 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2012-01-06 15:10:56 -0500
commit37d15909ff6bf6e97e1d4447efa7f1a19e7a508e (patch)
tree03d1be5fc753995295a6812e4bed485be73d2512 /arch/arm/kernel
parenta2f33da11ab9efba25d41e959de6338a9078fb36 (diff)
arm/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: Russell King <linux@arm.linux.org.uk> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r--arch/arm/kernel/bios32.c27
1 files changed, 8 insertions, 19 deletions
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c
index 4e606073f89d..f58ba3589908 100644
--- a/arch/arm/kernel/bios32.c
+++ b/arch/arm/kernel/bios32.c
@@ -316,21 +316,6 @@ pdev_fixup_device_resources(struct pci_sys_data *root, struct pci_dev *dev)
316 } 316 }
317} 317}
318 318
319static void __devinit
320pbus_assign_bus_resources(struct pci_bus *bus, struct pci_sys_data *root)
321{
322 struct pci_dev *dev = bus->self;
323 int i;
324
325 if (!dev) {
326 /*
327 * Assign root bus resources.
328 */
329 for (i = 0; i < 3; i++)
330 bus->resource[i] = root->resource[i];
331 }
332}
333
334/* 319/*
335 * pcibios_fixup_bus - Called after each bus is probed, 320 * pcibios_fixup_bus - Called after each bus is probed,
336 * but before its children are examined. 321 * but before its children are examined.
@@ -341,8 +326,6 @@ void pcibios_fixup_bus(struct pci_bus *bus)
341 struct pci_dev *dev; 326 struct pci_dev *dev;
342 u16 features = PCI_COMMAND_SERR | PCI_COMMAND_PARITY | PCI_COMMAND_FAST_BACK; 327 u16 features = PCI_COMMAND_SERR | PCI_COMMAND_PARITY | PCI_COMMAND_FAST_BACK;
343 328
344 pbus_assign_bus_resources(bus, root);
345
346 /* 329 /*
347 * Walk the devices on this bus, working out what we can 330 * Walk the devices on this bus, working out what we can
348 * and can't support. 331 * and can't support.
@@ -508,12 +491,18 @@ static void __init pcibios_init_hw(struct hw_pci *hw)
508 sys->busnr = busnr; 491 sys->busnr = busnr;
509 sys->swizzle = hw->swizzle; 492 sys->swizzle = hw->swizzle;
510 sys->map_irq = hw->map_irq; 493 sys->map_irq = hw->map_irq;
511 sys->resource[0] = &ioport_resource; 494 INIT_LIST_HEAD(&sys->resources);
512 sys->resource[1] = &iomem_resource;
513 495
514 ret = hw->setup(nr, sys); 496 ret = hw->setup(nr, sys);
515 497
516 if (ret > 0) { 498 if (ret > 0) {
499 if (list_empty(&sys->resources)) {
500 pci_add_resource(&sys->resources,
501 &ioport_resource);
502 pci_add_resource(&sys->resources,
503 &iomem_resource);
504 }
505
517 sys->bus = hw->scan(nr, sys); 506 sys->bus = hw->scan(nr, sys);
518 507
519 if (!sys->bus) 508 if (!sys->bus)