summaryrefslogtreecommitdiffstats
path: root/include/linux/dma-mapping.h
diff options
context:
space:
mode:
authorWill Deacon2014-08-27 16:49:10 +0200
committerWill Deacon2014-12-01 17:50:32 +0100
commita3a60f81ee6f8fa65a57fa186b395bcd1f1bb097 (patch)
treefb9f47c0b0f9065916242bfa76864d5b72825b8f /include/linux/dma-mapping.h
parentiommu: provide early initialisation hook for IOMMU drivers (diff)
downloadkernel-qcow2-linux-a3a60f81ee6f8fa65a57fa186b395bcd1f1bb097.tar.gz
kernel-qcow2-linux-a3a60f81ee6f8fa65a57fa186b395bcd1f1bb097.tar.xz
kernel-qcow2-linux-a3a60f81ee6f8fa65a57fa186b395bcd1f1bb097.zip
dma-mapping: replace set_arch_dma_coherent_ops with arch_setup_dma_ops
set_arch_dma_coherent_ops is called from of_dma_configure in order to swizzle the architectural dma-mapping functions over to a cache-coherent implementation. This is currently implemented only for ARM. In anticipation of re-using this mechanism for IOMMU-backed dma-mapping ops too, this patch replaces the function with a broader arch_setup_dma_ops callback which will be extended in future. Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Marek Szyprowski <m.szyprowski@samsung.com> Tested-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'include/linux/dma-mapping.h')
-rw-r--r--include/linux/dma-mapping.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index d5d388160f42..8a1560f95d4a 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -129,11 +129,8 @@ static inline int dma_coerce_mask_and_coherent(struct device *dev, u64 mask)
extern u64 dma_get_required_mask(struct device *dev);
-#ifndef set_arch_dma_coherent_ops
-static inline int set_arch_dma_coherent_ops(struct device *dev)
-{
- return 0;
-}
+#ifndef arch_setup_dma_ops
+static inline void arch_setup_dma_ops(struct device *dev, bool coherent) { }
#endif
static inline unsigned int dma_get_max_seg_size(struct device *dev)