summaryrefslogtreecommitdiffstats
path: root/bsps/sparc/leon3/include/bsp
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2023-09-15 11:24:50 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2023-10-20 11:16:54 +0200
commitff533cec9dc4f5c10972f0f6d8a2f90064765462 (patch)
treeaec6cdb74d3feda15f8278a44d917a899f8d686a /bsps/sparc/leon3/include/bsp
parentbsps/leon3: Make GPTIMER fall back mandatory (diff)
downloadrtems-ff533cec9dc4f5c10972f0f6d8a2f90064765462.tar.bz2
bsps/leon3: Simplify clock and CPU counter
Share the timecounter instance between the clock and the CPU counter. This greatly simplifies the clock driver since we have to do the device selection only in one place, the CPU counter support. Update #4954.
Diffstat (limited to 'bsps/sparc/leon3/include/bsp')
-rw-r--r--bsps/sparc/leon3/include/bsp/leon3.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/bsps/sparc/leon3/include/bsp/leon3.h b/bsps/sparc/leon3/include/bsp/leon3.h
index ad33d73631..99e16b90dd 100644
--- a/bsps/sparc/leon3/include/bsp/leon3.h
+++ b/bsps/sparc/leon3/include/bsp/leon3.h
@@ -48,6 +48,8 @@
#include <grlib/ambapp.h>
#endif
+#include <sys/timetc.h>
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -347,6 +349,13 @@ static inline uint32_t leon3_up_counter_frequency( void )
extern apbuart *leon3_debug_uart;
#endif
+/**
+ * @brief Provides the LEON3-specific timecounter.
+ *
+ * It is also used by the CPU counter implementation.
+ */
+extern struct timecounter leon3_timecounter_instance;
+
/** @} */
#ifdef __cplusplus