diff options
author | Stefan Brüns <stefan.bruens@rwth-aachen.de> | 2015-12-22 01:21:03 +0100 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2015-12-31 16:16:29 +0100 |
commit | faa7db24a4b6c1b645dec312a16574442d5adde2 (patch) | |
tree | 7e555277a389ebc566622c0a9910d0513b261b57 /include | |
parent | 5253aded464f99734698bffd33c662f1ac071fd0 (diff) | |
download | u-boot-imx-faa7db24a4b6c1b645dec312a16574442d5adde2.zip u-boot-imx-faa7db24a4b6c1b645dec312a16574442d5adde2.tar.gz u-boot-imx-faa7db24a4b6c1b645dec312a16574442d5adde2.tar.bz2 |
usb: Move determination of TT hub address/port into separate function
Start split and complete split tokens need the hub address and the
downstream port of the first HS hub (device view).
The core of the function was duplicated in both host/ehci_hcd and
musb-new/usb-compat.h.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/usb.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/usb.h b/include/usb.h index 198ecbc..2539364 100644 --- a/include/usb.h +++ b/include/usb.h @@ -875,6 +875,18 @@ int legacy_hub_port_reset(struct usb_device *dev, int port, int hub_port_reset(struct udevice *dev, int port, unsigned short *portstat); +/* + * usb_find_usb2_hub_address_port() - Get hub address and port for TT setting + * + * Searches for the first HS hub above the given device. If a + * HS hub is found, the hub address and the port the device is + * connected to is return, as required for SPLIT transactions + * + * @param: udev full speed or low speed device + */ +void usb_find_usb2_hub_address_port(struct usb_device *udev, + uint8_t *hub_address, uint8_t *hub_port); + /** * usb_alloc_new_device() - Allocate a new device * |