1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 16:52:14 +02:00

configs: drop CONFIG_SYS_EXTRA_ENV_RELOC

Instead of manually specifying CONFIG_SYS_EXTRA_ENV_RELOC
for every board that needs it, it shouldn't hurt to let
initr_reloc_global_data() always relocate gd->env_addr
unless we know this pointer is outside the initial binary.

To achieve this, the relocation is omitted if
CONFIG_ENV_ADDR is defined (and ENV_IS_EMBEDDED is not).

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
This commit is contained in:
Simon Goldschmidt
2018-09-27 12:38:34 +02:00
committed by Tom Rini
parent c906f372b2
commit 6c6add6029
23 changed files with 4 additions and 56 deletions

View File

@@ -140,15 +140,12 @@ static int initr_reloc_global_data(void)
*/
fixup_cpu();
#endif
#ifdef CONFIG_SYS_EXTRA_ENV_RELOC
#if !defined(CONFIG_ENV_ADDR) || defined(ENV_IS_EMBEDDED)
/*
* Some systems need to relocate the env_addr pointer early because the
* location it points to will get invalidated before env_relocate is
* called. One example is on systems that might use a L2 or L3 cache
* in SRAM mode and initialize that cache from SRAM mode back to being
* a cache in cpu_init_r.
* Relocate the early env_addr pointer unless we know it is not inside
* the binary. Some systems need this and for the rest, it doesn't hurt.
*/
gd->env_addr += gd->relocaddr - CONFIG_SYS_MONITOR_BASE;
gd->env_addr += gd->reloc_off;
#endif
#ifdef CONFIG_OF_EMBED
/*