Patrick Georgi submitted this change.

View Change

Approvals: build bot (Jenkins): Verified Furquan Shaikh: Looks good to me, approved Marco Chen: Looks good to me, approved Peichao Wang: Looks good to me, approved
mb/google/dedede: Add support for variant specific SMI sleep flow

This support is required to power off certain components that exist only
in certain variants.

BUG=None
TEST=Build and boot Boten to OS.

Change-Id: Ib43ada784666919a4d26246a683dad7f3546fabb
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44587
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Peichao Wang <pwang12@lenovo.corp-partner.google.com>
Reviewed-by: Marco Chen <marcochen@google.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
---
M src/mainboard/google/dedede/smihandler.c
M src/mainboard/google/dedede/variants/baseboard/include/baseboard/variants.h
2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/mainboard/google/dedede/smihandler.c b/src/mainboard/google/dedede/smihandler.c
index 20f0207..c50578d 100644
--- a/src/mainboard/google/dedede/smihandler.c
+++ b/src/mainboard/google/dedede/smihandler.c
@@ -21,6 +21,8 @@
pads = variant_sleep_gpio_table(&num);
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);
}
@@ -41,3 +43,7 @@
{
chromeec_smi_process_events();
}
+
+void __weak variant_smi_sleep(u8 slp_typ)
+{
+}
diff --git a/src/mainboard/google/dedede/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/dedede/variants/baseboard/include/baseboard/variants.h
index bb41e45..e7bfd86 100644
--- a/src/mainboard/google/dedede/variants/baseboard/include/baseboard/variants.h
+++ b/src/mainboard/google/dedede/variants/baseboard/include/baseboard/variants.h
@@ -36,4 +36,7 @@
*/
bool variant_mem_is_half_populated(void);

+/* Allow each variants to customize SMI sleep flow. */
+void variant_smi_sleep(u8 slp_typ);
+
#endif /*__BASEBOARD_VARIANTS_H__ */

To view, visit change 44587. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ib43ada784666919a4d26246a683dad7f3546fabb
Gerrit-Change-Number: 44587
Gerrit-PatchSet: 8
Gerrit-Owner: Karthik Ramasubramanian <kramasub@google.com>
Gerrit-Reviewer: Furquan Shaikh <furquan@google.com>
Gerrit-Reviewer: Henry Sun <henrysun@google.com>
Gerrit-Reviewer: Marco Chen <marcochen@google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com>
Gerrit-Reviewer: Peichao Wang <pwang12@lenovo.corp-partner.google.com>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak@google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Rasheed Hsueh <rasheed.hsueh@lcfc.corp-partner.google.com>
Gerrit-CC: Tim Wawrzynczak <twawrzynczak@chromium.org>
Gerrit-MessageType: merged