diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-06-22 13:45:02 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-06-22 14:00:27 +0200 |
commit | 655ce0fb00c75c523dd81466a2dcf611171e4650 (patch) | |
tree | 91713d5a3efc4b935efb16101e449fb298caa238 /c | |
parent | sptests/sp20: Use printer task (diff) | |
download | rtems-655ce0fb00c75c523dd81466a2dcf611171e4650.tar.bz2 |
sparc: Optimize CPU counter support
Diffstat (limited to 'c')
-rw-r--r-- | c/src/lib/libbsp/sparc/erc32/clock/ckinit.c | 7 | ||||
-rw-r--r-- | c/src/lib/libbsp/sparc/leon2/clock/ckinit.c | 7 | ||||
-rw-r--r-- | c/src/lib/libbsp/sparc/leon3/startup/cpucounter.c | 7 |
3 files changed, 6 insertions, 15 deletions
diff --git a/c/src/lib/libbsp/sparc/erc32/clock/ckinit.c b/c/src/lib/libbsp/sparc/erc32/clock/ckinit.c index cb5cee86fc..fd05a2cf59 100644 --- a/c/src/lib/libbsp/sparc/erc32/clock/ckinit.c +++ b/c/src/lib/libbsp/sparc/erc32/clock/ckinit.c @@ -26,6 +26,7 @@ #include <bspopts.h> #include <rtems/counter.h> #include <rtems/timecounter.h> +#include <rtems/score/sparcimpl.h> #if SIMSPARC_FAST_IDLE==1 #define CLOCK_DRIVER_USE_FAST_IDLE 1 @@ -133,8 +134,4 @@ static void erc32_counter_initialize( uint32_t frequency ) #include "../../../shared/clockdrv_shell.h" -SPARC_Counter _SPARC_Counter = { - .counter_read = _SPARC_Counter_read_address, - .counter_difference = _SPARC_Counter_difference_one, - .counter_address = (uint32_t *) &_SPARC_Counter -}; +SPARC_COUNTER_DEFINITION; diff --git a/c/src/lib/libbsp/sparc/leon2/clock/ckinit.c b/c/src/lib/libbsp/sparc/leon2/clock/ckinit.c index f21bd18720..ced5d3fa06 100644 --- a/c/src/lib/libbsp/sparc/leon2/clock/ckinit.c +++ b/c/src/lib/libbsp/sparc/leon2/clock/ckinit.c @@ -25,6 +25,7 @@ #include <bsp.h> #include <bspopts.h> #include <rtems/timecounter.h> +#include <rtems/score/sparcimpl.h> #if SIMSPARC_FAST_IDLE==1 #define CLOCK_DRIVER_USE_FAST_IDLE 1 @@ -106,8 +107,4 @@ extern int CLOCK_SPEED; #include "../../../shared/clockdrv_shell.h" -SPARC_Counter _SPARC_Counter = { - .counter_read = _SPARC_Counter_read_address, - .counter_difference = _SPARC_Counter_difference_one, - .counter_address = (uint32_t *) &_SPARC_Counter -}; +SPARC_COUNTER_DEFINITION; diff --git a/c/src/lib/libbsp/sparc/leon3/startup/cpucounter.c b/c/src/lib/libbsp/sparc/leon3/startup/cpucounter.c index 53d921a66a..7aaf98a2fc 100644 --- a/c/src/lib/libbsp/sparc/leon3/startup/cpucounter.c +++ b/c/src/lib/libbsp/sparc/leon3/startup/cpucounter.c @@ -16,6 +16,7 @@ #include <rtems/counter.h> #include <rtems/sysinit.h> +#include <rtems/score/sparcimpl.h> static void leon3_counter_initialize(void) { @@ -73,8 +74,4 @@ RTEMS_SYSINIT_ITEM( RTEMS_SYSINIT_ORDER_THIRD ); -SPARC_Counter _SPARC_Counter = { - .counter_read = _SPARC_Counter_read_address, - .counter_difference = _SPARC_Counter_difference_one, - .counter_address = (uint32_t *) &_SPARC_Counter -}; +SPARC_COUNTER_DEFINITION; |