From e1caa5841e8a9bc0ee658bdacae0519fa28e1e6a Mon Sep 17 00:00:00 2001 From: York Sun Date: Wed, 7 Feb 2018 14:17:11 -0800 Subject: 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 CC: Maxime Ripard --- include/environment.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/environment.h') diff --git a/include/environment.h b/include/environment.h index 6044b9e1b46..d7037ccd931 100644 --- a/include/environment.h +++ b/include/environment.h @@ -188,6 +188,7 @@ enum env_valid { }; enum env_location { + ENVL_UNKNOWN, ENVL_EEPROM, ENVL_EXT4, ENVL_FAT, @@ -202,7 +203,6 @@ enum env_location { ENVL_NOWHERE, ENVL_COUNT, - ENVL_UNKNOWN, }; /* value for the various operations we want to perform on the env */ -- cgit v1.2.3