Lines Matching refs:device
16 void *(*alloc)(struct device *dev, size_t size, dma_addr_t *dma_handle,
18 void (*free)(struct device *dev, size_t size, void *vaddr,
20 struct page *(*alloc_pages)(struct device *dev, size_t size,
23 void (*free_pages)(struct device *dev, size_t size, struct page *vaddr,
25 void *(*alloc_noncoherent)(struct device *dev, size_t size,
28 void (*free_noncoherent)(struct device *dev, size_t size, void *vaddr,
31 int (*mmap)(struct device *, struct vm_area_struct *, void *, dma_addr_t,
34 int (*get_sgtable)(struct device *dev, struct sg_table *sgt, void *cpu_addr,
37 dma_addr_t (*map_page)(struct device *dev, struct page *page,
40 void (*unmap_page)(struct device *dev, dma_addr_t dma_handle, size_t size,
46 int (*map_sg)(struct device *dev, struct scatterlist *sg, int nents,
48 void (*unmap_sg)(struct device *dev, struct scatterlist *sg, int nents,
50 dma_addr_t (*map_resource)(struct device *dev, phys_addr_t phys_addr,
53 void (*unmap_resource)(struct device *dev, dma_addr_t dma_handle,
56 void (*sync_single_for_cpu)(struct device *dev, dma_addr_t dma_handle,
58 void (*sync_single_for_device)(struct device *dev, dma_addr_t dma_handle,
60 void (*sync_sg_for_cpu)(struct device *dev, struct scatterlist *sg,
62 void (*sync_sg_for_device)(struct device *dev, struct scatterlist *sg,
64 void (*cache_sync)(struct device *dev, void *vaddr, size_t size,
66 int (*dma_supported)(struct device *dev, u64 mask);
67 u64 (*get_required_mask)(struct device *dev);
68 size_t (*max_mapping_size)(struct device *dev);
69 unsigned long (*get_merge_boundary)(struct device *dev);
80 static inline const struct dma_map_ops *get_dma_ops(struct device *dev)
88 static inline void set_dma_ops(struct device *dev,
94 static inline const struct dma_map_ops *get_dma_ops(struct device *dev)
98 static inline void set_dma_ops(struct device *dev,
107 static inline struct cma *dev_get_cma_area(struct device *dev)
120 struct page *dma_alloc_from_contiguous(struct device *dev, size_t count,
122 bool dma_release_from_contiguous(struct device *dev, struct page *pages,
124 struct page *dma_alloc_contiguous(struct device *dev, size_t size, gfp_t gfp);
125 void dma_free_contiguous(struct device *dev, struct page *page, size_t size);
129 static inline struct cma *dev_get_cma_area(struct device *dev)
143 static inline struct page *dma_alloc_from_contiguous(struct device *dev,
150 static inline bool dma_release_from_contiguous(struct device *dev,
156 static inline struct page *dma_alloc_contiguous(struct device *dev, size_t size,
161 static inline void dma_free_contiguous(struct device *dev, struct page *page,
177 int dma_declare_coherent_memory(struct device *dev, phys_addr_t phys_addr,
179 int dma_alloc_from_dev_coherent(struct device *dev, ssize_t size,
181 int dma_release_from_dev_coherent(struct device *dev, int order, void *vaddr);
182 int dma_mmap_from_dev_coherent(struct device *dev, struct vm_area_struct *vma,
185 void *dma_alloc_from_global_coherent(struct device *dev, ssize_t size,
192 static inline int dma_declare_coherent_memory(struct device *dev,
203 static inline void *dma_alloc_from_global_coherent(struct device *dev,
221 int dma_common_get_sgtable(struct device *dev, struct sg_table *sgt,
224 int dma_common_mmap(struct device *dev, struct vm_area_struct *vma,
227 struct page *dma_common_alloc_pages(struct device *dev, size_t size,
230 void dma_common_free_pages(struct device *dev, size_t size, struct page *vaddr,
240 struct page *dma_alloc_from_pool(struct device *dev, size_t size,
242 bool (*phys_addr_ok)(struct device *,
244 bool dma_free_from_pool(struct device *dev, void *start, size_t size);
251 static inline bool dev_is_dma_coherent(struct device *dev)
256 static inline bool dev_is_dma_coherent(struct device *dev)
262 void *arch_dma_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle,
264 void arch_dma_free(struct device *dev, size_t size, void *cpu_addr,
280 * pgprot, as the expectation is that the device is not coherent.
286 pgprot_t dma_pgprot(struct device *dev, pgprot_t prot, unsigned long attrs);
288 static inline pgprot_t dma_pgprot(struct device *dev, pgprot_t prot,
343 void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
346 static inline void arch_setup_dma_ops(struct device *dev, u64 dma_base,
354 void arch_teardown_dma_ops(struct device *dev);
356 static inline void arch_teardown_dma_ops(struct device *dev)
363 void debug_dma_dump_mappings(struct device *dev);
368 static inline void debug_dma_dump_mappings(struct device *dev)