usb: dwc3: switch to peripheral mode when exiting
[oweals/u-boot.git] / common / bootretry.c
index 12653c00d0f259dcd06ae60d21812557f64e447e..47aaaa82201ea60a9bf470d1771032f41c4f1766 100644 (file)
@@ -1,13 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2000
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
 #include <bootretry.h>
 #include <cli.h>
+#include <env.h>
 #include <errno.h>
 #include <watchdog.h>
 
@@ -21,9 +21,9 @@ static int      retry_time = -1; /* -1 so can call readline before main_loop */
 /***************************************************************************
  * initialize command line timeout
  */
-void init_cmd_timeout(void)
+void bootretry_init_cmd_timeout(void)
 {
-       char *s = getenv("bootretry");
+       char *s = env_get("bootretry");
 
        if (s != NULL)
                retry_time = (int)simple_strtol(s, NULL, 10);
@@ -37,7 +37,7 @@ void init_cmd_timeout(void)
 /***************************************************************************
  * reset command line timeout to retry_time seconds
  */
-void reset_cmd_timeout(void)
+void bootretry_reset_cmd_timeout(void)
 {
        endtime = endtick(retry_time);
 }