summaryrefslogtreecommitdiff
path: root/src/mainboard/google
diff options
context:
space:
mode:
authorTarun Tuli <taruntuli@google.com>2022-12-03 17:18:40 +0000
committerMartin L Roth <gaumless@gmail.com>2022-12-14 03:31:47 +0000
commit0f0a43c9b13c86a578482e57925ee10b6ecce639 (patch)
treea89e1c9c223f486b48e8d09a642d99b1c44536a1 /src/mainboard/google
parentfa0709663b727dc639d772df0b668bb4d81cd926 (diff)
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 <taruntuli@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/70319 Reviewed-by: Subrata Banik <subratabanik@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google')
-rw-r--r--src/mainboard/google/poppy/mainboard.c11
-rw-r--r--src/mainboard/google/poppy/variants/baseboard/include/baseboard/variants.h1
2 files changed, 12 insertions, 0 deletions
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);