|
@@ -21,6 +21,7 @@
|
|
|
#include <linux/dma-contiguous.h>
|
|
|
#include <linux/io.h>
|
|
|
#include <linux/kernel.h>
|
|
|
+#include <linux/memblock.h>
|
|
|
#include <linux/of.h>
|
|
|
#include <linux/of_fdt.h>
|
|
|
#include <asm/mach/arch.h>
|
|
@@ -199,7 +200,7 @@ void __init rcar_gen2_reserve(void)
|
|
|
|
|
|
of_scan_flat_dt(rcar_gen2_scan_mem, &mrc);
|
|
|
#ifdef CONFIG_DMA_CMA
|
|
|
- if (mrc.size)
|
|
|
+ if (mrc.size && memblock_is_region_memory(mrc.base, mrc.size))
|
|
|
dma_contiguous_reserve_area(mrc.size, mrc.base, 0,
|
|
|
&rcar_gen2_dma_contiguous, true);
|
|
|
#endif
|