summaryrefslogtreecommitdiff
path: root/arch/arm64/include/asm/dma-mapping.h
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2014-09-22 14:48:31 +0400
committerCatalin Marinas <catalin.marinas@arm.com>2014-09-22 14:48:31 +0400
commit2189064795dc3fb4101e5c34d28c6b62b8a3bfd9 (patch)
tree1c2dc5e758dd6aae85d2c48d7f7485415a6f614b /arch/arm64/include/asm/dma-mapping.h
parentc9d571bee9628bc925253a21ea5943707aadb5f1 (diff)
downloadlinux-2189064795dc3fb4101e5c34d28c6b62b8a3bfd9.tar.xz
arm64: Implement set_arch_dma_coherent_ops() to replace bus notifiers
Commit 6ecba8eb51b7 (arm64: Use bus notifiers to set per-device coherent DMA ops) introduced bus notifiers to set the coherent dma ops based on the 'dma-coherent' DT property. Since the generic of_dma_configure() handles this property for platform and AMBA devices, replace the notifiers with set_arch_dma_coherent_ops(). Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/dma-mapping.h')
-rw-r--r--arch/arm64/include/asm/dma-mapping.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/dma-mapping.h b/arch/arm64/include/asm/dma-mapping.h
index dc82e52acdb3..adeae3f6f0fc 100644
--- a/arch/arm64/include/asm/dma-mapping.h
+++ b/arch/arm64/include/asm/dma-mapping.h
@@ -52,6 +52,13 @@ static inline void set_dma_ops(struct device *dev, struct dma_map_ops *ops)
dev->archdata.dma_ops = ops;
}
+static inline int set_arch_dma_coherent_ops(struct device *dev)
+{
+ set_dma_ops(dev, &coherent_swiotlb_dma_ops);
+ return 0;
+}
+#define set_arch_dma_coherent_ops set_arch_dma_coherent_ops
+
#include <asm-generic/dma-mapping-common.h>
static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr)