From 9dd1a12f9c3199fe9f678a4997bb163a1eb1bb96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Wed, 6 Nov 2019 11:04:27 +0200 Subject: ELOG: Introduce elog_gsmi variants MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This avoids a lot of if (CONFIG(ELOG_GSMI)) boilerplate. Change-Id: I87d25c820daedeb33b3b474a6632a89ea80b0867 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/36647 Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) --- src/include/elog.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/include') diff --git a/src/include/elog.h b/src/include/elog.h index 1692a809fc..8d1b3ba067 100644 --- a/src/include/elog.h +++ b/src/include/elog.h @@ -243,6 +243,16 @@ static inline int elog_smbios_write_type15(unsigned long *current, static inline int elog_add_extended_event(u8 type, u32 complement) { return 0; } #endif +#if CONFIG(ELOG_GSMI) +#define elog_gsmi_add_event elog_add_event +#define elog_gsmi_add_event_byte elog_add_event_byte +#define elog_gsmi_add_event_word elog_add_event_word +#else +static inline int elog_gsmi_add_event(u8 event_type) { return 0; } +static inline int elog_gsmi_add_event_byte(u8 event_type, u8 data) { return 0; } +static inline int elog_gsmi_add_event_word(u8 event_type, u16 data) { return 0; } +#endif + extern u32 gsmi_exec(u8 command, u32 *param); #if CONFIG(ELOG_BOOT_COUNT) -- cgit v1.2.3