2008-09-30 Joel Sherrill <joel.sherrill@oarcorp.com>

* timer/timer.c: Eliminate uses of old benchmark timer names.
This commit is contained in:
Joel Sherrill
2008-09-30 16:27:16 +00:00
parent 42650f0282
commit 290da88f5a
26 changed files with 74 additions and 139 deletions

View File

@@ -1,3 +1,7 @@
2008-09-30 Joel Sherrill <joel.sherrill@oarcorp.com>
* timer/timer.c: Eliminate uses of old benchmark timer names.
2008-09-30 Ralf Corsépius <ralf.corsepius@rtems.org> 2008-09-30 Ralf Corsépius <ralf.corsepius@rtems.org>
* Makefile.am: Eliminate bsp.am. Build startup files as side-effect * Makefile.am: Eliminate bsp.am. Build startup files as side-effect

View File

@@ -1,18 +1,4 @@
/* Timer_init() /*
*
* This routine initializes the timer on the FORCE CPU-386 board.
*
* Input parameters: NONE
*
* Output parameters: NONE
*
* NOTE: This routine will not work if the optimizer is enabled
* for some compilers. The multiple writes to the Z8036
* may be optimized away.
*
* It is important that the timer start/stop overhead be
* determined when porting or modifying this code.
*
* COPYRIGHT (c) 1989-1999. * COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR). * On-Line Applications Research Corporation (OAR).
* *

View File

@@ -1,3 +1,7 @@
2008-09-30 Joel Sherrill <joel.sherrill@oarcorp.com>
* timer/timer.c: Eliminate uses of old benchmark timer names.
2008-09-30 Ralf Corsépius <ralf.corsepius@rtems.org> 2008-09-30 Ralf Corsépius <ralf.corsepius@rtems.org>
* Makefile.am: Eliminate bsp.am. Build startup files as side-effect * Makefile.am: Eliminate bsp.am. Build startup files as side-effect

View File

@@ -1,18 +1,4 @@
/* Timer_init() /*
*
* This routine initializes the timer on the FORCE CPU-386 board.
*
* Input parameters: NONE
*
* Output parameters: NONE
*
* NOTE: This routine will not work if the optimizer is enabled
* for some compilers. The multiple writes to the Z8036
* may be optimized away.
*
* It is important that the timer start/stop overhead be
* determined when porting or modifying this code.
*
* COPYRIGHT (c) 1989-1999. * COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR). * On-Line Applications Research Corporation (OAR).
* *

View File

@@ -1,3 +1,7 @@
2008-09-30 Joel Sherrill <joel.sherrill@oarcorp.com>
* timer/timer.c: Eliminate uses of old benchmark timer names.
2008-09-30 Ralf Corsépius <ralf.corsepius@rtems.org> 2008-09-30 Ralf Corsépius <ralf.corsepius@rtems.org>
* Makefile.am: Eliminate bsp.am. Build startup files as side-effect * Makefile.am: Eliminate bsp.am. Build startup files as side-effect

View File

@@ -1,14 +1,4 @@
/* Timer_init() /*
*
* This routine initializes TIMER 2 for an MC68302.
*
* Input parameters: NONE
*
* Output parameters: NONE
*
* NOTE: It is important that the timer start/stop overhead be
* determined when porting or modifying this code.
*
* COPYRIGHT (c) 1989-1999. * COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR). * On-Line Applications Research Corporation (OAR).
* *

View File

@@ -1,3 +1,7 @@
2008-09-30 Joel Sherrill <joel.sherrill@oarcorp.com>
* timer/timer.c: Eliminate uses of old benchmark timer names.
2008-09-30 Ralf Corsépius <ralf.corsepius@rtems.org> 2008-09-30 Ralf Corsépius <ralf.corsepius@rtems.org>
* Makefile.am: Eliminate bsp.am. Build startup files as side-effect * Makefile.am: Eliminate bsp.am. Build startup files as side-effect

View File

@@ -1,6 +1,4 @@
/* /*
* Timer_init()
*
* ATTENTION: AS MC68349 has no built-in Timer, the following code doesn't work * ATTENTION: AS MC68349 has no built-in Timer, the following code doesn't work
* in a MC68349. You can't use FIFO full mode for the moment, but * in a MC68349. You can't use FIFO full mode for the moment, but
* it should be easy to fix this by using an external timer * it should be easy to fix this by using an external timer

View File

@@ -1,3 +1,7 @@
2008-09-30 Joel Sherrill <joel.sherrill@oarcorp.com>
* timer/timer.c: Eliminate uses of old benchmark timer names.
2008-09-30 Ralf Corsépius <ralf.corsepius@rtems.org> 2008-09-30 Ralf Corsépius <ralf.corsepius@rtems.org>
* Makefile.am: Eliminate bsp.am. Build startup files as side-effect * Makefile.am: Eliminate bsp.am. Build startup files as side-effect

View File

@@ -1,8 +1,5 @@
/* /*
* Timer_init()
*
* Use TIMER 1 and TIMER 2 for Timing Test Suite * Use TIMER 1 and TIMER 2 for Timing Test Suite
*
* The hardware on the MC68360 makes these routines very simple. * The hardware on the MC68360 makes these routines very simple.
* *
* Based on the `gen68302' board support package, and covered by the * Based on the `gen68302' board support package, and covered by the

View File

@@ -1,3 +1,7 @@
2008-09-30 Joel Sherrill <joel.sherrill@oarcorp.com>
* timer/timer.c: Eliminate uses of old benchmark timer names.
2008-09-30 Ralf Corsépius <ralf.corsepius@rtems.org> 2008-09-30 Ralf Corsépius <ralf.corsepius@rtems.org>
* Makefile.am: Eliminate bsp.am. Build startup files as side-effect * Makefile.am: Eliminate bsp.am. Build startup files as side-effect

View File

@@ -1,18 +1,4 @@
/* Timer_init() /*
*
* This routine initializes the MC68230 timer on the Motorola IDP board.
*
* Input parameters: NONE
*
* Output parameters: NONE
*
* NOTE: This routine will not work if the optimizer is enabled
* for some compilers. The multiple writes to the MC68230
* may be optimized away.
*
* It is important that the timer start/stop overhead be
* determined when porting or modifying this code.
*
* Code Modified for the MC68230 by Doug McBride, Colorado Space Grant College * Code Modified for the MC68230 by Doug McBride, Colorado Space Grant College
* *
* COPYRIGHT (c) 1989-1999. * COPYRIGHT (c) 1989-1999.

View File

@@ -1,3 +1,7 @@
2008-09-30 Joel Sherrill <joel.sherrill@oarcorp.com>
* timer/timer.c: Eliminate uses of old benchmark timer names.
2008-09-30 Ralf Corsépius <ralf.corsepius@rtems.org> 2008-09-30 Ralf Corsépius <ralf.corsepius@rtems.org>
* Makefile.am: Eliminate bsp.am. Build startup files as side-effect * Makefile.am: Eliminate bsp.am. Build startup files as side-effect

View File

@@ -1,14 +1,4 @@
/* Timer_init() /*
*
* This routine is not implemented for this BSP.
*
* Input parameters: NONE
*
* Output parameters: NONE
*
* NOTE: It is important that the timer start/stop overhead be
* determined when porting or modifying this code.
*
* COPYRIGHT (c) 1989-1999. * COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR). * On-Line Applications Research Corporation (OAR).
* *

View File

@@ -1,3 +1,7 @@
2008-09-30 Joel Sherrill <joel.sherrill@oarcorp.com>
* timer/timer.c: Eliminate uses of old benchmark timer names.
2008-09-30 Ralf Corsépius <ralf.corsepius@rtems.org> 2008-09-30 Ralf Corsépius <ralf.corsepius@rtems.org>
* Makefile.am: Eliminate bsp.am. Build startup files as side-effect * Makefile.am: Eliminate bsp.am. Build startup files as side-effect

View File

@@ -1,18 +1,4 @@
/* Timer_init() /*
*
* This routine initializes the Z8036 timer on the MVME136 board.
*
* Input parameters: NONE
*
* Output parameters: NONE
*
* NOTE: This routine will not work if the optimizer is enabled
* for some compilers. The multiple writes to the Z8036
* may be optimized away.
*
* It is important that the timer start/stop overhead be
* determined when porting or modifying this code.
*
* COPYRIGHT (c) 1989-1999. * COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR). * On-Line Applications Research Corporation (OAR).
* *

View File

@@ -1,3 +1,7 @@
2008-09-30 Joel Sherrill <joel.sherrill@oarcorp.com>
* timer/timer.c: Eliminate uses of old benchmark timer names.
2008-09-30 Ralf Corsépius <ralf.corsepius@rtems.org> 2008-09-30 Ralf Corsépius <ralf.corsepius@rtems.org>
* Makefile.am: Eliminate bsp.am. Build startup files as side-effect * Makefile.am: Eliminate bsp.am. Build startup files as side-effect

View File

@@ -1,14 +1,4 @@
/* Timer_init() /*
*
* This routine initializes the PCC timer on the MVME147 board.
*
* Input parameters: NONE
*
* Output parameters: NONE
*
* NOTE: It is important that the timer start/stop overhead be
* determined when porting or modifying this code.
*
* COPYRIGHT (c) 1989-1999. * COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR). * On-Line Applications Research Corporation (OAR).
* *

View File

@@ -1,3 +1,7 @@
2008-09-30 Joel Sherrill <joel.sherrill@oarcorp.com>
* timer/timer.c: Eliminate uses of old benchmark timer names.
2008-09-30 Ralf Corsépius <ralf.corsepius@rtems.org> 2008-09-30 Ralf Corsépius <ralf.corsepius@rtems.org>
* Makefile.am: Eliminate bsp.am. Build startup files as side-effect * Makefile.am: Eliminate bsp.am. Build startup files as side-effect

View File

@@ -1,18 +1,6 @@
/* Timer_init() /*
*
* This routine initializes the Tick Timer 1 on the MVME162 board. * This routine initializes the Tick Timer 1 on the MVME162 board.
* *
* Input parameters: NONE
*
* Output parameters: NONE
*
* NOTE: This routine will not work if the optimizer is enabled
* for some compilers. The multiple writes
* may be optimized away.
*
* It is important that the timer start/stop overhead be
* determined when porting or modifying this code.
*
* COPYRIGHT (c) 1989-1999. * COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR). * On-Line Applications Research Corporation (OAR).
* *

View File

@@ -1,3 +1,7 @@
2008-09-30 Joel Sherrill <joel.sherrill@oarcorp.com>
* timer/timer.c: Eliminate uses of old benchmark timer names.
2008-09-29 Ralf Corsépius <ralf.corsepius@rtems.org> 2008-09-29 Ralf Corsépius <ralf.corsepius@rtems.org>
* Makefile.am: Eliminate *_SOURCES. * Makefile.am: Eliminate *_SOURCES.

View File

@@ -1,14 +1,7 @@
/* Timer_init() /*
* *
* This routine initializes TIMER 2 for an MC68302. * This routine initializes TIMER 2 for an MC68302.
* *
* Input parameters: NONE
*
* Output parameters: NONE
*
* NOTE: It is important that the timer start/stop overhead be
* determined when porting or modifying this code.
*
* COPYRIGHT (c) 1989-1999. * COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR). * On-Line Applications Research Corporation (OAR).
* *

View File

@@ -1,3 +1,7 @@
2008-09-30 Joel Sherrill <joel.sherrill@oarcorp.com>
* timer/timer.c: Eliminate uses of old benchmark timer names.
2008-09-29 Ralf Corsépius <ralf.corsepius@rtems.org> 2008-09-29 Ralf Corsépius <ralf.corsepius@rtems.org>
* Makefile.am: Eliminate bsp.am. Build startup files as side-effect * Makefile.am: Eliminate bsp.am. Build startup files as side-effect

View File

@@ -21,7 +21,7 @@
| this file contains the console driver | | this file contains the console driver |
\*===============================================================*/ \*===============================================================*/
/* /*
* Timer_init() * benchmark_timer_initialize()
* *
* Use TIMER 1 and TIMER 2 for Timing Test Suite * Use TIMER 1 and TIMER 2 for Timing Test Suite
* *
@@ -52,8 +52,10 @@
#include <bsp.h> #include <bsp.h>
#include <mpc8xx.h> #include <mpc8xx.h>
bool benchmark_timer_find_average_overhead;
void void
Timer_initialize (void) benchmark_timer_initialize (void)
{ {
/* /*
* Reset timers 1 and 2 * Reset timers 1 and 2
@@ -84,8 +86,7 @@ Timer_initialize (void)
/* /*
* Return timer value in microsecond units * Return timer value in microsecond units
*/ */
int int benchmark_timer_read(void)
Read_timer (void)
{ {
int retval; int retval;
retval = *(uint32_t*)&m8xx.tcn1; retval = *(uint32_t*)&m8xx.tcn1;
@@ -93,17 +94,9 @@ Read_timer (void)
return retval; return retval;
} }
/* void benchmark_timer_disable_subtracting_average_overhead(
* Empty function call used in loops to measure basic cost of looping bool find_flag
* in Timing Test Suite. )
*/
rtems_status_code
Empty_function (void)
{
return RTEMS_SUCCESSFUL;
}
void
Set_find_average_overhead(bool find_flag)
{ {
benchmark_timer_find_average_overhead = find_flag;
} }

View File

@@ -1,3 +1,7 @@
2008-09-30 Joel Sherrill <joel.sherrill@oarcorp.com>
* timer/timer.c: Eliminate uses of old benchmark timer names.
2008-09-05 Joel Sherrill <joel.sherrill@OARcorp.com> 2008-09-05 Joel Sherrill <joel.sherrill@OARcorp.com>
* clock/ckinit.c: The Shared Memory Driver no longer requires the * clock/ckinit.c: The Shared Memory Driver no longer requires the

View File

@@ -53,11 +53,11 @@
extern uint32_t mips_read_timer( void ); extern uint32_t mips_read_timer( void );
static bool benchmark_timer_find_average_overhead; static bool benchmark_timer_find_average_overhead;
static uint32_t Timer_initial_value = 0; static uint32_t benchmark_timer_initial_value = 0;
void benchmark_timer_initialize( void ) void benchmark_timer_initialize( void )
{ {
Timer_initial_value = mips_read_timer(); benchmark_timer_initial_value = mips_read_timer();
/* /*
* Somehow start the timer * Somehow start the timer
*/ */
@@ -90,11 +90,11 @@ int benchmark_timer_read( void )
*/ */
clicks = mips_read_timer(); /* XXX: read some HW here */ clicks = mips_read_timer(); /* XXX: read some HW here */
if (clicks < Timer_initial_value) if (clicks < benchmark_timer_initial_value)
{ {
clicks += TIMER_MAX_VALUE; clicks += TIMER_MAX_VALUE;
} }
clicks -= Timer_initial_value; clicks -= benchmark_timer_initial_value;
/* /*
* Total is calculated by taking into account the number of timer overflow * Total is calculated by taking into account the number of timer overflow