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: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
Simon Glass 2017-08-03 12:22:07 -06:00 committed by Tom Rini
parent a69d0f60e5
commit 310fb14b26
9 changed files with 14 additions and 14 deletions

View 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

View 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;

View 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

View 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

View 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

View 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

2
env/common.c vendored
View File

@ -280,7 +280,7 @@ void env_relocate(void)
set_default_env("!bad CRC");
#endif
} else {
env_relocate_spec();
env_load();
}
}

5
env/env.c vendored
View File

@ -150,11 +150,6 @@ int env_init(void)
return 0;
}
void env_relocate_spec(void)
{
env_load();
}
int saveenv(void)
{
return env_save();

View 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_ */