Lines Matching refs:dir
141 size_t offset, size_t size, enum dma_data_direction dir, in dma_map_page_attrs() argument
147 BUG_ON(!valid_dma_direction(dir)); in dma_map_page_attrs()
153 addr = dma_direct_map_page(dev, page, offset, size, dir, attrs); in dma_map_page_attrs()
155 addr = ops->map_page(dev, page, offset, size, dir, attrs); in dma_map_page_attrs()
156 debug_dma_map_page(dev, page, offset, size, dir, addr); in dma_map_page_attrs()
163 enum dma_data_direction dir, unsigned long attrs) in dma_unmap_page_attrs() argument
167 BUG_ON(!valid_dma_direction(dir)); in dma_unmap_page_attrs()
169 dma_direct_unmap_page(dev, addr, size, dir, attrs); in dma_unmap_page_attrs()
171 ops->unmap_page(dev, addr, size, dir, attrs); in dma_unmap_page_attrs()
172 debug_dma_unmap_page(dev, addr, size, dir); in dma_unmap_page_attrs()
181 enum dma_data_direction dir, unsigned long attrs) in dma_map_sg_attrs() argument
186 BUG_ON(!valid_dma_direction(dir)); in dma_map_sg_attrs()
192 ents = dma_direct_map_sg(dev, sg, nents, dir, attrs); in dma_map_sg_attrs()
194 ents = ops->map_sg(dev, sg, nents, dir, attrs); in dma_map_sg_attrs()
196 debug_dma_map_sg(dev, sg, nents, ents, dir); in dma_map_sg_attrs()
203 int nents, enum dma_data_direction dir, in dma_unmap_sg_attrs() argument
208 BUG_ON(!valid_dma_direction(dir)); in dma_unmap_sg_attrs()
209 debug_dma_unmap_sg(dev, sg, nents, dir); in dma_unmap_sg_attrs()
211 dma_direct_unmap_sg(dev, sg, nents, dir, attrs); in dma_unmap_sg_attrs()
213 ops->unmap_sg(dev, sg, nents, dir, attrs); in dma_unmap_sg_attrs()
218 size_t size, enum dma_data_direction dir, unsigned long attrs) in dma_map_resource() argument
223 BUG_ON(!valid_dma_direction(dir)); in dma_map_resource()
233 addr = dma_direct_map_resource(dev, phys_addr, size, dir, attrs); in dma_map_resource()
235 addr = ops->map_resource(dev, phys_addr, size, dir, attrs); in dma_map_resource()
237 debug_dma_map_resource(dev, phys_addr, size, dir, addr); in dma_map_resource()
243 enum dma_data_direction dir, unsigned long attrs) in dma_unmap_resource() argument
247 BUG_ON(!valid_dma_direction(dir)); in dma_unmap_resource()
249 ops->unmap_resource(dev, addr, size, dir, attrs); in dma_unmap_resource()
250 debug_dma_unmap_resource(dev, addr, size, dir); in dma_unmap_resource()
255 enum dma_data_direction dir) in dma_sync_single_for_cpu() argument
259 BUG_ON(!valid_dma_direction(dir)); in dma_sync_single_for_cpu()
261 dma_direct_sync_single_for_cpu(dev, addr, size, dir); in dma_sync_single_for_cpu()
263 ops->sync_single_for_cpu(dev, addr, size, dir); in dma_sync_single_for_cpu()
264 debug_dma_sync_single_for_cpu(dev, addr, size, dir); in dma_sync_single_for_cpu()
269 size_t size, enum dma_data_direction dir) in dma_sync_single_for_device() argument
273 BUG_ON(!valid_dma_direction(dir)); in dma_sync_single_for_device()
275 dma_direct_sync_single_for_device(dev, addr, size, dir); in dma_sync_single_for_device()
277 ops->sync_single_for_device(dev, addr, size, dir); in dma_sync_single_for_device()
278 debug_dma_sync_single_for_device(dev, addr, size, dir); in dma_sync_single_for_device()
283 int nelems, enum dma_data_direction dir) in dma_sync_sg_for_cpu() argument
287 BUG_ON(!valid_dma_direction(dir)); in dma_sync_sg_for_cpu()
289 dma_direct_sync_sg_for_cpu(dev, sg, nelems, dir); in dma_sync_sg_for_cpu()
291 ops->sync_sg_for_cpu(dev, sg, nelems, dir); in dma_sync_sg_for_cpu()
292 debug_dma_sync_sg_for_cpu(dev, sg, nelems, dir); in dma_sync_sg_for_cpu()
297 int nelems, enum dma_data_direction dir) in dma_sync_sg_for_device() argument
301 BUG_ON(!valid_dma_direction(dir)); in dma_sync_sg_for_device()
303 dma_direct_sync_sg_for_device(dev, sg, nelems, dir); in dma_sync_sg_for_device()
305 ops->sync_sg_for_device(dev, sg, nelems, dir); in dma_sync_sg_for_device()
306 debug_dma_sync_sg_for_device(dev, sg, nelems, dir); in dma_sync_sg_for_device()
478 dma_addr_t *dma_handle, enum dma_data_direction dir, gfp_t gfp) in dma_alloc_pages() argument
490 page = dma_direct_alloc_pages(dev, size, dma_handle, dir, gfp); in dma_alloc_pages()
492 page = ops->alloc_pages(dev, size, dma_handle, dir, gfp); in dma_alloc_pages()
496 debug_dma_map_page(dev, page, 0, size, dir, *dma_handle); in dma_alloc_pages()
503 dma_addr_t dma_handle, enum dma_data_direction dir) in dma_free_pages() argument
508 debug_dma_unmap_page(dev, dma_handle, size, dir); in dma_free_pages()
511 dma_direct_free_pages(dev, size, page, dma_handle, dir); in dma_free_pages()
513 ops->free_pages(dev, size, page, dma_handle, dir); in dma_free_pages()
518 dma_addr_t *dma_handle, enum dma_data_direction dir, gfp_t gfp) in dma_alloc_noncoherent() argument
526 page = dma_alloc_pages(dev, size, dma_handle, dir, gfp); in dma_alloc_noncoherent()
533 vaddr = ops->alloc_noncoherent(dev, size, dma_handle, dir, gfp); in dma_alloc_noncoherent()
535 debug_dma_map_page(dev, virt_to_page(vaddr), 0, size, dir, in dma_alloc_noncoherent()
542 dma_addr_t dma_handle, enum dma_data_direction dir) in dma_free_noncoherent() argument
547 dma_free_pages(dev, size, virt_to_page(vaddr), dma_handle, dir); in dma_free_noncoherent()
552 debug_dma_unmap_page(dev, dma_handle, size, dir); in dma_free_noncoherent()
553 ops->free_noncoherent(dev, size, vaddr, dma_handle, dir); in dma_free_noncoherent()