diff options
author | Philipp Deppenwiese <zaolin@das-labor.org> | 2017-10-24 15:08:49 +0200 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2017-11-04 00:28:57 +0000 |
commit | 86fd88407b6842246b542dfeea80c4f8ac1d692f (patch) | |
tree | ca0ad46dcf5505d483c05a95cf0761110ff7b36f /src/include/timestamp.h | |
parent | 6b06abb461e23bcebe08f2d19d0ae79adf9f512e (diff) |
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 <zaolin@das-labor.org>
Reviewed-on: https://review.coreboot.org/22147
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/include/timestamp.h')
-rw-r--r-- | src/include/timestamp.h | 10 |
1 files changed, 10 insertions, 0 deletions
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); |