usb: hub: introduce HUB_DEBOUNCE_TIMEOUT
Introduce define for connection timeout, named HUB_DEBOUNCE_TIMEOUT as in linux kernel drivers/usb/core/hub.c Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Change-Id: Ic02e6fb44225d1cfe15506c7c85f70a0893fb880 Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/236835 Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com> Reviewed-by: Patrice CHOTARD <patrice.chotard@foss.st.com> Tested-by: Patrice CHOTARD <patrice.chotard@foss.st.com>
This commit is contained in:
committed by
Patrice Chotard
parent
d8c511144a
commit
1d337aa8dc
@ -47,6 +47,8 @@
|
|||||||
#define HUB_SHORT_RESET_TIME 20
|
#define HUB_SHORT_RESET_TIME 20
|
||||||
#define HUB_LONG_RESET_TIME 200
|
#define HUB_LONG_RESET_TIME 200
|
||||||
|
|
||||||
|
#define HUB_DEBOUNCE_TIMEOUT 1000
|
||||||
|
|
||||||
#define PORT_OVERCURRENT_MAX_SCAN_COUNT 3
|
#define PORT_OVERCURRENT_MAX_SCAN_COUNT 3
|
||||||
|
|
||||||
struct usb_device_scan {
|
struct usb_device_scan {
|
||||||
@ -208,10 +210,10 @@ static void usb_hub_power_on(struct usb_hub_device *hub)
|
|||||||
* will be done based on this value in the USB port loop in
|
* will be done based on this value in the USB port loop in
|
||||||
* usb_hub_configure() later.
|
* usb_hub_configure() later.
|
||||||
*/
|
*/
|
||||||
hub->connect_timeout = hub->query_delay + 1000;
|
hub->connect_timeout = hub->query_delay + HUB_DEBOUNCE_TIMEOUT;
|
||||||
debug("devnum=%d poweron: query_delay=%d connect_timeout=%d\n",
|
debug("devnum=%d poweron: query_delay=%d connect_timeout=%d\n",
|
||||||
dev->devnum, max(100, (int)pgood_delay),
|
dev->devnum, max(100, (int)pgood_delay),
|
||||||
max(100, (int)pgood_delay) + 1000);
|
max(100, (int)pgood_delay) + HUB_DEBOUNCE_TIMEOUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !CONFIG_IS_ENABLED(DM_USB)
|
#if !CONFIG_IS_ENABLED(DM_USB)
|
||||||
|
|||||||
Reference in New Issue
Block a user