aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/fsp_baytrail/smihandler.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel/fsp_baytrail/smihandler.c')
-rw-r--r--src/soc/intel/fsp_baytrail/smihandler.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/soc/intel/fsp_baytrail/smihandler.c b/src/soc/intel/fsp_baytrail/smihandler.c
index 2a7376ad7d..1a8fb4b6e6 100644
--- a/src/soc/intel/fsp_baytrail/smihandler.c
+++ b/src/soc/intel/fsp_baytrail/smihandler.c
@@ -112,11 +112,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.
*/
@@ -208,7 +206,6 @@ static em64t100_smm_state_save_area_t *smi_apmc_find_state_save(uint8_t cmd)
return NULL;
}
-#if CONFIG(ELOG_GSMI)
static void southbridge_smi_gsmi(void)
{
u32 *ret, *param;
@@ -229,7 +226,7 @@ static void southbridge_smi_gsmi(void)
/* drivers/elog/gsmi.c */
*ret = gsmi_exec(sub_command, param);
}
-#endif
+
static void southbridge_smi_apmc(void)
{
uint8_t reg8;
@@ -275,11 +272,10 @@ static void southbridge_smi_apmc(void)
printk(BIOS_DEBUG, "SMI#: Setting GNVS to %p\n", gnvs);
}
break;
-#if CONFIG(ELOG_GSMI)
case APM_CNT_ELOG_GSMI:
- southbridge_smi_gsmi();
+ if (CONFIG(ELOG_GSMI))
+ southbridge_smi_gsmi();
break;
-#endif
}
mainboard_smi_apmc(reg8);
@@ -294,9 +290,7 @@ static void southbridge_smi_pm1(void)
*/
if (pm1_sts & PWRBTN_STS) {
// power button pressed
-#if CONFIG(ELOG_GSMI)
- elog_add_event(ELOG_TYPE_POWER_BUTTON);
-#endif
+ elog_gsmi_add_event(ELOG_TYPE_POWER_BUTTON);
disable_pm1_control(-1UL);
enable_pm1_control(SLP_EN | (SLP_TYP_S5 << SLP_TYP_SHIFT));
}