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>
This commit is contained in:
Philipp Deppenwiese 2017-10-24 15:08:49 +02:00 committed by Martin Roth
parent 6b06abb461
commit 86fd88407b
1 changed files with 10 additions and 0 deletions

View File

@ -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);