From d3c565e7452f24432ae2940a2e19c70fa2de8e83 Mon Sep 17 00:00:00 2001 From: Karthikeyan Ramasubramanian Date: Tue, 26 Oct 2021 23:20:25 -0600 Subject: [PATCH] mb/google/guybrush: Fix GPIO overrides during verstage GPIO overrides are defined for verstage. But the overrides are neither enabled nor applied during verstage. Enable the overrides and apply them during verstage. BUG=None TEST=Build and boot to OS in Guybrush. Perform suspend/stress, warm and cold reboot cycling for 10 iterations each. Ensure that all the PCIe devices are enumerated fine. Signed-off-by: Karthikeyan Ramasubramanian Change-Id: I510313bf860d8d55ec3b04a9cfdfa942373163f9 Reviewed-on: https://review.coreboot.org/c/coreboot/+/58637 Tested-by: build bot (Jenkins) Reviewed-by: Rob Barnes Reviewed-by: Raul Rangel Reviewed-by: Marshall Dawson --- .../google/guybrush/variants/guybrush/Makefile.inc | 2 ++ .../google/guybrush/variants/nipperkin/Makefile.inc | 2 ++ src/mainboard/google/guybrush/verstage.c | 9 ++++++--- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/mainboard/google/guybrush/variants/guybrush/Makefile.inc b/src/mainboard/google/guybrush/variants/guybrush/Makefile.inc index d8a1beaf8f..dd3b775456 100644 --- a/src/mainboard/google/guybrush/variants/guybrush/Makefile.inc +++ b/src/mainboard/google/guybrush/variants/guybrush/Makefile.inc @@ -9,4 +9,6 @@ romstage-y += variant.c ramstage-y += gpio.c ramstage-y += variant.c +verstage-y += gpio.c + subdirs-y += ./memory diff --git a/src/mainboard/google/guybrush/variants/nipperkin/Makefile.inc b/src/mainboard/google/guybrush/variants/nipperkin/Makefile.inc index 03c9c8bac4..d147aa9a49 100644 --- a/src/mainboard/google/guybrush/variants/nipperkin/Makefile.inc +++ b/src/mainboard/google/guybrush/variants/nipperkin/Makefile.inc @@ -3,6 +3,8 @@ bootblock-y += gpio.c romstage-y += gpio.c ramstage-y += gpio.c +verstage-y += gpio.c + bootblock-y += variant.c romstage-y += variant.c ramstage-y += variant.c diff --git a/src/mainboard/google/guybrush/verstage.c b/src/mainboard/google/guybrush/verstage.c index a8c162f59b..e6434dfda2 100644 --- a/src/mainboard/google/guybrush/verstage.c +++ b/src/mainboard/google/guybrush/verstage.c @@ -9,12 +9,15 @@ static void setup_gpio(void) { - const struct soc_amd_gpio *gpios; - size_t num_gpios; + const struct soc_amd_gpio *gpios, *override_gpios; + size_t num_gpios, override_num_gpios; if (CONFIG(VBOOT_STARTS_BEFORE_BOOTBLOCK)) { gpios = variant_early_gpio_table(&num_gpios); - gpio_configure_pads(gpios, num_gpios); + override_gpios = variant_early_override_gpio_table(&override_num_gpios); + + gpio_configure_pads_with_override(gpios, num_gpios, + override_gpios, override_num_gpios); } }