2008-08-31 Joel Sherrill <joel.sherrill@oarcorp.com>

* mcf5206/timer/timer.c, mcf5206/timer/timerisr.S,
	mcf5272/timer/timer.c, mcf5272/timer/timerisr.S: Rename timer driver
	methods to follow RTEMS programming conventions.
This commit is contained in:
Joel Sherrill
2008-08-31 16:59:23 +00:00
parent 8c84731227
commit a5cd22710d
5 changed files with 34 additions and 28 deletions

View File

@@ -1,3 +1,9 @@
2008-08-31 Joel Sherrill <joel.sherrill@oarcorp.com>
* mcf5206/timer/timer.c, mcf5206/timer/timerisr.S,
mcf5272/timer/timer.c, mcf5272/timer/timerisr.S: Rename timer driver
methods to follow RTEMS programming conventions.
2008-08-19 Joel Sherrill <joel.sherrill@OARcorp.com> 2008-08-19 Joel Sherrill <joel.sherrill@OARcorp.com>
* m68040/fpsp/rtems_fpsp.c: Move extern outside of braces. * m68040/fpsp/rtems_fpsp.c: Move extern outside of braces.

View File

@@ -30,13 +30,13 @@
uint32_t Timer_interrupts; uint32_t Timer_interrupts;
rtems_boolean Timer_driver_Find_average_overhead; rtems_boolean benchmark_timer_find_average_overhead;
/* External assembler interrupt handler routine */ /* External assembler interrupt handler routine */
extern rtems_isr timerisr(rtems_vector_number vector); extern rtems_isr timerisr(rtems_vector_number vector);
/* Timer_initialize -- /* benchmark_timer_initialize --
* Initialize timer 2 for accurate time measurement. * Initialize timer 2 for accurate time measurement.
* *
* PARAMETERS: * PARAMETERS:
@@ -46,7 +46,7 @@ extern rtems_isr timerisr(rtems_vector_number vector);
* none * none
*/ */
void void
Timer_initialize(void) benchmark_timer_initialize(void)
{ {
/* Catch timer2 interrupts */ /* Catch timer2 interrupts */
set_vector(timerisr, BSP_INTVEC_TIMER2, 0); set_vector(timerisr, BSP_INTVEC_TIMER2, 0);
@@ -77,7 +77,7 @@ Timer_initialize(void)
} }
/* /*
* The following controls the behavior of Read_timer(). * The following controls the behavior of benchmark_timer_read().
* *
* FIND_AVG_OVERHEAD * instructs the routine to return the "raw" count. * FIND_AVG_OVERHEAD * instructs the routine to return the "raw" count.
* *
@@ -93,7 +93,7 @@ Timer_initialize(void)
/* This value is in microseconds. */ /* This value is in microseconds. */
#define LEAST_VALID 1 /* Don't trust a clicks value lower than this */ #define LEAST_VALID 1 /* Don't trust a clicks value lower than this */
/* Read_timer -- /* benchmark_timer_read --
* Read timer value in microsecond units since timer start. * Read timer value in microsecond units since timer start.
* *
* PARAMETERS: * PARAMETERS:
@@ -103,7 +103,7 @@ Timer_initialize(void)
* number of microseconds since timer has been started * number of microseconds since timer has been started
*/ */
int int
Read_timer( void ) benchmark_timer_read( void )
{ {
uint16_t clicks; uint16_t clicks;
uint32_t total; uint32_t total;
@@ -126,7 +126,7 @@ Read_timer( void )
total = (Timer_interrupts * TRR2_VAL) + clicks; total = (Timer_interrupts * TRR2_VAL) + clicks;
if ( Timer_driver_Find_average_overhead == 1 ) if ( benchmark_timer_find_average_overhead == 1 )
return total; /* in XXX microsecond units */ return total; /* in XXX microsecond units */
if ( total < LEAST_VALID ) if ( total < LEAST_VALID )
@@ -139,7 +139,7 @@ Read_timer( void )
} }
/* Empty_function -- /* benchmark_timer_empty_function --
* Empty function call used in loops to measure basic cost of looping * Empty function call used in loops to measure basic cost of looping
* in Timing Test Suite. * in Timing Test Suite.
* *
@@ -150,14 +150,14 @@ Read_timer( void )
* RTEMS_SUCCESSFUL * RTEMS_SUCCESSFUL
*/ */
rtems_status_code rtems_status_code
Empty_function(void) benchmark_timer_empty_function(void)
{ {
return RTEMS_SUCCESSFUL; return RTEMS_SUCCESSFUL;
} }
/* Set_find_average_overhead -- /* benchmark_timer_disable_subtracting_average_overhead --
* This routine is invoked by the "Check Timer" (tmck) test in the * This routine is invoked by the "Check Timer" (tmck) test in the
* RTEMS Timing Test Suite. It makes the Read_timer routine not * RTEMS Timing Test Suite. It makes the benchmark_timer_read routine not
* subtract the overhead required to initialize and read the benchmark * subtract the overhead required to initialize and read the benchmark
* timer. * timer.
* *
@@ -168,7 +168,7 @@ Empty_function(void)
* none * none
*/ */
void void
Set_find_average_overhead(rtems_boolean find_flag) benchmark_timer_disable_subtracting_average_overhead(rtems_boolean find_flag)
{ {
Timer_driver_Find_average_overhead = find_flag; benchmark_timer_find_average_overhead = find_flag;
} }

View File

@@ -4,7 +4,7 @@
* All code in this routine is pure overhead which can perturb the * All code in this routine is pure overhead which can perturb the
* accuracy of RTEMS' timing test suite. * accuracy of RTEMS' timing test suite.
* *
* See also: Read_timer() * See also: benchmark_timer_read()
* *
* To reduce overhead this is best to be the "rawest" hardware interupt * To reduce overhead this is best to be the "rawest" hardware interupt
* handler you can write. This should be the only interrupt which can * handler you can write. This should be the only interrupt which can

View File

@@ -30,13 +30,13 @@
uint32_t Timer_interrupts; uint32_t Timer_interrupts;
rtems_boolean Timer_driver_Find_average_overhead; rtems_boolean benchmark_timer_find_average_overhead;
/* External assembler interrupt handler routine */ /* External assembler interrupt handler routine */
extern rtems_isr timerisr(rtems_vector_number vector); extern rtems_isr timerisr(rtems_vector_number vector);
/* Timer_initialize -- /* benchmark_timer_initialize --
* Initialize timer 2 for accurate time measurement. * Initialize timer 2 for accurate time measurement.
* *
* PARAMETERS: * PARAMETERS:
@@ -46,7 +46,7 @@ extern rtems_isr timerisr(rtems_vector_number vector);
* none * none
*/ */
void void
Timer_initialize(void) benchmark_timer_initialize(void)
{ {
uint32_t icr; uint32_t icr;
/* Catch timer2 interrupts */ /* Catch timer2 interrupts */
@@ -80,7 +80,7 @@ Timer_initialize(void)
} }
/* /*
* The following controls the behavior of Read_timer(). * The following controls the behavior of benchmark_timer_read().
* *
* FIND_AVG_OVERHEAD * instructs the routine to return the "raw" count. * FIND_AVG_OVERHEAD * instructs the routine to return the "raw" count.
* *
@@ -96,7 +96,7 @@ Timer_initialize(void)
/* This value is in microseconds. */ /* This value is in microseconds. */
#define LEAST_VALID 1 /* Don't trust a clicks value lower than this */ #define LEAST_VALID 1 /* Don't trust a clicks value lower than this */
/* Read_timer -- /* benchmark_timer_read --
* Read timer value in microsecond units since timer start. * Read timer value in microsecond units since timer start.
* *
* PARAMETERS: * PARAMETERS:
@@ -106,7 +106,7 @@ Timer_initialize(void)
* number of microseconds since timer has been started * number of microseconds since timer has been started
*/ */
int int
Read_timer( void ) benchmark_timer_read( void )
{ {
uint16_t clicks; uint16_t clicks;
uint32_t total; uint32_t total;
@@ -128,7 +128,7 @@ Read_timer( void )
total = (Timer_interrupts * TRR2_VAL) + clicks; total = (Timer_interrupts * TRR2_VAL) + clicks;
if ( Timer_driver_Find_average_overhead == 1 ) if ( benchmark_timer_find_average_overhead == 1 )
return total; /* in XXX microsecond units */ return total; /* in XXX microsecond units */
if ( total < LEAST_VALID ) if ( total < LEAST_VALID )
@@ -141,7 +141,7 @@ Read_timer( void )
} }
/* Empty_function -- /* benchmark_timer_empty_function --
* Empty function call used in loops to measure basic cost of looping * Empty function call used in loops to measure basic cost of looping
* in Timing Test Suite. * in Timing Test Suite.
* *
@@ -152,14 +152,14 @@ Read_timer( void )
* RTEMS_SUCCESSFUL * RTEMS_SUCCESSFUL
*/ */
rtems_status_code rtems_status_code
Empty_function(void) benchmark_timer_empty_function(void)
{ {
return RTEMS_SUCCESSFUL; return RTEMS_SUCCESSFUL;
} }
/* Set_find_average_overhead -- /* benchmark_timer_disable_subtracting_average_overhead --
* This routine is invoked by the "Check Timer" (tmck) test in the * This routine is invoked by the "Check Timer" (tmck) test in the
* RTEMS Timing Test Suite. It makes the Read_timer routine not * RTEMS Timing Test Suite. It makes the benchmark_timer_read routine not
* subtract the overhead required to initialize and read the benchmark * subtract the overhead required to initialize and read the benchmark
* timer. * timer.
* *
@@ -170,7 +170,7 @@ Empty_function(void)
* none * none
*/ */
void void
Set_find_average_overhead(rtems_boolean find_flag) benchmark_timer_disable_subtracting_average_overhead(rtems_boolean find_flag)
{ {
Timer_driver_Find_average_overhead = find_flag; benchmark_timer_find_average_overhead = find_flag;
} }

View File

@@ -4,7 +4,7 @@
* All code in this routine is pure overhead which can perturb the * All code in this routine is pure overhead which can perturb the
* accuracy of RTEMS' timing test suite. * accuracy of RTEMS' timing test suite.
* *
* See also: Read_timer() * See also: benchmark_timer_read()
* *
* To reduce overhead this is best to be the "rawest" hardware interupt * To reduce overhead this is best to be the "rawest" hardware interupt
* handler you can write. This should be the only interrupt which can * handler you can write. This should be the only interrupt which can