From 891b0a02566c477e4b48cece3fbdae1fd3029a5c Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Fri, 28 Feb 2020 10:29:32 +0100 Subject: usb: hub: Parse and save TT details from device descriptor Adoption of U-Boot commit 5624dfd5aa91c244519ec60b40b4a42b4d9a43ca: | commit 5624dfd5aa91c244519ec60b40b4a42b4d9a43ca | Author: Bin Meng | 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 | Reviewed-by: Simon Glass Signed-off-by: Sascha Hauer --- include/usb/usb.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/usb') 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 */ }; /** -- cgit v1.2.3