env: Move env_set() to env.h
[oweals/u-boot.git] / board / amazon / kc1 / kc1.c
index b3fa7896c5fb6bb84da38bcc697a57ba464caa1c..9034c4fbfff04900bbf63e284cf7368518dcd2ae 100644 (file)
@@ -1,13 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Amazon Kindle Fire (first generation) codename kc1 config
  *
  * Copyright (C) 2016 Paul Kocialkowski <contact@paulk.fr>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <config.h>
 #include <common.h>
+#include <env.h>
 #include <linux/ctype.h>
 #include <linux/usb/musb.h>
 #include <asm/omap_musb.h>
@@ -17,6 +17,7 @@
 #include <asm/emif.h>
 #include <twl6030.h>
 #include "kc1.h"
+#include <asm/mach-types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -117,8 +118,8 @@ int misc_init_r(void)
        }
 
        if (reboot_mode[0] > 0 && isascii(reboot_mode[0])) {
-               if (!getenv("reboot-mode"))
-                       setenv("reboot-mode", (char *)reboot_mode);
+               if (!env_get("reboot-mode"))
+                       env_set("reboot-mode", (char *)reboot_mode);
        }
 
        omap_reboot_mode_clear();
@@ -161,7 +162,7 @@ void get_board_serial(struct tag_serialnr *serialnr)
        omap_die_id_get_board_serial(serialnr);
 }
 
-int fb_set_reboot_flag(void)
+int fastboot_set_reboot_flag(void)
 {
        return omap_reboot_mode_store("b");
 }