]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
env: Drop env_relocate_spec() in favour of env_load()
authorSimon Glass <sjg@chromium.org>
Thu, 3 Aug 2017 18:22:07 +0000 (12:22 -0600)
committerTom Rini <trini@konsulko.com>
Wed, 16 Aug 2017 00:50:29 +0000 (20:50 -0400)
This is a strange name for a function that loads the environment. There is
now only one implementation of this function, so use the new env_load()
function directly instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
board/birdland/bav335x/board.c
board/gateworks/gw_ventana/gw_ventana_spl.c
board/tcl/sl50/board.c
board/ti/am335x/board.c
board/ti/am57xx/board.c
board/ti/dra7xx/evm.c
env/common.c
env/env.c
include/environment.h

index 67aca3cc43253722fd96e955c0d3d7e217a6e511..b49365e157a7a8bf0f63ac3eab28644029a2b75f 100644 (file)
@@ -162,7 +162,7 @@ int spl_start_uboot(void)
 
 #ifdef CONFIG_SPL_ENV_SUPPORT
        env_init();
-       env_relocate_spec();
+       env_load();
        if (getenv_yesno("boot_os") != 1)
                return 1;
 #endif
index 69a638d71d8ca7904314a36cb50208b7fee1a2fc..baa8480b6c440909e4589d3f041e53613f9ecc43 100644 (file)
@@ -690,7 +690,7 @@ int spl_start_uboot(void)
        debug("%s\n", __func__);
 #ifdef CONFIG_SPL_ENV_SUPPORT
        env_init();
-       env_relocate_spec();
+       env_load();
        debug("boot_os=%s\n", getenv("boot_os"));
        if (getenv_yesno("boot_os") == 1)
                ret = 0;
index e89ee35d306a47893578c1b244f956fcc69d58a5..d3c953e9932028efcfdcb98a7004df5dc634141d 100644 (file)
@@ -76,7 +76,7 @@ int spl_start_uboot(void)
 
 #ifdef CONFIG_SPL_ENV_SUPPORT
        env_init();
-       env_relocate_spec();
+       env_load();
        if (getenv_yesno("boot_os") != 1)
                return 1;
 #endif
index 0a16529b5f810d0a3dff9b0798454f414b5b3ba4..ac0592b725e00997ee3eb977b33ad24520eb4126 100644 (file)
@@ -249,7 +249,7 @@ int spl_start_uboot(void)
 
 #ifdef CONFIG_SPL_ENV_SUPPORT
        env_init();
-       env_relocate_spec();
+       env_load();
        if (getenv_yesno("boot_os") != 1)
                return 1;
 #endif
index 00a31a97fd6dce4ae98d704638c7f4df271b2ef4..126c9ef694f93185fe34a17476a68fe0fd118883 100644 (file)
@@ -742,7 +742,7 @@ int spl_start_uboot(void)
 
 #ifdef CONFIG_SPL_ENV_SUPPORT
        env_init();
-       env_relocate_spec();
+       env_load();
        if (getenv_yesno("boot_os") != 1)
                return 1;
 #endif
index 7d36f03fa1ec98c99a42ea28cb0458c9747bef79..23be2c70e47ae9a7e1877c9c9b82da93d26d4392 100644 (file)
@@ -825,7 +825,7 @@ int spl_start_uboot(void)
 
 #ifdef CONFIG_SPL_ENV_SUPPORT
        env_init();
-       env_relocate_spec();
+       env_load();
        if (getenv_yesno("boot_os") != 1)
                return 1;
 #endif
index 9b3a26859f6b58bca0818ac5ed0b2a8799d55974..0cc8829d0d07d6533776510e30dc691e156f7d3c 100644 (file)
@@ -280,7 +280,7 @@ void env_relocate(void)
                set_default_env("!bad CRC");
 #endif
        } else {
-               env_relocate_spec();
+               env_load();
        }
 }
 
index a239d93156df8d7e5c184542b3b016c185311d39..85d95e574717767f1f1d1f16a7846e54439b902e 100644 (file)
--- a/env/env.c
+++ b/env/env.c
@@ -150,11 +150,6 @@ int env_init(void)
        return 0;
 }
 
-void env_relocate_spec(void)
-{
-       env_load();
-}
-
 int saveenv(void)
 {
        return env_save();
index 1df243462e9d9b4626563a2ff00160b54d1d82bb..b4f93663da78239ad990c230caf35f6a054ce707 100644 (file)
@@ -170,8 +170,6 @@ extern env_t environment;
 extern const unsigned char default_environment[];
 extern env_t *env_ptr;
 
-extern void env_relocate_spec(void);
-
 #if defined(CONFIG_NEEDS_MANUAL_RELOC)
 extern void env_reloc(void);
 #endif
@@ -320,6 +318,13 @@ struct env_driver *env_driver_lookup_default(void);
  */
 int env_get_char(int index);
 
+/**
+ * env_load() - Load the environment from storage
+ *
+ * @return 0 if OK, -ve on error
+ */
+int env_load(void);
+
 #endif /* DO_DEPS_ONLY */
 
 #endif /* _ENVIRONMENT_H_ */