]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - board/sunxi/board.c
env: Rename common functions related to setenv()
[people/ms/u-boot.git] / board / sunxi / board.c
index f79bd5c62c193b3034e69eb2d9463e1689c2e116..92fa6c897493756854a3bb7e2d03ca00ff43b5dd 100644 (file)
@@ -33,6 +33,7 @@
 #include <nand.h>
 #include <net.h>
 #include <sy8106a.h>
+#include <asm/setup.h>
 
 #if defined CONFIG_VIDEO_LCD_PANEL_I2C && !(defined CONFIG_SPL_BUILD)
 /* So that we can use pin names in Kconfig and sunxi_name_to_gpio() */
@@ -645,7 +646,7 @@ static void parse_spl_header(const uint32_t spl_addr)
                return;
        }
        /* otherwise assume .scr format (mkimage-type script) */
-       setenv_hex("fel_scriptaddr", spl->fel_script_address);
+       env_set_hex("fel_scriptaddr", spl->fel_script_address);
 }
 
 /*
@@ -711,7 +712,7 @@ static void setup_environment(const void *fdt)
                        snprintf(serial_string, sizeof(serial_string),
                                "%08x%08x", sid[0], sid[3]);
 
-                       setenv("serial#", serial_string);
+                       env_set("serial#", serial_string);
                }
        }
 }
@@ -720,11 +721,11 @@ int misc_init_r(void)
 {
        __maybe_unused int ret;
 
-       setenv("fel_booted", NULL);
-       setenv("fel_scriptaddr", NULL);
+       env_set("fel_booted", NULL);
+       env_set("fel_scriptaddr", NULL);
        /* determine if we are running in FEL mode */
        if (!is_boot0_magic(SPL_ADDR + 4)) { /* eGON.BT0 */
-               setenv("fel_booted", "1");
+               env_set("fel_booted", "1");
                parse_spl_header(SPL_ADDR);
        }