Skip to content

Commit

Permalink
env: Rename some other getenv()-related functions
Browse files Browse the repository at this point in the history
We are now using an env_ prefix for environment functions. Rename these
other functions as well, for consistency:

   getenv_vlan()
   getenv_bootm_size()
   getenv_bootm_low()
   getenv_bootm_mapsize()
   env_get_default()

Suggested-by: Wolfgang Denk <[email protected]>
Signed-off-by: Simon Glass <[email protected]>
  • Loading branch information
sjg20 authored and trini committed Aug 16, 2017
1 parent 35affd7 commit 723806c
Show file tree
Hide file tree
Showing 41 changed files with 85 additions and 85 deletions.
8 changes: 4 additions & 4 deletions arch/powerpc/lib/bootm.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ static void boot_jump_linux(bootm_headers_t *images)
debug (" Booting using OF flat tree...\n");
WATCHDOG_RESET ();
(*kernel) ((bd_t *)of_flat_tree, 0, 0, EPAPR_MAGIC,
getenv_bootm_mapsize(), 0, 0);
env_get_bootm_mapsize(), 0, 0);
/* does not return */
} else
#endif
Expand Down Expand Up @@ -121,8 +121,8 @@ void arch_lmb_reserve(struct lmb *lmb)
phys_size_t bootm_size;
ulong size, sp, bootmap_base;

bootmap_base = getenv_bootm_low();
bootm_size = getenv_bootm_size();
bootmap_base = env_get_bootm_low();
bootm_size = env_get_bootm_size();

#ifdef DEBUG
if (((u64)bootmap_base + bootm_size) >
Expand Down Expand Up @@ -340,6 +340,6 @@ void boot_jump_vxworks(bootm_headers_t *images)

((void (*)(void *, ulong, ulong, ulong,
ulong, ulong, ulong))images->ep)(images->ft_addr,
0, 0, EPAPR_MAGIC, getenv_bootm_mapsize(), 0, 0);
0, 0, EPAPR_MAGIC, env_get_bootm_mapsize(), 0, 0);
}
#endif
4 changes: 2 additions & 2 deletions board/Arcturus/ucp1020/ucp1020.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,8 @@ int ft_board_setup(void *blob, bd_t *bd)

ft_cpu_setup(blob, bd);

base = getenv_bootm_low();
size = getenv_bootm_size();
base = env_get_bootm_low();
size = env_get_bootm_size();

fdt_fixup_memory(blob, (u64)base, (u64)size);

Expand Down
4 changes: 2 additions & 2 deletions board/freescale/b4860qds/b4860qds.c
Original file line number Diff line number Diff line change
Expand Up @@ -1197,8 +1197,8 @@ int ft_board_setup(void *blob, bd_t *bd)

ft_cpu_setup(blob, bd);

base = getenv_bootm_low();
size = getenv_bootm_size();
base = env_get_bootm_low();
size = env_get_bootm_size();

fdt_fixup_memory(blob, (u64)base, (u64)size);

Expand Down
4 changes: 2 additions & 2 deletions board/freescale/bsc9131rdb/bsc9131rdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ int ft_board_setup(void *blob, bd_t *bd)

ft_cpu_setup(blob, bd);

base = getenv_bootm_low();
size = getenv_bootm_size();
base = env_get_bootm_low();
size = env_get_bootm_size();

fdt_fixup_memory(blob, (u64)base, (u64)size);
#ifdef CONFIG_FDT_FIXUP_PARTITIONS
Expand Down
4 changes: 2 additions & 2 deletions board/freescale/bsc9132qds/bsc9132qds.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,8 @@ int ft_board_setup(void *blob, bd_t *bd)

ft_cpu_setup(blob, bd);

base = getenv_bootm_low();
size = getenv_bootm_size();
base = env_get_bootm_low();
size = env_get_bootm_size();

#if defined(CONFIG_PCI)
FT_FSL_PCI_SETUP;
Expand Down
4 changes: 2 additions & 2 deletions board/freescale/c29xpcie/c29xpcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ int ft_board_setup(void *blob, bd_t *bd)

ft_cpu_setup(blob, bd);

base = getenv_bootm_low();
size = getenv_bootm_size();
base = env_get_bootm_low();
size = env_get_bootm_size();

#if defined(CONFIG_PCI)
FT_FSL_PCI_SETUP;
Expand Down
4 changes: 2 additions & 2 deletions board/freescale/corenet_ds/corenet_ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ int ft_board_setup(void *blob, bd_t *bd)

ft_cpu_setup(blob, bd);

base = getenv_bootm_low();
size = getenv_bootm_size();
base = env_get_bootm_low();
size = env_get_bootm_size();

fdt_fixup_memory(blob, (u64)base, (u64)size);

Expand Down
4 changes: 2 additions & 2 deletions board/freescale/mpc8572ds/mpc8572ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ int ft_board_setup(void *blob, bd_t *bd)

ft_cpu_setup(blob, bd);

base = getenv_bootm_low();
size = getenv_bootm_size();
base = env_get_bootm_low();
size = env_get_bootm_size();

fdt_fixup_memory(blob, (u64)base, (u64)size);

Expand Down
4 changes: 2 additions & 2 deletions board/freescale/p1010rdb/p1010rdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,8 @@ int ft_board_setup(void *blob, bd_t *bd)

ft_cpu_setup(blob, bd);

base = getenv_bootm_low();
size = getenv_bootm_size();
base = env_get_bootm_low();
size = env_get_bootm_size();

#if defined(CONFIG_PCI)
FT_FSL_PCI_SETUP;
Expand Down
4 changes: 2 additions & 2 deletions board/freescale/p1022ds/p1022ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,8 @@ int ft_board_setup(void *blob, bd_t *bd)

ft_cpu_setup(blob, bd);

base = getenv_bootm_low();
size = getenv_bootm_size();
base = env_get_bootm_low();
size = env_get_bootm_size();

fdt_fixup_memory(blob, (u64)base, (u64)size);

Expand Down
4 changes: 2 additions & 2 deletions board/freescale/p1023rdb/p1023rdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ int ft_board_setup(void *blob, bd_t *bd)

ft_cpu_setup(blob, bd);

base = getenv_bootm_low();
size = getenv_bootm_size();
base = env_get_bootm_low();
size = env_get_bootm_size();

fdt_fixup_memory(blob, (u64)base, (u64)size);

Expand Down
4 changes: 2 additions & 2 deletions board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,8 @@ int ft_board_setup(void *blob, bd_t *bd)

ft_cpu_setup(blob, bd);

base = getenv_bootm_low();
size = getenv_bootm_size();
base = env_get_bootm_low();
size = env_get_bootm_size();

fdt_fixup_memory(blob, (u64)base, (u64)size);

Expand Down
4 changes: 2 additions & 2 deletions board/freescale/p1_twr/p1_twr.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@ int ft_board_setup(void *blob, bd_t *bd)

ft_cpu_setup(blob, bd);

base = getenv_bootm_low();
size = getenv_bootm_size();
base = env_get_bootm_low();
size = env_get_bootm_size();

fdt_fixup_memory(blob, (u64)base, (u64)size);

Expand Down
4 changes: 2 additions & 2 deletions board/freescale/p2041rdb/p2041rdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ int ft_board_setup(void *blob, bd_t *bd)

ft_cpu_setup(blob, bd);

base = getenv_bootm_low();
size = getenv_bootm_size();
base = env_get_bootm_low();
size = env_get_bootm_size();

fdt_fixup_memory(blob, (u64)base, (u64)size);

Expand Down
4 changes: 2 additions & 2 deletions board/freescale/t102xqds/t102xqds.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,8 @@ int ft_board_setup(void *blob, bd_t *bd)

ft_cpu_setup(blob, bd);

base = getenv_bootm_low();
size = getenv_bootm_size();
base = env_get_bootm_low();
size = env_get_bootm_size();

fdt_fixup_memory(blob, (u64)base, (u64)size);

Expand Down
4 changes: 2 additions & 2 deletions board/freescale/t102xrdb/t102xrdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ int ft_board_setup(void *blob, bd_t *bd)

ft_cpu_setup(blob, bd);

base = getenv_bootm_low();
size = getenv_bootm_size();
base = env_get_bootm_low();
size = env_get_bootm_size();

fdt_fixup_memory(blob, (u64)base, (u64)size);

Expand Down
4 changes: 2 additions & 2 deletions board/freescale/t1040qds/t1040qds.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ int ft_board_setup(void *blob, bd_t *bd)

ft_cpu_setup(blob, bd);

base = getenv_bootm_low();
size = getenv_bootm_size();
base = env_get_bootm_low();
size = env_get_bootm_size();

fdt_fixup_memory(blob, (u64)base, (u64)size);

Expand Down
4 changes: 2 additions & 2 deletions board/freescale/t104xrdb/t104xrdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ int ft_board_setup(void *blob, bd_t *bd)

ft_cpu_setup(blob, bd);

base = getenv_bootm_low();
size = getenv_bootm_size();
base = env_get_bootm_low();
size = env_get_bootm_size();

fdt_fixup_memory(blob, (u64)base, (u64)size);

Expand Down
4 changes: 2 additions & 2 deletions board/freescale/t208xqds/t208xqds.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,8 @@ int ft_board_setup(void *blob, bd_t *bd)

ft_cpu_setup(blob, bd);

base = getenv_bootm_low();
size = getenv_bootm_size();
base = env_get_bootm_low();
size = env_get_bootm_size();

fdt_fixup_memory(blob, (u64)base, (u64)size);

Expand Down
4 changes: 2 additions & 2 deletions board/freescale/t208xrdb/t208xrdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ int ft_board_setup(void *blob, bd_t *bd)

ft_cpu_setup(blob, bd);

base = getenv_bootm_low();
size = getenv_bootm_size();
base = env_get_bootm_low();
size = env_get_bootm_size();

fdt_fixup_memory(blob, (u64)base, (u64)size);

Expand Down
4 changes: 2 additions & 2 deletions board/freescale/t4qds/t4240emu.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ int ft_board_setup(void *blob, bd_t *bd)

ft_cpu_setup(blob, bd);

base = getenv_bootm_low();
size = getenv_bootm_size();
base = env_get_bootm_low();
size = env_get_bootm_size();

fdt_fixup_memory(blob, (u64)base, (u64)size);

Expand Down
4 changes: 2 additions & 2 deletions board/freescale/t4qds/t4240qds.c
Original file line number Diff line number Diff line change
Expand Up @@ -684,8 +684,8 @@ int ft_board_setup(void *blob, bd_t *bd)

ft_cpu_setup(blob, bd);

base = getenv_bootm_low();
size = getenv_bootm_size();
base = env_get_bootm_low();
size = env_get_bootm_size();

fdt_fixup_memory(blob, (u64)base, (u64)size);

Expand Down
4 changes: 2 additions & 2 deletions board/freescale/t4rdb/t4240rdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ int ft_board_setup(void *blob, bd_t *bd)

ft_cpu_setup(blob, bd);

base = getenv_bootm_low();
size = getenv_bootm_size();
base = env_get_bootm_low();
size = env_get_bootm_size();

fdt_fixup_memory(blob, (u64)base, (u64)size);

Expand Down
4 changes: 2 additions & 2 deletions board/gdsys/p1022/controlcenterd.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,8 @@ int ft_board_setup(void *blob, bd_t *bd)

ft_cpu_setup(blob, bd);

base = getenv_bootm_low();
size = getenv_bootm_size();
base = env_get_bootm_low();
size = env_get_bootm_size();

fdt_fixup_memory(blob, (u64)base, (u64)size);

Expand Down
4 changes: 2 additions & 2 deletions board/keymile/kmp204x/kmp204x.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,8 @@ int ft_board_setup(void *blob, bd_t *bd)

ft_cpu_setup(blob, bd);

base = getenv_bootm_low();
size = getenv_bootm_size();
base = env_get_bootm_low();
size = env_get_bootm_size();

fdt_fixup_memory(blob, (u64)base, (u64)size);

Expand Down
4 changes: 2 additions & 2 deletions board/varisys/cyrus/cyrus.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ int ft_board_setup(void *blob, bd_t *bd)

ft_cpu_setup(blob, bd);

base = getenv_bootm_low();
size = getenv_bootm_size();
base = env_get_bootm_low();
size = env_get_bootm_size();

fdt_fixup_memory(blob, (u64)base, (u64)size);

Expand Down
2 changes: 1 addition & 1 deletion cmd/elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ int do_bootvx(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
ptr += sprintf(build_buf + ptr, "e=%s", tmp);
tmp = env_get("netmask");
if (tmp) {
u32 mask = getenv_ip("netmask").s_addr;
u32 mask = env_get_ip("netmask").s_addr;
ptr += sprintf(build_buf + ptr,
":%08x ", ntohl(mask));
} else {
Expand Down
6 changes: 3 additions & 3 deletions cmd/mtdparts.c
Original file line number Diff line number Diff line change
Expand Up @@ -1533,7 +1533,7 @@ static int spread_partitions(void)
* @param buf temporary buffer pointer MTDPARTS_MAXLEN long
* @return mtdparts variable string, NULL if not found
*/
static const char *getenv_mtdparts(char *buf)
static const char *env_get_mtdparts(char *buf)
{
if (gd->flags & GD_FLG_ENV_READY)
return env_get("mtdparts");
Expand Down Expand Up @@ -1565,7 +1565,7 @@ static int parse_mtdparts(const char *const mtdparts)
}

/* re-read 'mtdparts' variable, mtd_devices_init may be updating env */
p = getenv_mtdparts(tmp_parts);
p = env_get_mtdparts(tmp_parts);
if (!p)
p = mtdparts;

Expand Down Expand Up @@ -1742,7 +1742,7 @@ int mtdparts_init(void)

/* get variables */
ids = env_get("mtdids");
parts = getenv_mtdparts(tmp_parts);
parts = env_get_mtdparts(tmp_parts);
current_partition = env_get("partition");

/* save it for later parsing, cannot rely on current partition pointer
Expand Down
2 changes: 1 addition & 1 deletion cmd/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ int do_sntp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
char *toff;

if (argc < 2) {
net_ntp_server = getenv_ip("ntpserverip");
net_ntp_server = env_get_ip("ntpserverip");
if (net_ntp_server.s_addr == 0) {
printf("ntpserverip not set\n");
return CMD_RET_FAILURE;
Expand Down
4 changes: 2 additions & 2 deletions common/bootm.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ static void boot_start_lmb(bootm_headers_t *images)

lmb_init(&images->lmb);

mem_start = getenv_bootm_low();
mem_size = getenv_bootm_size();
mem_start = env_get_bootm_low();
mem_size = env_get_bootm_size();

lmb_add(&images->lmb, (phys_addr_t)mem_start, mem_size);

Expand Down
4 changes: 2 additions & 2 deletions common/image-fdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ int boot_relocate_fdt(struct lmb *lmb, char **of_flat_tree, ulong *of_size)
} else {
of_start =
(void *)(ulong) lmb_alloc_base(lmb, of_len, 0x1000,
getenv_bootm_mapsize()
+ getenv_bootm_low());
env_get_bootm_mapsize()
+ env_get_bootm_low());
}

if (of_start == NULL) {
Expand Down
Loading

0 comments on commit 723806c

Please sign in to comment.