diff options
author | York Sun <york.sun@nxp.com> | 2018-02-07 14:17:11 -0800 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-02-16 11:12:41 -0500 |
commit | e1caa5841e8a9bc0ee658bdacae0519fa28e1e6a (patch) | |
tree | 97f85fa34ef28e76d53a27eddd76fce321acb333 /include/asm-generic | |
parent | 32fe36574ea5e6ea55313e16547b98a984af7767 (diff) |
env: Fix env_load_location
Commit 7d714a24d725 ("env: Support multiple environments") added
static variable env_load_location. When saving environmental
variables, this variable is presumed to have the value set before.
In case the value was set before relocation and U-Boot runs from a
NOR flash, this variable wasn't writable. This causes failure when
saving the environment. To save this location, global data must be
used instead.
Signed-off-by: York Sun <york.sun@nxp.com>
CC: Maxime Ripard <maxime.ripard@free-electrons.com>
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/global_data.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 1de67e8e8f..c16ad73864 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -51,6 +51,7 @@ typedef struct global_data { unsigned long env_addr; /* Address of Environment struct */ unsigned long env_valid; /* Environment valid? enum env_valid */ unsigned long env_has_init; /* Bitmask of boolean of struct env_location offsets */ + int env_load_location; unsigned long ram_top; /* Top address of RAM used by U-Boot */ unsigned long relocaddr; /* Start address of U-Boot in RAM */ |