aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pci.h
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2011-10-28 18:25:45 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2012-01-06 15:10:51 -0500
commit166c6370754a0a92386e2ffb0eeb06e50ac8588d (patch)
treec9bbbf23a0508cd93d546ecbfdb9fcd423a1e461 /include/linux/pci.h
parenta9d9f5276cb3fa08351e8837ab9398bfd8e69a2e (diff)
PCI: add pci_create_root_bus() that accepts resource list
pci_create_bus() assigns ioport_resource and iomem_resource as the default bus resources, i.e., the entire address space. Architectures fix these later, typically in pcibios_fixup_bus() or after pci_scan_bus_parented() returns, but code that runs in the interim sees incorrect resource information. This patch adds a new pci_create_root_bus() that sets the bus resources correctly from a supplied list of resources. I intend to remove pci_create_bus() after changing all callers. Based on original patch by Deng-Cheng Zhu. Reference: http://www.spinics.net/lists/mips/msg41654.html Reference: https://lkml.org/lkml/2011/8/26/88 Signed-off-by: Deng-Cheng Zhu <dczhu@mips.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r--include/linux/pci.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 9daa79901122..eacb1e51e11b 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -670,6 +670,9 @@ static inline struct pci_bus * __devinit pci_scan_bus(int bus, struct pci_ops *o
670 pci_bus_add_devices(root_bus); 670 pci_bus_add_devices(root_bus);
671 return root_bus; 671 return root_bus;
672} 672}
673struct pci_bus *pci_create_root_bus(struct device *parent, int bus,
674 struct pci_ops *ops, void *sysdata,
675 struct list_head *resources);
673struct pci_bus *pci_create_bus(struct device *parent, int bus, 676struct pci_bus *pci_create_bus(struct device *parent, int bus,
674 struct pci_ops *ops, void *sysdata); 677 struct pci_ops *ops, void *sysdata);
675struct pci_bus *pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, 678struct pci_bus *pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev,