aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/include/asm
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2014-08-27 15:49:10 +0100
committerAlex Shi <alex.shi@linaro.org>2015-11-07 21:52:47 +0800
commit013b94e8e2a7bfb0c7e610e1d48df845552c34b6 (patch)
tree43c029677a35b8243fa9185df740d4c80070108d /arch/arm/include/asm
parent8588e4727dc1a47cbac31710b81e6e82b490328c (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> (cherry picked from commit a3a60f81ee6f8fa65a57fa186b395bcd1f1bb097) Signed-off-by: Alex Shi <alex.shi@linaro.org>
Diffstat (limited to 'arch/arm/include/asm')
-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)
}
#define dma_max_pfn(dev) dma_max_pfn(dev)
-static inline int set_arch_dma_coherent_ops(struct device *dev)
+static inline void arch_setup_dma_ops(struct device *dev, bool coherent)
{
- set_dma_ops(dev, &arm_coherent_dma_ops);
- return 0;
+ if (coherent)
+ set_dma_ops(dev, &arm_coherent_dma_ops);
}
-#define set_arch_dma_coherent_ops(dev) set_arch_dma_coherent_ops(dev)
+#define arch_setup_dma_ops arch_setup_dma_ops
static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr)
{