summaryrefslogtreecommitdiff
path: root/common/usb_hub.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/usb_hub.c')
-rw-r--r--common/usb_hub.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/common/usb_hub.c b/common/usb_hub.c
index 990993aa2f..f231d711d8 100644
--- a/common/usb_hub.c
+++ b/common/usb_hub.c
@@ -166,7 +166,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;
@@ -191,10 +191,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);
/*