summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/google/skyrim/romstage.c12
-rw-r--r--src/mainboard/google/skyrim/variants/baseboard/gpio.c8
-rw-r--r--src/mainboard/google/skyrim/variants/baseboard/include/baseboard/variants.h5
3 files changed, 17 insertions, 8 deletions
diff --git a/src/mainboard/google/skyrim/romstage.c b/src/mainboard/google/skyrim/romstage.c
index cf93fc5685..ce25ee9182 100644
--- a/src/mainboard/google/skyrim/romstage.c
+++ b/src/mainboard/google/skyrim/romstage.c
@@ -5,11 +5,11 @@
void mb_pre_fspm(FSP_M_CONFIG *mcfg)
{
- size_t base_num_gpios;
- const struct soc_amd_gpio *base_gpios;
+ size_t num_base_gpios, num_override_gpios;
+ const struct soc_amd_gpio *base_gpios, *override_gpios;
- /* Initialize PCIe reset. */
- variant_romstage_gpio_table(&base_gpios, &base_num_gpios);
-
- gpio_configure_pads(base_gpios, base_num_gpios);
+ baseboard_romstage_gpio_table(&base_gpios, &num_base_gpios);
+ variant_romstage_override_gpio_table(&override_gpios, &num_override_gpios);
+ gpio_configure_pads_with_override(base_gpios, num_base_gpios,
+ override_gpios, num_override_gpios);
}
diff --git a/src/mainboard/google/skyrim/variants/baseboard/gpio.c b/src/mainboard/google/skyrim/variants/baseboard/gpio.c
index b234a5dee3..b44114e48c 100644
--- a/src/mainboard/google/skyrim/variants/baseboard/gpio.c
+++ b/src/mainboard/google/skyrim/variants/baseboard/gpio.c
@@ -202,12 +202,18 @@ static const struct soc_amd_gpio romstage_gpio_table[] = {
PAD_GPO(GPIO_6, HIGH),
};
-__weak void variant_romstage_gpio_table(const struct soc_amd_gpio **gpio, size_t *size)
+void baseboard_romstage_gpio_table(const struct soc_amd_gpio **gpio, size_t *size)
{
*size = ARRAY_SIZE(romstage_gpio_table);
*gpio = romstage_gpio_table;
}
+__weak void variant_romstage_override_gpio_table(const struct soc_amd_gpio **gpio, size_t *size)
+{
+ *size = 0;
+ *gpio = NULL;
+}
+
void baseboard_gpio_table(const struct soc_amd_gpio **gpio, size_t *size)
{
*size = ARRAY_SIZE(base_gpio_table);
diff --git a/src/mainboard/google/skyrim/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/skyrim/variants/baseboard/include/baseboard/variants.h
index 73ccc03991..4d71c5cc5c 100644
--- a/src/mainboard/google/skyrim/variants/baseboard/include/baseboard/variants.h
+++ b/src/mainboard/google/skyrim/variants/baseboard/include/baseboard/variants.h
@@ -39,6 +39,9 @@ void variant_espi_gpio_table(const struct soc_amd_gpio **gpio, size_t *size);
void variant_tpm_gpio_table(const struct soc_amd_gpio **gpio, size_t *size);
/* This function provides GPIO settings in romstage. */
-void variant_romstage_gpio_table(const struct soc_amd_gpio **gpio, size_t *size);
+void baseboard_romstage_gpio_table(const struct soc_amd_gpio **gpio, size_t *size);
+
+/* This function allows variant to override any GPIO init in romstage. */
+void variant_romstage_override_gpio_table(const struct soc_amd_gpio **gpio, size_t *size);
#endif /* __BASEBOARD_VARIANTS_H__ */