diff options
author | Ahmad Fatoum <ahmad@a3f.at> | 2021-03-03 17:12:47 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-03-04 12:11:22 +0100 |
commit | 3f975f810bd34c56cfafd88d1d4e6eb669e74561 (patch) | |
tree | 4ee73d2980ee39d9c6bed962f04ddd4f7eb63430 /arch/sandbox | |
parent | 598217bad38f62aa1691742839cfe856ba2a99e2 (diff) | |
download | barebox-3f975f810bd34c56cfafd88d1d4e6eb669e74561.tar.gz barebox-3f975f810bd34c56cfafd88d1d4e6eb669e74561.tar.xz |
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 <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/sandbox')
-rw-r--r-- | arch/sandbox/include/asm/dma.h | 11 |
1 files changed, 0 insertions, 11 deletions
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) { |