diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2018-03-13 11:56:44 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-03-29 08:16:36 +0200 |
commit | 20c9325c6201de9287910756f6794ba03fd03c82 (patch) | |
tree | af728d54eb3bb5ea9609723994736ae22d17158f | |
parent | 548a574e370f046d09443bc29b210c2c294fa532 (diff) | |
download | barebox-20c9325c6201de9287910756f6794ba03fd03c82.tar.gz barebox-20c9325c6201de9287910756f6794ba03fd03c82.tar.xz |
dma: Use dma_addr_t as type for DMA addresses
DMA addresses are not necessarily the same as unsigned long. Fix
the type for the dma_sync_single_* operations.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | arch/arm/cpu/mmu.c | 4 | ||||
-rw-r--r-- | arch/arm/include/asm/dma.h | 4 | ||||
-rw-r--r-- | arch/mips/lib/dma-default.c | 4 | ||||
-rw-r--r-- | include/dma.h | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c index de0b631981..fc71cf03cd 100644 --- a/arch/arm/cpu/mmu.c +++ b/arch/arm/cpu/mmu.c @@ -575,7 +575,7 @@ void dma_free_coherent(void *mem, dma_addr_t dma_handle, size_t size) free(mem); } -void dma_sync_single_for_cpu(unsigned long address, size_t size, +void dma_sync_single_for_cpu(dma_addr_t address, size_t size, enum dma_data_direction dir) { if (dir != DMA_TO_DEVICE) { @@ -585,7 +585,7 @@ void dma_sync_single_for_cpu(unsigned long address, size_t size, } } -void dma_sync_single_for_device(unsigned long address, size_t size, +void dma_sync_single_for_device(dma_addr_t address, size_t size, enum dma_data_direction dir) { if (dir == DMA_FROM_DEVICE) { diff --git a/arch/arm/include/asm/dma.h b/arch/arm/include/asm/dma.h index 1ba2edf012..a68886b162 100644 --- a/arch/arm/include/asm/dma.h +++ b/arch/arm/include/asm/dma.h @@ -34,12 +34,12 @@ static inline void dma_free_coherent(void *mem, dma_addr_t dma_handle, free(mem); } -static inline void dma_sync_single_for_cpu(unsigned long address, size_t size, +static inline void dma_sync_single_for_cpu(dma_addr_t address, size_t size, enum dma_data_direction dir) { } -static inline void dma_sync_single_for_device(unsigned long address, size_t size, +static inline void dma_sync_single_for_device(dma_addr_t address, size_t size, enum dma_data_direction dir) { } diff --git a/arch/mips/lib/dma-default.c b/arch/mips/lib/dma-default.c index 9b2fe7d410..71c1e423b7 100644 --- a/arch/mips/lib/dma-default.c +++ b/arch/mips/lib/dma-default.c @@ -44,13 +44,13 @@ static inline void __dma_sync_mips(void *addr, size_t size, } #endif -void dma_sync_single_for_cpu(unsigned long address, size_t size, +void dma_sync_single_for_cpu(dma_addr_t address, size_t size, enum dma_data_direction dir) { __dma_sync_mips(address, size, dir); } -void dma_sync_single_for_device(unsigned long address, size_t size, +void dma_sync_single_for_device(dma_addr_t address, size_t size, enum dma_data_direction dir) { __dma_sync_mips(address, size, dir); diff --git a/include/dma.h b/include/dma.h index 4d31797968..29d94c0a52 100644 --- a/include/dma.h +++ b/include/dma.h @@ -31,10 +31,10 @@ static inline void dma_free(void *mem) #endif /* streaming DMA - implement the below calls to support HAS_DMA */ -void dma_sync_single_for_cpu(unsigned long address, size_t size, +void dma_sync_single_for_cpu(dma_addr_t address, size_t size, enum dma_data_direction dir); -void dma_sync_single_for_device(unsigned long address, size_t size, +void dma_sync_single_for_device(dma_addr_t address, size_t size, enum dma_data_direction dir); void *dma_alloc_coherent(size_t size, dma_addr_t *dma_handle); |