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
53 dma_mem = kzalloc(sizeof(struct dma_coherent_mem), GFP_KERNEL); in dma_init_coherent_memory()
54 if (!dma_mem) in dma_init_coherent_memory()
56 dma_mem->bitmap = kzalloc(bitmap_size, GFP_KERNEL); in dma_init_coherent_memory()
57 if (!dma_mem->bitmap) in dma_init_coherent_memory()
60 dma_mem->virt_base = mem_base; in dma_init_coherent_memory()
61 dma_mem->device_base = device_addr; in dma_init_coherent_memory()
62 dma_mem->pfn_base = PFN_DOWN(phys_addr); in dma_init_coherent_memory()
63 dma_mem->size = pages; in dma_init_coherent_memory()
64 dma_mem->use_dev_dma_pfn_offset = use_dma_pfn_offset; in dma_init_coherent_memory()
65 spin_lock_init(&dma_mem->spinlock); in dma_init_coherent_memory()
67 return dma_mem; in dma_init_coherent_memory()
70 kfree(dma_mem); in dma_init_coherent_memory()
94 if (dev->dma_mem) in dma_assign_coherent_memory()
97 dev->dma_mem = mem; in dma_assign_coherent_memory()
348 dev->dma_mem = NULL; in rmem_dma_device_release()