aboutsummaryrefslogtreecommitdiff
path: root/common/usb_hub.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-07-14 11:10:49 -0400
committerTom Rini <trini@konsulko.com>2022-07-14 11:10:49 -0400
commit54f683dbfb8b0777ee4d0ba00872da33e54c98fa (patch)
tree2bf9b2cb071abd2a9a80a252fc0126f1df46cfec /common/usb_hub.c
parent58f3dc5c4eac9c6050edda6af2e37d20a2f9586d (diff)
parent16aabfe2f29d4682b2176095029fa307caccaced (diff)
Merge https://source.denx.de/u-boot/custodians/u-boot-usb
Diffstat (limited to 'common/usb_hub.c')
-rw-r--r--common/usb_hub.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/common/usb_hub.c b/common/usb_hub.c
index ba11a188ca..d73638950b 100644
--- a/common/usb_hub.c
+++ b/common/usb_hub.c
@@ -47,6 +47,8 @@
#define HUB_SHORT_RESET_TIME 20
#define HUB_LONG_RESET_TIME 200
+#define HUB_DEBOUNCE_TIMEOUT 1000
+
#define PORT_OVERCURRENT_MAX_SCAN_COUNT 3
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
* 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",
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)