• Home
  • Raw
  • Download

Lines Matching refs:dev

25 static inline struct dma_coherent_mem *dev_get_coherent_memory(struct device *dev)  in dev_get_coherent_memory()  argument
27 if (dev && dev->dma_mem) in dev_get_coherent_memory()
28 return dev->dma_mem; in dev_get_coherent_memory()
32 static inline dma_addr_t dma_get_device_base(struct device *dev, in dma_get_device_base() argument
36 return phys_to_dma(dev, PFN_PHYS(mem->pfn_base)); in dma_get_device_base()
97 static int dma_assign_coherent_memory(struct device *dev, in dma_assign_coherent_memory() argument
100 if (!dev) in dma_assign_coherent_memory()
103 if (dev->dma_mem) in dma_assign_coherent_memory()
106 dev->dma_mem = mem; in dma_assign_coherent_memory()
127 int dma_declare_coherent_memory(struct device *dev, phys_addr_t phys_addr, in dma_declare_coherent_memory() argument
137 ret = dma_assign_coherent_memory(dev, mem); in dma_declare_coherent_memory()
143 void dma_release_coherent_memory(struct device *dev) in dma_release_coherent_memory() argument
145 if (dev) { in dma_release_coherent_memory()
146 _dma_release_coherent_memory(dev->dma_mem); in dma_release_coherent_memory()
147 dev->dma_mem = NULL; in dma_release_coherent_memory()
151 static void *__dma_alloc_from_coherent(struct device *dev, in __dma_alloc_from_coherent() argument
172 *dma_handle = dma_get_device_base(dev, mem) + in __dma_alloc_from_coherent()
197 int dma_alloc_from_dev_coherent(struct device *dev, ssize_t size, in dma_alloc_from_dev_coherent() argument
200 struct dma_coherent_mem *mem = dev_get_coherent_memory(dev); in dma_alloc_from_dev_coherent()
205 *ret = __dma_alloc_from_coherent(dev, mem, size, dma_handle); in dma_alloc_from_dev_coherent()
209 void *dma_alloc_from_global_coherent(struct device *dev, ssize_t size, in dma_alloc_from_global_coherent() argument
215 return __dma_alloc_from_coherent(dev, dma_coherent_default_memory, size, in dma_alloc_from_global_coherent()
247 int dma_release_from_dev_coherent(struct device *dev, int order, void *vaddr) in dma_release_from_dev_coherent() argument
249 struct dma_coherent_mem *mem = dev_get_coherent_memory(dev); in dma_release_from_dev_coherent()
300 int dma_mmap_from_dev_coherent(struct device *dev, struct vm_area_struct *vma, in dma_mmap_from_dev_coherent() argument
303 struct dma_coherent_mem *mem = dev_get_coherent_memory(dev); in dma_mmap_from_dev_coherent()
328 static int rmem_dma_device_init(struct reserved_mem *rmem, struct device *dev) in rmem_dma_device_init() argument
344 dma_assign_coherent_memory(dev, mem); in rmem_dma_device_init()
349 struct device *dev) in rmem_dma_device_release() argument
351 if (dev) in rmem_dma_device_release()
352 dev->dma_mem = NULL; in rmem_dma_device_release()