#include <fastboot.h>
#include <net.h>
#include <usb.h>
+#include <watchdog.h>
static int do_fastboot_udp(int argc, char *const argv[],
uintptr_t buf_addr, size_t buf_size)
return CMD_RET_FAILURE;
}
- ret = board_usb_init(controller_index, USB_INIT_DEVICE);
+ ret = usb_gadget_initialize(controller_index);
if (ret) {
pr_err("USB init failed: %d\n", ret);
return CMD_RET_FAILURE;
break;
if (ctrlc())
break;
+ WATCHDOG_RESET();
usb_gadget_handle_interrupts(controller_index);
}
exit:
g_dnl_unregister();
g_dnl_clear_detach();
- board_usb_cleanup(controller_index, USB_INIT_DEVICE);
+ usb_gadget_release(controller_index);
return ret;
#else