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>
This commit is contained in:
Daniel Kurtz 2018-05-24 18:00:45 -06:00 committed by Martin Roth
parent c6c897280e
commit f55c3c2eb9
1 changed files with 7 additions and 0 deletions

View File

@ -250,7 +250,14 @@ static inline int elog_smbios_write_type15(unsigned long *current,
extern u32 gsmi_exec(u8 command, u32 *param); extern u32 gsmi_exec(u8 command, u32 *param);
#if IS_ENABLED(CONFIG_ELOG_BOOT_COUNT)
u32 boot_count_read(void); u32 boot_count_read(void);
#else
static inline u32 boot_count_read(void)
{
return 0;
}
#endif
u32 boot_count_increment(void); u32 boot_count_increment(void);
/* /*