summaryrefslogtreecommitdiff
path: root/board/siemens
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-08-03 12:22:09 -0600
committerTom Rini <trini@konsulko.com>2017-08-16 08:22:18 -0400
commit382bee57f19b4454e2015bc19a010bc2d0ab9337 (patch)
tree8c13efda2a6539cdbf1ac76fc458ffef1e9c966d /board/siemens
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 'board/siemens')
-rw-r--r--board/siemens/common/factoryset.c6
-rw-r--r--board/siemens/common/factoryset.h2
-rw-r--r--board/siemens/draco/board.c8
-rw-r--r--board/siemens/pxm2/board.c4
-rw-r--r--board/siemens/rut/board.c4
-rw-r--r--board/siemens/taurus/taurus.c24
6 files changed, 24 insertions, 24 deletions
diff --git a/board/siemens/common/factoryset.c b/board/siemens/common/factoryset.c
index 6c869ed2b0..4e5ad58d44 100644
--- a/board/siemens/common/factoryset.c
+++ b/board/siemens/common/factoryset.c
@@ -266,7 +266,7 @@ err:
static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
-static int factoryset_mac_setenv(void)
+static int factoryset_mac_env_set(void)
{
uint8_t mac_addr[6];
@@ -296,11 +296,11 @@ static int factoryset_mac_setenv(void)
return 0;
}
-int factoryset_setenv(void)
+int factoryset_env_set(void)
{
int ret = 0;
- if (factoryset_mac_setenv() < 0)
+ if (factoryset_mac_env_set() < 0)
ret = -1;
return ret;
diff --git a/board/siemens/common/factoryset.h b/board/siemens/common/factoryset.h
index 3f23d5ebf4..8602627d2e 100644
--- a/board/siemens/common/factoryset.h
+++ b/board/siemens/common/factoryset.h
@@ -25,7 +25,7 @@ struct factorysetcontainer {
};
int factoryset_read_eeprom(int i2c_addr);
-int factoryset_setenv(void);
+int factoryset_env_set(void);
extern struct factorysetcontainer factory_dat;
#endif /* __FACTORYSET_H */
diff --git a/board/siemens/draco/board.c b/board/siemens/draco/board.c
index d8869a09dd..c705b5ab0f 100644
--- a/board/siemens/draco/board.c
+++ b/board/siemens/draco/board.c
@@ -272,13 +272,13 @@ int board_late_init(void)
#ifdef CONFIG_FACTORYSET
/* Set ASN in environment*/
if (factory_dat.asn[0] != 0) {
- setenv("dtb_name", (char *)factory_dat.asn);
+ env_set("dtb_name", (char *)factory_dat.asn);
} else {
/* dtb suffix gets added in load script */
- setenv("dtb_name", "am335x-draco");
+ env_set("dtb_name", "am335x-draco");
}
#else
- setenv("dtb_name", "am335x-draco");
+ env_set("dtb_name", "am335x-draco");
#endif
return 0;
@@ -330,7 +330,7 @@ int board_eth_init(bd_t *bis)
int n = 0;
int rv;
- factoryset_setenv();
+ factoryset_env_set();
/* Set rgmii mode and enable rmii clock to be sourced from chip */
writel((RMII_MODE_ENABLE | RMII_CHIPCKL_ENABLE), &cdev->miisel);
diff --git a/board/siemens/pxm2/board.c b/board/siemens/pxm2/board.c
index 750f338897..012974d8eb 100644
--- a/board/siemens/pxm2/board.c
+++ b/board/siemens/pxm2/board.c
@@ -446,12 +446,12 @@ int board_late_init(void)
factory_dat.pxm50 = 0;
sprintf(tmp, "%s_%s", factory_dat.asn,
factory_dat.comp_version);
- ret = setenv("boardid", tmp);
+ ret = env_set("boardid", tmp);
if (ret)
printf("error setting board id\n");
} else {
factory_dat.pxm50 = 1;
- ret = setenv("boardid", "PXM50_1.0");
+ ret = env_set("boardid", "PXM50_1.0");
if (ret)
printf("error setting board id\n");
}
diff --git a/board/siemens/rut/board.c b/board/siemens/rut/board.c
index b3c666c054..2a97414baf 100644
--- a/board/siemens/rut/board.c
+++ b/board/siemens/rut/board.c
@@ -182,7 +182,7 @@ int board_eth_init(bd_t *bis)
int rv;
#ifndef CONFIG_SPL_BUILD
- factoryset_setenv();
+ factoryset_env_set();
#endif
/* Set rgmii mode and enable rmii clock to be sourced from chip */
@@ -482,7 +482,7 @@ int board_late_init(void)
else
strcpy(tmp, "QMX7.E38_4.0");
- ret = setenv("boardid", tmp);
+ ret = env_set("boardid", tmp);
if (ret)
printf("error setting board id\n");
diff --git a/board/siemens/taurus/taurus.c b/board/siemens/taurus/taurus.c
index 3b742ebc22..d877a9c771 100644
--- a/board/siemens/taurus/taurus.c
+++ b/board/siemens/taurus/taurus.c
@@ -380,9 +380,9 @@ static int upgrade_failure_fallback(void)
partitionset_active = getenv("partitionset_active");
if (partitionset_active) {
if (partitionset_active[0] == 'A')
- setenv("partitionset_active", "B");
+ env_set("partitionset_active", "B");
else
- setenv("partitionset_active", "A");
+ env_set("partitionset_active", "A");
} else {
printf("partitionset_active missing.\n");
return -ENOENT;
@@ -390,22 +390,22 @@ static int upgrade_failure_fallback(void)
rootfs = getenv("rootfs");
rootfs_fallback = getenv("rootfs_fallback");
- setenv("rootfs", rootfs_fallback);
- setenv("rootfs_fallback", rootfs);
+ env_set("rootfs", rootfs_fallback);
+ env_set("rootfs_fallback", rootfs);
kern_size = getenv("kernel_size");
kern_size_fb = getenv("kernel_size_fallback");
- setenv("kernel_size", kern_size_fb);
- setenv("kernel_size_fallback", kern_size);
+ env_set("kernel_size", kern_size_fb);
+ env_set("kernel_size_fallback", kern_size);
kern_off = getenv("kernel_Off");
kern_off_fb = getenv("kernel_Off_fallback");
- setenv("kernel_Off", kern_off_fb);
- setenv("kernel_Off_fallback", kern_off);
+ env_set("kernel_Off", kern_off_fb);
+ env_set("kernel_Off_fallback", kern_off);
- setenv("bootargs", '\0');
- setenv("upgrade_available", '\0');
- setenv("boot_retries", '\0');
+ env_set("bootargs", '\0');
+ env_set("upgrade_available", '\0');
+ env_set("boot_retries", '\0');
env_save();
return 0;
@@ -424,7 +424,7 @@ static int do_upgrade_available(cmd_tbl_t *cmdtp, int flag, int argc,
boot_retry = simple_strtoul(getenv("boot_retries"), NULL, 10);
boot_retry++;
sprintf(boot_buf, "%lx", boot_retry);
- setenv("boot_retries", boot_buf);
+ env_set("boot_retries", boot_buf);
env_save();
/*