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()
45 struct dma_coherent_mem *dma_mem = NULL; in dma_init_coherent_memory() local
61 dma_mem = kzalloc(sizeof(struct dma_coherent_mem), GFP_KERNEL); in dma_init_coherent_memory()
62 if (!dma_mem) { in dma_init_coherent_memory()
66 dma_mem->bitmap = kzalloc(bitmap_size, GFP_KERNEL); in dma_init_coherent_memory()
67 if (!dma_mem->bitmap) { in dma_init_coherent_memory()
72 dma_mem->virt_base = mem_base; in dma_init_coherent_memory()
73 dma_mem->device_base = device_addr; in dma_init_coherent_memory()
74 dma_mem->pfn_base = PFN_DOWN(phys_addr); in dma_init_coherent_memory()
75 dma_mem->size = pages; in dma_init_coherent_memory()
76 dma_mem->flags = flags; in dma_init_coherent_memory()
77 spin_lock_init(&dma_mem->spinlock); in dma_init_coherent_memory()
79 *mem = dma_mem; in dma_init_coherent_memory()
83 kfree(dma_mem); in dma_init_coherent_memory()
105 if (dev->dma_mem) in dma_assign_coherent_memory()
108 dev->dma_mem = mem; in dma_assign_coherent_memory()
131 struct dma_coherent_mem *mem = dev->dma_mem; in dma_release_declared_memory()
136 dev->dma_mem = NULL; in dma_release_declared_memory()
143 struct dma_coherent_mem *mem = dev->dma_mem; in dma_mark_declared_memory_occupied()
373 dev->dma_mem = NULL; in rmem_dma_device_release()