diff options
author | Marek BehĂșn <marek.behun@nic.cz> | 2021-10-22 15:47:20 +0200 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2021-10-31 12:26:44 -0600 |
commit | cf89c5180a1fc871ea172392b476325f284996bf (patch) | |
tree | 75f671d5b0658a1b7d790ed6df0f85bea28d9098 /env | |
parent | 9fc310621942d75a0865e25af6933eaed55d2337 (diff) | |
download | u-boot-cf89c5180a1fc871ea172392b476325f284996bf.tar.gz |
env: flash: Let generic env_init() assign default environment
env_flash_init() (both implementations) assigns default environment if
ENV_INVALID, but this is done in the generic env_init() function, which
calls this initializer, so drop it from here.
Signed-off-by: Marek BehĂșn <marek.behun@nic.cz>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'env')
-rw-r--r-- | env/flash.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/env/flash.c b/env/flash.c index 473e82454d..b3230fd611 100644 --- a/env/flash.c +++ b/env/flash.c @@ -77,7 +77,6 @@ static int env_flash_init(void) uchar flag1 = flash_addr->flags; uchar flag2 = flash_addr_new->flags; - ulong addr_default = (ulong)&default_environment[0]; ulong addr1 = (ulong)&(flash_addr->data); ulong addr2 = (ulong)&(flash_addr_new->data); @@ -92,7 +91,6 @@ static int env_flash_init(void) gd->env_addr = addr2; gd->env_valid = ENV_VALID; } else if (!crc1_ok && !crc2_ok) { - gd->env_addr = addr_default; gd->env_valid = ENV_INVALID; } else if (flag1 == ENV_REDUND_ACTIVE && flag2 == ENV_REDUND_OBSOLETE) { @@ -230,7 +228,6 @@ static int env_flash_init(void) return 0; } - gd->env_addr = (ulong)&default_environment[0]; gd->env_valid = ENV_INVALID; return 0; } |