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>
This commit is contained in:
Will Deacon 2014-08-27 15:49:10 +01:00
parent 1cd076bf67
commit a3a60f81ee
3 changed files with 19 additions and 27 deletions

View file

@ -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)