aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/generic/init.c
diff options
context:
space:
mode:
authorMarcin Nowakowski <marcin.nowakowski@imgtec.com>2016-11-23 08:43:47 -0500
committerRalf Baechle <ralf@linux-mips.org>2017-01-03 10:34:45 -0500
commit0063fdede69b2cc6f861aab0641f7e25f451def9 (patch)
tree7c8a5b81b27125d89297f6c6e88a173e90952389 /arch/mips/generic/init.c
parent73346081cac18732a959be580a90abc707dea52a (diff)
MIPS: platform: Allow for DTB to be moved during kernel relocation
Add plat_fdt_relocated(void*) API to allow the kernel relocation code to update platform's information about the DTB location if the DTB had to be moved due to being placed in a location used by the relocated kernel. Signed-off-by: Marcin Nowakowski <marcin.nowakowski@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14611/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/generic/init.c')
-rw-r--r--arch/mips/generic/init.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/mips/generic/init.c b/arch/mips/generic/init.c
index d493ccbf274a..4af619215410 100644
--- a/arch/mips/generic/init.c
+++ b/arch/mips/generic/init.c
@@ -88,6 +88,19 @@ void __init *plat_get_fdt(void)
88 return (void *)fdt; 88 return (void *)fdt;
89} 89}
90 90
91void __init plat_fdt_relocated(void *new_location)
92{
93 /*
94 * reset fdt as the cached value would point to the location
95 * before relocations happened and update the location argument
96 * if it was passed using UHI
97 */
98 fdt = NULL;
99
100 if (fw_arg0 == -2)
101 fw_arg1 = (unsigned long)new_location;
102}
103
91void __init plat_mem_setup(void) 104void __init plat_mem_setup(void)
92{ 105{
93 if (mach && mach->fixup_fdt) 106 if (mach && mach->fixup_fdt)