summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/sparc/leon3/include/leon.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-03-06 13:17:04 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-03-10 08:03:46 +0100
commit6b115b3008a15bc9b7ad1f194830c7ea399b51fe (patch)
tree48edf2902f11d2998f6634cc930c28c5dbd29f37 /c/src/lib/libbsp/sparc/leon3/include/leon.h
parentbsps/sparc: Add missing IRQMP registers (diff)
downloadrtems-6b115b3008a15bc9b7ad1f194830c7ea399b51fe.tar.bz2
bsp/leon3: Use interrupt timestamping counter
Use the interrupt controller timestamping counter for the CPU counter if available since it runs with a high frequency.
Diffstat (limited to 'c/src/lib/libbsp/sparc/leon3/include/leon.h')
-rw-r--r--c/src/lib/libbsp/sparc/leon3/include/leon.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/sparc/leon3/include/leon.h b/c/src/lib/libbsp/sparc/leon3/include/leon.h
index 476ed5c848..00f158f0c3 100644
--- a/c/src/lib/libbsp/sparc/leon3/include/leon.h
+++ b/c/src/lib/libbsp/sparc/leon3/include/leon.h
@@ -399,6 +399,13 @@ static inline uint32_t leon3_get_data_cache_config_register(void)
return leon3_get_system_register(0xc);
}
+static inline bool leon3_irqmp_has_timestamp(
+ volatile struct irqmp_timestamp_regs *irqmp_ts
+)
+{
+ return (irqmp_ts->control >> 27) > 0;
+}
+
#endif /* !ASM */
#ifdef __cplusplus