提交 3104021c 编写于 作者: R Rob Herring

xtensa: use unflatten_and_copy_device_tree

Use the common unflatten_and_copy_device_tree to copy the built-in FDT
out of init section.
Signed-off-by: NRob Herring <rob.herring@calxeda.com>
Cc: Chris Zankel <chris@zankel.net>
Acked-by: NMax Filippov <jcmvbkbc@gmail.com>
Cc: linux-xtensa@linux-xtensa.org
Acked-by: NGrant Likely <grant.likely@linaro.org>
上级 21c561bd
...@@ -21,11 +21,8 @@ ...@@ -21,11 +21,8 @@
#include <linux/screen_info.h> #include <linux/screen_info.h>
#include <linux/bootmem.h> #include <linux/bootmem.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#ifdef CONFIG_OF
#include <linux/of_fdt.h> #include <linux/of_fdt.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
#endif
#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE) #if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE)
# include <linux/console.h> # include <linux/console.h>
...@@ -252,17 +249,6 @@ void __init early_init_devtree(void *params) ...@@ -252,17 +249,6 @@ void __init early_init_devtree(void *params)
of_scan_flat_dt(early_init_dt_scan_memory, NULL); of_scan_flat_dt(early_init_dt_scan_memory, NULL);
} }
static void __init copy_devtree(void)
{
void *alloc = early_init_dt_alloc_memory_arch(
be32_to_cpu(initial_boot_params->totalsize), 8);
if (alloc) {
memcpy(alloc, initial_boot_params,
be32_to_cpu(initial_boot_params->totalsize));
initial_boot_params = alloc;
}
}
static int __init xtensa_device_probe(void) static int __init xtensa_device_probe(void)
{ {
of_platform_populate(NULL, NULL, NULL, NULL); of_platform_populate(NULL, NULL, NULL, NULL);
...@@ -525,10 +511,7 @@ void __init setup_arch(char **cmdline_p) ...@@ -525,10 +511,7 @@ void __init setup_arch(char **cmdline_p)
bootmem_init(); bootmem_init();
#ifdef CONFIG_OF unflatten_and_copy_device_tree();
copy_devtree();
unflatten_device_tree();
#endif
platform_setup(cmdline_p); platform_setup(cmdline_p);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册