common: board_f: Dont relocate FDT incase of CONFIG_OF_EMBED
PATCH 1/1 common: board_f: Dont relocate FDT incase of CONFIG_OF_EMBED
From: Siva Durga Prasad Paladugu <[email protected]>
Done relocate fdt incase of CONFIG_OF EMBED as the fdt is already embedded with u-boot image. Also update the fdt_blob correctly in this case
---
common/board_f.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
common/board_f.c +9 -2
@@ -508,7 +508,7 @@ static int reserve_global_data(void)return 0 ; } -static int reserve_fdt (void ) +static int __maybe_unused reserve_fdt (void ) {/* * If the device tree is sitting immediately above our image then we
@@ -658,7 +658,7 @@ static int setup_dram_config(void)return 0 ; } -static int reloc_fdt (void ) +static int __maybe_unused reloc_fdt (void ) {if (gd->flags &GD_FLG_SKIP_RELOC )return 0 ;
@@ -687,6 +687,9 @@ static int setup_reloc(void) gd->reloc_off = gd->relocaddr - (CONFIG_SYS_TEXT_BASE +0x400 );#endif #endif +#ifdef CONFIG_OF_EMBED + gd->fdt_blob += gd->reloc_off; +#endif memcpy (gd->new_gd, (char *)gd,sizeof (gd_t));debug ("Relocation Offset is: %08lx\n" , gd->reloc_off);
@@ -938,7 +941,9 @@ static init_fnc_t init_sequence_f[] = {#endif setup_machine, reserve_global_data, +#ifndef CONFIG_OF_EMBED reserve_fdt, +#endif reserve_arch, reserve_stacks, setup_dram_config,
@@ -955,7 +960,9 @@ static init_fnc_t init_sequence_f[] = { setup_board_extra, #endif INIT_FUNC_WATCHDOG_RESET +#ifndef CONFIG_OF_EMBED reloc_fdt, +#endif setup_reloc, #if defined(CONFIG_X86) || defined(CONFIG_ARC) copy_uboot_to_ram,
Signature · 1 line
1.9.1
PATCH 1/1 common: board_f: Dont relocate FDT incase of CONFIG_OF_EMBED
Hi Michal,
Quoted 3 lines · Michal Simek
From: Siva Durga Prasad Paladugu <[email protected]>
Done relocate fdt incase of
CONFIG_OFEMBED as the fdt is
Probably it was meant to be something like:
------------------->8-------------------
__Don't__ relocate fdt in__case of CONFIG_OF EMBED as the fdt is ------------------->8-------------------
Otherwise,
-Alexey
PATCH 1/1 common: board_f: Dont relocate FDT incase of CONFIG_OF_EMBED
Quoted 7 lines · Alexey Brodkin
Hi Michal,
Quoted 3 lines · Michal Simek
From: Siva Durga Prasad Paladugu <[email protected]>
Done relocate fdt incase of
CONFIG_OFEMBED as the fdt is
Quoted 7 lines
Probably it was meant to be something like:
------------------->8-------------------
__Don't__ relocate fdtin__caseofCONFIG_OFEMBED as the fdt is ------------------->8-------------------Otherwise,
Reviewed-by Alexey Brodkin <[email protected]>
Ah yeah. Will fix it in v2.
Thanks,
Michal