diff options
author | Simon Glass <sjg@chromium.org> | 2017-08-03 12:22:09 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-08-16 08:22:18 -0400 |
commit | 382bee57f19b4454e2015bc19a010bc2d0ab9337 (patch) | |
tree | 8c13efda2a6539cdbf1ac76fc458ffef1e9c966d /board/ti | |
parent | 01510091de905c46620757b9027b2e55c4b3b313 (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/ti')
-rw-r--r-- | board/ti/am335x/board.c | 2 | ||||
-rw-r--r-- | board/ti/am43xx/board.c | 2 | ||||
-rw-r--r-- | board/ti/am57xx/board.c | 4 | ||||
-rw-r--r-- | board/ti/beagle/beagle.c | 38 | ||||
-rw-r--r-- | board/ti/common/board_detect.c | 14 | ||||
-rw-r--r-- | board/ti/dra7xx/evm.c | 2 | ||||
-rw-r--r-- | board/ti/ks2_evm/board_k2g.c | 4 | ||||
-rw-r--r-- | board/ti/panda/panda.c | 4 |
8 files changed, 35 insertions, 35 deletions
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c index ac0592b725..5751b814ca 100644 --- a/board/ti/am335x/board.c +++ b/board/ti/am335x/board.c @@ -731,7 +731,7 @@ int board_late_init(void) * on HS devices. */ if (get_device_type() == HS_DEVICE) - setenv("boot_fit", "1"); + env_set("boot_fit", "1"); #endif #if !defined(CONFIG_SPL_BUILD) diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c index 933596d59c..55098bf816 100644 --- a/board/ti/am43xx/board.c +++ b/board/ti/am43xx/board.c @@ -626,7 +626,7 @@ int board_late_init(void) * on HS devices. */ if (get_device_type() == HS_DEVICE) - setenv("boot_fit", "1"); + env_set("boot_fit", "1"); #endif return 0; } diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c index 126c9ef694..bd94a90f8f 100644 --- a/board/ti/am57xx/board.c +++ b/board/ti/am57xx/board.c @@ -592,7 +592,7 @@ void am57x_idk_lcd_detect(void) /* we will let default be "no lcd" */ } out: - setenv("idk_lcd", idk_lcd); + env_set("idk_lcd", idk_lcd); return; } @@ -612,7 +612,7 @@ int board_late_init(void) * on HS devices. */ if (get_device_type() == HS_DEVICE) - setenv("boot_fit", "1"); + env_set("boot_fit", "1"); /* * Set the GPIO7 Pad to POWERHOLD. This has higher priority diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c index 887b577b6a..2f62fbec69 100644 --- a/board/ti/beagle/beagle.c +++ b/board/ti/beagle/beagle.c @@ -341,16 +341,16 @@ int misc_init_r(void) switch (get_board_revision()) { case REVISION_AXBX: printf("Beagle Rev Ax/Bx\n"); - setenv("beaglerev", "AxBx"); + env_set("beaglerev", "AxBx"); break; case REVISION_CX: printf("Beagle Rev C1/C2/C3\n"); - setenv("beaglerev", "Cx"); + env_set("beaglerev", "Cx"); MUX_BEAGLE_C(); break; case REVISION_C4: printf("Beagle Rev C4\n"); - setenv("beaglerev", "C4"); + env_set("beaglerev", "C4"); MUX_BEAGLE_C(); /* Set VAUX2 to 1.8V for EHCI PHY */ twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED, @@ -360,7 +360,7 @@ int misc_init_r(void) break; case REVISION_XM_AB: printf("Beagle xM Rev A/B\n"); - setenv("beaglerev", "xMAB"); + env_set("beaglerev", "xMAB"); MUX_BEAGLE_XM(); /* Set VAUX2 to 1.8V for EHCI PHY */ twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED, @@ -371,7 +371,7 @@ int misc_init_r(void) break; case REVISION_XM_C: printf("Beagle xM Rev C\n"); - setenv("beaglerev", "xMC"); + env_set("beaglerev", "xMC"); MUX_BEAGLE_XM(); /* Set VAUX2 to 1.8V for EHCI PHY */ twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED, @@ -397,14 +397,14 @@ int misc_init_r(void) expansion_config.revision, expansion_config.fab_revision); MUX_TINCANTOOLS_ZIPPY(); - setenv("buddy", "zippy"); + env_set("buddy", "zippy"); break; case TINCANTOOLS_ZIPPY2: printf("Recognized Tincantools Zippy2 board (rev %d %s)\n", expansion_config.revision, expansion_config.fab_revision); MUX_TINCANTOOLS_ZIPPY(); - setenv("buddy", "zippy2"); + env_set("buddy", "zippy2"); break; case TINCANTOOLS_TRAINER: printf("Recognized Tincantools Trainer board (rev %d %s)\n", @@ -412,37 +412,37 @@ int misc_init_r(void) expansion_config.fab_revision); MUX_TINCANTOOLS_ZIPPY(); MUX_TINCANTOOLS_TRAINER(); - setenv("buddy", "trainer"); + env_set("buddy", "trainer"); break; case TINCANTOOLS_SHOWDOG: printf("Recognized Tincantools Showdow board (rev %d %s)\n", expansion_config.revision, expansion_config.fab_revision); /* Place holder for DSS2 definition for showdog lcd */ - setenv("defaultdisplay", "showdoglcd"); - setenv("buddy", "showdog"); + env_set("defaultdisplay", "showdoglcd"); + env_set("buddy", "showdog"); break; case KBADC_BEAGLEFPGA: printf("Recognized KBADC Beagle FPGA board\n"); MUX_KBADC_BEAGLEFPGA(); - setenv("buddy", "beaglefpga"); + env_set("buddy", "beaglefpga"); break; case LW_BEAGLETOUCH: printf("Recognized Liquidware BeagleTouch board\n"); - setenv("buddy", "beagletouch"); + env_set("buddy", "beagletouch"); break; case BRAINMUX_LCDOG: printf("Recognized Brainmux LCDog board\n"); - setenv("buddy", "lcdog"); + env_set("buddy", "lcdog"); break; case BRAINMUX_LCDOGTOUCH: printf("Recognized Brainmux LCDog Touch board\n"); - setenv("buddy", "lcdogtouch"); + env_set("buddy", "lcdogtouch"); break; case BBTOYS_WIFI: printf("Recognized BeagleBoardToys WiFi board\n"); MUX_BBTOYS_WIFI() - setenv("buddy", "bbtoys-wifi"); + env_set("buddy", "bbtoys-wifi"); break; case BBTOYS_VGA: printf("Recognized BeagleBoardToys VGA board\n"); @@ -459,20 +459,20 @@ int misc_init_r(void) case LSR_COM6L_ADPT: printf("Recognized LSR COM6L Adapter Board\n"); MUX_BBTOYS_WIFI() - setenv("buddy", "lsr-com6l-adpt"); + env_set("buddy", "lsr-com6l-adpt"); break; case BEAGLE_NO_EEPROM: printf("No EEPROM on expansion board\n"); - setenv("buddy", "none"); + env_set("buddy", "none"); break; default: printf("Unrecognized expansion board: %x\n", expansion_config.device_vendor); - setenv("buddy", "unknown"); + env_set("buddy", "unknown"); } if (expansion_config.content == 1) - setenv(expansion_config.env_var, expansion_config.env_setting); + env_set(expansion_config.env_var, expansion_config.env_setting); twl4030_power_init(); switch (get_board_revision()) { diff --git a/board/ti/common/board_detect.c b/board/ti/common/board_detect.c index 1da5ace923..c4ef28282f 100644 --- a/board/ti/common/board_detect.c +++ b/board/ti/common/board_detect.c @@ -379,21 +379,21 @@ void __maybe_unused set_board_info_env(char *name) struct ti_common_eeprom *ep = TI_EEPROM_DATA; if (name) - setenv("board_name", name); + env_set("board_name", name); else if (ep->name) - setenv("board_name", ep->name); + env_set("board_name", ep->name); else - setenv("board_name", unknown); + env_set("board_name", unknown); if (ep->version) - setenv("board_rev", ep->version); + env_set("board_rev", ep->version); else - setenv("board_rev", unknown); + env_set("board_rev", unknown); if (ep->serial) - setenv("board_serial", ep->serial); + env_set("board_serial", ep->serial); else - setenv("board_serial", unknown); + env_set("board_serial", unknown); } static u64 mac_to_u64(u8 mac[6]) diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c index 23be2c70e4..5c43561bb7 100644 --- a/board/ti/dra7xx/evm.c +++ b/board/ti/dra7xx/evm.c @@ -558,7 +558,7 @@ int board_late_init(void) * on HS devices. */ if (get_device_type() == HS_DEVICE) - setenv("boot_fit", "1"); + env_set("boot_fit", "1"); omap_die_id_serial(); omap_set_fastboot_vars(); diff --git a/board/ti/ks2_evm/board_k2g.c b/board/ti/ks2_evm/board_k2g.c index 21605762ef..15f0f54af6 100644 --- a/board/ti/ks2_evm/board_k2g.c +++ b/board/ti/ks2_evm/board_k2g.c @@ -310,9 +310,9 @@ int board_late_init(void) #ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG if (board_is_k2g_gp()) - setenv("board_name", "66AK2GGP\0"); + env_set("board_name", "66AK2GGP\0"); else if (board_is_k2g_ice()) - setenv("board_name", "66AK2GIC\0"); + env_set("board_name", "66AK2GIC\0"); #endif return 0; } diff --git a/board/ti/panda/panda.c b/board/ti/panda/panda.c index 6ffb53c4c6..c59e58a82a 100644 --- a/board/ti/panda/panda.c +++ b/board/ti/panda/panda.c @@ -103,7 +103,7 @@ int get_board_revision(void) board_id4 = gpio_get_value(PANDA_ES_BOARD_ID_4_GPIO); #ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG - setenv("board_name", "panda-es"); + env_set("board_name", "panda-es"); #endif board_id = ((board_id4 << 4) | (board_id3 << 3) | (board_id2 << 2) | (board_id1 << 1) | (board_id0)); @@ -117,7 +117,7 @@ int get_board_revision(void) #ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG if ((board_id >= 0x3) && (processor_rev == OMAP4430_ES2_3)) - setenv("board_name", "panda-a4"); + env_set("board_name", "panda-a4"); #endif } |