aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/iseries/iommu.c6
-rw-r--r--arch/powerpc/platforms/iseries/pci.c1
2 files changed, 5 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/iseries/iommu.c b/arch/powerpc/platforms/iseries/iommu.c
index ff43f1fd8343..40219823d9b0 100644
--- a/arch/powerpc/platforms/iseries/iommu.c
+++ b/arch/powerpc/platforms/iseries/iommu.c
@@ -174,9 +174,10 @@ static struct iommu_table *iommu_table_find(struct iommu_table * tbl)
174} 174}
175 175
176 176
177void iommu_devnode_init_iSeries(struct pci_dev *pdev, struct device_node *dn) 177static void pci_dma_dev_setup_iseries(struct pci_dev *pdev)
178{ 178{
179 struct iommu_table *tbl; 179 struct iommu_table *tbl;
180 struct device_node *dn = pdev->sysdata;
180 struct pci_dn *pdn = PCI_DN(dn); 181 struct pci_dn *pdn = PCI_DN(dn);
181 const u32 *lsn = of_get_property(dn, "linux,logical-slot-number", NULL); 182 const u32 *lsn = of_get_property(dn, "linux,logical-slot-number", NULL);
182 183
@@ -194,6 +195,8 @@ void iommu_devnode_init_iSeries(struct pci_dev *pdev, struct device_node *dn)
194 kfree(tbl); 195 kfree(tbl);
195 pdev->dev.archdata.dma_data = pdn->iommu_table; 196 pdev->dev.archdata.dma_data = pdn->iommu_table;
196} 197}
198#else
199#define pci_dma_dev_setup_iseries NULL
197#endif 200#endif
198 201
199static struct iommu_table veth_iommu_table; 202static struct iommu_table veth_iommu_table;
@@ -251,5 +254,6 @@ void iommu_init_early_iSeries(void)
251 ppc_md.tce_build = tce_build_iSeries; 254 ppc_md.tce_build = tce_build_iSeries;
252 ppc_md.tce_free = tce_free_iSeries; 255 ppc_md.tce_free = tce_free_iSeries;
253 256
257 ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_iseries;
254 set_pci_dma_ops(&dma_iommu_ops); 258 set_pci_dma_ops(&dma_iommu_ops);
255} 259}
diff --git a/arch/powerpc/platforms/iseries/pci.c b/arch/powerpc/platforms/iseries/pci.c
index 02a634faedbe..21cddc30220b 100644
--- a/arch/powerpc/platforms/iseries/pci.c
+++ b/arch/powerpc/platforms/iseries/pci.c
@@ -444,7 +444,6 @@ void __init iSeries_pcibios_fixup_resources(struct pci_dev *pdev)
444 pdev->sysdata = node; 444 pdev->sysdata = node;
445 allocate_device_bars(pdev); 445 allocate_device_bars(pdev);
446 iseries_device_information(pdev, bus, *sub_bus); 446 iseries_device_information(pdev, bus, *sub_bus);
447 iommu_devnode_init_iSeries(pdev, node);
448} 447}
449 448
450/* 449/*