summaryrefslogtreecommitdiffstats
path: root/include/usb
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2020-03-02 10:27:25 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2020-03-20 10:07:16 +0100
commitc4dcbcd30f046d6411cb0d789ad94056b935f26b (patch)
treec05841b9a07d093aedf6bc79a60ac1c7ab9b7fcf /include/usb
parent4569ddd9130ecb475b224ffbc6851e0b4c471028 (diff)
downloadbarebox-c4dcbcd30f046d6411cb0d789ad94056b935f26b.tar.gz
barebox-c4dcbcd30f046d6411cb0d789ad94056b935f26b.tar.xz
usb: support set hub depth request for USB 3.0 hubs
This is an adoption of U-Boot commit bbc6f06c0031249bf1983b875e54cb7549bafe60: | commit bbc6f06c0031249bf1983b875e54cb7549bafe60 | Author: Bin Meng <bmeng.cn@gmail.com> | Date: Wed Jul 19 21:51:13 2017 +0800 | | usb: hub: Support 'set hub depth' request for USB 3.0 hubs | | USB 3.0 hub uses a hub depth value multiplied by four as an offset | into the 'route string' to locate the bits it uses to determine the | downstream port number. We shall set the hub depth value of a USB | 3.0 hub after it is configured. | | Signed-off-by: Bin Meng <bmeng.cn@gmail.com> | Reviewed-by: Simon Glass <sjg@chromium.org> In this patch we also support recording the depth of a hub in struct usb_device. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/usb')
-rw-r--r--include/usb/usb.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/usb/usb.h b/include/usb/usb.h
index 94506fa525..5de9e25863 100644
--- a/include/usb/usb.h
+++ b/include/usb/usb.h
@@ -108,6 +108,7 @@ struct usb_device {
int act_len; /* transfered bytes */
int maxchild; /* Number of ports if hub */
int portnr;
+ int level;
struct usb_device *parent;
struct usb_device *children[USB_MAXCHILDREN];
@@ -460,4 +461,6 @@ int usb_register_otg_device(struct device_d *parent,
extern struct list_head usb_device_list;
+bool usb_hub_is_root_hub(struct usb_device *hdev);
+
#endif /*_USB_H_ */