From 216d69d459ba685c2aeb42b00c1cef7be2482864 Mon Sep 17 00:00:00 2001 From: Chris Wang Date: Tue, 2 Mar 2021 22:33:00 +0800 Subject: mb/google/zork: add UPDM updating function before runing FSP-M Add the UPD updating hook in early stage for customization. BUG=b:117719313 BRANCH=zork TEST=build,check the hook function been executed. Signed-off-by: Chris Wang Change-Id: I4954a438a51b29b086015624127e651fd06f971b Reviewed-on: https://review.coreboot.org/c/coreboot/+/51181 Reviewed-by: EricR Lai Reviewed-by: Kangheui Won Tested-by: build bot (Jenkins) --- src/soc/amd/picasso/include/soc/romstage.h | 10 ++++++++++ src/soc/amd/picasso/romstage.c | 4 ++++ 2 files changed, 14 insertions(+) create mode 100644 src/soc/amd/picasso/include/soc/romstage.h (limited to 'src/soc/amd') diff --git a/src/soc/amd/picasso/include/soc/romstage.h b/src/soc/amd/picasso/include/soc/romstage.h new file mode 100644 index 0000000000..0af374f437 --- /dev/null +++ b/src/soc/amd/picasso/include/soc/romstage.h @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef _SOC_ROMSTAGE_H_ +#define _SOC_ROMSTAGE_H_ + +#include + +void mainboard_updm_update(FSP_M_CONFIG *mcfg); + +#endif /* _SOC_ROMSTAGE_H_ */ diff --git a/src/soc/amd/picasso/romstage.c b/src/soc/amd/picasso/romstage.c index ecee4d3fe9..daf2280346 100644 --- a/src/soc/amd/picasso/romstage.c +++ b/src/soc/amd/picasso/romstage.c @@ -16,10 +16,12 @@ #include #include #include +#include #include #include "chip.h" #include +void __weak mainboard_updm_update(FSP_M_CONFIG *mupd) {} static struct chipset_power_state chipset_state; static void fill_chipset_state(void) @@ -139,6 +141,8 @@ void platform_fsp_memory_init_params_cb(FSPM_UPD *mupd, uint32_t version) mcfg->telemetry_vddcr_soc_offset = config->telemetry_vddcr_soc_offset; mcfg->hd_audio_enable = devtree_hda_dev_enabled(); mcfg->sata_enable = devtree_sata_dev_enabled(); + + mainboard_updm_update(mcfg); } asmlinkage void car_stage_entry(void) -- cgit v1.2.3