diff options
author | Marek BehĂșn <marek.behun@nic.cz> | 2021-10-22 15:47:15 +0200 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2021-10-31 12:26:44 -0600 |
commit | 07dcd82546ea1b1e3bbb139254d7ac3f531a1caf (patch) | |
tree | 2cfa7415e7334e1fcd0c6bbbf94107527502f1f3 | |
parent | af8149e9ac40dbb596fb2f5b72b82feb54476f68 (diff) | |
download | u-boot-07dcd82546ea1b1e3bbb139254d7ac3f531a1caf.zip u-boot-07dcd82546ea1b1e3bbb139254d7ac3f531a1caf.tar.gz u-boot-07dcd82546ea1b1e3bbb139254d7ac3f531a1caf.tar.bz2 |
env: nand: Put ENV_INVALID into gd->env_valid if default environment
env_nand_init() says the environment is valid even if it is assigning
default environment due to not being able to access nand pre-reloaction
(determined by macro values). Change this to ENV_INVALID and let the
generic env_init() function, which calls this initializer, assign the
default environment.
Signed-off-by: Marek BehĂșn <marek.behun@nic.cz>
Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | env/nand.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -107,8 +107,7 @@ static int env_nand_init(void) gd->env_addr = (ulong)env_ptr->data; #else /* ENV_IS_EMBEDDED || CONFIG_NAND_ENV_DST */ - gd->env_addr = (ulong)&default_environment[0]; - gd->env_valid = ENV_VALID; + gd->env_valid = ENV_INVALID; #endif /* ENV_IS_EMBEDDED || CONFIG_NAND_ENV_DST */ return 0; |