]>
git.ipfire.org Git - people/ms/u-boot.git/blob - common/spl/spl_dfu.c
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
= getenv(dfu_alt_info
);
45 error("\"dfu_alt_info\" env variable not defined!\n");
49 ret
= setenv("dfu_alt_info", str_env
);
51 error("unable to set env variable \"dfu_alt_info\"!\n");
55 /* invoke dfu command */
56 return run_dfu(usbctrl
, interface
, devstr
);