spl: Set up the bloblist in board_init_r()
[oweals/u-boot.git] / common / spl / spl_dfu.c
index 05bb21035df2781fb975057515af9135dd55e89c..5728d43ad3f29f664502e48ca415809328811a39 100644 (file)
@@ -1,12 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2016
  * Texas Instruments, <www.ti.com>
  *
  * Ravi B <ravibabu@ti.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 #include <common.h>
+#include <env.h>
 #include <spl.h>
 #include <linux/compiler.h>
 #include <errno.h>
@@ -15,7 +15,6 @@
 #include <g_dnl.h>
 #include <usb.h>
 #include <dfu.h>
-#include <environment.h>
 
 static int run_dfu(int usb_index, char *interface, char *devstring)
 {
@@ -39,10 +38,10 @@ int spl_dfu_cmd(int usbctrl, char *dfu_alt_info, char *interface, char *devstr)
        int ret;
 
        /* set default environment */
-       set_default_env(0);
+       env_set_default(NULL, 0);
        str_env = env_get(dfu_alt_info);
        if (!str_env) {
-               pr_err("\"dfu_alt_info\" env variable not defined!\n");
+               pr_err("\"%s\" env variable not defined!\n", dfu_alt_info);
                return -EINVAL;
        }