Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[linux-2.6-microblaze.git] / include / linux / dma-map-ops.h
index 03925e4..70fcd0f 100644 (file)
@@ -317,6 +317,20 @@ static inline void arch_dma_mark_clean(phys_addr_t paddr, size_t size)
 void *arch_dma_set_uncached(void *addr, size_t size);
 void arch_dma_clear_uncached(void *addr, size_t size);
 
+#ifdef CONFIG_ARCH_HAS_DMA_MAP_DIRECT
+bool arch_dma_map_page_direct(struct device *dev, phys_addr_t addr);
+bool arch_dma_unmap_page_direct(struct device *dev, dma_addr_t dma_handle);
+bool arch_dma_map_sg_direct(struct device *dev, struct scatterlist *sg,
+               int nents);
+bool arch_dma_unmap_sg_direct(struct device *dev, struct scatterlist *sg,
+               int nents);
+#else
+#define arch_dma_map_page_direct(d, a)         (false)
+#define arch_dma_unmap_page_direct(d, a)       (false)
+#define arch_dma_map_sg_direct(d, s, n)                (false)
+#define arch_dma_unmap_sg_direct(d, s, n)      (false)
+#endif
+
 #ifdef CONFIG_ARCH_HAS_SETUP_DMA_OPS
 void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
                const struct iommu_ops *iommu, bool coherent);