1 // SPDX-License-Identifier: GPL-2.0+
4 * Texas Instruments, <www.ti.com>
6 * Ravi B <ravibabu@ti.com>
11 #include <linux/compiler.h>
19 static int run_dfu(int usb_index, char *interface, char *devstring)
23 ret = dfu_init_env_entities(interface, devstring);
29 run_usb_dnl_gadget(usb_index, "usb_dnl_dfu");
35 int spl_dfu_cmd(int usbctrl, char *dfu_alt_info, char *interface, char *devstr)
40 /* set default environment */
41 env_set_default(NULL, 0);
42 str_env = env_get(dfu_alt_info);
44 pr_err("\"%s\" env variable not defined!\n", dfu_alt_info);
48 ret = env_set("dfu_alt_info", str_env);
50 pr_err("unable to set env variable \"dfu_alt_info\"!\n");
54 /* invoke dfu command */
55 return run_dfu(usbctrl, interface, devstr);