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 /board | |
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 'board')
-rw-r--r-- | board/BuR/brxre1/board.c | 6 | ||||
-rw-r--r-- | board/BuR/common/common.c | 40 | ||||
-rw-r--r-- | board/birdland/bav335x/board.c | 2 | ||||
-rw-r--r-- | board/gateworks/gw_ventana/gw_ventana_spl.c | 2 | ||||
-rw-r--r-- | board/gdsys/p1022/controlcenterd-id.c | 4 | ||||
-rw-r--r-- | board/tcl/sl50/board.c | 2 | ||||
-rw-r--r-- | board/ti/am335x/board.c | 2 | ||||
-rw-r--r-- | board/ti/am57xx/board.c | 2 | ||||
-rw-r--r-- | board/ti/dra7xx/evm.c | 2 |
9 files changed, 31 insertions, 31 deletions
diff --git a/board/BuR/brxre1/board.c b/board/BuR/brxre1/board.c index cdbc93a8ec..ca08f3cd90 100644 --- a/board/BuR/brxre1/board.c +++ b/board/BuR/brxre1/board.c @@ -282,9 +282,9 @@ int board_late_init(void) snprintf(othbootargs, sizeof(othbootargs), "u=vxWorksFTP pw=vxWorks o=0x%08x;0x%08x;0x%08x;0x%08x", (unsigned int) gd->fb_base-0x20, - (u32)getenv_ulong("vx_memtop", 16, gd->fb_base-0x20), - (u32)getenv_ulong("vx_romfsbase", 16, 0), - (u32)getenv_ulong("vx_romfssize", 16, 0)); + (u32)env_get_ulong("vx_memtop", 16, gd->fb_base-0x20), + (u32)env_get_ulong("vx_romfsbase", 16, 0), + (u32)env_get_ulong("vx_romfssize", 16, 0)); env_set("othbootargs", othbootargs); /* * reset VBAR registers to its reset location, VxWorks 6.9.3.2 does diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c index 39a600b5c1..c1cd010023 100644 --- a/board/BuR/common/common.c +++ b/board/BuR/common/common.c @@ -58,9 +58,9 @@ void lcdbacklight(int on) unsigned int bright = FDTPROP(PATHINF, "brightdef"); unsigned int pwmfrq = FDTPROP(PATHINF, "brightfdim"); #else - unsigned int driver = getenv_ulong("ds1_bright_drv", 16, 0UL); - unsigned int bright = getenv_ulong("ds1_bright_def", 10, 50); - unsigned int pwmfrq = getenv_ulong("ds1_pwmfreq", 10, ~0UL); + unsigned int driver = env_get_ulong("ds1_bright_drv", 16, 0UL); + unsigned int bright = env_get_ulong("ds1_bright_def", 10, 50); + unsigned int pwmfrq = env_get_ulong("ds1_pwmfreq", 10, ~0UL); #endif unsigned int tmp; struct gptimer *timerhw; @@ -186,20 +186,20 @@ int load_lcdtiming(struct am335x_lcdpanel *panel) snprintf(buf, sizeof(buf), "fbcon=rotate:%d", panel_info.vl_rot); env_set("optargs_rot", buf); #else - pnltmp.hactive = getenv_ulong("ds1_hactive", 10, ~0UL); - pnltmp.vactive = getenv_ulong("ds1_vactive", 10, ~0UL); - pnltmp.bpp = getenv_ulong("ds1_bpp", 10, ~0UL); - pnltmp.hfp = getenv_ulong("ds1_hfp", 10, ~0UL); - pnltmp.hbp = getenv_ulong("ds1_hbp", 10, ~0UL); - pnltmp.hsw = getenv_ulong("ds1_hsw", 10, ~0UL); - pnltmp.vfp = getenv_ulong("ds1_vfp", 10, ~0UL); - pnltmp.vbp = getenv_ulong("ds1_vbp", 10, ~0UL); - pnltmp.vsw = getenv_ulong("ds1_vsw", 10, ~0UL); - pnltmp.pxl_clk_div = getenv_ulong("ds1_pxlclkdiv", 10, ~0UL); - pnltmp.pol = getenv_ulong("ds1_pol", 16, ~0UL); - pnltmp.pup_delay = getenv_ulong("ds1_pupdelay", 10, ~0UL); - pnltmp.pon_delay = getenv_ulong("ds1_tondelay", 10, ~0UL); - panel_info.vl_rot = getenv_ulong("ds1_rotation", 10, 0); + pnltmp.hactive = env_get_ulong("ds1_hactive", 10, ~0UL); + pnltmp.vactive = env_get_ulong("ds1_vactive", 10, ~0UL); + pnltmp.bpp = env_get_ulong("ds1_bpp", 10, ~0UL); + pnltmp.hfp = env_get_ulong("ds1_hfp", 10, ~0UL); + pnltmp.hbp = env_get_ulong("ds1_hbp", 10, ~0UL); + pnltmp.hsw = env_get_ulong("ds1_hsw", 10, ~0UL); + pnltmp.vfp = env_get_ulong("ds1_vfp", 10, ~0UL); + pnltmp.vbp = env_get_ulong("ds1_vbp", 10, ~0UL); + pnltmp.vsw = env_get_ulong("ds1_vsw", 10, ~0UL); + pnltmp.pxl_clk_div = env_get_ulong("ds1_pxlclkdiv", 10, ~0UL); + pnltmp.pol = env_get_ulong("ds1_pol", 16, ~0UL); + pnltmp.pup_delay = env_get_ulong("ds1_pupdelay", 10, ~0UL); + pnltmp.pon_delay = env_get_ulong("ds1_tondelay", 10, ~0UL); + panel_info.vl_rot = env_get_ulong("ds1_rotation", 10, 0); #endif if ( ~0UL == (pnltmp.hactive) || @@ -251,7 +251,7 @@ static int load_devicetree(void) { int rc; loff_t dtbsize; - u32 dtbaddr = getenv_ulong("dtbaddr", 16, 0UL); + u32 dtbaddr = env_get_ulong("dtbaddr", 16, 0UL); if (dtbaddr == 0) { printf("%s: don't have a valid <dtbaddr> in env!\n", __func__); @@ -375,7 +375,7 @@ int ft_board_setup(void *blob, bd_t *bd) * if no simplefb is requested through environment, we don't set up * one, instead we turn off backlight. */ - if (getenv_ulong("simplefb", 10, 0) == 0) { + if (env_get_ulong("simplefb", 10, 0) == 0) { lcdbacklight(0); return 0; } @@ -447,7 +447,7 @@ void lcdpower(int on) } pin = FDTPROP(PATHINF, "pwrpin"); #else - pin = getenv_ulong("ds1_pwr", 16, ~0UL); + pin = env_get_ulong("ds1_pwr", 16, ~0UL); #endif if (pin == ~0UL) { puts("no pwrpin in dtb/env, cannot powerup display!\n"); diff --git a/board/birdland/bav335x/board.c b/board/birdland/bav335x/board.c index e174336e2c..f284568ec9 100644 --- a/board/birdland/bav335x/board.c +++ b/board/birdland/bav335x/board.c @@ -163,7 +163,7 @@ int spl_start_uboot(void) #ifdef CONFIG_SPL_ENV_SUPPORT env_init(); env_load(); - if (getenv_yesno("boot_os") != 1) + if (env_get_yesno("boot_os") != 1) return 1; #endif diff --git a/board/gateworks/gw_ventana/gw_ventana_spl.c b/board/gateworks/gw_ventana/gw_ventana_spl.c index feea228b3d..9524da7daf 100644 --- a/board/gateworks/gw_ventana/gw_ventana_spl.c +++ b/board/gateworks/gw_ventana/gw_ventana_spl.c @@ -692,7 +692,7 @@ int spl_start_uboot(void) env_init(); env_load(); debug("boot_os=%s\n", env_get("boot_os")); - if (getenv_yesno("boot_os") == 1) + if (env_get_yesno("boot_os") == 1) ret = 0; #else /* use i2c-0:0x50:0x00 for falcon boot mode (0=linux, else uboot) */ diff --git a/board/gdsys/p1022/controlcenterd-id.c b/board/gdsys/p1022/controlcenterd-id.c index 61c030a458..1813a58e60 100644 --- a/board/gdsys/p1022/controlcenterd-id.c +++ b/board/gdsys/p1022/controlcenterd-id.c @@ -217,7 +217,7 @@ static u8 *get_2nd_stage_bl_location(ulong target_addr) { ulong addr; #ifdef CCDM_SECOND_STAGE - addr = getenv_ulong("loadaddr", 16, CONFIG_LOADADDR); + addr = env_get_ulong("loadaddr", 16, CONFIG_LOADADDR); #else addr = target_addr; #endif @@ -235,7 +235,7 @@ static u8 *get_image_location(void) { ulong addr; /* TODO use other area? */ - addr = getenv_ulong("loadaddr", 16, CONFIG_LOADADDR); + addr = env_get_ulong("loadaddr", 16, CONFIG_LOADADDR); return (u8 *)(addr); } #endif diff --git a/board/tcl/sl50/board.c b/board/tcl/sl50/board.c index 08af279751..f79bb9dcdd 100644 --- a/board/tcl/sl50/board.c +++ b/board/tcl/sl50/board.c @@ -77,7 +77,7 @@ int spl_start_uboot(void) #ifdef CONFIG_SPL_ENV_SUPPORT env_init(); env_load(); - if (getenv_yesno("boot_os") != 1) + if (env_get_yesno("boot_os") != 1) return 1; #endif diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c index ab835856e5..1a52bffc00 100644 --- a/board/ti/am335x/board.c +++ b/board/ti/am335x/board.c @@ -250,7 +250,7 @@ int spl_start_uboot(void) #ifdef CONFIG_SPL_ENV_SUPPORT env_init(); env_load(); - if (getenv_yesno("boot_os") != 1) + if (env_get_yesno("boot_os") != 1) return 1; #endif diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c index 7bcbc31042..7e7056cf71 100644 --- a/board/ti/am57xx/board.c +++ b/board/ti/am57xx/board.c @@ -743,7 +743,7 @@ int spl_start_uboot(void) #ifdef CONFIG_SPL_ENV_SUPPORT env_init(); env_load(); - if (getenv_yesno("boot_os") != 1) + if (env_get_yesno("boot_os") != 1) return 1; #endif diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c index bdbf7f6796..93d3d0b54e 100644 --- a/board/ti/dra7xx/evm.c +++ b/board/ti/dra7xx/evm.c @@ -826,7 +826,7 @@ int spl_start_uboot(void) #ifdef CONFIG_SPL_ENV_SUPPORT env_init(); env_load(); - if (getenv_yesno("boot_os") != 1) + if (env_get_yesno("boot_os") != 1) return 1; #endif |