Просмотр исходного кода

xtensa: support reserved-memory DT node

This allows reserving regions of physical memory from the device tree.
See Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt
for more details.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Max Filippov 9 лет назад
Родитель
Сommit
4e7c84ec04
2 измененных файлов с 3 добавлено и 0 удалено
  1. 1 0
      arch/xtensa/Kconfig
  2. 2 0
      arch/xtensa/mm/init.c

+ 1 - 0
arch/xtensa/Kconfig

@@ -435,6 +435,7 @@ config USE_OF
 	bool "Flattened Device Tree support"
 	bool "Flattened Device Tree support"
 	select OF
 	select OF
 	select OF_EARLY_FLATTREE
 	select OF_EARLY_FLATTREE
+	select OF_RESERVED_MEM
 	help
 	help
 	  Include support for flattened device tree machine descriptions.
 	  Include support for flattened device tree machine descriptions.
 
 

+ 2 - 0
arch/xtensa/mm/init.c

@@ -25,6 +25,7 @@
 #include <linux/mman.h>
 #include <linux/mman.h>
 #include <linux/nodemask.h>
 #include <linux/nodemask.h>
 #include <linux/mm.h>
 #include <linux/mm.h>
+#include <linux/of_fdt.h>
 
 
 #include <asm/bootparam.h>
 #include <asm/bootparam.h>
 #include <asm/page.h>
 #include <asm/page.h>
@@ -48,6 +49,7 @@ void __init bootmem_init(void)
 	else
 	else
 		memblock_reserve(0, 1);
 		memblock_reserve(0, 1);
 
 
+	early_init_fdt_scan_reserved_mem();
 
 
 	if (!memblock_phys_mem_size())
 	if (!memblock_phys_mem_size())
 		panic("No memory found!\n");
 		panic("No memory found!\n");