Lines Matching refs:dma_mem
27 if (dev && dev->dma_mem) in dev_get_coherent_memory()
28 return dev->dma_mem; in dev_get_coherent_memory()
44 struct dma_coherent_mem *dma_mem = NULL; in dma_init_coherent_memory() local
60 dma_mem = kzalloc(sizeof(struct dma_coherent_mem), GFP_KERNEL); in dma_init_coherent_memory()
61 if (!dma_mem) { in dma_init_coherent_memory()
65 dma_mem->bitmap = kzalloc(bitmap_size, GFP_KERNEL); in dma_init_coherent_memory()
66 if (!dma_mem->bitmap) { in dma_init_coherent_memory()
71 dma_mem->virt_base = mem_base; in dma_init_coherent_memory()
72 dma_mem->device_base = device_addr; in dma_init_coherent_memory()
73 dma_mem->pfn_base = PFN_DOWN(phys_addr); in dma_init_coherent_memory()
74 dma_mem->size = pages; in dma_init_coherent_memory()
75 spin_lock_init(&dma_mem->spinlock); in dma_init_coherent_memory()
77 *mem = dma_mem; in dma_init_coherent_memory()
81 kfree(dma_mem); in dma_init_coherent_memory()
103 if (dev->dma_mem) in dma_assign_coherent_memory()
106 dev->dma_mem = mem; in dma_assign_coherent_memory()
344 dev->dma_mem = NULL; in rmem_dma_device_release()