提交 16cc11da 编写于 作者: J John Rose 提交者: Paul Mackerras

[PATCH] powerpc: dynamic probe - use ppc_md.pci_probe_mode()

Change the dynamic PCI probe function for pSeries to use
ppc_md.pci_probe_mode() when appropriate.
Signed-off-by: NJohn Rose <johnrose@austin.ibm.com>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 add60ef3
...@@ -152,20 +152,24 @@ pcibios_pci_config_bridge(struct pci_dev *dev) ...@@ -152,20 +152,24 @@ pcibios_pci_config_bridge(struct pci_dev *dev)
void void
pcibios_add_pci_devices(struct pci_bus * bus) pcibios_add_pci_devices(struct pci_bus * bus)
{ {
int slotno, num; int slotno, num, mode;
struct pci_dev *dev; struct pci_dev *dev;
struct device_node *dn = pci_bus_to_OF_node(bus); struct device_node *dn = pci_bus_to_OF_node(bus);
eeh_add_device_tree_early(dn); eeh_add_device_tree_early(dn);
if (_machine == PLATFORM_PSERIES_LPAR) { mode = PCI_PROBE_NORMAL;
if (ppc_md.pci_probe_mode)
mode = ppc_md.pci_probe_mode(bus);
if (mode == PCI_PROBE_DEVTREE) {
/* use ofdt-based probe */ /* use ofdt-based probe */
of_scan_bus(dn, bus); of_scan_bus(dn, bus);
if (!list_empty(&bus->devices)) { if (!list_empty(&bus->devices)) {
pcibios_fixup_new_pci_devices(bus, 0); pcibios_fixup_new_pci_devices(bus, 0);
pci_bus_add_devices(bus); pci_bus_add_devices(bus);
} }
} else { } else if (mode == PCI_PROBE_NORMAL) {
/* use legacy probe */ /* use legacy probe */
slotno = PCI_SLOT(PCI_DN(dn->child)->devfn); slotno = PCI_SLOT(PCI_DN(dn->child)->devfn);
num = pci_scan_slot(bus, PCI_DEVFN(slotno, 0)); num = pci_scan_slot(bus, PCI_DEVFN(slotno, 0));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册