summaryrefslogtreecommitdiff
path: root/src/soc/intel/common
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2019-11-06 11:04:27 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2019-11-09 10:49:47 +0000
commit9dd1a12f9c3199fe9f678a4997bb163a1eb1bb96 (patch)
tree13440c2c992bf76005b3165671328d6ed154e5e9 /src/soc/intel/common
parent7e4bfe4b91cc8dbc18a4b940c26f372e471d49db (diff)
downloadcoreboot-9dd1a12f9c3199fe9f678a4997bb163a1eb1bb96.tar.xz
ELOG: Introduce elog_gsmi variants
This avoids a lot of if (CONFIG(ELOG_GSMI)) boilerplate. Change-Id: I87d25c820daedeb33b3b474a6632a89ea80b0867 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/36647 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/common')
-rw-r--r--src/soc/intel/common/block/smm/smihandler.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/soc/intel/common/block/smm/smihandler.c b/src/soc/intel/common/block/smm/smihandler.c
index 9e98aae564..0581d23021 100644
--- a/src/soc/intel/common/block/smm/smihandler.c
+++ b/src/soc/intel/common/block/smm/smihandler.c
@@ -195,8 +195,8 @@ void smihandler_southbridge_sleep(
mainboard_smi_sleep(slp_typ);
/* Log S3, S4, and S5 entry */
- if (slp_typ >= ACPI_S3 && CONFIG(ELOG_GSMI))
- elog_add_event_byte(ELOG_TYPE_ACPI_ENTER, slp_typ);
+ if (slp_typ >= ACPI_S3)
+ elog_gsmi_add_event_byte(ELOG_TYPE_ACPI_ENTER, slp_typ);
/* Clear pending GPE events */
pmc_clear_all_gpe_status();
@@ -413,8 +413,7 @@ void smihandler_southbridge_pm1(
*/
if ((pm1_sts & PWRBTN_STS) && (pm1_en & PWRBTN_EN)) {
/* power button pressed */
- if (CONFIG(ELOG_GSMI))
- elog_add_event(ELOG_TYPE_POWER_BUTTON);
+ elog_gsmi_add_event(ELOG_TYPE_POWER_BUTTON);
pmc_disable_pm1_control(-1UL);
pmc_enable_pm1_control(SLP_EN | (SLP_TYP_S5 << SLP_TYP_SHIFT));
}