diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-08-31 17:42:00 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-08-31 17:42:00 +0000 |
commit | e511e126268d719ec86f6633b17c47fa3ed27ac5 (patch) | |
tree | df9d7fbd90ba1d32c99c90cf0f4c881ced36f926 /c/src/lib/libbsp/sparc/leon3 | |
parent | 2008-08-31 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-e511e126268d719ec86f6633b17c47fa3ed27ac5.tar.bz2 |
2008-08-31 Joel Sherrill <joel.sherrill@oarcorp.com>
* timer/timer.c: Eliminate empty function from every benchmark timer
driver. Fix spelling.
Diffstat (limited to 'c/src/lib/libbsp/sparc/leon3')
-rw-r--r-- | c/src/lib/libbsp/sparc/leon3/ChangeLog | 5 | ||||
-rw-r--r-- | c/src/lib/libbsp/sparc/leon3/timer/timer.c | 23 |
2 files changed, 14 insertions, 14 deletions
diff --git a/c/src/lib/libbsp/sparc/leon3/ChangeLog b/c/src/lib/libbsp/sparc/leon3/ChangeLog index 815974f830..075d45a741 100644 --- a/c/src/lib/libbsp/sparc/leon3/ChangeLog +++ b/c/src/lib/libbsp/sparc/leon3/ChangeLog @@ -1,5 +1,10 @@ 2008-08-31 Joel Sherrill <joel.sherrill@oarcorp.com> + * timer/timer.c: Eliminate empty function from every benchmark timer + driver. Fix spelling. + +2008-08-31 Joel Sherrill <joel.sherrill@oarcorp.com> + * timer/timer.c: Rename timer driver methods to follow RTEMS programming conventions. diff --git a/c/src/lib/libbsp/sparc/leon3/timer/timer.c b/c/src/lib/libbsp/sparc/leon3/timer/timer.c index c8cf91727b..28802d2c74 100644 --- a/c/src/lib/libbsp/sparc/leon3/timer/timer.c +++ b/c/src/lib/libbsp/sparc/leon3/timer/timer.c @@ -30,24 +30,24 @@ #define LEON3_TIMER_INDEX 0 #endif -rtems_boolean benchmark_timerfind_average_overhead; +rtems_boolean benchmark_timer_find_average_overhead; -rtems_boolean benchmark_timeris_initialized = FALSE; +rtems_boolean benchmark_timer_is_initialized = FALSE; extern volatile LEON3_Timer_Regs_Map *LEON3_Timer_Regs; -void benchmark_timerinitialize(void) +void benchmark_timer_initialize(void) { /* * Timer runs long and accurate enough not to require an interrupt. */ if (LEON3_Timer_Regs) { - if ( benchmark_timeris_initialized == FALSE ) { + if ( benchmark_timer_is_initialized == FALSE ) { /* approximately 1 us per countdown */ LEON3_Timer_Regs->timer[LEON3_TIMER_INDEX].reload = 0xffffff; LEON3_Timer_Regs->timer[LEON3_TIMER_INDEX].value = 0xffffff; } else { - benchmark_timeris_initialized = TRUE; + benchmark_timer_is_initialized = TRUE; } LEON3_Timer_Regs->timer[LEON3_TIMER_INDEX].conf = LEON3_GPTIMER_EN | LEON3_GPTIMER_LD; } @@ -57,7 +57,7 @@ void benchmark_timerinitialize(void) /* to start/stop the timer. */ #define LEAST_VALID 2 /* Don't trust a value lower than this */ -int benchmark_timerread(void) +int benchmark_timer_read(void) { uint32_t total; @@ -66,7 +66,7 @@ int benchmark_timerread(void) total = 0xffffff - total; - if ( benchmark_timerfind_average_overhead == 1 ) + if ( benchmark_timer_find_average_overhead == 1 ) return total; /* in one microsecond units */ if ( total < LEAST_VALID ) @@ -77,14 +77,9 @@ int benchmark_timerread(void) return 0; } -rtems_status_code benchmark_timerempty_function( void ) -{ - return RTEMS_SUCCESSFUL; -} - -void benchmark_timerdisable_subtracting_average_overhead( +void benchmark_timer_disable_subtracting_average_overhead( rtems_boolean find_flag ) { - benchmark_timerfind_average_overhead = find_flag; + benchmark_timer_find_average_overhead = find_flag; } |