summaryrefslogtreecommitdiff
path: root/src/drivers/elog
diff options
context:
space:
mode:
authorDaniel Kurtz <djkurtz@chromium.org>2018-05-24 18:22:42 -0600
committerMartin Roth <martinroth@google.com>2018-05-25 16:40:19 +0000
commit12173feef8a92962daf61e56db89d948d27916ef (patch)
tree6491d62ea53ba6f087ec6c0a29593555ac691437 /src/drivers/elog
parentf55c3c2eb934464054e3b41e8dd1e0e23732ee52 (diff)
downloadcoreboot-12173feef8a92962daf61e56db89d948d27916ef.tar.xz
elog: Only print TYPE_BOOT on S3-resume if CONFIG_ELOG_BOOT_COUNT
Previously, we were unconditionally adding a TYPE_BOOT message to the ELOG on every boot (even S3 resume) if CONFIG_ELOG_BOOT_COUNT was disabled. Now that boot_count_read() returns 0 for the !CONFIG_ELOG_BOOT_COUNT case, the code becomes a bit simpler. BUG=b:79865267 TEST=firmware_EventLog Change-Id: I803fa4c3e03b6cc94751cf0ce34b78021ae2124e Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Reviewed-on: https://review.coreboot.org/26527 Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/elog')
-rw-r--r--src/drivers/elog/elog.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/drivers/elog/elog.c b/src/drivers/elog/elog.c
index c8f221ac0b..ff4f0364c5 100644
--- a/src/drivers/elog/elog.c
+++ b/src/drivers/elog/elog.c
@@ -786,15 +786,10 @@ int elog_init(void)
#if !defined(__SMM__)
/* Log boot count event except in S3 resume */
-#if IS_ENABLED(CONFIG_ELOG_BOOT_COUNT)
#if IS_ENABLED(CONFIG_HAVE_ACPI_RESUME)
- if (!acpi_is_wakeup_s3())
+ if (!acpi_is_wakeup_s3())
#endif
elog_add_event_dword(ELOG_TYPE_BOOT, boot_count_read());
-#else
- /* If boot count is not implemented, fake it. */
- elog_add_event_dword(ELOG_TYPE_BOOT, 0);
-#endif
#if IS_ENABLED(CONFIG_ARCH_X86)
/* Check and log POST codes from previous boot */