summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilipp Deppenwiese <zaolin@das-labor.org>2017-10-24 15:08:49 +0200
committerMartin Roth <martinroth@google.com>2017-11-04 00:28:57 +0000
commit86fd88407b6842246b542dfeea80c4f8ac1d692f (patch)
treeca0ad46dcf5505d483c05a95cf0761110ff7b36f /src
parent6b06abb461e23bcebe08f2d19d0ae79adf9f512e (diff)
downloadcoreboot-86fd88407b6842246b542dfeea80c4f8ac1d692f.tar.xz
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')
-rw-r--r--src/include/timestamp.h10
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);