#include <common.h>
#include <command.h>
#include <asm/byteorder.h>
-
-#if (CONFIG_COMMANDS & CFG_CMD_USB)
-
+#include <part.h>
#include <usb.h>
#ifdef CONFIG_USB_STORAGE
int i;
struct usb_device *dev = NULL;
+ extern char usb_started;
#ifdef CONFIG_USB_STORAGE
block_dev_desc_t *stor_dev;
#endif
usb_stop();
return 0;
}
+ if (!usb_started) {
+ printf("USB is stopped. Please issue 'usb start' first.\n");
+ return 1;
+ }
if (strncmp(argv[1],"tree",4) == 0) {
printf("\nDevice Tree:\n");
usb_show_tree(usb_get_dev_index(0));
return 1;
}
-
-#endif /* (CONFIG_COMMANDS & CFG_CMD_USB) */
-
-
-#if (CONFIG_COMMANDS & CFG_CMD_USB)
-
#ifdef CONFIG_USB_STORAGE
U_BOOT_CMD(
usb, 5, 1, do_usb,
"usb info [dev] - show available USB devices\n"
);
#endif
-#endif