1 #ifndef _ASM_GENERIC_DMA_MAPPING_H
2 #define _ASM_GENERIC_DMA_MAPPING_H
19 BUG_ON(!valid_dma_direction(dir));
36 BUG_ON(!valid_dma_direction(dir));
52 BUG_ON(!valid_dma_direction(dir));
53 ents = ops->map_sg(dev, sg, nents, dir, attrs);
65 BUG_ON(!valid_dma_direction(dir));
68 ops->
unmap_sg(dev, sg, nents, dir, attrs);
72 size_t offset,
size_t size,
79 BUG_ON(!valid_dma_direction(dir));
80 addr = ops->
map_page(dev, page, offset, size, dir,
NULL);
91 BUG_ON(!valid_dma_direction(dir));
103 BUG_ON(!valid_dma_direction(dir));
115 BUG_ON(!valid_dma_direction(dir));
123 unsigned long offset,
129 BUG_ON(!valid_dma_direction(dir));
137 unsigned long offset,
143 BUG_ON(!valid_dma_direction(dir));
155 BUG_ON(!valid_dma_direction(dir));
167 BUG_ON(!valid_dma_direction(dir));
174 #define dma_map_single(d, a, s, r) dma_map_single_attrs(d, a, s, r, NULL)
175 #define dma_unmap_single(d, a, s, r) dma_unmap_single_attrs(d, a, s, r, NULL)
176 #define dma_map_sg(d, s, n, r) dma_map_sg_attrs(d, s, n, r, NULL)
177 #define dma_unmap_sg(d, s, n, r) dma_unmap_sg_attrs(d, s, n, r, NULL)
202 return ops->
mmap(dev, vma, cpu_addr, dma_addr, size, attrs);
206 #define dma_mmap_coherent(d, v, c, h, s) dma_mmap_attrs(d, v, c, h, s, NULL)
209 void *cpu_addr,
dma_addr_t dma_addr,
size_t size)
213 return dma_mmap_attrs(dev, vma, cpu_addr, dma_addr, size, &attrs);
218 void *cpu_addr,
dma_addr_t dma_addr,
size_t size);
227 return ops->
get_sgtable(dev, sgt, cpu_addr, dma_addr, size,
232 #define dma_get_sgtable(d, t, v, h, s) dma_get_sgtable_attrs(d, t, v, h, s, NULL)