From cdd7d18120a1a76df4a9f8d78391c7018013d916 Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Wed, 18 Nov 2020 09:20:01 -0700 Subject: mb/google/zork: Remove 50ms WIFI delay As a part of trying to get our boot time as low as possible, any delays in the code should try to be refactored out. This removes the 50ms delay in the WIFI sequence by enabling power and putting the wifi module into reset in bootblock, then bringing it out of reset in ramstage. This is significantly longer than the 50ms requirement. The reset GPIO was already being set high in ramstage, so that code didn't need to be added. BUG=b:171513520 TEST=Boot on boards with different module types, WIFI works on both. BRANCH=Zork Signed-off-by: Martin Roth Change-Id: I211d3da338ad368d1f011f03cf7d05121c057075 Reviewed-on: https://review.coreboot.org/c/coreboot/+/47719 Tested-by: build bot (Jenkins) Reviewed-by: Marshall Dawson --- .../google/zork/variants/baseboard/gpio_baseboard_trembyle.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c b/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c index 14b85b0da9..818c39bf59 100644 --- a/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c +++ b/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c @@ -199,8 +199,8 @@ static void wifi_power_reset_configure_active_low_power(void) * Configure WiFi GPIOs such that: * - WIFI_AUX_RESET_L is configured first to assert PERST# to WiFi device. * - Enable power to WiFi using EN_PWR_WIFI_L. - * - Wait for 50ms after power to WiFi is enabled. - * - Deassert WIFI_AUX_RESET_L. + * - Wait for >50ms after power to WiFi is enabled. (Time between bootblock & ramstage) + * - WIFI_AUX_RESET_L gets deasserted later in mainboard_configure_gpios in ramstage */ static const struct soc_amd_gpio v3_wifi_table[] = { /* WIFI_AUX_RESET_L */ @@ -210,8 +210,6 @@ static void wifi_power_reset_configure_active_low_power(void) }; program_gpios(v3_wifi_table, ARRAY_SIZE(v3_wifi_table)); - mdelay(50); - gpio_set(GPIO_86, 1); } static void wifi_power_reset_configure_active_high_power(void) -- cgit v1.2.3