1 #ifndef _ASM_DMA_MAPPING_H
2 #define _ASM_DMA_MAPPING_H
5 dma_supported(struct device *dev, u64 mask)
12 dma_set_mask(struct device *dev, u64 dma_mask)
19 dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
27 dma_free_coherent(struct device *dev, size_t size, void *cpu_addr,
28 dma_addr_t dma_handle)
33 static inline dma_addr_t
34 dma_map_single(struct device *dev, void *cpu_addr, size_t size,
35 enum dma_data_direction direction)
42 dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
43 enum dma_data_direction direction)
48 static inline dma_addr_t
49 dma_map_page(struct device *dev, struct page *page,
50 unsigned long offset, size_t size,
51 enum dma_data_direction direction)
58 dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size,
59 enum dma_data_direction direction)
65 dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
66 enum dma_data_direction direction)
73 dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries,
74 enum dma_data_direction direction)
80 dma_sync_single(struct device *dev, dma_addr_t dma_handle, size_t size,
81 enum dma_data_direction direction)
87 dma_sync_sg(struct device *dev, struct scatterlist *sg, int nelems,
88 enum dma_data_direction direction)
93 #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
94 #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
95 #define dma_is_consistent(d) (1)
98 dma_get_cache_alignment(void)
105 dma_sync_single_range(struct device *dev, dma_addr_t dma_handle,
106 unsigned long offset, size_t size,
107 enum dma_data_direction direction)
113 dma_cache_sync(void *vaddr, size_t size,
114 enum dma_data_direction direction)