summaryrefslogtreecommitdiffstats
path: root/include/usb
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2020-02-28 10:29:32 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2020-03-20 10:07:16 +0100
commit891b0a02566c477e4b48cece3fbdae1fd3029a5c (patch)
tree030e7dfd001ec160a9b1091b16e3e4b5dfac1446 /include/usb
parent5b17d93e75795413bc66b0b20ee4f3960ddce316 (diff)
downloadbarebox-891b0a02566c477e4b48cece3fbdae1fd3029a5c.tar.gz
barebox-891b0a02566c477e4b48cece3fbdae1fd3029a5c.tar.xz
usb: hub: Parse and save TT details from device descriptor
Adoption of U-Boot commit 5624dfd5aa91c244519ec60b40b4a42b4d9a43ca: | commit 5624dfd5aa91c244519ec60b40b4a42b4d9a43ca | Author: Bin Meng <bmeng.cn@gmail.com> | Date: Wed Jul 19 21:51:16 2017 +0800 | | usb: hub: Parse and save TT details from device descriptor | | A high speed hub has a special responsibility to handle full speed/ | low speed devices connected on downstream ports. In this case, the | hub must isolate the high speed signaling environment from the full | speed/low speed signaling environment with the help of Transaction | Translator (TT). TT details are provided by hub descriptors and we | parse and save it to hub uclass_priv for later use. | | Signed-off-by: Bin Meng <bmeng.cn@gmail.com> | Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/usb')
-rw-r--r--include/usb/usb.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/usb/usb.h b/include/usb/usb.h
index a9c34cdde4..94506fa525 100644
--- a/include/usb/usb.h
+++ b/include/usb/usb.h
@@ -306,6 +306,16 @@ void usb_rescan(void);
#define usb_pipecontrol(pipe) (usb_pipetype((pipe)) == PIPE_CONTROL)
#define usb_pipebulk(pipe) (usb_pipetype((pipe)) == PIPE_BULK)
+/*
+ * As of USB 2.0, full/low speed devices are segregated into trees.
+ * One type grows from USB 1.1 host controllers (OHCI, UHCI etc).
+ * The other type grows from high speed hubs when they connect to
+ * full/low speed devices using "Transaction Translators" (TTs).
+ */
+struct usb_tt {
+ bool multi; /* true means one TT per port */
+ unsigned think_time; /* think time in ns */
+};
/*************************************************************************
* Hub Stuff
@@ -316,6 +326,7 @@ struct usb_hub_device {
uint64_t connect_timeout; /* Device connection timeout in ns */
uint64_t query_delay; /* Device query delay in ns */
int overcurrent_count[USB_MAXCHILDREN]; /* Over-current counter */
+ struct usb_tt tt; /* Transaction Translator */
};
/**