From 732e9e63826f1100953b5c91259e77f4f305d6af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Niew=C3=B6hner?= Date: Mon, 21 Dec 2020 17:09:08 +0100 Subject: mb/google/octopus: do LPC/eSPI pad configuration at board-level MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Do LPC/eSPI pad configuration at board-level to match other platforms by adding an appropriate early gpio table in the bootblock. The soc code gets dropped in CB:49410. Change-Id: Ie33bae481f430a1c4410a0a4e2b2a34a3e78adaa Signed-off-by: Michael Niewöhner Reviewed-on: https://review.coreboot.org/c/coreboot/+/49411 Reviewed-by: Karthik Ramasubramanian Tested-by: build bot (Jenkins) --- src/mainboard/google/octopus/bootblock.c | 4 ++-- src/mainboard/google/octopus/variants/baseboard/gpio.c | 10 ++++++++++ .../octopus/variants/baseboard/include/baseboard/variants.h | 1 + 3 files changed, 13 insertions(+), 2 deletions(-) (limited to 'src/mainboard/google/octopus') diff --git a/src/mainboard/google/octopus/bootblock.c b/src/mainboard/google/octopus/bootblock.c index 0add4535b2..e0f037f4a9 100644 --- a/src/mainboard/google/octopus/bootblock.c +++ b/src/mainboard/google/octopus/bootblock.c @@ -3,7 +3,6 @@ #include #include #include -#include #include void bootblock_mainboard_init(void) @@ -11,7 +10,8 @@ void bootblock_mainboard_init(void) const struct pad_config *pads, *override_pads; size_t num, override_num; - lpc_configure_pads(); + pads = mainboard_early_bootblock_gpio_table(&num); + gpio_configure_pads(pads, num); /* * Perform EC init before configuring GPIOs. This is because variant diff --git a/src/mainboard/google/octopus/variants/baseboard/gpio.c b/src/mainboard/google/octopus/variants/baseboard/gpio.c index 21d42683df..b99ec4fc19 100644 --- a/src/mainboard/google/octopus/variants/baseboard/gpio.c +++ b/src/mainboard/google/octopus/variants/baseboard/gpio.c @@ -292,6 +292,16 @@ const struct pad_config *__weak variant_early_override_gpio_table(size_t *num) return NULL; } +static const struct pad_config early_bootblock_gpio_table[] = { + PAD_NC(GPIO_154, NONE), /* LPC_CLKRUNB -- NC for eSPI */ +}; + +const struct pad_config *mainboard_early_bootblock_gpio_table(size_t *num) +{ + *num = ARRAY_SIZE(early_bootblock_gpio_table); + return early_bootblock_gpio_table; +} + /* GPIOs needed prior to ramstage. */ static const struct pad_config early_gpio_table[] = { PAD_CFG_GPI(GPIO_190, NONE, DEEP), /* PCH_WP_OD */ diff --git a/src/mainboard/google/octopus/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/octopus/variants/baseboard/include/baseboard/variants.h index f39a786f11..5f2c6e25bb 100644 --- a/src/mainboard/google/octopus/variants/baseboard/include/baseboard/variants.h +++ b/src/mainboard/google/octopus/variants/baseboard/include/baseboard/variants.h @@ -10,6 +10,7 @@ /* The next set of functions return the gpio table and fill in the number of * entries for each table. */ +const struct pad_config *mainboard_early_bootblock_gpio_table(size_t *num); const struct pad_config *variant_base_gpio_table(size_t *num); const struct pad_config *variant_override_gpio_table(size_t *num); const struct pad_config *variant_early_gpio_table(size_t *num); -- cgit v1.2.3