aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/pci_64.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/pci_64.c')
-rw-r--r--arch/powerpc/kernel/pci_64.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index 9a6bb80a8cd4..88b78484b944 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -61,7 +61,7 @@ void iSeries_pcibios_init(void);
61 61
62LIST_HEAD(hose_list); 62LIST_HEAD(hose_list);
63 63
64struct dma_mapping_ops pci_dma_ops; 64struct dma_mapping_ops *pci_dma_ops;
65EXPORT_SYMBOL(pci_dma_ops); 65EXPORT_SYMBOL(pci_dma_ops);
66 66
67int global_phb_number; /* Global phb counter */ 67int global_phb_number; /* Global phb counter */
@@ -1205,15 +1205,35 @@ void __devinit pcibios_fixup_device_resources(struct pci_dev *dev,
1205} 1205}
1206EXPORT_SYMBOL(pcibios_fixup_device_resources); 1206EXPORT_SYMBOL(pcibios_fixup_device_resources);
1207 1207
1208void __devinit pcibios_setup_new_device(struct pci_dev *dev)
1209{
1210 struct dev_archdata *sd = &dev->dev.archdata;
1211
1212 sd->of_node = pci_device_to_OF_node(dev);
1213
1214 DBG("PCI device %s OF node: %s\n", pci_name(dev),
1215 sd->of_node ? sd->of_node->full_name : "<none>");
1216
1217 sd->dma_ops = pci_dma_ops;
1218#ifdef CONFIG_NUMA
1219 sd->numa_node = pcibus_to_node(dev->bus);
1220#else
1221 sd->numa_node = -1;
1222#endif
1223 if (ppc_md.pci_dma_dev_setup)
1224 ppc_md.pci_dma_dev_setup(dev);
1225}
1226EXPORT_SYMBOL(pcibios_setup_new_device);
1208 1227
1209static void __devinit do_bus_setup(struct pci_bus *bus) 1228static void __devinit do_bus_setup(struct pci_bus *bus)
1210{ 1229{
1211 struct pci_dev *dev; 1230 struct pci_dev *dev;
1212 1231
1213 ppc_md.iommu_bus_setup(bus); 1232 if (ppc_md.pci_dma_bus_setup)
1233 ppc_md.pci_dma_bus_setup(bus);
1214 1234
1215 list_for_each_entry(dev, &bus->devices, bus_list) 1235 list_for_each_entry(dev, &bus->devices, bus_list)
1216 ppc_md.iommu_dev_setup(dev); 1236 pcibios_setup_new_device(dev);
1217 1237
1218 /* Read default IRQs and fixup if necessary */ 1238 /* Read default IRQs and fixup if necessary */
1219 list_for_each_entry(dev, &bus->devices, bus_list) { 1239 list_for_each_entry(dev, &bus->devices, bus_list) {