summaryrefslogtreecommitdiff
path: root/common/cmd_usb.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2006-08-07 20:28:05 +0200
committerWolfgang Denk <wd@pollux.denx.de>2006-08-07 20:28:05 +0200
commit6587f7e1e98bfcb7910a47bae2eb51e9a5fbd4da (patch)
treed31caa7217b495efc4cc2e971bdb955f9e735f72 /common/cmd_usb.c
parenta2c95a72247990dee9a03b26b4dc9fc0182c97ed (diff)
parente51aae382979dd838cd5d4027bb21072b7f03a20 (diff)
downloadu-boot-imx-6587f7e1e98bfcb7910a47bae2eb51e9a5fbd4da.zip
u-boot-imx-6587f7e1e98bfcb7910a47bae2eb51e9a5fbd4da.tar.gz
u-boot-imx-6587f7e1e98bfcb7910a47bae2eb51e9a5fbd4da.tar.bz2
Merge with /home/tur/proj/usb_sticks/u-boot
Diffstat (limited to 'common/cmd_usb.c')
-rw-r--r--common/cmd_usb.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/common/cmd_usb.c b/common/cmd_usb.c
index fdfd042..28c05aa 100644
--- a/common/cmd_usb.c
+++ b/common/cmd_usb.c
@@ -186,7 +186,7 @@ void usb_display_conf_desc(struct usb_config_descriptor *config,struct usb_devic
void usb_display_if_desc(struct usb_interface_descriptor *ifdesc,struct usb_device *dev)
{
printf(" Interface: %d\n",ifdesc->bInterfaceNumber);
- printf(" - Alternate Settings %d, Endpoints: %d\n",ifdesc->bAlternateSetting,ifdesc->bNumEndpoints);
+ printf(" - Alternate Setting %d, Endpoints: %d\n",ifdesc->bAlternateSetting,ifdesc->bNumEndpoints);
printf(" - Class ");
usb_display_class_sub(ifdesc->bInterfaceClass,ifdesc->bInterfaceSubClass,ifdesc->bInterfaceProtocol);
printf("\n");
@@ -444,6 +444,7 @@ int do_usb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
int i;
struct usb_device *dev = NULL;
+ extern char usb_started;
#ifdef CONFIG_USB_STORAGE
block_dev_desc_t *stor_dev;
#endif
@@ -477,6 +478,10 @@ int do_usb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
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));