aboutsummaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorSimon Glass2017-08-03 12:22:09 -0600
committerTom Rini2017-08-16 08:22:18 -0400
commit382bee57f19b4454e2015bc19a010bc2d0ab9337 (patch)
tree8c13efda2a6539cdbf1ac76fc458ffef1e9c966d /arch/arm
parent01510091de905c46620757b9027b2e55c4b3b313 (diff)
env: Rename setenv() to env_set()
We are now using an env_ prefix for environment functions. Rename setenv() 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 'arch/arm')
-rw-r--r--arch/arm/cpu/armv7/vf610/generic.c2
-rw-r--r--arch/arm/lib/semihosting.c2
-rw-r--r--arch/arm/mach-imx/mx6/opos6ul.c2
-rw-r--r--arch/arm/mach-imx/mx7/soc.c4
-rw-r--r--arch/arm/mach-omap2/boot-common.c2
-rw-r--r--arch/arm/mach-omap2/utils.c10
-rw-r--r--arch/arm/mach-rockchip/rk3036-board.c4
-rw-r--r--arch/arm/mach-rockchip/rk322x-board.c4
-rw-r--r--arch/arm/mach-rockchip/rk3288-board.c4
-rw-r--r--arch/arm/mach-socfpga/misc_gen5.c4
-rw-r--r--arch/arm/mach-tegra/board2.c4
-rw-r--r--arch/arm/mach-tegra/tegra186/nvtboot_board.c2
-rw-r--r--arch/arm/mach-uniphier/board_late_init.c10
13 files changed, 27 insertions, 27 deletions
diff --git a/arch/arm/cpu/armv7/vf610/generic.c b/arch/arm/cpu/armv7/vf610/generic.c
index ac2d8d1a3f8..88f3f4dd163 100644
--- a/arch/arm/cpu/armv7/vf610/generic.c
+++ b/arch/arm/cpu/armv7/vf610/generic.c
@@ -329,7 +329,7 @@ int arch_misc_init(void)
strcpy(soc, "vf");
strcat(soc, soc_type);
- setenv("soc", soc);
+ env_set("soc", soc);
return 0;
}
diff --git a/arch/arm/lib/semihosting.c b/arch/arm/lib/semihosting.c
index 415ac89de9f..bcd16ee5911 100644
--- a/arch/arm/lib/semihosting.c
+++ b/arch/arm/lib/semihosting.c
@@ -200,7 +200,7 @@ static int do_smhload(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
/* Optionally save returned end to the environment */
if (argc == 4) {
sprintf(end_str, "0x%08lx", end_addr);
- setenv(argv[3], end_str);
+ env_set(argv[3], end_str);
}
} else {
return CMD_RET_USAGE;
diff --git a/arch/arm/mach-imx/mx6/opos6ul.c b/arch/arm/mach-imx/mx6/opos6ul.c
index 22b244079b0..f8d7e8ee680 100644
--- a/arch/arm/mach-imx/mx6/opos6ul.c
+++ b/arch/arm/mach-imx/mx6/opos6ul.c
@@ -132,7 +132,7 @@ int board_late_init(void)
/* In bootstrap don't use the env vars */
if (((reg & 0x3000000) >> 24) == 0x1) {
set_default_env(NULL);
- setenv("preboot", "");
+ env_set("preboot", "");
}
return opos6ul_board_late_init();
diff --git a/arch/arm/mach-imx/mx7/soc.c b/arch/arm/mach-imx/mx7/soc.c
index 4cf977e20a3..7152c847d0a 100644
--- a/arch/arm/mach-imx/mx7/soc.c
+++ b/arch/arm/mach-imx/mx7/soc.c
@@ -256,9 +256,9 @@ int arch_misc_init(void)
{
#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
if (is_mx7d())
- setenv("soc", "imx7d");
+ env_set("soc", "imx7d");
else
- setenv("soc", "imx7s");
+ env_set("soc", "imx7s");
#endif
return 0;
diff --git a/arch/arm/mach-omap2/boot-common.c b/arch/arm/mach-omap2/boot-common.c
index 2bcc8e9f979..26245aa1694 100644
--- a/arch/arm/mach-omap2/boot-common.c
+++ b/arch/arm/mach-omap2/boot-common.c
@@ -241,7 +241,7 @@ void arch_preboot_os(void)
int fb_set_reboot_flag(void)
{
printf("Setting reboot to fastboot flag ...\n");
- setenv("dofastboot", "1");
+ env_set("dofastboot", "1");
env_save();
return 0;
}
diff --git a/arch/arm/mach-omap2/utils.c b/arch/arm/mach-omap2/utils.c
index 1946641eb90..b7074638bda 100644
--- a/arch/arm/mach-omap2/utils.c
+++ b/arch/arm/mach-omap2/utils.c
@@ -40,7 +40,7 @@ static void omap_set_fastboot_cpu(void)
printf("Warning: fastboot.cpu: unknown CPU rev: %u\n", cpu_rev);
}
- setenv("fastboot.cpu", cpu);
+ env_set("fastboot.cpu", cpu);
}
static void omap_set_fastboot_secure(void)
@@ -63,7 +63,7 @@ static void omap_set_fastboot_secure(void)
printf("Warning: fastboot.secure: unknown CPU sec: %u\n", dev);
}
- setenv("fastboot.secure", secure);
+ env_set("fastboot.secure", secure);
}
static void omap_set_fastboot_board_rev(void)
@@ -74,7 +74,7 @@ static void omap_set_fastboot_board_rev(void)
if (board_rev == NULL)
printf("Warning: fastboot.board_rev: unknown board revision\n");
- setenv("fastboot.board_rev", board_rev);
+ env_set("fastboot.board_rev", board_rev);
}
#ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV
@@ -118,7 +118,7 @@ static void omap_set_fastboot_userdata_size(void)
sprintf(buf, "%u", sz_kb);
}
- setenv("fastboot.userdata_size", buf);
+ env_set("fastboot.userdata_size", buf);
}
#else
static inline void omap_set_fastboot_userdata_size(void)
@@ -173,7 +173,7 @@ void omap_die_id_serial(void)
snprintf(serial_string, sizeof(serial_string),
"%08x%08x", die_id[0], die_id[3]);
- setenv("serial#", serial_string);
+ env_set("serial#", serial_string);
}
}
diff --git a/arch/arm/mach-rockchip/rk3036-board.c b/arch/arm/mach-rockchip/rk3036-board.c
index 26ea23b0140..a3457f39144 100644
--- a/arch/arm/mach-rockchip/rk3036-board.c
+++ b/arch/arm/mach-rockchip/rk3036-board.c
@@ -34,11 +34,11 @@ static void setup_boot_mode(void)
switch (boot_mode) {
case BOOT_FASTBOOT:
printf("enter fastboot!\n");
- setenv("preboot", "setenv preboot; fastboot usb0");
+ env_set("preboot", "setenv preboot; fastboot usb0");
break;
case BOOT_UMS:
printf("enter UMS!\n");
- setenv("preboot", "setenv preboot; ums mmc 0");
+ env_set("preboot", "setenv preboot; ums mmc 0");
break;
}
}
diff --git a/arch/arm/mach-rockchip/rk322x-board.c b/arch/arm/mach-rockchip/rk322x-board.c
index b6543a51082..1e79c193096 100644
--- a/arch/arm/mach-rockchip/rk322x-board.c
+++ b/arch/arm/mach-rockchip/rk322x-board.c
@@ -30,11 +30,11 @@ static void setup_boot_mode(void)
switch (boot_mode) {
case BOOT_FASTBOOT:
printf("enter fastboot!\n");
- setenv("preboot", "setenv preboot; fastboot usb0");
+ env_set("preboot", "setenv preboot; fastboot usb0");
break;
case BOOT_UMS:
printf("enter UMS!\n");
- setenv("preboot", "setenv preboot; ums mmc 0");
+ env_set("preboot", "setenv preboot; ums mmc 0");
break;
}
}
diff --git a/arch/arm/mach-rockchip/rk3288-board.c b/arch/arm/mach-rockchip/rk3288-board.c
index d5f568c7932..74c6cc14a14 100644
--- a/arch/arm/mach-rockchip/rk3288-board.c
+++ b/arch/arm/mach-rockchip/rk3288-board.c
@@ -37,11 +37,11 @@ static void setup_boot_mode(void)
switch (boot_mode) {
case BOOT_FASTBOOT:
printf("enter fastboot!\n");
- setenv("preboot", "setenv preboot; fastboot usb0");
+ env_set("preboot", "setenv preboot; fastboot usb0");
break;
case BOOT_UMS:
printf("enter UMS!\n");
- setenv("preboot", "setenv preboot; if mmc dev 0;"
+ env_set("preboot", "setenv preboot; if mmc dev 0;"
"then ums mmc 0; else ums mmc 1;fi");
break;
}
diff --git a/arch/arm/mach-socfpga/misc_gen5.c b/arch/arm/mach-socfpga/misc_gen5.c
index 49b26b3570f..2f1da740fbe 100644
--- a/arch/arm/mach-socfpga/misc_gen5.c
+++ b/arch/arm/mach-socfpga/misc_gen5.c
@@ -219,9 +219,9 @@ int arch_misc_init(void)
{
const u32 bsel = readl(&sysmgr_regs->bootinfo) & 0x7;
const int fpga_id = socfpga_fpga_id(0);
- setenv("bootmode", bsel_str[bsel].mode);
+ env_set("bootmode", bsel_str[bsel].mode);
if (fpga_id >= 0)
- setenv("fpgatype", socfpga_fpga_model[fpga_id].var);
+ env_set("fpgatype", socfpga_fpga_model[fpga_id].var);
return socfpga_eth_reset();
}
#endif
diff --git a/arch/arm/mach-tegra/board2.c b/arch/arm/mach-tegra/board2.c
index bd137969f07..0426b7a95a9 100644
--- a/arch/arm/mach-tegra/board2.c
+++ b/arch/arm/mach-tegra/board2.c
@@ -214,9 +214,9 @@ int board_late_init(void)
#if defined(CONFIG_TEGRA_SUPPORT_NON_SECURE)
if (tegra_cpu_is_non_secure()) {
printf("CPU is in NS mode\n");
- setenv("cpu_ns_mode", "1");
+ env_set("cpu_ns_mode", "1");
} else {
- setenv("cpu_ns_mode", "");
+ env_set("cpu_ns_mode", "");
}
#endif
start_cpu_fan();
diff --git a/arch/arm/mach-tegra/tegra186/nvtboot_board.c b/arch/arm/mach-tegra/tegra186/nvtboot_board.c
index feb935f0d90..56650efd4fc 100644
--- a/arch/arm/mach-tegra/tegra186/nvtboot_board.c
+++ b/arch/arm/mach-tegra/tegra186/nvtboot_board.c
@@ -49,7 +49,7 @@ static int set_ethaddr_from_nvtboot(void)
return -ENOENT;
}
- ret = setenv("ethaddr", (void *)prop);
+ ret = env_set("ethaddr", (void *)prop);
if (ret) {
printf("Failed to set ethaddr from nvtboot DTB: %d\n", ret);
return ret;
diff --git a/arch/arm/mach-uniphier/board_late_init.c b/arch/arm/mach-uniphier/board_late_init.c
index 4bfa10b374a..e6d600e41fc 100644
--- a/arch/arm/mach-uniphier/board_late_init.c
+++ b/arch/arm/mach-uniphier/board_late_init.c
@@ -55,7 +55,7 @@ static int uniphier_set_fdt_file(void)
strncat(dtb_name, ".dtb", buf_len);
- return setenv("fdt_file", dtb_name);
+ return env_set("fdt_file", dtb_name);
}
int board_late_init(void)
@@ -65,20 +65,20 @@ int board_late_init(void)
switch (uniphier_boot_device_raw()) {
case BOOT_DEVICE_MMC1:
printf("eMMC Boot");
- setenv("bootmode", "emmcboot");
+ env_set("bootmode", "emmcboot");
break;
case BOOT_DEVICE_NAND:
printf("NAND Boot");
- setenv("bootmode", "nandboot");
+ env_set("bootmode", "nandboot");
nand_denali_wp_disable();
break;
case BOOT_DEVICE_NOR:
printf("NOR Boot");
- setenv("bootmode", "norboot");
+ env_set("bootmode", "norboot");
break;
case BOOT_DEVICE_USB:
printf("USB Boot");
- setenv("bootmode", "usbboot");
+ env_set("bootmode", "usbboot");
break;
default:
printf("Unknown");