aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2014-12-18 12:13:49 -0500
committerCatalin Marinas <catalin.marinas@arm.com>2014-12-22 04:26:32 -0500
commit31dde116cb084bc0042cafe48975ffb7d1a4ae5d (patch)
tree203222ac7488d89e6b4f2418e640e2d86dacb5f7 /arch
parent97bf6af1f928216fd6c5a66e8a57bfa95a659672 (diff)
arm64: Replace set_arch_dma_coherent_ops with arch_setup_dma_ops
Commit a3a60f81ee6f (dma-mapping: replace set_arch_dma_coherent_ops with arch_setup_dma_ops) changes the of_dma_configure() arch dma_ops callback to arch_setup_dma_ops but only the arch/arm code is updated. Subsequent commit 97890ba9289c (dma-mapping: detect and configure IOMMU in of_dma_configure) changes the arch_setup_dma_ops() prototype further to handle iommu. The patch makes the corresponding arm64 changes. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Reported-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm64/include/asm/dma-mapping.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/arm64/include/asm/dma-mapping.h b/arch/arm64/include/asm/dma-mapping.h
index d34189bceff7..9ce3e680ae1c 100644
--- a/arch/arm64/include/asm/dma-mapping.h
+++ b/arch/arm64/include/asm/dma-mapping.h
@@ -52,13 +52,14 @@ static inline void set_dma_ops(struct device *dev, struct dma_map_ops *ops)
52 dev->archdata.dma_ops = ops; 52 dev->archdata.dma_ops = ops;
53} 53}
54 54
55static inline int set_arch_dma_coherent_ops(struct device *dev) 55static inline void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
56 struct iommu_ops *iommu, bool coherent)
56{ 57{
57 dev->archdata.dma_coherent = true; 58 dev->archdata.dma_coherent = coherent;
58 set_dma_ops(dev, &coherent_swiotlb_dma_ops); 59 if (coherent)
59 return 0; 60 set_dma_ops(dev, &coherent_swiotlb_dma_ops);
60} 61}
61#define set_arch_dma_coherent_ops set_arch_dma_coherent_ops 62#define arch_setup_dma_ops arch_setup_dma_ops
62 63
63/* do not use this function in a driver */ 64/* do not use this function in a driver */
64static inline bool is_device_dma_coherent(struct device *dev) 65static inline bool is_device_dma_coherent(struct device *dev)