@@ -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
@@ -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;
@@ -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
@@ -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
@@ -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
@@ -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
@@ -280,7 +280,7 @@ void env_relocate(void)
set_default_env("!bad CRC");
#endif
} else {
- env_relocate_spec();
+ env_load();
}
}
@@ -150,11 +150,6 @@ int env_init(void)
return 0;
}
-void env_relocate_spec(void)
-{
- env_load();
-}
-
int saveenv(void)
{
return env_save();
@@ -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_ */