From 3f975f810bd34c56cfafd88d1d4e6eb669e74561 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Wed, 3 Mar 2021 17:12:47 +0100 Subject: dma: move dma_map/unmap_single from ARM to common code There's nothing ARM specific about these functions. Move them to a common location, so other arches can use them as well. This also fixes a bug on ARM MMU=n configurations: Previously these two functions these functions only respected dma-ranges translation when compiled with MMU support. DMA address translation is applicable regardless of CPU use of MMU though. Now, dma-ranges should be respected unconditionally. Signed-off-by: Ahmad Fatoum Signed-off-by: Sascha Hauer --- arch/sandbox/include/asm/dma.h | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'arch/sandbox') diff --git a/arch/sandbox/include/asm/dma.h b/arch/sandbox/include/asm/dma.h index 5e72d8e7df..34c0fc5190 100644 --- a/arch/sandbox/include/asm/dma.h +++ b/arch/sandbox/include/asm/dma.h @@ -40,17 +40,6 @@ static inline void dma_free_coherent(void *mem, dma_addr_t dma_handle, free(mem); } -static inline dma_addr_t dma_map_single(struct device_d *dev, void *ptr, size_t size, - enum dma_data_direction dir) -{ - return (dma_addr_t)ptr; -} - -static inline void dma_unmap_single(struct device_d *dev, dma_addr_t addr, size_t size, - enum dma_data_direction dir) -{ -} - static inline void dma_sync_single_for_cpu(dma_addr_t address, size_t size, enum dma_data_direction dir) { -- cgit v1.2.3