diff options
author | Lucas Stach <dev@lynxeye.de> | 2015-03-05 22:49:54 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-03-06 07:51:47 +0100 |
commit | 6c583d0e327deecaea026cf47576fbe42274bd8c (patch) | |
tree | 078b4795109845537893bdc32368e32ed812e66d /arch/mips/include | |
parent | 394a3533a8c66400aeeddf69c5c2c45fb598a946 (diff) | |
download | barebox-6c583d0e327deecaea026cf47576fbe42274bd8c.tar.gz barebox-6c583d0e327deecaea026cf47576fbe42274bd8c.tar.xz |
MIPS: change dma_alloc/free_coherent to common prototypes
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/mips/include')
-rw-r--r-- | arch/mips/include/asm/dma-mapping.h | 6 | ||||
-rw-r--r-- | arch/mips/include/asm/dma.h | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/arch/mips/include/asm/dma-mapping.h b/arch/mips/include/asm/dma-mapping.h index 555efa5773..639511226d 100644 --- a/arch/mips/include/asm/dma-mapping.h +++ b/arch/mips/include/asm/dma-mapping.h @@ -12,12 +12,14 @@ static inline void *dma_alloc_coherent(size_t size, dma_addr_t *dma_handle) ret = xmemalign(PAGE_SIZE, size); - *dma_handle = CPHYSADDR(ret); + if (dma_handle) + *dma_handle = CPHYSADDR(ret); return (void *)CKSEG1ADDR(ret); } -static inline void dma_free_coherent(void *vaddr) +static inline void dma_free_coherent(void *vaddr, dma_addr_t dma_handle, + size_t size) { free(vaddr); } diff --git a/arch/mips/include/asm/dma.h b/arch/mips/include/asm/dma.h index 27d269f491..30a58c78b9 100644 --- a/arch/mips/include/asm/dma.h +++ b/arch/mips/include/asm/dma.h @@ -8,6 +8,6 @@ #ifndef __ASM_DMA_H #define __ASM_DMA_H -/* empty */ +#include "asm/dma-mapping.h" #endif /* __ASM_DMA_H */ |