summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Kurtz <djkurtz@chromium.org>2018-05-24 18:00:45 -0600
committerMartin Roth <martinroth@google.com>2018-05-25 16:40:08 +0000
commitf55c3c2eb934464054e3b41e8dd1e0e23732ee52 (patch)
tree03f8d90314977f27c5d2c399cdfe5bec4f258071 /src
parentc6c897280e4997eeb3be0311d01c5e2f26b816cd (diff)
downloadcoreboot-f55c3c2eb934464054e3b41e8dd1e0e23732ee52.tar.xz
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 <djkurtz@chromium.org> Reviewed-on: https://review.coreboot.org/26526 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')
-rw-r--r--src/include/elog.h7
1 files changed, 7 insertions, 0 deletions
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);
/*