From 12173feef8a92962daf61e56db89d948d27916ef Mon Sep 17 00:00:00 2001 From: Daniel Kurtz Date: Thu, 24 May 2018 18:22:42 -0600 Subject: 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 Reviewed-on: https://review.coreboot.org/26527 Reviewed-by: Martin Roth Reviewed-by: Aaron Durbin Reviewed-by: Simon Glass Reviewed-by: Paul Menzel Tested-by: build bot (Jenkins) --- src/drivers/elog/elog.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src') 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 */ -- cgit v1.2.3