]> git.baikalelectronics.ru Git - uboot.git/commit
usb: Use the first available device for ehci_gadget
authorSean Anderson <sean.anderson@seco.com>
Fri, 5 Nov 2021 16:52:55 +0000 (12:52 -0400)
committerSimon Glass <sjg@chromium.org>
Tue, 25 Jan 2022 18:47:07 +0000 (11:47 -0700)
commitce55337ce865b555432f0b67133a0a80d23fc38c
tree4036deb1e3065dcf71a00c60d0fa5cafcc26d87e
parent9b9ef09f34003da583137ae46351247e92f409aa
usb: Use the first available device for ehci_gadget

For whatever reason, usb_setup_ehci_gadget removes and probes USB device
0. However, not all systems have a device 0. Use the first device
instead.

The device probed should probably have something to do with the
controller (as specified by e.g. ums <controller> or fastboot
<controller>). In fact, I find it odd that we probe the USB device in
the first place, because this is just to set up the gadget itself.
Presumably, the controller should be probed by usb_gadget_initialize
somehow.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/usb/host/usb-uclass.c