summaryrefslogtreecommitdiffstats
path: root/include/asm-generic/dma-coherent.h
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2012-03-23 13:05:14 +0100
committerMarek Szyprowski <m.szyprowski@samsung.com>2012-05-21 15:06:09 +0200
commitbca0fa5f12a6744a2b2e53154af65a51402b3426 (patch)
tree3da5a3098d9a9139e7a027cdab1a8ae5386f6be0 /include/asm-generic/dma-coherent.h
parent76e10d158efb6d4516018846f60c2ab5501900bc (diff)
common: add dma_mmap_from_coherent() function
Add a common helper for dma-mapping core for mapping a coherent buffer to userspace. Reported-by: Subash Patel <subashrp@gmail.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Tested-By: Subash Patel <subash.ramaswamy@linaro.org>
Diffstat (limited to 'include/asm-generic/dma-coherent.h')
-rw-r--r--include/asm-generic/dma-coherent.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/asm-generic/dma-coherent.h b/include/asm-generic/dma-coherent.h
index 85a3ffaa024..abfb2682de7 100644
--- a/include/asm-generic/dma-coherent.h
+++ b/include/asm-generic/dma-coherent.h
@@ -3,13 +3,15 @@
#ifdef CONFIG_HAVE_GENERIC_DMA_COHERENT
/*
- * These two functions are only for dma allocator.
+ * These three functions are only for dma allocator.
* Don't use them in device drivers.
*/
int dma_alloc_from_coherent(struct device *dev, ssize_t size,
dma_addr_t *dma_handle, void **ret);
int dma_release_from_coherent(struct device *dev, int order, void *vaddr);
+int dma_mmap_from_coherent(struct device *dev, struct vm_area_struct *vma,
+ void *cpu_addr, size_t size, int *ret);
/*
* Standard interface
*/