aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/platforms/cell/iommu.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c
index 1f7b25474086..5cdcd3638250 100644
--- a/arch/powerpc/platforms/cell/iommu.c
+++ b/arch/powerpc/platforms/cell/iommu.c
@@ -841,19 +841,18 @@ static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask)
841 if (!dev->dma_mask || !dma_supported(dev, dma_mask)) 841 if (!dev->dma_mask || !dma_supported(dev, dma_mask))
842 return -EIO; 842 return -EIO;
843 843
844 if (dma_mask == DMA_BIT_MASK(64)) { 844 if (dma_mask == DMA_BIT_MASK(64) &&
845 if (cell_iommu_get_fixed_address(dev) == OF_BAD_ADDR) 845 cell_iommu_get_fixed_address(dev) != OF_BAD_ADDR)
846 dev_dbg(dev, "iommu: 64-bit OK, but bad addr\n"); 846 {
847 else { 847 dev_dbg(dev, "iommu: 64-bit OK, using fixed ops\n");
848 dev_dbg(dev, "iommu: 64-bit OK, using fixed ops\n"); 848 set_dma_ops(dev, &dma_iommu_fixed_ops);
849 set_dma_ops(dev, &dma_iommu_fixed_ops);
850 cell_dma_dev_setup(dev);
851 }
852 } else { 849 } else {
853 dev_dbg(dev, "iommu: not 64-bit, using default ops\n"); 850 dev_dbg(dev, "iommu: not 64-bit, using default ops\n");
854 set_dma_ops(dev, get_pci_dma_ops()); 851 set_dma_ops(dev, get_pci_dma_ops());
855 } 852 }
856 853
854 cell_dma_dev_setup(dev);
855
857 *dev->dma_mask = dma_mask; 856 *dev->dma_mask = dma_mask;
858 857
859 return 0; 858 return 0;