diff options
author | Tom Rini <trini@konsulko.com> | 2022-10-10 15:38:14 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-10-10 15:38:14 -0400 |
commit | c4c32e359662aa95d9dbda2bd1272181bd9cb830 (patch) | |
tree | 69f549936a023bd2b1fada4343789ba779579570 /common | |
parent | 2877e9ddca83180ec1e3567f6bab3ffc380e0b60 (diff) | |
parent | 5f7e01e9d5d8005e9a8fbbdf8a05dfd63a5e5f04 (diff) |
Merge https://source.denx.de/u-boot/custodians/u-boot-usb
Diffstat (limited to 'common')
-rw-r--r-- | common/usb_hub.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/common/usb_hub.c b/common/usb_hub.c index d73638950b..95f1449b5c 100644 --- a/common/usb_hub.c +++ b/common/usb_hub.c @@ -168,7 +168,7 @@ static void usb_hub_power_on(struct usb_hub_device *hub) int i; struct usb_device *dev; unsigned pgood_delay = hub->desc.bPwrOn2PwrGood * 2; - const char *env; + const char __maybe_unused *env; dev = hub->pusb_dev; @@ -193,10 +193,12 @@ static void usb_hub_power_on(struct usb_hub_device *hub) * but allow this time to be increased via env variable as some * devices break the spec and require longer warm-up times */ +#if CONFIG_IS_ENABLED(ENV_SUPPORT) env = env_get("usb_pgood_delay"); if (env) pgood_delay = max(pgood_delay, (unsigned)simple_strtol(env, NULL, 0)); +#endif debug("pgood_delay=%dms\n", pgood_delay); /* |