diff options
author | Furquan Shaikh <furquan@google.com> | 2018-07-25 14:30:59 -0700 |
---|---|---|
committer | Aaron Durbin <adurbin@chromium.org> | 2018-07-26 15:36:44 +0000 |
commit | 06a41f1f604bb10c54a3a17b0f75dda8d7d61614 (patch) | |
tree | 0233163a59b861bf5be44455c9124957dcb7ed48 /src/mainboard/google/octopus/variants | |
parent | 4a12a56cdf1ea073def5e62386eebac32ff59cd3 (diff) |
mb/google/octopus: Use newly added gpio_configure_pads_with_override
This change updates mainboard_init to call
gpio_configure_pads_with_override instead of gpio_configure_pads to
allow variants to provide overrides for the GPIO config table provided
by the baseboard.
BUG=b:111743717
TEST=Verified on phaser that GPIO config with and without this change
is the same.
Change-Id: I494a950100e5ec82504d652ff6e8a75746456d1f
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/27641
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Justin TerAvest <teravest@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google/octopus/variants')
3 files changed, 10 insertions, 3 deletions
diff --git a/src/mainboard/google/octopus/variants/baseboard/gpio.c b/src/mainboard/google/octopus/variants/baseboard/gpio.c index 7b1075fc65..3dee892110 100644 --- a/src/mainboard/google/octopus/variants/baseboard/gpio.c +++ b/src/mainboard/google/octopus/variants/baseboard/gpio.c @@ -281,12 +281,18 @@ static const struct pad_config gpio_table[] = { PAD_NC(GPIO_210, DN_20K), }; -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; +} + /* 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 c9d7d7bf85..04f87968d0 100644 --- a/src/mainboard/google/octopus/variants/baseboard/include/baseboard/variants.h +++ b/src/mainboard/google/octopus/variants/baseboard/include/baseboard/variants.h @@ -23,7 +23,8 @@ /* 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_override_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, int slp_typ); diff --git a/src/mainboard/google/octopus/variants/bip/gpio.c b/src/mainboard/google/octopus/variants/bip/gpio.c index 5f83ee4dfa..18cb6d9464 100644 --- a/src/mainboard/google/octopus/variants/bip/gpio.c +++ b/src/mainboard/google/octopus/variants/bip/gpio.c @@ -259,7 +259,7 @@ static const struct pad_config gpio_table[] = { PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_210, 0, DEEP, NONE, HIZCRx0, DISPUPD), }; -const struct pad_config *variant_gpio_table(size_t *num) +const struct pad_config *variant_base_gpio_table(size_t *num) { *num = ARRAY_SIZE(gpio_table); return gpio_table; |