Lines Matching refs:dma_mem
25 if (dev && dev->dma_mem) in dev_get_coherent_memory()
26 return dev->dma_mem; in dev_get_coherent_memory()
41 struct dma_coherent_mem *dma_mem; in dma_init_coherent_memory() local
52 dma_mem = kzalloc(sizeof(struct dma_coherent_mem), GFP_KERNEL); in dma_init_coherent_memory()
53 if (!dma_mem) in dma_init_coherent_memory()
55 dma_mem->bitmap = bitmap_zalloc(pages, GFP_KERNEL); in dma_init_coherent_memory()
56 if (!dma_mem->bitmap) in dma_init_coherent_memory()
59 dma_mem->virt_base = mem_base; in dma_init_coherent_memory()
60 dma_mem->device_base = device_addr; in dma_init_coherent_memory()
61 dma_mem->pfn_base = PFN_DOWN(phys_addr); in dma_init_coherent_memory()
62 dma_mem->size = pages; in dma_init_coherent_memory()
63 dma_mem->use_dev_dma_pfn_offset = use_dma_pfn_offset; in dma_init_coherent_memory()
64 spin_lock_init(&dma_mem->spinlock); in dma_init_coherent_memory()
66 return dma_mem; in dma_init_coherent_memory()
69 kfree(dma_mem); in dma_init_coherent_memory()
93 if (dev->dma_mem) in dma_assign_coherent_memory()
96 dev->dma_mem = mem; in dma_assign_coherent_memory()
136 _dma_release_coherent_memory(dev->dma_mem); in dma_release_coherent_memory()
137 dev->dma_mem = NULL; in dma_release_coherent_memory()
355 dev->dma_mem = NULL; in rmem_dma_device_release()