From d490afbe04a41f380ab79dfe92f28dda74ab52a7 Mon Sep 17 00:00:00 2001 From: Mathew King Date: Thu, 11 Mar 2021 08:25:52 -0700 Subject: mb/google/guybrush: Configure early GPIOs in earliest stage Configure early GPIOs in verstage if it is run in PSP otherwise configure them in bootblock. BUG=b:181961514, b:180721208 TEST=builds Signed-off-by: Mathew King Change-Id: Ib9410089592776ffe198901f2de914fd04bdbade Reviewed-on: https://review.coreboot.org/c/coreboot/+/51348 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- .../google/guybrush/variants/baseboard/Makefile.inc | 2 ++ src/mainboard/google/guybrush/variants/baseboard/gpio.c | 12 ++++++------ .../guybrush/variants/baseboard/include/baseboard/variants.h | 4 ++-- 3 files changed, 10 insertions(+), 8 deletions(-) (limited to 'src/mainboard/google/guybrush/variants/baseboard') diff --git a/src/mainboard/google/guybrush/variants/baseboard/Makefile.inc b/src/mainboard/google/guybrush/variants/baseboard/Makefile.inc index 7c092e44c2..3b86b93aba 100644 --- a/src/mainboard/google/guybrush/variants/baseboard/Makefile.inc +++ b/src/mainboard/google/guybrush/variants/baseboard/Makefile.inc @@ -2,4 +2,6 @@ bootblock-y += gpio.c ramstage-y += gpio.c +verstage-y += gpio.c + smm-y += gpio.c diff --git a/src/mainboard/google/guybrush/variants/baseboard/gpio.c b/src/mainboard/google/guybrush/variants/baseboard/gpio.c index 68c7d290ef..3e9d88a468 100644 --- a/src/mainboard/google/guybrush/variants/baseboard/gpio.c +++ b/src/mainboard/google/guybrush/variants/baseboard/gpio.c @@ -163,9 +163,9 @@ static const struct soc_amd_gpio base_gpio_table[] = { PAD_NF(GPIO_148, I2C1_SDA, PULL_NONE), }; -/* Early GPIO configuration in bootblock */ -static const struct soc_amd_gpio bootblock_gpio_table[] = { - /* TODO: Fill bootblock gpio configuration */ +/* Early GPIO configuration */ +static const struct soc_amd_gpio early_gpio_table[] = { + /* TODO: Fill early gpio configuration */ }; /* GPIO configuration for sleep */ @@ -184,10 +184,10 @@ const struct soc_amd_gpio *__weak variant_override_gpio_table(size_t *size) return NULL; } -const struct soc_amd_gpio *__weak variant_bootblock_gpio_table(size_t *size) +const struct soc_amd_gpio *__weak variant_early_gpio_table(size_t *size) { - *size = ARRAY_SIZE(bootblock_gpio_table); - return bootblock_gpio_table; + *size = ARRAY_SIZE(early_gpio_table); + return early_gpio_table; } const __weak struct soc_amd_gpio *variant_sleep_gpio_table(size_t *size) diff --git a/src/mainboard/google/guybrush/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/guybrush/variants/baseboard/include/baseboard/variants.h index 91a2f147d2..dccaed0e2c 100644 --- a/src/mainboard/google/guybrush/variants/baseboard/include/baseboard/variants.h +++ b/src/mainboard/google/guybrush/variants/baseboard/include/baseboard/variants.h @@ -18,8 +18,8 @@ const struct soc_amd_gpio *variant_base_gpio_table(size_t *size); */ const struct soc_amd_gpio *variant_override_gpio_table(size_t *size); -/* This function provides GPIO init in bootblock. */ -const struct soc_amd_gpio *variant_bootblock_gpio_table(size_t *size); +/* This function provides early GPIO init in bootblock or psp. */ +const struct soc_amd_gpio *variant_early_gpio_table(size_t *size); /* This function provides GPIO settings before entering sleep. */ const struct soc_amd_gpio *variant_sleep_gpio_table(size_t *size); -- cgit v1.2.3