Commit a52d1443 authored by Thierry Reding's avatar Thierry Reding Committed by Bjorn Helgaas

PCI: Export host bridge registration interface

Allow PCI host bridge drivers to use the new host bridge interfaces to
register their host bridge.
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
Signed-off-by: default avatarBjorn Helgaas <helgaas@kernel.org>
parent 59094065
...@@ -521,7 +521,7 @@ static void pci_release_host_bridge_dev(struct device *dev) ...@@ -521,7 +521,7 @@ static void pci_release_host_bridge_dev(struct device *dev)
kfree(bridge); kfree(bridge);
} }
static struct pci_host_bridge *pci_alloc_host_bridge(size_t priv) struct pci_host_bridge *pci_alloc_host_bridge(size_t priv)
{ {
struct pci_host_bridge *bridge; struct pci_host_bridge *bridge;
...@@ -533,6 +533,7 @@ static struct pci_host_bridge *pci_alloc_host_bridge(size_t priv) ...@@ -533,6 +533,7 @@ static struct pci_host_bridge *pci_alloc_host_bridge(size_t priv)
return bridge; return bridge;
} }
EXPORT_SYMBOL(pci_alloc_host_bridge);
static const unsigned char pcix_bus_speed[] = { static const unsigned char pcix_bus_speed[] = {
PCI_SPEED_UNKNOWN, /* 0 */ PCI_SPEED_UNKNOWN, /* 0 */
...@@ -717,7 +718,7 @@ static void pci_set_bus_msi_domain(struct pci_bus *bus) ...@@ -717,7 +718,7 @@ static void pci_set_bus_msi_domain(struct pci_bus *bus)
dev_set_msi_domain(&bus->dev, d); dev_set_msi_domain(&bus->dev, d);
} }
static int pci_register_host_bridge(struct pci_host_bridge *bridge) int pci_register_host_bridge(struct pci_host_bridge *bridge)
{ {
struct device *parent = bridge->dev.parent; struct device *parent = bridge->dev.parent;
struct resource_entry *window, *n; struct resource_entry *window, *n;
...@@ -832,6 +833,7 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge) ...@@ -832,6 +833,7 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge)
kfree(bus); kfree(bus);
return err; return err;
} }
EXPORT_SYMBOL(pci_register_host_bridge);
static struct pci_bus *pci_alloc_child_bus(struct pci_bus *parent, static struct pci_bus *pci_alloc_child_bus(struct pci_bus *parent,
struct pci_dev *bridge, int busnr) struct pci_dev *bridge, int busnr)
......
...@@ -449,6 +449,8 @@ static inline struct pci_host_bridge *pci_host_bridge_from_priv(void *priv) ...@@ -449,6 +449,8 @@ static inline struct pci_host_bridge *pci_host_bridge_from_priv(void *priv)
return container_of(priv, struct pci_host_bridge, private); return container_of(priv, struct pci_host_bridge, private);
} }
struct pci_host_bridge *pci_alloc_host_bridge(size_t priv);
int pci_register_host_bridge(struct pci_host_bridge *bridge);
struct pci_host_bridge *pci_find_host_bridge(struct pci_bus *bus); struct pci_host_bridge *pci_find_host_bridge(struct pci_bus *bus);
void pci_set_host_bridge_release(struct pci_host_bridge *bridge, void pci_set_host_bridge_release(struct pci_host_bridge *bridge,
......
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