mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-28 01:51:33 +00:00
usb: storage: Show number of storage devices detected for DM_USB
By enabling DM_USB information about number of storage devices was lost. Get this information back simply by printing number of devices detected via BLK uclass. For example: scanning bus 0 for devices... 7 USB Device(s) found scanning usb for storage devices... 3 Storage Device(s) found scanning usb for ethernet devices... 0 Ethernet Device(s) found Signed-off-by: Michal Simek <michal.simek@xilinx.com>
This commit is contained in:
parent
59ef20303a
commit
b984700ca4
2 changed files with 5 additions and 5 deletions
|
@ -571,11 +571,11 @@ static void do_usb_start(void)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Driver model will probe the devices as they are found */
|
/* Driver model will probe the devices as they are found */
|
||||||
#ifndef CONFIG_DM_USB
|
|
||||||
# ifdef CONFIG_USB_STORAGE
|
# ifdef CONFIG_USB_STORAGE
|
||||||
/* try to recognize storage devices immediately */
|
/* try to recognize storage devices immediately */
|
||||||
usb_stor_curr_dev = usb_stor_scan(1);
|
usb_stor_curr_dev = usb_stor_scan(1);
|
||||||
# endif
|
# endif
|
||||||
|
#ifndef CONFIG_DM_USB
|
||||||
# ifdef CONFIG_USB_KEYBOARD
|
# ifdef CONFIG_USB_KEYBOARD
|
||||||
drv_usb_kbd_init();
|
drv_usb_kbd_init();
|
||||||
# endif
|
# endif
|
||||||
|
|
|
@ -303,7 +303,6 @@ void usb_stor_reset(void)
|
||||||
usb_max_devs = 0;
|
usb_max_devs = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef CONFIG_DM_USB
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* scan the usb and reports device info
|
* scan the usb and reports device info
|
||||||
* to the user if mode = 1
|
* to the user if mode = 1
|
||||||
|
@ -311,11 +310,12 @@ void usb_stor_reset(void)
|
||||||
*/
|
*/
|
||||||
int usb_stor_scan(int mode)
|
int usb_stor_scan(int mode)
|
||||||
{
|
{
|
||||||
unsigned char i;
|
|
||||||
|
|
||||||
if (mode == 1)
|
if (mode == 1)
|
||||||
printf(" scanning usb for storage devices... ");
|
printf(" scanning usb for storage devices... ");
|
||||||
|
|
||||||
|
#ifndef CONFIG_DM_USB
|
||||||
|
unsigned char i;
|
||||||
|
|
||||||
usb_disable_asynch(1); /* asynch transfer not allowed */
|
usb_disable_asynch(1); /* asynch transfer not allowed */
|
||||||
|
|
||||||
usb_stor_reset();
|
usb_stor_reset();
|
||||||
|
@ -329,12 +329,12 @@ int usb_stor_scan(int mode)
|
||||||
} /* for */
|
} /* for */
|
||||||
|
|
||||||
usb_disable_asynch(0); /* asynch transfer allowed */
|
usb_disable_asynch(0); /* asynch transfer allowed */
|
||||||
|
#endif
|
||||||
printf("%d Storage Device(s) found\n", usb_max_devs);
|
printf("%d Storage Device(s) found\n", usb_max_devs);
|
||||||
if (usb_max_devs > 0)
|
if (usb_max_devs > 0)
|
||||||
return 0;
|
return 0;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static int usb_stor_irq(struct usb_device *dev)
|
static int usb_stor_irq(struct usb_device *dev)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue