diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2023-09-14 16:08:53 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2023-10-20 11:16:54 +0200 |
commit | b6dc4b47077803cde93648016d15ce3992573d03 (patch) | |
tree | 425c75b086ca6c211490c7a73b0c96746dba91d5 /cpukit/score/cpu/sparc/include/rtems/score/cpu.h | |
parent | bsps/leon3: Optional IRQ(A)MP timestamp support (diff) | |
download | rtems-b6dc4b47077803cde93648016d15ce3992573d03.tar.bz2 |
sparc: Move CPU counter implementation
Enable a BSP-specific CPU counter implementation.
Update #4954.
Diffstat (limited to '')
-rw-r--r-- | cpukit/score/cpu/sparc/include/rtems/score/cpu.h | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/cpukit/score/cpu/sparc/include/rtems/score/cpu.h b/cpukit/score/cpu/sparc/include/rtems/score/cpu.h index 7a3588f812..a21cef371f 100644 --- a/cpukit/score/cpu/sparc/include/rtems/score/cpu.h +++ b/cpukit/score/cpu/sparc/include/rtems/score/cpu.h @@ -1151,31 +1151,7 @@ typedef uint32_t CPU_Counter_ticks; uint32_t _CPU_Counter_frequency( void ); -typedef CPU_Counter_ticks ( *SPARC_Counter_read )( void ); - -/* - * The SPARC processors supported by RTEMS have no built-in CPU counter - * support. We have to use some hardware counter module for this purpose, for - * example the GPTIMER instance used by the clock driver. The BSP must provide - * an implementation of the CPU counter read function. This allows the use of - * dynamic hardware enumeration. - */ -typedef struct { - SPARC_Counter_read read_isr_disabled; - SPARC_Counter_read read; - volatile const CPU_Counter_ticks *counter_register; - volatile const uint32_t *pending_register; - uint32_t pending_mask; - CPU_Counter_ticks accumulated; - CPU_Counter_ticks interval; -} SPARC_Counter; - -extern const SPARC_Counter _SPARC_Counter; - -static inline CPU_Counter_ticks _CPU_Counter_read( void ) -{ - return ( *_SPARC_Counter.read )(); -} +CPU_Counter_ticks _CPU_Counter_read( void ); /** Type that can store a 32-bit integer or a pointer. */ typedef uintptr_t CPU_Uint32ptr; |