diff options
Diffstat (limited to 'arch/arc/kernel/devtree.c')
-rw-r--r-- | arch/arc/kernel/devtree.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arc/kernel/devtree.c b/arch/arc/kernel/devtree.c index a7d98b30358b..bdee3a812052 100644 --- a/arch/arc/kernel/devtree.c +++ b/arch/arc/kernel/devtree.c | |||
@@ -106,3 +106,18 @@ struct machine_desc * __init setup_machine_fdt(void *dt) | |||
106 | 106 | ||
107 | return mdesc_best; | 107 | return mdesc_best; |
108 | } | 108 | } |
109 | |||
110 | /* | ||
111 | * Copy the flattened DT out of .init since unflattening doesn't copy strings | ||
112 | * and the normal DT APIs refs them from orig flat DT | ||
113 | */ | ||
114 | void __init copy_devtree(void) | ||
115 | { | ||
116 | void *alloc = early_init_dt_alloc_memory_arch( | ||
117 | be32_to_cpu(initial_boot_params->totalsize), 64); | ||
118 | if (alloc) { | ||
119 | memcpy(alloc, initial_boot_params, | ||
120 | be32_to_cpu(initial_boot_params->totalsize)); | ||
121 | initial_boot_params = alloc; | ||
122 | } | ||
123 | } | ||