aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2014-08-27 10:49:10 -0400
committerWill Deacon <will.deacon@arm.com>2014-12-01 11:50:32 -0500
commita3a60f81ee6f8fa65a57fa186b395bcd1f1bb097 (patch)
treefb9f47c0b0f9065916242bfa76864d5b72825b8f /arch/arm
parent1cd076bf67793942ed921b766f7d461de2ebc0a2 (diff)
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 'arch/arm')
-rw-r--r--arch/arm/include/asm/dma-mapping.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h
index 85738b200023..dc3420e77758 100644
--- a/arch/arm/include/asm/dma-mapping.h
+++ b/arch/arm/include/asm/dma-mapping.h
@@ -121,12 +121,12 @@ static inline unsigned long dma_max_pfn(struct device *dev)
121} 121}
122#define dma_max_pfn(dev) dma_max_pfn(dev) 122#define dma_max_pfn(dev) dma_max_pfn(dev)
123 123
124static inline int set_arch_dma_coherent_ops(struct device *dev) 124static inline void arch_setup_dma_ops(struct device *dev, bool coherent)
125{ 125{
126 set_dma_ops(dev, &arm_coherent_dma_ops); 126 if (coherent)
127 return 0; 127 set_dma_ops(dev, &arm_coherent_dma_ops);
128} 128}
129#define set_arch_dma_coherent_ops(dev) set_arch_dma_coherent_ops(dev) 129#define arch_setup_dma_ops arch_setup_dma_ops
130 130
131static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr) 131static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr)
132{ 132{