aboutsummaryrefslogtreecommitdiff
path: root/board/bluewater
diff options
context:
space:
mode:
authorSimon Glass2017-08-03 12:22:12 -0600
committerTom Rini2017-08-16 08:30:24 -0400
commit00caae6d47645e68d6e5277aceb69592b49381a6 (patch)
treec361aa0cea3093b93c1118266fe9e2b44ac6e453 /board/bluewater
parentfd1e959e91d2b0b2e853d09dd9167dfff18a616c (diff)
env: Rename getenv/_f() to env_get()
We are now using an env_ prefix for environment functions. Rename these two functions for consistency. Also add function comments in common.h. Quite a few places use getenv() in a condition context, provoking a warning from checkpatch. These are fixed up in this patch also. Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'board/bluewater')
-rw-r--r--board/bluewater/gurnard/gurnard.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/board/bluewater/gurnard/gurnard.c b/board/bluewater/gurnard/gurnard.c
index e82c6918414..8733a9af163 100644
--- a/board/bluewater/gurnard/gurnard.c
+++ b/board/bluewater/gurnard/gurnard.c
@@ -341,7 +341,7 @@ int board_init(void)
at91_set_A_periph(AT91_PIN_PE6, 1); /* power up */
/* Select the second timing index for board rev 2 */
- rev_str = getenv("board_rev");
+ rev_str = env_get("board_rev");
if (rev_str && !strncmp(rev_str, "2", 1)) {
struct udevice *dev;
@@ -368,7 +368,7 @@ int board_late_init(void)
* Set MAC address so we do not need to init Ethernet before Linux
* boot
*/
- env_str = getenv("ethaddr");
+ env_str = env_get("ethaddr");
if (env_str) {
struct at91_emac *emac = (struct at91_emac *)ATMEL_BASE_EMAC;
/* Parse MAC address */
@@ -385,7 +385,7 @@ int board_late_init(void)
&emac->sa2l);
writel((env_enetaddr[4] | env_enetaddr[5] << 8), &emac->sa2h);
- printf("MAC: %s\n", getenv("ethaddr"));
+ printf("MAC: %s\n", env_get("ethaddr"));
} else {
/* Not set in environment */
printf("MAC: not set\n");