diff options
Diffstat (limited to 'arch/mips/include/asm/dma-mapping.h')
-rw-r--r-- | arch/mips/include/asm/dma-mapping.h | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/arch/mips/include/asm/dma-mapping.h b/arch/mips/include/asm/dma-mapping.h deleted file mode 100644 index c71a087038..0000000000 --- a/arch/mips/include/asm/dma-mapping.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef _ASM_DMA_MAPPING_H -#define _ASM_DMA_MAPPING_H - -#include <common.h> -#include <xfuncs.h> -#include <asm/addrspace.h> -#include <asm/types.h> -#include <malloc.h> -#include <asm/io.h> - -static inline void *dma_alloc_coherent(size_t size, dma_addr_t *dma_handle) -{ - void *ret; - - ret = xmemalign(PAGE_SIZE, size); - - memset(ret, 0, size); - - if (dma_handle) - *dma_handle = CPHYSADDR(ret); - - dma_flush_range((unsigned long)ret, (unsigned long)(ret + size)); - - return (void *)CKSEG1ADDR(ret); -} - -static inline void dma_free_coherent(void *vaddr, dma_addr_t dma_handle, - size_t size) -{ - if (IS_ENABLED(CONFIG_MMU)) - free((void *)CKSEG0ADDR(vaddr)); - else - free(vaddr); -} - -#endif /* _ASM_DMA_MAPPING_H */ |