aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/iseries
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/iseries')
-rw-r--r--arch/powerpc/platforms/iseries/iommu.c12
-rw-r--r--arch/powerpc/platforms/iseries/pci.c2
2 files changed, 5 insertions, 9 deletions
diff --git a/arch/powerpc/platforms/iseries/iommu.c b/arch/powerpc/platforms/iseries/iommu.c
index 218817d13c5c..ee0a4e42e4f0 100644
--- a/arch/powerpc/platforms/iseries/iommu.c
+++ b/arch/powerpc/platforms/iseries/iommu.c
@@ -27,6 +27,7 @@
27#include <linux/types.h> 27#include <linux/types.h>
28#include <linux/dma-mapping.h> 28#include <linux/dma-mapping.h>
29#include <linux/list.h> 29#include <linux/list.h>
30#include <linux/pci.h>
30 31
31#include <asm/iommu.h> 32#include <asm/iommu.h>
32#include <asm/tce.h> 33#include <asm/tce.h>
@@ -168,7 +169,7 @@ static struct iommu_table *iommu_table_find(struct iommu_table * tbl)
168} 169}
169 170
170 171
171void iommu_devnode_init_iSeries(struct device_node *dn) 172void iommu_devnode_init_iSeries(struct pci_dev *pdev, struct device_node *dn)
172{ 173{
173 struct iommu_table *tbl; 174 struct iommu_table *tbl;
174 struct pci_dn *pdn = PCI_DN(dn); 175 struct pci_dn *pdn = PCI_DN(dn);
@@ -186,19 +187,14 @@ void iommu_devnode_init_iSeries(struct device_node *dn)
186 pdn->iommu_table = iommu_init_table(tbl, -1); 187 pdn->iommu_table = iommu_init_table(tbl, -1);
187 else 188 else
188 kfree(tbl); 189 kfree(tbl);
190 pdev->dev.archdata.dma_data = pdn->iommu_table;
189} 191}
190#endif 192#endif
191 193
192static void iommu_dev_setup_iSeries(struct pci_dev *dev) { }
193static void iommu_bus_setup_iSeries(struct pci_bus *bus) { }
194
195void iommu_init_early_iSeries(void) 194void iommu_init_early_iSeries(void)
196{ 195{
197 ppc_md.tce_build = tce_build_iSeries; 196 ppc_md.tce_build = tce_build_iSeries;
198 ppc_md.tce_free = tce_free_iSeries; 197 ppc_md.tce_free = tce_free_iSeries;
199 198
200 ppc_md.iommu_dev_setup = iommu_dev_setup_iSeries; 199 pci_dma_ops = &dma_iommu_ops;
201 ppc_md.iommu_bus_setup = iommu_bus_setup_iSeries;
202
203 pci_iommu_init();
204} 200}
diff --git a/arch/powerpc/platforms/iseries/pci.c b/arch/powerpc/platforms/iseries/pci.c
index 4aa165e010d9..a90ae42a7bc2 100644
--- a/arch/powerpc/platforms/iseries/pci.c
+++ b/arch/powerpc/platforms/iseries/pci.c
@@ -253,7 +253,7 @@ void __init iSeries_pci_final_fixup(void)
253 PCI_DN(node)->pcidev = pdev; 253 PCI_DN(node)->pcidev = pdev;
254 allocate_device_bars(pdev); 254 allocate_device_bars(pdev);
255 iSeries_Device_Information(pdev, DeviceCount); 255 iSeries_Device_Information(pdev, DeviceCount);
256 iommu_devnode_init_iSeries(node); 256 iommu_devnode_init_iSeries(pdev, node);
257 } else 257 } else
258 printk("PCI: Device Tree not found for 0x%016lX\n", 258 printk("PCI: Device Tree not found for 0x%016lX\n",
259 (unsigned long)pdev); 259 (unsigned long)pdev);