aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/pci_iommu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/pci_iommu.c')
-rw-r--r--arch/powerpc/kernel/pci_iommu.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/arch/powerpc/kernel/pci_iommu.c b/arch/powerpc/kernel/pci_iommu.c
index 7fb4cca021be..0688b2534acb 100644
--- a/arch/powerpc/kernel/pci_iommu.c
+++ b/arch/powerpc/kernel/pci_iommu.c
@@ -148,13 +148,17 @@ static int pci_iommu_dma_supported(struct device *dev, u64 mask)
148 return 1; 148 return 1;
149} 149}
150 150
151struct dma_mapping_ops pci_iommu_ops = {
152 .alloc_coherent = pci_iommu_alloc_coherent,
153 .free_coherent = pci_iommu_free_coherent,
154 .map_single = pci_iommu_map_single,
155 .unmap_single = pci_iommu_unmap_single,
156 .map_sg = pci_iommu_map_sg,
157 .unmap_sg = pci_iommu_unmap_sg,
158 .dma_supported = pci_iommu_dma_supported,
159};
160
151void pci_iommu_init(void) 161void pci_iommu_init(void)
152{ 162{
153 pci_dma_ops.alloc_coherent = pci_iommu_alloc_coherent; 163 pci_dma_ops = pci_iommu_ops;
154 pci_dma_ops.free_coherent = pci_iommu_free_coherent;
155 pci_dma_ops.map_single = pci_iommu_map_single;
156 pci_dma_ops.unmap_single = pci_iommu_unmap_single;
157 pci_dma_ops.map_sg = pci_iommu_map_sg;
158 pci_dma_ops.unmap_sg = pci_iommu_unmap_sg;
159 pci_dma_ops.dma_supported = pci_iommu_dma_supported;
160} 164}