aboutsummaryrefslogtreecommitdiffstats
path: root/arch/openrisc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/openrisc')
-rw-r--r--arch/openrisc/kernel/prom.c13
-rw-r--r--arch/openrisc/kernel/setup.c2
2 files changed, 1 insertions, 14 deletions
diff --git a/arch/openrisc/kernel/prom.c b/arch/openrisc/kernel/prom.c
index bf3fd05703c3..3b94972e52b2 100644
--- a/arch/openrisc/kernel/prom.c
+++ b/arch/openrisc/kernel/prom.c
@@ -55,8 +55,6 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
55 55
56void __init early_init_devtree(void *params) 56void __init early_init_devtree(void *params)
57{ 57{
58 void *alloc;
59
60 /* Setup flat device-tree pointer */ 58 /* Setup flat device-tree pointer */
61 initial_boot_params = params; 59 initial_boot_params = params;
62 60
@@ -72,17 +70,6 @@ void __init early_init_devtree(void *params)
72 of_scan_flat_dt(early_init_dt_scan_memory, NULL); 70 of_scan_flat_dt(early_init_dt_scan_memory, NULL);
73 71
74 memblock_allow_resize(); 72 memblock_allow_resize();
75
76 /* We must copy the flattend device tree from init memory to regular
77 * memory because the device tree references the strings in it
78 * directly.
79 */
80
81 alloc = __va(memblock_alloc(initial_boot_params->totalsize, PAGE_SIZE));
82
83 memcpy(alloc, initial_boot_params, initial_boot_params->totalsize);
84
85 initial_boot_params = alloc;
86} 73}
87 74
88#ifdef CONFIG_BLK_DEV_INITRD 75#ifdef CONFIG_BLK_DEV_INITRD
diff --git a/arch/openrisc/kernel/setup.c b/arch/openrisc/kernel/setup.c
index 719c5c8895c4..09a769b69572 100644
--- a/arch/openrisc/kernel/setup.c
+++ b/arch/openrisc/kernel/setup.c
@@ -283,7 +283,7 @@ void __init setup_arch(char **cmdline_p)
283{ 283{
284 unsigned long max_low_pfn; 284 unsigned long max_low_pfn;
285 285
286 unflatten_device_tree(); 286 unflatten_and_copy_device_tree();
287 287
288 setup_cpuinfo(); 288 setup_cpuinfo();
289 289