diff options
-rw-r--r-- | arch/arc/include/asm/mach_desc.h | 1 | ||||
-rw-r--r-- | arch/arc/kernel/devtree.c | 15 | ||||
-rw-r--r-- | arch/arc/kernel/setup.c | 3 |
3 files changed, 1 insertions, 18 deletions
diff --git a/arch/arc/include/asm/mach_desc.h b/arch/arc/include/asm/mach_desc.h index 9998dc846ebb..d3e9c0a05be8 100644 --- a/arch/arc/include/asm/mach_desc.h +++ b/arch/arc/include/asm/mach_desc.h | |||
@@ -82,6 +82,5 @@ __attribute__((__section__(".arch.info.init"))) = { \ | |||
82 | }; | 82 | }; |
83 | 83 | ||
84 | extern struct machine_desc *setup_machine_fdt(void *dt); | 84 | extern struct machine_desc *setup_machine_fdt(void *dt); |
85 | extern void __init copy_devtree(void); | ||
86 | 85 | ||
87 | #endif | 86 | #endif |
diff --git a/arch/arc/kernel/devtree.c b/arch/arc/kernel/devtree.c index 2340af0e1d6f..eeb613aa44ff 100644 --- a/arch/arc/kernel/devtree.c +++ b/arch/arc/kernel/devtree.c | |||
@@ -100,18 +100,3 @@ struct machine_desc * __init setup_machine_fdt(void *dt) | |||
100 | 100 | ||
101 | return mdesc_best; | 101 | return mdesc_best; |
102 | } | 102 | } |
103 | |||
104 | /* | ||
105 | * Copy the flattened DT out of .init since unflattening doesn't copy strings | ||
106 | * and the normal DT APIs refs them from orig flat DT | ||
107 | */ | ||
108 | void __init copy_devtree(void) | ||
109 | { | ||
110 | void *alloc = early_init_dt_alloc_memory_arch( | ||
111 | be32_to_cpu(initial_boot_params->totalsize), 64); | ||
112 | if (alloc) { | ||
113 | memcpy(alloc, initial_boot_params, | ||
114 | be32_to_cpu(initial_boot_params->totalsize)); | ||
115 | initial_boot_params = alloc; | ||
116 | } | ||
117 | } | ||
diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c index 2c68bc7e6a78..710bf895dc2c 100644 --- a/arch/arc/kernel/setup.c +++ b/arch/arc/kernel/setup.c | |||
@@ -346,8 +346,7 @@ void __init setup_arch(char **cmdline_p) | |||
346 | setup_arch_memory(); | 346 | setup_arch_memory(); |
347 | 347 | ||
348 | /* copy flat DT out of .init and then unflatten it */ | 348 | /* copy flat DT out of .init and then unflatten it */ |
349 | copy_devtree(); | 349 | unflatten_and_copy_device_tree(); |
350 | unflatten_device_tree(); | ||
351 | 350 | ||
352 | /* Can be issue if someone passes cmd line arg "ro" | 351 | /* Can be issue if someone passes cmd line arg "ro" |
353 | * But that is unlikely so keeping it as it is | 352 | * But that is unlikely so keeping it as it is |