17 #ifndef __ASM_OPENRISC_DMA_MAPPING_H
18 #define __ASM_OPENRISC_DMA_MAPPING_H
30 #define DMA_ERROR_CODE (~(dma_addr_t)0x0)
41 #define dma_alloc_coherent(d,s,h,f) dma_alloc_attrs(d,s,h,f,NULL)
43 static inline void *dma_alloc_attrs(
struct device *
dev,
size_t size,
50 memory = ops->
alloc(dev, size, dma_handle, gfp, attrs);
57 #define dma_free_coherent(d,s,c,h) dma_free_attrs(d,s,c,h,NULL)
59 static inline void dma_free_attrs(
struct device *
dev,
size_t size,
67 ops->
free(dev, size, cpu_addr, dma_handle, attrs);
77 return dma_alloc_attrs(dev, size, dma_handle, gfp, &attrs);
87 dma_free_attrs(dev, size, cpu_addr, dma_handle, &attrs);