From a0c4e2203fdde7b2636eab3f1406ea66f0e0da19 Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Thu, 5 Mar 2015 22:49:58 +0100 Subject: dma: add streaming DMA ops This will allow us to implement cache maintenance in a platform agnostic way. Signed-off-by: Lucas Stach Signed-off-by: Sascha Hauer --- include/dma.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/dma.h') diff --git a/include/dma.h b/include/dma.h index 899f831faa..fb75eec678 100644 --- a/include/dma.h +++ b/include/dma.h @@ -11,6 +11,7 @@ #include #include +#include #include #ifndef dma_alloc @@ -27,4 +28,14 @@ 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, + enum dma_data_direction dir); + +void dma_sync_single_for_device(unsigned long address, size_t size, + enum dma_data_direction dir); + +void *dma_alloc_coherent(size_t size, dma_addr_t *dma_handle); +void dma_free_coherent(void *mem, dma_addr_t dma_handle, size_t size); + #endif /* __DMA_H */ -- cgit v1.2.3