Hello Marco Chen,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/34340
to review the following change.
Change subject: mb/google/octopus: add variant_smi_sleep ......................................................................
mb/google/octopus: add variant_smi_sleep
Allow variants to customize their own smi sleep flow.
BUG=b:137033609 BRANCH=octopus TEST=built
Change-Id: I75db544d333a640848da9072878687c802c1c1a4 Signed-off-by: Marco Chen marcochen@google.com --- M src/mainboard/google/octopus/smihandler.c M src/mainboard/google/octopus/variants/baseboard/include/baseboard/variants.h 2 files changed, 10 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/40/34340/1
diff --git a/src/mainboard/google/octopus/smihandler.c b/src/mainboard/google/octopus/smihandler.c index 27928ee..855c982 100644 --- a/src/mainboard/google/octopus/smihandler.c +++ b/src/mainboard/google/octopus/smihandler.c @@ -39,6 +39,8 @@ pads = variant_sleep_gpio_table(&num, slp_typ); gpio_configure_pads(pads, num);
+ variant_smi_sleep(slp_typ); + chromeec_smi_sleep(slp_typ, MAINBOARD_EC_S3_WAKE_EVENTS, MAINBOARD_EC_S5_WAKE_EVENTS); } @@ -60,3 +62,8 @@ google_chromeec_log_events(MAINBOARD_EC_LOG_EVENTS | MAINBOARD_EC_S0IX_WAKE_EVENTS); } + +void __weak variant_smi_sleep(u8 slp_typ) +{ + /* Leave for the variant to implement if necessary. */ +} diff --git a/src/mainboard/google/octopus/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/octopus/variants/baseboard/include/baseboard/variants.h index 33a8f52..140beb4 100644 --- a/src/mainboard/google/octopus/variants/baseboard/include/baseboard/variants.h +++ b/src/mainboard/google/octopus/variants/baseboard/include/baseboard/variants.h @@ -51,4 +51,7 @@ /* Get no touchscreen SKU ID. */ bool no_touchscreen_sku(uint32_t sku_id);
+/* allow each variants to customize smi sleep flow. */ +void variant_smi_sleep(u8 slp_typ); + #endif /* BASEBOARD_VARIANTS_H */