aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa/kernel
diff options
context:
space:
mode:
authorRob Herring <rob.herring@calxeda.com>2013-08-26 12:24:11 -0400
committerRob Herring <rob.herring@calxeda.com>2013-10-09 12:38:05 -0400
commit3104021c12747df63843fedf3ceb6a54410e2c18 (patch)
treedb9c9c83a9362b35ddceb8cc4e11ee7b9346ff6c /arch/xtensa/kernel
parent21c561bda17a67afe923866cf88653637abf6e7a (diff)
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: Rob Herring <rob.herring@calxeda.com> Cc: Chris Zankel <chris@zankel.net> Acked-by: Max Filippov <jcmvbkbc@gmail.com> Cc: linux-xtensa@linux-xtensa.org Acked-by: Grant Likely <grant.likely@linaro.org>
Diffstat (limited to 'arch/xtensa/kernel')
-rw-r--r--arch/xtensa/kernel/setup.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c
index 946fb8d06c8b..fc31ec1e977d 100644
--- a/arch/xtensa/kernel/setup.c
+++ b/arch/xtensa/kernel/setup.c
@@ -21,11 +21,8 @@
21#include <linux/screen_info.h> 21#include <linux/screen_info.h>
22#include <linux/bootmem.h> 22#include <linux/bootmem.h>
23#include <linux/kernel.h> 23#include <linux/kernel.h>
24
25#ifdef CONFIG_OF
26#include <linux/of_fdt.h> 24#include <linux/of_fdt.h>
27#include <linux/of_platform.h> 25#include <linux/of_platform.h>
28#endif
29 26
30#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE) 27#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE)
31# include <linux/console.h> 28# include <linux/console.h>
@@ -252,17 +249,6 @@ void __init early_init_devtree(void *params)
252 of_scan_flat_dt(early_init_dt_scan_memory, NULL); 249 of_scan_flat_dt(early_init_dt_scan_memory, NULL);
253} 250}
254 251
255static void __init copy_devtree(void)
256{
257 void *alloc = early_init_dt_alloc_memory_arch(
258 be32_to_cpu(initial_boot_params->totalsize), 8);
259 if (alloc) {
260 memcpy(alloc, initial_boot_params,
261 be32_to_cpu(initial_boot_params->totalsize));
262 initial_boot_params = alloc;
263 }
264}
265
266static int __init xtensa_device_probe(void) 252static int __init xtensa_device_probe(void)
267{ 253{
268 of_platform_populate(NULL, NULL, NULL, NULL); 254 of_platform_populate(NULL, NULL, NULL, NULL);
@@ -525,10 +511,7 @@ void __init setup_arch(char **cmdline_p)
525 511
526 bootmem_init(); 512 bootmem_init();
527 513
528#ifdef CONFIG_OF 514 unflatten_and_copy_device_tree();
529 copy_devtree();
530 unflatten_device_tree();
531#endif
532 515
533 platform_setup(cmdline_p); 516 platform_setup(cmdline_p);
534 517