]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/sparc/kernel/iommu.c
Merge remote-tracking branches 'asoc/fix/da7219-pops' and 'asoc/fix/qcom' into asoc...
[karo-tx-linux.git] / arch / sparc / kernel / iommu.c
index 5c615abff030fdb6c26a7c68c86d5c3fa0544b94..852a3291db968986a0f77d240ccf7b58c3f9070a 100644 (file)
@@ -760,8 +760,12 @@ int dma_supported(struct device *dev, u64 device_mask)
        struct iommu *iommu = dev->archdata.iommu;
        u64 dma_addr_mask = iommu->dma_addr_mask;
 
-       if (device_mask >= (1UL << 32UL))
-               return 0;
+       if (device_mask > DMA_BIT_MASK(32)) {
+               if (iommu->atu)
+                       dma_addr_mask = iommu->atu->dma_addr_mask;
+               else
+                       return 0;
+       }
 
        if ((device_mask & dma_addr_mask) == dma_addr_mask)
                return 1;