From 0f0a43c9b13c86a578482e57925ee10b6ecce639 Mon Sep 17 00:00:00 2001 From: Tarun Tuli Date: Sat, 3 Dec 2022 17:18:40 +0000 Subject: mb/google/poppy: Add support for a variant finalize function Add a hook to allow a variant finalize to be called at the end of ramstage. BUG=b:245954151 TEST=Builds successfully Change-Id: I00c091051e3499ca94b286d7fbe0a7a8bd38e635 Signed-off-by: Tarun Tuli Reviewed-on: https://review.coreboot.org/c/coreboot/+/70319 Reviewed-by: Subrata Banik Tested-by: build bot (Jenkins) --- src/mainboard/google/poppy/mainboard.c | 11 +++++++++++ .../poppy/variants/baseboard/include/baseboard/variants.h | 1 + 2 files changed, 12 insertions(+) (limited to 'src/mainboard/google') diff --git a/src/mainboard/google/poppy/mainboard.c b/src/mainboard/google/poppy/mainboard.c index 0e6c7b98c6..30b46fb771 100644 --- a/src/mainboard/google/poppy/mainboard.c +++ b/src/mainboard/google/poppy/mainboard.c @@ -60,7 +60,18 @@ static void mainboard_chip_init(void *chip_info) gpio_configure_pads(pads, num); } +void __weak variant_final(void) +{ + /* nop */ +} + +static void mainboard_final(void *chip_info) +{ + variant_final(); +} + struct chip_operations mainboard_ops = { .init = mainboard_chip_init, .enable_dev = mainboard_enable, + .final = mainboard_final }; 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 9d3e7f087f..9e4bfc5ff3 100644 --- a/src/mainboard/google/poppy/variants/baseboard/include/baseboard/variants.h +++ b/src/mainboard/google/poppy/variants/baseboard/include/baseboard/variants.h @@ -55,6 +55,7 @@ int variant_memory_sku(void); void variant_devtree_update(void); uint32_t variant_board_sku(void); void variant_smi_sleep(u8 slp_typ); +void variant_final(void); struct nhlt; void variant_nhlt_init(struct nhlt *nhlt); -- cgit v1.2.3