3 * Texas Instruments, <www.ti.com>
5 * Ravi B <ravibabu@ti.com>
7 * SPDX-License-Identifier: GPL-2.0+
11 #include <linux/compiler.h>
18 #include <environment.h>
20 static int run_dfu(int usb_index, char *interface, char *devstring)
24 ret = dfu_init_env_entities(interface, devstring);
30 run_usb_dnl_gadget(usb_index, "usb_dnl_dfu");
36 int spl_dfu_cmd(int usbctrl, char *dfu_alt_info, char *interface, char *devstr)
41 /* set default environment */
43 str_env = env_get(dfu_alt_info);
45 pr_err("\"dfu_alt_info\" env variable not defined!\n");
49 ret = env_set("dfu_alt_info", str_env);
51 pr_err("unable to set env variable \"dfu_alt_info\"!\n");
55 /* invoke dfu command */
56 return run_dfu(usbctrl, interface, devstr);