From 3865a33231064c4ea9e6950776c60dc37b4abf78 Mon Sep 17 00:00:00 2001 From: Nick Vaccaro Date: Tue, 16 Feb 2021 18:58:43 -0800 Subject: [PATCH] mb/google/volteer: add variant_ramstage_init() Add a weak variant routine to allow variants to perform any needed initialization in ramstage. BUG=b:178094376 TEST=none Change-Id: I65dc1cdf15b68d9f2239e02fcb4b2c902d749378 Signed-off-by: Nick Vaccaro Reviewed-on: https://review.coreboot.org/c/coreboot/+/50827 Reviewed-by: Tim Wawrzynczak Tested-by: build bot (Jenkins) --- src/mainboard/google/volteer/mainboard.c | 7 +++++++ .../variants/baseboard/include/baseboard/variants.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/src/mainboard/google/volteer/mainboard.c b/src/mainboard/google/volteer/mainboard.c index 4d65245066..e8b3466e79 100644 --- a/src/mainboard/google/volteer/mainboard.c +++ b/src/mainboard/google/volteer/mainboard.c @@ -78,6 +78,11 @@ void __weak variant_devtree_update(void) { } +void __weak variant_ramstage_init(void) +{ + /* Default weak implementation */ +} + static void add_fw_config_oem_string(const struct fw_config *config, void *arg) { struct smbios_type11 *t; @@ -99,6 +104,8 @@ static void mainboard_enable(struct device *dev) dev->ops->init = mainboard_init; dev->ops->acpi_inject_dsdt = chromeos_dsdt_generator; dev->ops->get_smbios_strings = mainboard_smbios_strings; + + variant_ramstage_init(); } void mainboard_update_soc_chip_config(struct soc_intel_tigerlake_config *cfg) diff --git a/src/mainboard/google/volteer/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/volteer/variants/baseboard/include/baseboard/variants.h index 2431c59cdc..3d12c85561 100644 --- a/src/mainboard/google/volteer/variants/baseboard/include/baseboard/variants.h +++ b/src/mainboard/google/volteer/variants/baseboard/include/baseboard/variants.h @@ -24,4 +24,7 @@ int variant_memory_sku(void); /* Modify devictree settings during ramstage. */ void variant_devtree_update(void); +/* Perform variant specific initialization early on in ramstage */ +void variant_ramstage_init(void); + #endif /* __BASEBOARD_VARIANTS_H__ */