]> git.sur5r.net Git - u-boot/blobdiff - common/cmd_usb.c
sandbox: config: enable fdt and snprintf() options
[u-boot] / common / cmd_usb.c
index d4ec2a291cddca5c340987b277290a9477bfda7a..4a86590f172a41b9c5029d77e98e19aa4fadb1ac 100644 (file)
@@ -28,6 +28,7 @@
 #include <common.h>
 #include <command.h>
 #include <asm/byteorder.h>
+#include <asm/unaligned.h>
 #include <part.h>
 #include <usb.h>
 
@@ -240,7 +241,7 @@ void usb_display_ep_desc(struct usb_endpoint_descriptor *epdesc)
                printf("Interrupt");
                break;
        }
-       printf(" MaxPacket %d", epdesc->wMaxPacketSize);
+       printf(" MaxPacket %d", get_unaligned(&epdesc->wMaxPacketSize));
        if ((epdesc->bmAttributes & 0x03) == 0x3)
                printf(" Interval %dms", epdesc->bInterval);
        printf("\n");
@@ -378,7 +379,7 @@ int do_usbboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
                boot_device = argv[2];
                break;
        default:
-               return cmd_usage(cmdtp);
+               return CMD_RET_USAGE;
        }
 
        if (!boot_device) {
@@ -508,7 +509,7 @@ int do_usb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 #endif
 
        if (argc < 2)
-               return cmd_usage(cmdtp);
+               return CMD_RET_USAGE;
 
        if ((strncmp(argv[1], "reset", 5) == 0) ||
                 (strncmp(argv[1], "start", 5) == 0)) {
@@ -693,7 +694,7 @@ int do_usb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
                return 0;
        }
 #endif /* CONFIG_USB_STORAGE */
-       return cmd_usage(cmdtp);
+       return CMD_RET_USAGE;
 }
 
 #ifdef CONFIG_USB_STORAGE