diff options
author | Karthikeyan Ramasubramanian <kramasub@google.com> | 2020-07-07 22:27:10 -0600 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-07-12 19:39:24 +0000 |
commit | c34079cea0990d184fe2b13065066d012dfdd93d (patch) | |
tree | 0d5e0ba56654b79224c960800d46830a817644c1 /src/mainboard/google/dedede/variants | |
parent | c8d8777750d00f9a0437462a333dfec7abaf0ac0 (diff) |
mb/google/dedede: Add ability to provide override GPIO table
For variants with slightly different GPIO configuration, add support to
pass an override GPIO configuration table.
BUG=None
TEST=Build and boot the waddledee mainboard.
Change-Id: I2f1c6dc2ea5499bff96a471c4461339ef01ee19a
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43279
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/mainboard/google/dedede/variants')
-rw-r--r-- | src/mainboard/google/dedede/variants/baseboard/gpio.c | 8 | ||||
-rw-r--r-- | src/mainboard/google/dedede/variants/baseboard/include/baseboard/variants.h | 3 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/mainboard/google/dedede/variants/baseboard/gpio.c b/src/mainboard/google/dedede/variants/baseboard/gpio.c index 71c0c1448a..1284bc5e34 100644 --- a/src/mainboard/google/dedede/variants/baseboard/gpio.c +++ b/src/mainboard/google/dedede/variants/baseboard/gpio.c @@ -420,12 +420,18 @@ static const struct pad_config early_gpio_table[] = { PAD_CFG_GPI(GPP_S0, NONE, DEEP), }; -const struct pad_config *__weak variant_gpio_table(size_t *num) +const struct pad_config *__weak variant_base_gpio_table(size_t *num) { *num = ARRAY_SIZE(gpio_table); return gpio_table; } +const struct pad_config *__weak variant_override_gpio_table(size_t *num) +{ + *num = 0; + return NULL; +} + const struct pad_config *__weak variant_early_gpio_table(size_t *num) { *num = ARRAY_SIZE(early_gpio_table); diff --git a/src/mainboard/google/dedede/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/dedede/variants/baseboard/include/baseboard/variants.h index 5d8355b2fe..1f4044366d 100644 --- a/src/mainboard/google/dedede/variants/baseboard/include/baseboard/variants.h +++ b/src/mainboard/google/dedede/variants/baseboard/include/baseboard/variants.h @@ -13,10 +13,11 @@ /* The next set of functions return the gpio table and fill in the number of * entries for each table. */ -const struct pad_config *variant_gpio_table(size_t *num); +const struct pad_config *variant_base_gpio_table(size_t *num); const struct pad_config *variant_early_gpio_table(size_t *num); const struct pad_config *variant_sleep_gpio_table(size_t *num); const struct cros_gpio *variant_cros_gpios(size_t *num); +const struct pad_config *variant_override_gpio_table(size_t *num); /** * Get board's Hardware features as defined in FW_CONFIG |