diff options
author | Tarun Tuli <taruntuli@google.com> | 2023-02-22 14:18:00 +0000 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-04-29 02:31:36 +0000 |
commit | 39c279acf89ec4cc7b8ca57c2e9f0f4bc897df54 (patch) | |
tree | 436cbdd58766967d600dc5bcc1433a12f6586e0d /src/mainboard | |
parent | 337f38ae0997691815da50376e14c3cce217d76d (diff) |
mb/google/poppy: Add support for variant SKU romstage GPIO configs
Add functionality that allows a variant SKU to have a specific set of
GPIO configs in romstage (modeled after the existing one in
ramstage)
BUG=b:245954151
TEST=builds
Change-Id: I593a23951306908fadc00e6bc8d9d310f09c5e4b
Signed-off-by: Tarun Tuli <taruntuli@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73211
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Shelley Chen <shchen@google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Diffstat (limited to 'src/mainboard')
-rw-r--r-- | src/mainboard/google/poppy/romstage.c | 2 | ||||
-rw-r--r-- | src/mainboard/google/poppy/variants/baseboard/gpio.c | 7 | ||||
-rw-r--r-- | src/mainboard/google/poppy/variants/baseboard/include/baseboard/variants.h | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/src/mainboard/google/poppy/romstage.c b/src/mainboard/google/poppy/romstage.c index 7fd4409401..f73ca5f93f 100644 --- a/src/mainboard/google/poppy/romstage.c +++ b/src/mainboard/google/poppy/romstage.c @@ -140,6 +140,8 @@ void mainboard_memory_init_params(FSPM_UPD *mupd) pads = variant_romstage_gpio_table(&num); gpio_configure_pads(pads, num); + pads = variant_romstage_sku_gpio_table(&num); + gpio_configure_pads(pads, num); memset(&p, 0, sizeof(p)); variant_memory_params(&p); diff --git a/src/mainboard/google/poppy/variants/baseboard/gpio.c b/src/mainboard/google/poppy/variants/baseboard/gpio.c index 9048e29688..ee2b1dc435 100644 --- a/src/mainboard/google/poppy/variants/baseboard/gpio.c +++ b/src/mainboard/google/poppy/variants/baseboard/gpio.c @@ -383,6 +383,13 @@ const struct pad_config * __weak return NULL; } +const struct pad_config * __weak + variant_romstage_sku_gpio_table(size_t *num) +{ + *num = 0; + return NULL; +} + static const struct cros_gpio cros_gpios[] = { CROS_GPIO_REC_AL(CROS_GPIO_VIRTUAL, CROS_GPIO_DEVICE_NAME), CROS_GPIO_WP_AH(GPIO_PCH_WP, CROS_GPIO_DEVICE_NAME), diff --git a/src/mainboard/google/poppy/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/poppy/variants/baseboard/include/baseboard/variants.h index 9e4bfc5ff3..603a2ba8e4 100644 --- a/src/mainboard/google/poppy/variants/baseboard/include/baseboard/variants.h +++ b/src/mainboard/google/poppy/variants/baseboard/include/baseboard/variants.h @@ -21,6 +21,7 @@ const struct pad_config *variant_romstage_gpio_table(size_t *num); /* Config gpio by different sku id */ const struct pad_config *variant_sku_gpio_table(size_t *num); +const struct pad_config *variant_romstage_sku_gpio_table(size_t *num); enum memory_type { MEMORY_LPDDR3, |