aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/probe.c
diff options
context:
space:
mode:
authorLorenzo Pieralisi <lorenzo.pieralisi@arm.com>2015-08-03 22:27:10 -0400
committerBjorn Helgaas <bhelgaas@google.com>2015-08-20 13:02:49 -0400
commitd2a7926d42b3b46e45b4e44dc3302b2701ec0856 (patch)
tree5e7780fed9d456c0e99b0584e2692630876e019d /drivers/pci/probe.c
parentada8b675b76ec847bfa4a237d82a7a96da128768 (diff)
PCI: Add pci_scan_root_bus_msi()
Add a pci_scan_root_bus_msi() interface so an arch can specify the MSI controller up front. This removes the need for a pcibios callback to set the MSI controller later. This is not exported because I'd like to replace the variety of "scan root bus" interfaces with a single, more extensible interface that can handle the MSI controller, domain, pci_ops, resources, etc. I hope this interface is temporary. [bhelgaas: changelog, split into separate patch] Suggested-by: Russell King <linux@arm.linux.org.uk> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Jingoo Han <jingoohan1@gmail.com>
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r--drivers/pci/probe.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index cefd636681b6..9ff4df0db0c3 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -2096,8 +2096,9 @@ void pci_bus_release_busn_res(struct pci_bus *b)
2096 res, ret ? "can not be" : "is"); 2096 res, ret ? "can not be" : "is");
2097} 2097}
2098 2098
2099struct pci_bus *pci_scan_root_bus(struct device *parent, int bus, 2099struct pci_bus *pci_scan_root_bus_msi(struct device *parent, int bus,
2100 struct pci_ops *ops, void *sysdata, struct list_head *resources) 2100 struct pci_ops *ops, void *sysdata,
2101 struct list_head *resources, struct msi_controller *msi)
2101{ 2102{
2102 struct resource_entry *window; 2103 struct resource_entry *window;
2103 bool found = false; 2104 bool found = false;
@@ -2114,6 +2115,8 @@ struct pci_bus *pci_scan_root_bus(struct device *parent, int bus,
2114 if (!b) 2115 if (!b)
2115 return NULL; 2116 return NULL;
2116 2117
2118 b->msi = msi;
2119
2117 if (!found) { 2120 if (!found) {
2118 dev_info(&b->dev, 2121 dev_info(&b->dev,
2119 "No busn resource found for root bus, will use [bus %02x-ff]\n", 2122 "No busn resource found for root bus, will use [bus %02x-ff]\n",
@@ -2128,6 +2131,13 @@ struct pci_bus *pci_scan_root_bus(struct device *parent, int bus,
2128 2131
2129 return b; 2132 return b;
2130} 2133}
2134
2135struct pci_bus *pci_scan_root_bus(struct device *parent, int bus,
2136 struct pci_ops *ops, void *sysdata, struct list_head *resources)
2137{
2138 return pci_scan_root_bus_msi(parent, bus, ops, sysdata, resources,
2139 NULL);
2140}
2131EXPORT_SYMBOL(pci_scan_root_bus); 2141EXPORT_SYMBOL(pci_scan_root_bus);
2132 2142
2133struct pci_bus *pci_scan_bus(int bus, struct pci_ops *ops, 2143struct pci_bus *pci_scan_bus(int bus, struct pci_ops *ops,