summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/timer.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/common/timer.c b/common/timer.c
index 843588f980..b43ff265ee 100644
--- a/common/timer.c
+++ b/common/timer.c
@@ -17,8 +17,16 @@
#define TIMER_SYSJUMP_TAG 0x4d54 /* "TM" */
-/* High 32-bits of the 64-bit timestamp counter. */
-STATIC_IF_NOT(CONFIG_HWTIMER_64BIT) uint32_t clksrc_high;
+/*
+ * High word of the 64-bit timestamp counter. Not used if
+ * CONFIG_HWTIMER_64BIT is enabled.
+ */
+#ifdef CONFIG_HWTIMER_64BIT
+/* Declaring as extern will cause linker errors if used */
+extern uint32_t clksrc_high;
+#else
+static volatile uint32_t clksrc_high;
+#endif /* CONFIG_HWTIMER_64BIT */
/* Bitmap of currently running timers */
static uint32_t timer_running;