]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - arch/powerpc/include/asm/iommu.h
powerpc/dma: trim the fat from <asm/dma-mapping.h>
[linux.git] / arch / powerpc / include / asm / iommu.h
index 6f00a892ebdf28fe337a74609b33f97c145cab32..0ac52392ed99d021af872f8a23a4527e2418576b 100644 (file)
@@ -325,5 +325,15 @@ extern bool iommu_fixed_is_weak;
 #define iommu_fixed_is_weak false
 #endif
 
+extern const struct dma_map_ops dma_iommu_ops;
+
+static inline unsigned long device_to_mask(struct device *dev)
+{
+       if (dev->dma_mask && *dev->dma_mask)
+               return *dev->dma_mask;
+       /* Assume devices without mask can take 32 bit addresses */
+       return 0xfffffffful;
+}
+
 #endif /* __KERNEL__ */
 #endif /* _ASM_IOMMU_H */