提交 310fb14b 编写于 作者: S Simon Glass 提交者: Tom Rini

env: Drop env_relocate_spec() in favour of env_load()

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: NSimon Glass <sjg@chromium.org>
Reviewed-by: NTom Rini <trini@konsulko.com>
上级 a69d0f60
......@@ -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_ */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册