From 86fd88407b6842246b542dfeea80c4f8ac1d692f Mon Sep 17 00:00:00 2001 From: Philipp Deppenwiese Date: Tue, 24 Oct 2017 15:08:49 +0200 Subject: include: Deactivate timestamp_get if kconfig option not set If CONFIG_COLLECT_TIMESTAMPS not set all timestamp functions should be deactivated by using a pre-processor statement. Change-Id: I8ac63ba7e4485e26dc35fb5a68b1811f6df2f91d Signed-off-by: Philipp Deppenwiese Reviewed-on: https://review.coreboot.org/22147 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/include/timestamp.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/include/timestamp.h b/src/include/timestamp.h index db675b5d2b..c3c1a8182e 100644 --- a/src/include/timestamp.h +++ b/src/include/timestamp.h @@ -57,8 +57,18 @@ uint32_t get_us_since_boot(void); #define get_us_since_boot() 0 #endif +/** + * Workaround for guard combination above. + * Looks like CONFIG_EARLY_CBMEM_INIT selects + * timestamp.c to be build. + */ +#if IS_ENABLED(CONFIG_COLLECT_TIMESTAMPS) /* Implemented by the architecture code */ uint64_t timestamp_get(void); +#else +#define timestamp_get() 0 +#endif + uint64_t get_initial_timestamp(void); /* Returns timestamp tick frequency in MHz. */ int timestamp_tick_freq_mhz(void); -- cgit v1.2.3