From f55c3c2eb934464054e3b41e8dd1e0e23732ee52 Mon Sep 17 00:00:00 2001 From: Daniel Kurtz Date: Thu, 24 May 2018 18:00:45 -0600 Subject: elog: Allow calling boot_count_read() without CONFIG_ELOG_BOOT_COUNT Have boot_count_read() just return 0 if CONFIG_ELOG_BOOT_COUNT is not enabled. BUG=b:79865267 TEST=firmware_EventLog Change-Id: I70f16226371324dea37b3f36f85c2037e324ef31 Signed-off-by: Daniel Kurtz Reviewed-on: https://review.coreboot.org/26526 Reviewed-by: Martin Roth Reviewed-by: Aaron Durbin Reviewed-by: Simon Glass Reviewed-by: Paul Menzel Tested-by: build bot (Jenkins) --- src/include/elog.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/include/elog.h') diff --git a/src/include/elog.h b/src/include/elog.h index 0f6a811bbd..0776c36b7d 100644 --- a/src/include/elog.h +++ b/src/include/elog.h @@ -250,7 +250,14 @@ static inline int elog_smbios_write_type15(unsigned long *current, extern u32 gsmi_exec(u8 command, u32 *param); +#if IS_ENABLED(CONFIG_ELOG_BOOT_COUNT) u32 boot_count_read(void); +#else +static inline u32 boot_count_read(void) +{ + return 0; +} +#endif u32 boot_count_increment(void); /* -- cgit v1.2.3