diff options
author | Igor Opaniuk <igor.opaniuk@foundries.io> | 2021-01-28 17:34:22 +0200 |
---|---|---|
committer | Jun Nie <jun.nie@linaro.org> | 2021-03-07 13:00:09 +0800 |
commit | f47671a7216b9d616f6473266f5ca0f3959e1b62 (patch) | |
tree | 4c4cbf617287c9598be61f6da78cca97ae25feb9 | |
parent | f1e672af0df9b5ef264312e5d384bf1091d8fd9f (diff) |
[FIO internal] usb hub: don't use env if it's not enabled
Signed-off-by: Igor Opaniuk <igor.opaniuk@foundries.io>
-rw-r--r-- | common/usb_hub.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/common/usb_hub.c b/common/usb_hub.c index c642b683e7..27682869b3 100644 --- a/common/usb_hub.c +++ b/common/usb_hub.c @@ -163,8 +163,9 @@ static void usb_hub_power_on(struct usb_hub_device *hub) int i; struct usb_device *dev; unsigned pgood_delay = hub->desc.bPwrOn2PwrGood * 2; +#if !defined(CONFIG_SPL_BUILD) && !defined(CONFIG_SPL_ENV_SUPPORT) const char *env; - +#endif dev = hub->pusb_dev; debug("enabling power on all ports\n"); @@ -188,10 +189,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 !defined(CONFIG_SPL_BUILD) && !defined(CONFIG_SPL_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); /* |