diff options
Diffstat (limited to 'arch/powerpc/platforms/iseries/iommu.c')
-rw-r--r-- | arch/powerpc/platforms/iseries/iommu.c | 6 |
1 files changed, 5 insertions, 1 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 | ||
177 | void iommu_devnode_init_iSeries(struct pci_dev *pdev, struct device_node *dn) | 177 | static 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 | ||
199 | static struct iommu_table veth_iommu_table; | 202 | static 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 | } |