dma-mapping: add a dma_init_global_coherent helper
Add a new helper to initialize the global coherent pool. This both cleans up the existing initialization which indirects through the reserved_mem_ops that are normally only used for struct device, and also allows using the global pool for non-devicetree architectures. Signed-off-by: Christoph Hellwig <hch@lst.de> Tested-by: Dillon Min <dillon.minfei@gmail.com>
This commit is contained in:
@@ -177,7 +177,7 @@ void *dma_alloc_from_global_coherent(struct device *dev, ssize_t size,
|
||||
int dma_release_from_global_coherent(int order, void *vaddr);
|
||||
int dma_mmap_from_global_coherent(struct vm_area_struct *vma, void *cpu_addr,
|
||||
size_t size, int *ret);
|
||||
|
||||
int dma_init_global_coherent(phys_addr_t phys_addr, size_t size);
|
||||
#else
|
||||
static inline int dma_declare_coherent_memory(struct device *dev,
|
||||
phys_addr_t phys_addr, dma_addr_t device_addr, size_t size)
|
||||
|
||||
Reference in New Issue
Block a user