UPSTREAM: usb: host: Print device name when scanning
Drop the counter, it has no meaning other than being the order in which the interface is found; the name assigned to the USB host controller interface is a better indicator. Example of the original output: > USB0: USB EHCI 1.10 > scanning bus 0 for devices... 2 USB Device(s) found > scanning usb for storage devices... 1 Storage Device(s) found Patched output: > Bus usb@ee080100: USB EHCI 1.10 > scanning bus usb@ee080100 for devices... 2 USB Device(s) found > scanning usb for storage devices... 1 Storage Device(s) found Change-Id: I4d009cd00a03018c4fec2f9ba573e35010f6328f Signed-off-by: Ismael Luceno <ismael.luceno@silicon-gears.com> Signed-off-by: Frank Wang <frank.wang@rock-chips.com> (cherry picked from commit 89aea23abb971fa89b7a96c02024b63d0b918a78)
This commit is contained in:
parent
95dc2be99c
commit
79e8eddfb9
|
|
@ -213,7 +213,7 @@ static void usb_scan_bus(struct udevice *bus, bool recurse)
|
||||||
|
|
||||||
assert(recurse); /* TODO: Support non-recusive */
|
assert(recurse); /* TODO: Support non-recusive */
|
||||||
|
|
||||||
printf("scanning bus %d for devices... ", bus->seq);
|
printf("scanning bus %s for devices... ", bus->name);
|
||||||
debug("\n");
|
debug("\n");
|
||||||
ret = usb_scan_device(bus, 0, USB_SPEED_FULL, &dev);
|
ret = usb_scan_device(bus, 0, USB_SPEED_FULL, &dev);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
|
@ -245,7 +245,6 @@ int usb_init(void)
|
||||||
struct usb_bus_priv *priv;
|
struct usb_bus_priv *priv;
|
||||||
struct udevice *bus;
|
struct udevice *bus;
|
||||||
struct uclass *uc;
|
struct uclass *uc;
|
||||||
int count = 0;
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
asynch_allowed = 1;
|
asynch_allowed = 1;
|
||||||
|
|
@ -258,8 +257,7 @@ int usb_init(void)
|
||||||
|
|
||||||
uclass_foreach_dev(bus, uc) {
|
uclass_foreach_dev(bus, uc) {
|
||||||
/* init low_level USB */
|
/* init low_level USB */
|
||||||
printf("USB%d: ", count);
|
printf("Bus %s: ", bus->name);
|
||||||
count++;
|
|
||||||
|
|
||||||
#ifdef CONFIG_SANDBOX
|
#ifdef CONFIG_SANDBOX
|
||||||
/*
|
/*
|
||||||
|
|
@ -330,10 +328,8 @@ int usb_init(void)
|
||||||
remove_inactive_children(uc, bus);
|
remove_inactive_children(uc, bus);
|
||||||
|
|
||||||
/* if we were not able to find at least one working bus, bail out */
|
/* if we were not able to find at least one working bus, bail out */
|
||||||
if (!count)
|
if (controllers_initialized == 0)
|
||||||
printf("No controllers found\n");
|
printf("No working controllers found\n");
|
||||||
else if (controllers_initialized == 0)
|
|
||||||
printf("USB error: all controllers failed lowlevel init\n");
|
|
||||||
|
|
||||||
return usb_started ? 0 : -1;
|
return usb_started ? 0 : -1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue