diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2014-10-13 18:51:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-13 20:18:12 -0400 |
commit | de9e14eebf33a60712a52a0bc6e08c043c0aba53 (patch) | |
tree | 7b681bf9d5cb6a7909c8d9090aaa868d3e22ccf2 /include/linux/cma.h | |
parent | 7bfa5ab6fa1b18f53fb94f922e107e6fbdc5e485 (diff) |
drivers: dma-contiguous: add initialization from device tree
Add a function to create CMA region from previously reserved memory and
add support for handling 'shared-dma-pool' reserved-memory device tree
nodes.
Based on previous code provided by Josh Cartwright <joshc@codeaurora.org>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Michal Nazarewicz <mina86@mina86.com>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Laura Abbott <lauraa@codeaurora.org>
Cc: Josh Cartwright <joshc@codeaurora.org>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/cma.h')
-rw-r--r-- | include/linux/cma.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/cma.h b/include/linux/cma.h index 371b93042520..0430ed05d3b9 100644 --- a/include/linux/cma.h +++ b/include/linux/cma.h | |||
@@ -22,6 +22,9 @@ extern int __init cma_declare_contiguous(phys_addr_t size, | |||
22 | phys_addr_t base, phys_addr_t limit, | 22 | phys_addr_t base, phys_addr_t limit, |
23 | phys_addr_t alignment, unsigned int order_per_bit, | 23 | phys_addr_t alignment, unsigned int order_per_bit, |
24 | bool fixed, struct cma **res_cma); | 24 | bool fixed, struct cma **res_cma); |
25 | extern int cma_init_reserved_mem(phys_addr_t size, | ||
26 | phys_addr_t base, int order_per_bit, | ||
27 | struct cma **res_cma); | ||
25 | extern struct page *cma_alloc(struct cma *cma, int count, unsigned int align); | 28 | extern struct page *cma_alloc(struct cma *cma, int count, unsigned int align); |
26 | extern bool cma_release(struct cma *cma, struct page *pages, int count); | 29 | extern bool cma_release(struct cma *cma, struct page *pages, int count); |
27 | #endif | 30 | #endif |