1 #ifndef ASMARM_DMA_MAPPING_H
2 #define ASMARM_DMA_MAPPING_H
12 #include <asm/memory.h>
14 #define DMA_ERROR_CODE (~0)
38 #ifdef __arch_page_to_dma
39 #error Please update to __arch_pfn_to_dma
47 #ifndef __arch_pfn_to_dma
70 return __arch_pfn_to_dma(dev, pfn);
75 return __arch_dma_to_pfn(dev, addr);
80 return __arch_dma_to_virt(dev, addr);
85 return __arch_virt_to_dma(dev, addr);
128 #define dma_alloc_coherent(d, s, h, f) dma_alloc_attrs(d, s, h, f, NULL)
130 static inline void *dma_alloc_attrs(
struct device *dev,
size_t size,
138 cpu_addr = ops->
alloc(dev, size, dma_handle, flag, attrs);
160 #define dma_free_coherent(d, s, c, h) dma_free_attrs(d, s, c, h, NULL)
162 static inline void dma_free_attrs(
struct device *dev,
size_t size,
170 ops->
free(dev, size, cpu_addr, dma_handle, attrs);
195 return dma_alloc_attrs(dev, size, dma_handle, flag, &attrs);
203 return dma_free_attrs(dev, size, cpu_addr, dma_handle, &attrs);
211 extern void __init init_dma_coherent_pool_size(
unsigned long size);
218 static inline void init_consistent_dma_size(
unsigned long size) { }