diff options
author | Simon Glass <sjg@chromium.org> | 2017-08-03 12:22:13 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-08-16 08:30:32 -0400 |
commit | bfebc8c965e41d62dc6355d09bdd63ca57011b99 (patch) | |
tree | 2739bc0c03f554119f9feaaea578a11f0d08aa61 /common | |
parent | 00caae6d47645e68d6e5277aceb69592b49381a6 (diff) | |
download | u-boot-bfebc8c965e41d62dc6355d09bdd63ca57011b99.tar.gz |
env: Rename getenv_hex(), getenv_yesno(), getenv_ulong()
We are now using an env_ prefix for environment functions. Rename these
for consistency. Also add function comments in common.h.
Suggested-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/autoboot.c | 2 | ||||
-rw-r--r-- | common/board_f.c | 4 | ||||
-rw-r--r-- | common/board_r.c | 6 | ||||
-rw-r--r-- | common/bootm.c | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/common/autoboot.c b/common/autoboot.c index 35c1e972c6..a011865028 100644 --- a/common/autoboot.c +++ b/common/autoboot.c @@ -301,7 +301,7 @@ const char *bootdelay_process(void) bootcount++; bootcount_store(bootcount); env_set_ulong("bootcount", bootcount); - bootlimit = getenv_ulong("bootlimit", 10, 0); + bootlimit = env_get_ulong("bootlimit", 10, 0); #endif /* CONFIG_BOOTCOUNT_LIMIT */ s = env_get("bootdelay"); diff --git a/common/board_f.c b/common/board_f.c index 5915e500ae..de5f398a0b 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -118,7 +118,7 @@ __weak void board_add_ram_info(int use_default) static int init_baud_rate(void) { - gd->baudrate = getenv_ulong("baudrate", 10, CONFIG_BAUDRATE); + gd->baudrate = env_get_ulong("baudrate", 10, CONFIG_BAUDRATE); return 0; } @@ -324,7 +324,7 @@ static int reserve_pram(void) { ulong reg; - reg = getenv_ulong("pram", 10, CONFIG_PRAM); + reg = env_get_ulong("pram", 10, CONFIG_PRAM); gd->relocaddr -= (reg << 10); /* size is in kB */ debug("Reserving %ldk for protected RAM at %08lx\n", reg, gd->relocaddr); diff --git a/common/board_r.c b/common/board_r.c index 016dc0262c..c659714ca2 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -372,7 +372,7 @@ static int initr_flash(void) * * NOTE: Maybe we should add some WATCHDOG_RESET()? XXX */ - if (getenv_yesno("flashchecksum") == 1) { + if (env_get_yesno("flashchecksum") == 1) { printf(" CRC: %08X", crc32(0, (const unsigned char *) CONFIG_SYS_FLASH_BASE, flash_size)); @@ -490,7 +490,7 @@ static int initr_env(void) #endif /* Initialize from environment */ - load_addr = getenv_ulong("loadaddr", 16, load_addr); + load_addr = env_get_ulong("loadaddr", 16, load_addr); return 0; } @@ -651,7 +651,7 @@ int initr_mem(void) char memsz[32]; # ifdef CONFIG_PRAM - pram = getenv_ulong("pram", 10, CONFIG_PRAM); + pram = env_get_ulong("pram", 10, CONFIG_PRAM); # endif # if defined(CONFIG_LOGBUFFER) && !defined(CONFIG_ALT_LB_ADDR) /* Also take the logbuffer into account (pram is in kB) */ diff --git a/common/bootm.c b/common/bootm.c index 0c380e742f..0856354067 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -72,7 +72,7 @@ static int bootm_start(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { memset((void *)&images, 0, sizeof(images)); - images.verify = getenv_yesno("verify"); + images.verify = env_get_yesno("verify"); boot_start_lmb(&images); @@ -534,7 +534,7 @@ static void fixup_silent_linux(void) * yes - we always fixup * unset - we rely on the console silent flag */ - want_silent = getenv_yesno("silent_linux"); + want_silent = env_get_yesno("silent_linux"); if (want_silent == 0) return; else if (want_silent == -1 && !(gd->flags & GD_FLG_SILENT)) |