summaryrefslogtreecommitdiff
path: root/src/southbridge/intel/lynxpoint
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2019-11-06 12:07:21 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2019-11-09 10:50:12 +0000
commitbe5317f6d0084b1997ff7342fbf5a5af3eecd950 (patch)
treed5efa36c5a5ba1a0141663c6a4b0737fe8879eec /src/southbridge/intel/lynxpoint
parent9dd1a12f9c3199fe9f678a4997bb163a1eb1bb96 (diff)
ELOG: Avoid some preprocessor use
Change-Id: I8daf8868af2e8c2b07b0dda0eeaf863f2f550c59 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/36648 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/southbridge/intel/lynxpoint')
-rw-r--r--src/southbridge/intel/lynxpoint/me_9.x.c4
-rw-r--r--src/southbridge/intel/lynxpoint/smi.c6
2 files changed, 4 insertions, 6 deletions
diff --git a/src/southbridge/intel/lynxpoint/me_9.x.c b/src/southbridge/intel/lynxpoint/me_9.x.c
index 1c45e2d99b..429fa42ab1 100644
--- a/src/southbridge/intel/lynxpoint/me_9.x.c
+++ b/src/southbridge/intel/lynxpoint/me_9.x.c
@@ -718,8 +718,7 @@ static me_bios_path intel_me_path(struct device *dev)
path = ME_ERROR_BIOS_PATH;
}
-#if CONFIG(ELOG)
- if (path != ME_NORMAL_BIOS_PATH) {
+ if (CONFIG(ELOG) && path != ME_NORMAL_BIOS_PATH) {
struct elog_event_data_me_extended data = {
.current_working_state = hfs.working_state,
.operation_state = hfs.operation_state,
@@ -733,7 +732,6 @@ static me_bios_path intel_me_path(struct device *dev)
elog_add_event_raw(ELOG_TYPE_MANAGEMENT_ENGINE_EXT,
&data, sizeof(data));
}
-#endif
return path;
}
diff --git a/src/southbridge/intel/lynxpoint/smi.c b/src/southbridge/intel/lynxpoint/smi.c
index 4fb00b507a..e5c390ef50 100644
--- a/src/southbridge/intel/lynxpoint/smi.c
+++ b/src/southbridge/intel/lynxpoint/smi.c
@@ -29,10 +29,10 @@ void smm_southbridge_clear_state(void)
{
u32 smi_en;
-#if CONFIG(ELOG)
/* Log events from chipset before clearing */
- pch_log_state();
-#endif
+ if (CONFIG(ELOG))
+ pch_log_state();
+
printk(BIOS_DEBUG, "Initializing Southbridge SMI...");
printk(BIOS_SPEW, " ... pmbase = 0x%04x\n", get_pmbase());