Skip to contentSkip to conversation

ARC: enable per-device dma and reserved memory in DT

PATCH New Alexey Brodkin 1 participant 3 messages Apr 26, 2016 Synopsys ARC architecture

lore
Share & tools
lore
#0 lore raw

cover ARC: enable per-device dma and reserved memory in DT

This tiny series enbles support of generic per-device coherent dma memory and ability to specify reserved memory regions to be used in those per-device mappings.

In particular this allowed us to move frame-buffer memory out of IOC aperture.

Cc linux-kernel at vger.kernel.org

Alexey Brodkin (2):
ARC: support generic per-device coherent dma mem
ARC: add support for reserved memory defined by device tree

 arch/arc/Kconfig   | 2 ++
 arch/arc/mm/init.c | 4 ++++
 2 files changed, 6 insertions(+)
Signature · 1 line
2.5.5
#1 lore raw

PATCH 1/2 ARC: support generic per-device coherent dma mem

Signed-off-by Alexey Brodkin <abrodkin at synopsys.com>
Cc linux-kernel at vger.kernel.org
---
 arch/arc/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arc/Kconfig +1 -0
index 208aae0..61d69e6 100644
@@ -37,6 +37,7 @@ config ARC
 	select OF_EARLY_FLATTREE
 	select PERF_USE_VMALLOC
 	select HAVE_DEBUG_STACKOVERFLOW
+	select HAVE_GENERIC_DMA_COHERENT
 
 config MIGHT_HAVE_PCI
 	bool
Signature · 1 line
2.5.5
#2 lore raw

PATCH 2/2 ARC: add support for reserved memory defined by device tree

In reply to Alexey Brodkin

Enable reserved memory initialization from device tree.

Signed-off-by Alexey Brodkin <abrodkin at synopsys.com>
Cc Grant Likely <grant.likely at linaro.org>
Cc Marek Szyprowski <m.szyprowski at samsung.com>
Cc linux-kernel at vger.kernel.org
---
 arch/arc/Kconfig   | 1 +
 arch/arc/mm/init.c | 4 ++++
 2 files changed, 5 insertions(+)
arch/arc/Kconfig +1 -0
index 61d69e6..33c1fc7 100644
@@ -35,6 +35,7 @@ config ARC
 	select NO_BOOTMEM
 	select OF
 	select OF_EARLY_FLATTREE
+	select OF_RESERVED_MEM
 	select PERF_USE_VMALLOC
 	select HAVE_DEBUG_STACKOVERFLOW
 	select HAVE_GENERIC_DMA_COHERENT
arch/arc/mm/init.c +4 -0
index 7d2c4fb..5487d0b 100644
@@ -13,6 +13,7 @@
 #ifdef CONFIG_BLK_DEV_INITRD
 #include <linux/initrd.h>
 #endif
+#include <linux/of_fdt.h>
 #include <linux/swap.h>
 #include <linux/module.h>
 #include <linux/highmem.h>
@@ -136,6 +137,9 @@ void __init setup_arch_memory(void)
 		memblock_reserve(__pa(initrd_start), initrd_end - initrd_start);
 #endif
 
+	early_init_fdt_reserve_self();
+	early_init_fdt_scan_reserved_mem();
+
 	memblock_dump_all();
 
 	/*----------------- node/zones setup --------------------------*/
Signature · 1 line
2.5.5