diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2016-04-25 22:08:52 +0300 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2016-12-15 10:41:50 -0800 |
commit | 9d2ffe5c62554f2795859bb661eb138759eee980 (patch) | |
tree | 3093778665a69c88e9f0727d5ee2165078c530cb /arch/xtensa/mm | |
parent | 3863c58cc742df9e5f9ef0bde7dc135fdc547c19 (diff) |
xtensa: enable HAVE_DMA_CONTIGUOUS
Enable HAVE_DMA_CONTIGUOUS, reserve contiguous memory at bootmem_init,
use dma_alloc_from_contiguous and dma_release_from_contiguous in
xtensa_dma_alloc/free.
This allows for big contiguous DMA buffer allocation from designated
area configured in the device tree.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/xtensa/mm')
-rw-r--r-- | arch/xtensa/mm/init.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/xtensa/mm/init.c b/arch/xtensa/mm/init.c index 80e4cfb2471a..720fe4e8b497 100644 --- a/arch/xtensa/mm/init.c +++ b/arch/xtensa/mm/init.c @@ -26,6 +26,7 @@ #include <linux/nodemask.h> #include <linux/mm.h> #include <linux/of_fdt.h> +#include <linux/dma-contiguous.h> #include <asm/bootparam.h> #include <asm/page.h> @@ -60,6 +61,7 @@ void __init bootmem_init(void) max_low_pfn = min(max_pfn, MAX_LOW_PFN); memblock_set_current_limit(PFN_PHYS(max_low_pfn)); + dma_contiguous_reserve(PFN_PHYS(max_low_pfn)); memblock_dump_all(); } |