diff options
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r-- | drivers/pci/probe.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 2dcd22d9c816..bbe4be7fc685 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -1632,6 +1632,18 @@ unsigned int pci_scan_child_bus(struct pci_bus *bus) | |||
1632 | return max; | 1632 | return max; |
1633 | } | 1633 | } |
1634 | 1634 | ||
1635 | /** | ||
1636 | * pcibios_root_bridge_prepare - Platform-specific host bridge setup. | ||
1637 | * @bridge: Host bridge to set up. | ||
1638 | * | ||
1639 | * Default empty implementation. Replace with an architecture-specific setup | ||
1640 | * routine, if necessary. | ||
1641 | */ | ||
1642 | int __weak pcibios_root_bridge_prepare(struct pci_host_bridge *bridge) | ||
1643 | { | ||
1644 | return 0; | ||
1645 | } | ||
1646 | |||
1635 | struct pci_bus *pci_create_root_bus(struct device *parent, int bus, | 1647 | struct pci_bus *pci_create_root_bus(struct device *parent, int bus, |
1636 | struct pci_ops *ops, void *sysdata, struct list_head *resources) | 1648 | struct pci_ops *ops, void *sysdata, struct list_head *resources) |
1637 | { | 1649 | { |
@@ -1665,6 +1677,10 @@ struct pci_bus *pci_create_root_bus(struct device *parent, int bus, | |||
1665 | bridge->dev.parent = parent; | 1677 | bridge->dev.parent = parent; |
1666 | bridge->dev.release = pci_release_bus_bridge_dev; | 1678 | bridge->dev.release = pci_release_bus_bridge_dev; |
1667 | dev_set_name(&bridge->dev, "pci%04x:%02x", pci_domain_nr(b), bus); | 1679 | dev_set_name(&bridge->dev, "pci%04x:%02x", pci_domain_nr(b), bus); |
1680 | error = pcibios_root_bridge_prepare(bridge); | ||
1681 | if (error) | ||
1682 | goto bridge_dev_reg_err; | ||
1683 | |||
1668 | error = device_register(&bridge->dev); | 1684 | error = device_register(&bridge->dev); |
1669 | if (error) | 1685 | if (error) |
1670 | goto bridge_dev_reg_err; | 1686 | goto bridge_dev_reg_err; |