]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/cmd_fastboot.c
mkimage will now report information about loadable
[karo-tx-uboot.git] / common / cmd_fastboot.c
index b72f4f310d83debe00e201c824a71e5018afcd90..d52ccfb3100eb8450af627c269202b57e7d35071 100644 (file)
@@ -20,12 +20,20 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
        if (ret)
                return ret;
 
+       if (!g_dnl_board_usb_cable_connected()) {
+               puts("\rUSB cable not detected.\n" \
+                    "Command exit.\n");
+               g_dnl_unregister();
+               g_dnl_clear_detach();
+               return CMD_RET_FAILURE;
+       }
+
        while (1) {
                if (g_dnl_detach())
                        break;
                if (ctrlc())
                        break;
-               usb_gadget_handle_interrupts();
+               usb_gadget_handle_interrupts(0);
        }
 
        g_dnl_unregister();