summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2017-07-19 13:51:13 (GMT)
committerPrabhakar Kushwaha <prabhakar.kushwaha@nxp.com>2017-08-08 08:42:23 (GMT)
commita4166f256d4bfbbeb162d78866d12ade4ab2b841 (patch)
tree9f8d998e2437b67f42f01695dec7e9b39f1bd9a2 /include
parent0aa281d347ef94a200af55c6ac0cebf4bb823ca9 (diff)
downloadu-boot-a4166f256d4bfbbeb162d78866d12ade4ab2b841.tar.xz
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>
Diffstat (limited to 'include')
-rw-r--r--include/usb.h1
-rw-r--r--include/usb_defs.h3
2 files changed, 4 insertions, 0 deletions
diff --git a/include/usb.h b/include/usb.h
index 64dfa84..f71da52 100644
--- a/include/usb.h
+++ b/include/usb.h
@@ -570,6 +570,7 @@ struct usb_hub_device {
ulong connect_timeout; /* Device connection timeout in ms */
ulong query_delay; /* Device query delay in ms */
int overcurrent_count[USB_MAXCHILDREN]; /* Over-current counter */
+ int hub_depth; /* USB 3.0 hub depth */
};
#ifdef CONFIG_DM_USB
diff --git a/include/usb_defs.h b/include/usb_defs.h
index 6b4385a..273337f 100644
--- a/include/usb_defs.h
+++ b/include/usb_defs.h
@@ -306,6 +306,9 @@
/* Mask for wIndex in get/set port feature */
#define USB_HUB_PORT_MASK 0xf
+/* Hub class request codes */
+#define USB_REQ_SET_HUB_DEPTH 0x0c
+
/*
* CBI style
*/