mirror of
https://github.com/linux-sunxi/u-boot-sunxi.git
synced 2024-02-12 11:16:03 +08:00
env: Fix env_load_location
Commit 7d714a24d7
("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>
This commit is contained in:
@ -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 */
|
||||
|
Reference in New Issue
Block a user