diff options
Diffstat (limited to 'board/toradex')
-rw-r--r-- | board/toradex/apalis_imx6/apalis_imx6.c | 9 | ||||
-rw-r--r-- | board/toradex/colibri_imx6/colibri_imx6.c | 2 | ||||
-rw-r--r-- | board/toradex/colibri_vf/colibri_vf.c | 2 | ||||
-rw-r--r-- | board/toradex/common/tdx-cfg-block.c | 2 | ||||
-rw-r--r-- | board/toradex/common/tdx-common.c | 10 |
5 files changed, 13 insertions, 12 deletions
diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c index 8e5613cb12..7a3e493faf 100644 --- a/board/toradex/apalis_imx6/apalis_imx6.c +++ b/board/toradex/apalis_imx6/apalis_imx6.c @@ -9,6 +9,7 @@ #include <common.h> #include <dm.h> +#include <environment.h> #include <asm/arch/clock.h> #include <asm/arch/crm_regs.h> #include <asm/arch/mxc_hdmi.h> @@ -803,7 +804,7 @@ int board_late_init(void) rev = get_board_rev(); snprintf(env_str, ARRAY_SIZE(env_str), "%.4x", rev); - setenv("board_rev", env_str); + env_set("board_rev", env_str); #ifndef CONFIG_TDX_APALIS_IMX6_V1_0 if ((rev & 0xfff0) == 0x0100) { @@ -813,12 +814,12 @@ int board_late_init(void) setup_iomux_dce_uart(); /* if using the default device tree, use version for V1.0 HW */ - fdt_env = getenv("fdt_file"); + fdt_env = env_get("fdt_file"); if ((fdt_env != NULL) && (strcmp(FDT_FILE, fdt_env) == 0)) { - setenv("fdt_file", FDT_FILE_V1_0); + env_set("fdt_file", FDT_FILE_V1_0); printf("patching fdt_file to " FDT_FILE_V1_0 "\n"); #ifndef CONFIG_ENV_IS_NOWHERE - saveenv(); + env_save(); #endif } } diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c index cbf7aa952a..dbcd233782 100644 --- a/board/toradex/colibri_imx6/colibri_imx6.c +++ b/board/toradex/colibri_imx6/colibri_imx6.c @@ -676,7 +676,7 @@ int board_late_init(void) rev = get_board_rev(); snprintf(env_str, ARRAY_SIZE(env_str), "%.4x", rev); - setenv("board_rev", env_str); + env_set("board_rev", env_str); #endif return 0; diff --git a/board/toradex/colibri_vf/colibri_vf.c b/board/toradex/colibri_vf/colibri_vf.c index 46dd15bac8..3858af9c40 100644 --- a/board/toradex/colibri_vf/colibri_vf.c +++ b/board/toradex/colibri_vf/colibri_vf.c @@ -535,7 +535,7 @@ int board_late_init(void) if (((src->sbmr2 & SRC_SBMR2_BMOD_MASK) >> SRC_SBMR2_BMOD_SHIFT) == SRC_SBMR2_BMOD_SERIAL) { printf("Serial Downloader recovery mode, disable autoboot\n"); - setenv("bootdelay", "-1"); + env_set("bootdelay", "-1"); } return 0; diff --git a/board/toradex/common/tdx-cfg-block.c b/board/toradex/common/tdx-cfg-block.c index 1bf8ca8f76..328c4c0200 100644 --- a/board/toradex/common/tdx-cfg-block.c +++ b/board/toradex/common/tdx-cfg-block.c @@ -278,7 +278,7 @@ static int get_cfgblock_interactive(void) len = cli_readline(message); it = console_buffer[0]; - soc = getenv("soc"); + soc = env_get("soc"); if (!strcmp("mx6", soc)) { #ifdef CONFIG_MACH_TYPE if (it == 'y' || it == 'Y') diff --git a/board/toradex/common/tdx-common.c b/board/toradex/common/tdx-common.c index 0d267877fa..b4e4727e63 100644 --- a/board/toradex/common/tdx-common.c +++ b/board/toradex/common/tdx-common.c @@ -80,24 +80,24 @@ int show_board_info(void) tdx_hw_tag.ver_minor, (char)tdx_hw_tag.ver_assembly + 'A'); - setenv("serial#", tdx_serial_str); + env_set("serial#", tdx_serial_str); /* * Check if environment contains a valid MAC address, * set the one from config block if not */ - if (!eth_getenv_enetaddr("ethaddr", ethaddr)) - eth_setenv_enetaddr("ethaddr", (u8 *)&tdx_eth_addr); + if (!eth_env_get_enetaddr("ethaddr", ethaddr)) + eth_env_set_enetaddr("ethaddr", (u8 *)&tdx_eth_addr); #ifdef CONFIG_TDX_CFG_BLOCK_2ND_ETHADDR - if (!eth_getenv_enetaddr("eth1addr", ethaddr)) { + if (!eth_env_get_enetaddr("eth1addr", ethaddr)) { /* * Secondary MAC address is allocated from block * 0x100000 higher then the first MAC address */ memcpy(ethaddr, &tdx_eth_addr, 6); ethaddr[3] += 0x10; - eth_setenv_enetaddr("eth1addr", ethaddr); + eth_env_set_enetaddr("eth1addr", ethaddr); } #endif |