summaryrefslogtreecommitdiff
path: root/src/southbridge/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/southbridge/intel/common
parent7e4bfe4b91cc8dbc18a4b940c26f372e471d49db (diff)
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/southbridge/intel/common')
-rw-r--r--src/southbridge/intel/common/smihandler.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/southbridge/intel/common/smihandler.c b/src/southbridge/intel/common/smihandler.c
index 5582051bc5..7f376fd354 100644
--- a/src/southbridge/intel/common/smihandler.c
+++ b/src/southbridge/intel/common/smihandler.c
@@ -138,11 +138,9 @@ static void southbridge_smi_sleep(void)
/* Do any mainboard sleep handling */
mainboard_smi_sleep(slp_typ);
-#if CONFIG(ELOG_GSMI)
/* Log S3, S4, and S5 entry */
if (slp_typ >= ACPI_S3)
- elog_add_event_byte(ELOG_TYPE_ACPI_ENTER, slp_typ);
-#endif
+ elog_gsmi_add_event_byte(ELOG_TYPE_ACPI_ENTER, slp_typ);
/* Next, do the deed.
*/
@@ -246,7 +244,6 @@ em64t101_smm_state_save_area_t *smi_apmc_find_state_save(u8 cmd)
return NULL;
}
-#if CONFIG(ELOG_GSMI)
static void southbridge_smi_gsmi(void)
{
u32 *ret, *param;
@@ -267,7 +264,6 @@ static void southbridge_smi_gsmi(void)
/* drivers/elog/gsmi.c */
*ret = gsmi_exec(sub_command, param);
}
-#endif
static void southbridge_smi_store(void)
{
@@ -338,11 +334,10 @@ static void southbridge_smi_apmc(void)
southbridge_finalize_all();
mainboard_finalized = 1;
break;
-#if CONFIG(ELOG_GSMI)
case APM_CNT_ELOG_GSMI:
- southbridge_smi_gsmi();
+ if (CONFIG(ELOG_GSMI))
+ southbridge_smi_gsmi();
break;
-#endif
case APM_CNT_SMMSTORE:
if (CONFIG(SMMSTORE))
southbridge_smi_store();
@@ -366,9 +361,7 @@ static void southbridge_smi_pm1(void)
// power button pressed
u32 reg32;
reg32 = (7 << 10) | (1 << 13);
-#if CONFIG(ELOG_GSMI)
- elog_add_event(ELOG_TYPE_POWER_BUTTON);
-#endif
+ elog_gsmi_add_event(ELOG_TYPE_POWER_BUTTON);
write_pmbase32(PM1_CNT, reg32);
}
}