diff options
author | Pierre-Clément Tosi <ptosi@google.com> | 2022-09-09 21:16:18 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-09-29 10:10:39 -0400 |
commit | 76f921eb95d5b814f973a263187db509d6f03903 (patch) | |
tree | 03b432017b1ee4aa9a76cf17ce0dad329ec18ad8 /common/board_r.c | |
parent | d21bbb98cc203dce7c646d2a2a399ed47fa3cc3f (diff) | |
download | u-boot-76f921eb95d5b814f973a263187db509d6f03903.tar.gz u-boot-76f921eb95d5b814f973a263187db509d6f03903.tar.bz2 u-boot-76f921eb95d5b814f973a263187db509d6f03903.zip |
board_r: Relocate OF_EMBED if NEEDS_MANUAL_RELOC only
When the embedded device tree is pointed to by the __dtb_dt_*begin
symbols, it seems to be covered by the early relocation code and doesn't
need to be manually patched.
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Pierre-Clément Tosi <ptosi@google.com>
Diffstat (limited to 'common/board_r.c')
-rw-r--r-- | common/board_r.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/common/board_r.c b/common/board_r.c index 56eb60fa27..00926dcb1e 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -150,13 +150,13 @@ static int initr_reloc_global_data(void) */ gd->env_addr += gd->reloc_off; #endif -#ifdef CONFIG_OF_EMBED /* * The fdt_blob needs to be moved to new relocation address * incase of FDT blob is embedded with in image */ - gd->fdt_blob += gd->reloc_off; -#endif + if (CONFIG_IS_ENABLED(OF_EMBED) && CONFIG_IS_ENABLED(NEEDS_MANUAL_RELOC)) + gd->fdt_blob += gd->reloc_off; + #ifdef CONFIG_EFI_LOADER /* * On the ARM architecture gd is mapped to a fixed register (r9 or x18). |