Use correct prototype of benchmark_timer_read()

This change starts with removing the effectively empty file
timerdrv.h. The prototypes for benchmark_timer_XXX() were in
btimer.h which was not universally used. Thus every use of
timerdrv.h had to be changed to btimer.h. Then the prototypes
for benchmark_timer_read() had to be adjusted to return
benchmark_timer_t rather than int or uint32_t.

I took this opportunity to also correct the file headers to
separate the copyright from the file description comments which
is needed to ensure the copyright isn't propagated into Doxygen
output.
This commit is contained in:
Joel Sherrill
2014-09-04 08:59:49 -05:00
parent c080c3434b
commit 8fbe2e69b5
111 changed files with 311 additions and 371 deletions

View File

@@ -46,7 +46,7 @@ void benchmark_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 */
uint32_t benchmark_timer_read( void ) benchmark_timer_t benchmark_timer_read( void )
{ {
uint16_t t; uint16_t t;
uint32_t total; uint32_t total;

View File

@@ -94,7 +94,7 @@ void benchmark_timer_initialize( void )
* @param None * @param None
* @return Timer value in microseconds * @return Timer value in microseconds
*/ */
uint32_t benchmark_timer_read( void ) benchmark_timer_t benchmark_timer_read( void )
{ {
uint32_t ticks; uint32_t ticks;
uint32_t total; uint32_t total;

View File

@@ -32,7 +32,7 @@ void benchmark_timer_initialize( void )
benchmark_timer_base = lpc176x_timer_get_timer_value( LPC176X_TIMER_1 ); benchmark_timer_base = lpc176x_timer_get_timer_value( LPC176X_TIMER_1 );
} }
uint32_t benchmark_timer_read( void ) benchmark_timer_t benchmark_timer_read( void )
{ {
uint32_t delta = lpc176x_timer_get_timer_value( LPC176X_TIMER_1 ) - uint32_t delta = lpc176x_timer_get_timer_value( LPC176X_TIMER_1 ) -
benchmark_timer_base; benchmark_timer_base;
@@ -42,4 +42,4 @@ uint32_t benchmark_timer_read( void )
void benchmark_timer_disable_subtracting_average_overhead( bool find_avg_ovhead ) void benchmark_timer_disable_subtracting_average_overhead( bool find_avg_ovhead )
{ {
} }

View File

@@ -22,7 +22,6 @@
#include <rtems.h> #include <rtems.h>
#include <bsp.h> #include <bsp.h>
#include <rtems/btimer.h> #include <rtems/btimer.h>
#include <rtems/timerdrv.h>
#include <bsp/system-clocks.h> #include <bsp/system-clocks.h>
@@ -35,7 +34,7 @@ void benchmark_timer_initialize(void)
benchmark_timer_base = lpc24xx_timer(); benchmark_timer_base = lpc24xx_timer();
} }
uint32_t benchmark_timer_read(void) benchmark_timer_t benchmark_timer_read(void)
{ {
uint32_t delta = lpc24xx_timer() - benchmark_timer_base; uint32_t delta = lpc24xx_timer() - benchmark_timer_base;

View File

@@ -21,7 +21,6 @@
#include <rtems.h> #include <rtems.h>
#include <rtems/btimer.h> #include <rtems/btimer.h>
#include <rtems/timerdrv.h>
#include <bsp.h> #include <bsp.h>
@@ -32,7 +31,7 @@ void benchmark_timer_initialize(void)
benchmark_timer_base = lpc32xx_timer(); benchmark_timer_base = lpc32xx_timer();
} }
uint32_t benchmark_timer_read(void) benchmark_timer_t benchmark_timer_read(void)
{ {
return lpc32xx_timer() - benchmark_timer_base; return lpc32xx_timer() - benchmark_timer_base;
} }

View File

@@ -17,7 +17,7 @@
*/ */
#include <rtems.h> #include <rtems.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
#include <bsp/raspberrypi.h> #include <bsp/raspberrypi.h>
static bool benchmark_timer_find_average_overhead = false; static bool benchmark_timer_find_average_overhead = false;
@@ -29,7 +29,7 @@ void benchmark_timer_initialize(void)
benchmark_timer_base = BCM2835_REG(BCM2835_GPU_TIMER_CLO); benchmark_timer_base = BCM2835_REG(BCM2835_GPU_TIMER_CLO);
} }
uint32_t benchmark_timer_read(void) benchmark_timer_t benchmark_timer_read(void)
{ {
uint32_t delta = BCM2835_REG(BCM2835_GPU_TIMER_CLO) - benchmark_timer_base; uint32_t delta = BCM2835_REG(BCM2835_GPU_TIMER_CLO) - benchmark_timer_base;

View File

@@ -28,7 +28,6 @@
#include <bsp.h> #include <bsp.h>
#include <bsp/system-clocks.h> #include <bsp/system-clocks.h>
#include <rtems/btimer.h> #include <rtems/btimer.h>
#include <rtems/timerdrv.h>
bool benchmark_timer_find_average_overhead = false; bool benchmark_timer_find_average_overhead = false;
@@ -39,7 +38,7 @@ void benchmark_timer_initialize(void)
benchmark_timer_base = _CPU_Counter_read(); benchmark_timer_base = _CPU_Counter_read();
} }
uint32_t benchmark_timer_read(void) benchmark_timer_t benchmark_timer_read(void)
{ {
uint32_t delta = _CPU_Counter_read() - benchmark_timer_base; uint32_t delta = _CPU_Counter_read() - benchmark_timer_base;

View File

@@ -51,9 +51,9 @@ volatile uint32_t Ttimer_val;
bool benchmark_timer_find_average_overhead = true; bool benchmark_timer_find_average_overhead = true;
volatile unsigned int fastLoop1ms, slowLoop1ms; volatile unsigned int fastLoop1ms, slowLoop1ms;
void (*benchmark_timer_initialize_function)(void) = 0; void (*benchmark_timer_initialize_function)(void) = 0;
uint32_t (*benchmark_timer_read_function)(void) = 0; benchmark_timer_t (*benchmark_timer_read_function)(void) = 0;
void (*Timer_exit_function)(void) = 0; void (*Timer_exit_function)(void) = 0;
/* timer (int 08h) Interrupt Service Routine (defined in 'timerisr.s') */ /* timer (int 08h) Interrupt Service Routine (defined in 'timerisr.s') */
extern void timerisr(void); extern void timerisr(void);

View File

@@ -47,7 +47,7 @@ void benchmark_timer_initialize(void)
/* This value is in microseconds. */ /* This value is in microseconds. */
#define LEAST_VALID 4 /* Don't trust a clicks value lower than this */ #define LEAST_VALID 4 /* Don't trust a clicks value lower than this */
uint32_t benchmark_timer_read(void) benchmark_timer_t benchmark_timer_read(void)
{ {
uint32_t ticks; uint32_t ticks;
uint32_t total; uint32_t total;

View File

@@ -76,7 +76,7 @@ void benchmark_timer_initialize( void )
/* This value is in microseconds. */ /* This value is in microseconds. */
#define LEAST_VALID 4 /* Don't trust a clicks value lower than this */ #define LEAST_VALID 4 /* Don't trust a clicks value lower than this */
uint32_t benchmark_timer_read( void ) benchmark_timer_t benchmark_timer_read( void )
{ {
uint32_t ticks; uint32_t ticks;
uint32_t total; uint32_t total;

View File

@@ -41,7 +41,7 @@ void benchmark_timer_initialize(void)
TABSR = 0x55; TABSR = 0x55;
} }
uint32_t benchmark_timer_read(void) benchmark_timer_t benchmark_timer_read(void)
{ {
uint32_t count; uint32_t count;

View File

@@ -64,7 +64,7 @@ void benchmark_timer_initialize( void )
/* /*
* Return timer value in 1/2-microsecond units * Return timer value in 1/2-microsecond units
*/ */
uint32_t benchmark_timer_read( void ) benchmark_timer_t benchmark_timer_read( void )
{ {
uint16_t clicks; uint16_t clicks;
uint32_t total; uint32_t total;

View File

@@ -49,7 +49,7 @@ void benchmark_timer_initialize(void)
#define AVG_OVERHEAD 9 /* may not be right -- do this later */ #define AVG_OVERHEAD 9 /* may not be right -- do this later */
#define LEAST_VALID 10 /* Don't trust a value lower than this */ #define LEAST_VALID 10 /* Don't trust a value lower than this */
uint32_t benchmark_timer_read(void) benchmark_timer_t benchmark_timer_read(void)
{ {
uint8_t data; uint8_t data;
uint8_t msb, osb, lsb; uint8_t msb, osb, lsb;

View File

@@ -29,7 +29,7 @@ void benchmark_timer_initialize(void)
/* /*
* Return timer value in microsecond units * Return timer value in microsecond units
*/ */
uint32_t benchmark_timer_read(void) benchmark_timer_t benchmark_timer_read(void)
{ {
return MCF_DTIM3_DTCN; return MCF_DTIM3_DTCN;
} }

View File

@@ -29,7 +29,7 @@ void benchmark_timer_initialize(void)
/* /*
* Return timer value in microsecond units * Return timer value in microsecond units
*/ */
uint32_t benchmark_timer_read(void) benchmark_timer_t benchmark_timer_read(void)
{ {
return MCF_DTIM3_DTCN; return MCF_DTIM3_DTCN;
} }

View File

@@ -29,7 +29,7 @@ void benchmark_timer_initialize(void)
/* /*
* Return timer value in microsecond units * Return timer value in microsecond units
*/ */
uint32_t benchmark_timer_read(void) benchmark_timer_t benchmark_timer_read(void)
{ {
return MCF_DTIM3_DTCN; return MCF_DTIM3_DTCN;
} }

View File

@@ -38,7 +38,7 @@ void benchmark_timer_initialize( void )
/* /*
* Return timer value in 1/2-microsecond units * Return timer value in 1/2-microsecond units
*/ */
uint32_t benchmark_timer_read( void ) benchmark_timer_t benchmark_timer_read( void )
{ {
uint32_t total; uint32_t total;
total = 0; total = 0;

View File

@@ -50,7 +50,7 @@ void benchmark_timer_initialize(void)
/* (6 countdowns) to start/stop the timer. */ /* (6 countdowns) to start/stop the timer. */
#define LEAST_VALID 10 /* Don't trust a value lower than this */ #define LEAST_VALID 10 /* Don't trust a value lower than this */
uint32_t benchmark_timer_read(void) benchmark_timer_t benchmark_timer_read(void)
{ {
/* /*
uint8_t msb, lsb; uint8_t msb, lsb;

View File

@@ -45,7 +45,7 @@ void benchmark_timer_initialize(void)
synchronized whith the counter updates*/ synchronized whith the counter updates*/
#define LEAST_VALID 10 /* Don't trust a value lower than this */ #define LEAST_VALID 10 /* Don't trust a value lower than this */
uint32_t benchmark_timer_read(void) benchmark_timer_t benchmark_timer_read(void)
{ {
uint32_t total; uint32_t total;
uint16_t counter_value; uint16_t counter_value;

View File

@@ -50,7 +50,7 @@ void benchmark_timer_initialize(void)
/* (3 countdowns) to start/stop the timer. */ /* (3 countdowns) to start/stop the timer. */
#define LEAST_VALID 10U /* Don't trust a value lower than this */ #define LEAST_VALID 10U /* Don't trust a value lower than this */
uint32_t benchmark_timer_read(void) benchmark_timer_t benchmark_timer_read(void)
{ {
uint32_t total; uint32_t total;

View File

@@ -1,22 +1,26 @@
/* timer.c /**
* @file
* *
* This file manages the benchmark timer used by the RTEMS Timing Test Suite. * This file manages the benchmark timer used by the RTEMS Timing Test Suite.
* Each measured time period is demarcated by calls to benchmark_timer_initialize() and * Each measured time period is demarcated by calls to
* benchmark_timer_read(). benchmark_timer_read() usually returns the number of microseconds * benchmark_timer_initialize() and benchmark_timer_read().
* since benchmark_timer_initialize() exitted. * benchmark_timer_read() usually returns the number of microseconds
* since benchmark_timer_initialize() exitted.
* *
* These functions are prototyped in rtems/c/src/lib/include/timerdrv.h and * These functions are prototyped in rtems/btimer.h and
* must be implemented as part of the BSP. * must be implemented as part of the BSP.
* *
* This port does not allow the application to select which timer on the * This port does not allow the application to select which timer on the
* MVME167 to use for the timer, nor does it allow the application to * MVME167 to use for the timer, nor does it allow the application to
* configure the timer. The timer uses the VMEchip2 Tick Timer #1. This timer * configure the timer. The timer uses the VMEchip2 Tick Timer #1. This timer
* is distinct from the clock, which uses Tick Timer #2 in the VMEchip2. * is distinct from the clock, which uses Tick Timer #2 in the VMEchip2.
* *
* All page references are to the MVME166/MVME167/MVME187 Single Board * All page references are to the MVME166/MVME167/MVME187 Single Board
* Computer Programmer's Reference Guide (MVME187PG/D2) with the April 1993 * Computer Programmer's Reference Guide (MVME187PG/D2) with the April 1993
* supplements/addenda (MVME187PG/D2A1). * supplements/addenda (MVME187PG/D2A1).
* */
/*
* COPYRIGHT (c) 1989-1999. * COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR). * On-Line Applications Research Corporation (OAR).
* *
@@ -104,7 +108,7 @@ void benchmark_timer_initialize(void)
* LEAST_VALID is the lowest number this routine should trust. Numbers * LEAST_VALID is the lowest number this routine should trust. Numbers
* below this are "noise" and zero is returned. * below this are "noise" and zero is returned.
*/ */
uint32_t benchmark_timer_read(void) benchmark_timer_t benchmark_timer_read(void)
{ {
uint32_t total; uint32_t total;

View File

@@ -1,14 +1,13 @@
/* timer_isr() /**
* @file
* *
* This ISR is used to bump a count of interval "overflow" interrupts which * This ISR is used to bump a count of interval "overflow" interrupts which
* have occurred since the timer was started. The number of overflows is taken * have occurred since the timer was started. The number of overflows is taken
* into account in the benchmark_timer_read() routine. * into account in the benchmark_timer_read() routine.
* */
* Input parameters: NONE
* /*
* Output parameters: NONE * COPYRIGHT (c) 1989-2014.
*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR). * On-Line Applications Research Corporation (OAR).
* *
* The license and distribution terms for this file may be * The license and distribution terms for this file may be

View File

@@ -67,7 +67,7 @@ void benchmark_timer_initialize( void )
/* /*
* Return timer value in 1/2-microsecond units * Return timer value in 1/2-microsecond units
*/ */
uint32_t benchmark_timer_read( void ) benchmark_timer_t benchmark_timer_read( void )
{ {
uint16_t clicks; uint16_t clicks;
uint32_t total; uint32_t total;

View File

@@ -29,7 +29,7 @@ void benchmark_timer_initialize(void)
#define LEAST_VALID 1 /* Don't trust a value lower than this */ #define LEAST_VALID 1 /* Don't trust a value lower than this */
/* tx39 simulator can count instructions. :) */ /* tx39 simulator can count instructions. :) */
uint32_t benchmark_timer_read(void) benchmark_timer_t benchmark_timer_read(void)
{ {
uint32_t total; uint32_t total;
uint32_t cnt; uint32_t cnt;

View File

@@ -55,7 +55,7 @@ void benchmark_timer_initialize(void)
/* mongoose-v can count cycles. :) */ /* mongoose-v can count cycles. :) */
#include <rtems/bspIo.h> #include <rtems/bspIo.h>
uint32_t benchmark_timer_read(void) benchmark_timer_t benchmark_timer_read(void)
{ {
uint32_t clicks; uint32_t clicks;
uint32_t total; uint32_t total;

View File

@@ -44,7 +44,7 @@ void benchmark_timer_initialize(void)
#define LEAST_VALID 1 /* Don't trust a value lower than this */ #define LEAST_VALID 1 /* Don't trust a value lower than this */
/* tx39 simulator can count instructions. :) */ /* tx39 simulator can count instructions. :) */
uint32_t benchmark_timer_read(void) benchmark_timer_t benchmark_timer_read(void)
{ {
uint32_t total; uint32_t total;

View File

@@ -94,7 +94,7 @@ void benchmark_timer_initialize( void )
#define LEAST_VALID AVG_OVERHEAD /* Don't trust a value lower than this */ #define LEAST_VALID AVG_OVERHEAD /* Don't trust a value lower than this */
uint32_t benchmark_timer_read( void ) benchmark_timer_t benchmark_timer_read( void )
{ {
uint32_t timer_wraps; uint32_t timer_wraps;
uint32_t timer_snap; uint32_t timer_snap;

View File

@@ -53,7 +53,7 @@ void benchmark_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 */
uint32_t benchmark_timer_read( void ) benchmark_timer_t benchmark_timer_read( void )
{ {
uint32_t clicks; uint32_t clicks;
uint32_t total; uint32_t total;

View File

@@ -1,4 +1,5 @@
/* timerisr.s /**
* @file
* *
* If required this ISR is used to bump a count of interval "overflow" * If required this ISR is used to bump a count of interval "overflow"
* interrupts which have occurred since the timer was started. The * interrupts which have occurred since the timer was started. The
@@ -9,10 +10,12 @@
* handler you can write. This should be the only interrupt which can * handler you can write. This should be the only interrupt which can
* occur during the measured time period. * occur during the measured time period.
* *
* NOTE: This file is USUALLY in assembly and is LEAN AND MEAN. * @note This file is USUALLY in assembly and is LEAN AND MEAN.
* Any code in this isr is pure overhead which can perturb * Any code in this isr is pure overhead which can perturb
* the accuracy of the Timing Test Suite. * the accuracy of the Timing Test Suite.
* */
/*
* COPYRIGHT (c) 1989-1999. * COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR). * On-Line Applications Research Corporation (OAR).
* *
@@ -22,6 +25,7 @@
*/ */
#include <rtems.h> #include <rtems.h>
#include <rtems/btimer.h>
extern uint32_t _Timer_interrupts; extern uint32_t _Timer_interrupts;

View File

@@ -32,7 +32,7 @@ void benchmark_timer_initialize(void)
#define AVG_OVERHEAD 0 #define AVG_OVERHEAD 0
#define LEAST_VALID 1 #define LEAST_VALID 1
uint32_t benchmark_timer_read( void ) benchmark_timer_t benchmark_timer_read( void )
{ {
uint64_t clicks; uint64_t clicks;
uint64_t total; uint64_t total;

View File

@@ -42,7 +42,7 @@ void benchmark_timer_initialize()
* benchmark_timer_read * benchmark_timer_read
*/ */
uint32_t benchmark_timer_read() benchmark_timer_t benchmark_timer_read()
{ {
uint64_t clicks; uint64_t clicks;
uint64_t total64; uint64_t total64;

View File

@@ -85,7 +85,7 @@ benchmark_timer_initialize (void)
/* /*
* Return timer value in microsecond units * Return timer value in microsecond units
*/ */
uint32_t benchmark_timer_read(void) benchmark_timer_t benchmark_timer_read(void)
{ {
uint32_t retval; uint32_t retval;
retval = *(uint32_t*)&m8xx.tcn1; retval = *(uint32_t*)&m8xx.tcn1;

View File

@@ -15,7 +15,7 @@ void benchmark_timer_initialize(void)
{ {
} }
uint32_t benchmark_timer_read(void) benchmark_timer_t benchmark_timer_read(void)
{ {
if (benchmark_timer_find_average_overhead) if (benchmark_timer_find_average_overhead)
return 1; return 1;

View File

@@ -62,7 +62,7 @@ void benchmark_timer_initialize(void)
#define LEAST_VALID 13 /* Don't trust a value lower than this */ #define LEAST_VALID 13 /* Don't trust a value lower than this */
#endif #endif
uint32_t benchmark_timer_read(void) benchmark_timer_t benchmark_timer_read(void)
{ {
uint32_t total; uint32_t total;

View File

@@ -58,7 +58,7 @@ void benchmark_timer_initialize(void)
/* to start/stop the timer. */ /* to start/stop the timer. */
#define LEAST_VALID 2 /* Don't trust a value lower than this */ #define LEAST_VALID 2 /* Don't trust a value lower than this */
uint32_t benchmark_timer_read(void) benchmark_timer_t benchmark_timer_read(void)
{ {
uint32_t total; uint32_t total;

View File

@@ -57,7 +57,7 @@ void benchmark_timer_initialize(void)
/* to start/stop the timer. */ /* to start/stop the timer. */
#define LEAST_VALID 2 /* Don't trust a value lower than this */ #define LEAST_VALID 2 /* Don't trust a value lower than this */
uint32_t benchmark_timer_read(void) benchmark_timer_t benchmark_timer_read(void)
{ {
uint32_t total; uint32_t total;

View File

@@ -1,26 +1,21 @@
/* /**
* Cogent CSB337 Timer driver * @file
* @brief Cogent CSB337 Timer driver
* *
* This uses timer 0 for timing measurments. * This uses timer 0 for timing measurments.
* */
* Copyright (c) 2004 by Jay Monkman <jtm@lopingdog.com>
/*
* Copyright (c) 2004 by Jay Monkman <jtm@lopingdog.com>
* *
* The license and distribution terms for this file may be * The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at * found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE. * http://www.rtems.org/license/LICENSE.
*
* Notes:
* This file manages the benchmark timer used by the RTEMS Timing Test
* Suite. Each measured time period is demarcated by calls to
* benchmark_timer_initialize() and benchmark_timer_read(). benchmark_timer_read() usually returns
* the number of microseconds since benchmark_timer_initialize() exitted.
*
* It is important that the timer start/stop overhead be determined
* when porting or modifying this code.
*/ */
#include <rtems.h>
#include <bsp.h> #include <bsp.h>
#include <rtems.h>
#include <rtems/btimer.h>
#include <at91rm9200.h> #include <at91rm9200.h>
#include <at91rm9200_pmc.h> #include <at91rm9200_pmc.h>
@@ -63,7 +58,7 @@ void benchmark_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 */
int benchmark_timer_read( void ) benchmark_timer_t benchmark_timer_read( void )
{ {
uint16_t t; uint16_t t;
uint32_t total; uint32_t total;

View File

@@ -1,28 +1,24 @@
/* /**
* RTL22xx board Timer driver * @file
* @brief RTL22xx board Timer driver
* *
* This uses Timer1 for timing measurments. * This uses Timer1 for timing measurments.
* */
* By Ray xu<rayx.cn@gmail.com>, modify form Mc9328mxl RTEMS DSP
* /*
* The license and distribution terms for this file may be * By Ray Xu <rayx.cn@gmail.com>, modify form Mc9328mxl RTEMS DSP
* found in the file LICENSE in this distribution or at *
* http://www.rtems.org/license/LICENSE. * The license and distribution terms for this file may be
* * found in the file LICENSE in this distribution or at
* Notes: * http://www.rtems.org/license/LICENSE.
* This file manages the benchmark timer used by the RTEMS Timing Test */
* Suite. Each measured time period is demarcated by calls to
* benchmark_timer_initialize() and benchmark_timer_read(). benchmark_timer_read() usually returns
* the number of microseconds since benchmark_timer_initialize() exitted.
*
* It is important that the timer start/stop overhead be determined
* when porting or modifying this code.
*/
#include <rtems.h>
#include <bsp.h> #include <bsp.h>
#include <rtems.h>
#include <rtems/btimer.h>
#include <lpc22xx.h> #include <lpc22xx.h>
#include "lpc_timer.h" #include "lpc_timer.h"
uint32_t g_start; uint32_t g_start;
uint32_t g_freq; uint32_t g_freq;
@@ -52,7 +48,7 @@ void benchmark_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 */
int benchmark_timer_read( void ) benchmark_timer_t benchmark_timer_read( void )
{ {
return (T0TC/(LPC22xx_Fpclk/1000000)); return (T0TC/(LPC22xx_Fpclk/1000000));
/* /*

View File

@@ -1,27 +1,22 @@
/* /**
* Cogent CSB336 Timer driver * @file
* @brief Cogent CSB336 Timer driver
* *
* This uses timer 2 for timing measurments. * This uses timer 2 for timing measurments.
* */
/*
* Copyright (c) 2004 Cogent Computer Systems * Copyright (c) 2004 Cogent Computer Systems
* Written by Jay Monkman <jtm@lopingdog.com> * Written by Jay Monkman <jtm@lopingdog.com>
* *
* The license and distribution terms for this file may be * The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at * found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE. * http://www.rtems.org/license/LICENSE.
* */
* Notes:
* This file manages the benchmark timer used by the RTEMS Timing Test
* Suite. Each measured time period is demarcated by calls to
* benchmark_timer_initialize() and benchmark_timer_read(). benchmark_timer_read() usually returns
* the number of microseconds since benchmark_timer_initialize() exitted.
*
* It is important that the timer start/stop overhead be determined
* when porting or modifying this code.
*/
#include <rtems.h> #include <rtems.h>
#include <bsp.h> #include <bsp.h>
#include <rtems/btimer.h>
#include <mc9328mxl.h> #include <mc9328mxl.h>
uint32_t g_start; uint32_t g_start;
@@ -62,7 +57,7 @@ void benchmark_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 */
int benchmark_timer_read( void ) benchmark_timer_t benchmark_timer_read( void )
{ {
uint32_t t; uint32_t t;
unsigned long long total; unsigned long long total;

View File

@@ -1,23 +1,20 @@
/**
* @file
* @brief PXA255 timer
*/
/* /*
* PXA255 timer by Yang Xi <hiyangxi@gmail.com> * PXA255 timer by Yang Xi <hiyangxi@gmail.com>
* Copyright (c) 2004 by Jay Monkman <jtm@lopingdog.com> * Copyright (c) 2004 by Jay Monkman <jtm@lopingdog.com>
* *
* Notes: * The license and distribution terms for this file may be
* This file manages the benchmark timer used by the RTEMS Timing Test * found in the file LICENSE in this distribution or at
* Suite. Each measured time period is demarcated by calls to * http://www.rtems.org/license/LICENSE.
* Timer_initialize() and Read_timer(). Read_timer() usually returns
* the number of microseconds since Timer_initialize() exitted.
*
* It is important that the timer start/stop overhead be determined
* when porting or modifying this code.
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
*/ */
#include <rtems.h>
#include <bsp.h> #include <bsp.h>
#include <rtems.h>
#include <rtems/btimer.h>
#include <pxa255.h> #include <pxa255.h>
uint32_t tstart; uint32_t tstart;
@@ -51,7 +48,7 @@ void benchmark_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 */
int benchmark_timer_read(void) benchmark_timer_t benchmark_timer_read(void)
{ {
uint32_t total; uint32_t total;

View File

@@ -1,24 +1,19 @@
/* /**
* S3C2400 Timer driver * @file
* @brief S3C2400 Timer driver
* *
* This uses timer 1 for timing measurments. * This uses timer 1 for timing measurments.
* */
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at /*
* http://www.rtems.org/license/LICENSE. * The license and distribution terms for this file may be
* * found in the file LICENSE in this distribution or at
* Notes: * http://www.rtems.org/license/LICENSE.
* This file manages the benchmark timer used by the RTEMS Timing Test */
* Suite. Each measured time period is demarcated by calls to
* benchmark_timer_initialize() and benchmark_timer_read(). benchmark_timer_read() usually returns
* the number of microseconds since benchmark_timer_initialize() exitted.
*
* It is important that the timer start/stop overhead be determined
* when porting or modifying this code.
*/
#include <rtems.h>
#include <bsp.h> #include <bsp.h>
#include <rtems.h>
#include <rtems/btimer.h>
#include <s3c24xx.h> #include <s3c24xx.h>
uint32_t g_start; uint32_t g_start;
@@ -69,7 +64,7 @@ void benchmark_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 */
int benchmark_timer_read( void ) benchmark_timer_t benchmark_timer_read( void )
{ {
uint32_t t; uint32_t t;
unsigned long long total; unsigned long long total;

View File

@@ -1,10 +1,15 @@
/* Timer for Blackfin /**
* @file
* @brief Timer for Blackfin
* *
* This file manages the benchmark timer used by the RTEMS Timing Test * This file manages the benchmark timer used by the RTEMS Timing Test
* Suite. Each measured time period is demarcated by calls to * Suite. Each measured time period is demarcated by calls to
* benchmark_timer_initialize() and benchmark_timer_read(). benchmark_timer_read() usually returns * benchmark_timer_initialize() and benchmark_timer_read().
* the number of microseconds since benchmark_timer_initialize() exitted. * benchmark_timer_read() usually returns the number of microseconds
* * since benchmark_timer_initialize() exitted.
*/
/*
* Copyright (c) 2006 by Atos Automacao Industrial Ltda. * Copyright (c) 2006 by Atos Automacao Industrial Ltda.
* written by Alain Schaefer <alain.schaefer@easc.ch> * written by Alain Schaefer <alain.schaefer@easc.ch>
* and Antonio Giovanini <antonio@atos.com.br> * and Antonio Giovanini <antonio@atos.com.br>
@@ -14,13 +19,12 @@
* http://www.rtems.org/license/LICENSE. * http://www.rtems.org/license/LICENSE.
*/ */
#include <rtems.h> #include <rtems.h>
#include <bsp.h> #include <bsp.h>
#include <rtems/btimer.h>
uint32_t Timer_interrupts;
uint32_t Timer_interrupts; bool benchmark_timer_find_average_overhead;
bool benchmark_timer_find_average_overhead;
/* /*
* benchmark_timer_initialize * benchmark_timer_initialize
@@ -56,7 +60,7 @@ void benchmark_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 */
int benchmark_timer_read( void ) benchmark_timer_t benchmark_timer_read( void )
{ {
uint32_t clicks; uint32_t clicks;
uint32_t total; uint32_t total;

View File

@@ -1,8 +1,11 @@
/* /**
* Timer Init * @file
* @brief Timer Init
* *
* This module initializes TIMER 2 for on the MCF5206E for benchmarks. * This module initializes TIMER 2 for on the MCF5206E for benchmarks.
* */
/*
* Copyright (C) 2000 OKTET Ltd., St.-Petersburg, Russia * Copyright (C) 2000 OKTET Ltd., St.-Petersburg, Russia
* Author: Victor V. Vengerov <vvv@oktet.ru> * Author: Victor V. Vengerov <vvv@oktet.ru>
* *
@@ -21,6 +24,7 @@
#include <rtems.h> #include <rtems.h>
#include <bsp.h> #include <bsp.h>
#include <rtems/btimer.h>
#include "mcf5206/mcf5206e.h" #include "mcf5206/mcf5206e.h"
#define TRR2_VAL 65530 #define TRR2_VAL 65530
@@ -99,7 +103,7 @@ benchmark_timer_initialize(void)
* RETURNS: * RETURNS:
* number of microseconds since timer has been started * number of microseconds since timer has been started
*/ */
int benchmark_timer_t
benchmark_timer_read( void ) benchmark_timer_read( void )
{ {
uint16_t clicks; uint16_t clicks;

View File

@@ -1,5 +1,6 @@
/* /**
* Handle MCF5206 TIMER2 interrupts. * @file
* @brief Handle MCF5206 TIMER2 interrupts
* *
* 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.
@@ -11,7 +12,9 @@
* occur during the measured time period. * occur during the measured time period.
* *
* An external counter, Timer_interrupts, is incremented. * An external counter, Timer_interrupts, is incremented.
* */
/*
* Copyright (C) 2000 OKTET Ltd., St.-Petersburg, Russia * Copyright (C) 2000 OKTET Ltd., St.-Petersburg, Russia
* Author: Victor V. Vengerov <vvv@oktet.ru> * Author: Victor V. Vengerov <vvv@oktet.ru>
* *
@@ -29,7 +32,7 @@
*/ */
#include <rtems/asm.h> #include <rtems/asm.h>
#include "bsp.h" #include <bsp.h>
#include "mcf5206/mcf5206e.h" #include "mcf5206/mcf5206e.h"
BEGIN_CODE BEGIN_CODE

View File

@@ -1,8 +1,10 @@
/* /**
* Timer Init * @file
* *
* This module initializes TIMER 2 for on the MCF5272 for benchmarks. * This module initializes TIMER 2 for on the MCF5272 for benchmarks.
* */
/*
* Copyright (C) 2000 OKTET Ltd., St.-Petersburg, Russia * Copyright (C) 2000 OKTET Ltd., St.-Petersburg, Russia
* Author: Victor V. Vengerov <vvv@oktet.ru> * Author: Victor V. Vengerov <vvv@oktet.ru>
* *
@@ -22,6 +24,7 @@
#include <rtems.h> #include <rtems.h>
#include <bsp.h> #include <bsp.h>
#include <mcf5272/mcf5272.h> #include <mcf5272/mcf5272.h>
#include <rtems/btimer.h>
#define TRR2_VAL 65530 #define TRR2_VAL 65530
@@ -102,7 +105,7 @@ benchmark_timer_initialize(void)
* RETURNS: * RETURNS:
* number of microseconds since timer has been started * number of microseconds since timer has been started
*/ */
int benchmark_timer_t
benchmark_timer_read( void ) benchmark_timer_read( void )
{ {
uint16_t clicks; uint16_t clicks;

View File

@@ -1,5 +1,6 @@
/* /**
* Handle MCF5272 TIMER2 interrupts. * @file
* @brief Handle MCF5272 TIMER2 interrupts.
* *
* 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.
@@ -11,7 +12,9 @@
* occur during the measured time period. * occur during the measured time period.
* *
* An external counter, Timer_interrupts, is incremented. * An external counter, Timer_interrupts, is incremented.
* */
/*
* Copyright (C) 2000 OKTET Ltd., St.-Petersburg, Russia * Copyright (C) 2000 OKTET Ltd., St.-Petersburg, Russia
* Author: Victor V. Vengerov <vvv@oktet.ru> * Author: Victor V. Vengerov <vvv@oktet.ru>
* *
@@ -30,9 +33,6 @@
#include <rtems/asm.h> #include <rtems/asm.h>
#include <bsp.h> #include <bsp.h>
/*
#include "mcf5272/mcf5272.h"
*/
BEGIN_CODE BEGIN_CODE
PUBLIC(timerisr) PUBLIC(timerisr)

View File

@@ -1,7 +1,12 @@
/* timer.c /**
* * @file
* This file contains the initialization code for the IDT 4650 timer driver. * @brief IDT 4650 Timer Driver.
* *
* This file manages the benchmark timer used by the RTEMS Timing Test
* Suite.
*/
/*
* Author: Craig Lebakken <craigl@transition.com> * Author: Craig Lebakken <craigl@transition.com>
* *
* COPYRIGHT (c) 1996 by Transition Networks Inc. * COPYRIGHT (c) 1996 by Transition Networks Inc.
@@ -19,14 +24,6 @@
* *
* derived from src/lib/libbsp/no_cpu/no_bsp/timer/timer.c * derived from src/lib/libbsp/no_cpu/no_bsp/timer/timer.c
* *
* This file manages the benchmark timer used by the RTEMS Timing Test
* Suite. Each measured time period is demarcated by calls to
* benchmark_timer_initialize() and benchmark_timer_read(). benchmark_timer_read() usually returns
* the number of microseconds since benchmark_timer_initialize() exitted.
*
* 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).
* *
@@ -35,15 +32,8 @@
* http://www.rtems.org/license/LICENSE. * http://www.rtems.org/license/LICENSE.
*/ */
/*
* Rather than deleting this, it is commented out to (hopefully) help
* the submitter send updates.
*
* static char _sccsid[] = "@(#)timer.c 08/20/96 1.5\n";
*/
#include <rtems.h> #include <rtems.h>
#include <rtems/btimer.h>
#define CLOCKS_PER_MICROSECOND ( CPU_CLOCK_RATE_MHZ ) #define CLOCKS_PER_MICROSECOND ( CPU_CLOCK_RATE_MHZ )
#define TIMER_MAX_VALUE 0xffffffff #define TIMER_MAX_VALUE 0xffffffff
@@ -78,7 +68,7 @@ void benchmark_timer_initialize( void )
/* This value is in cycles. */ /* This value is in cycles. */
#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 */
int benchmark_timer_read( void ) benchmark_timer_t benchmark_timer_read( void )
{ {
uint64_t clicks; uint64_t clicks;
uint32_t total; uint32_t total;

View File

@@ -1,18 +1,23 @@
/* timer.c /**
* @file
* *
* This file manages the benchmark timer used by the RTEMS Timing Test * This file manages the benchmark timer used by the RTEMS Timing Test
* Suite. Each measured time period is demarcated by calls to * Suite. Each measured time period is demarcated by calls to
* benchmark_timer_initialize() and benchmark_timer_read(). benchmark_timer_read() usually returns * benchmark_timer_initialize() and benchmark_timer_read().
* the number of microseconds since benchmark_timer_initialize() exitted. * benchmark_timer_read() usually returns the number of microseconds
* since benchmark_timer_initialize() exitted.
* *
* NOTE: It is important that the timer start/stop overhead be * NOTE: It is important that the timer start/stop overhead be
* determined when porting or modifying this code. * determined when porting or modifying this code.
* */
/*
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
* On-Line Applications Research Corporation (OAR). * On-Line Applications Research Corporation (OAR).
*/ */
#include <rtems.h> #include <rtems.h>
#include <rtems/btimer.h>
bool benchmark_timer_find_average_overhead; bool benchmark_timer_find_average_overhead;
@@ -38,7 +43,7 @@ void benchmark_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 */
int benchmark_timer_read( void ) benchmark_timer_t benchmark_timer_read( void )
{ {
uint32_t value; uint32_t value;
__asm__ volatile ( " mftb %0": "=r" (value) ); __asm__ volatile ( " mftb %0": "=r" (value) );

View File

@@ -1,16 +1,13 @@
/* timer.c /**
* @file
* @brief Timer Driver for the PowerPC MPC5xx.
* *
* This file manages the interval timer on the PowerPC MPC5xx. * This file manages the interval timer on the PowerPC MPC5xx.
* NOTE: This is not the PIT, but rather the RTEMS interval * @noe This is not the PIT, but rather the RTEMS interval timer.
* timer
* We shall use the bottom 32 bits of the timebase register, * We shall use the bottom 32 bits of the timebase register,
* */
* The following was in the 403 version of this file. I don't
* know what it means. JTM 5/19/98 /*
* NOTE: It is important that the timer start/stop overhead be
* determined when porting or modifying this code.
*
*
* MPC5xx port sponsored by Defence Research and Development Canada - Suffield * MPC5xx port sponsored by Defence Research and Development Canada - Suffield
* Copyright (C) 2004, Real-Time Systems Inc. (querbach@realtime.bc.ca) * Copyright (C) 2004, Real-Time Systems Inc. (querbach@realtime.bc.ca)
* *
@@ -47,6 +44,7 @@
*/ */
#include <rtems.h> #include <rtems.h>
#include <rtems/btimer.h>
#include <mpc5xx.h> #include <mpc5xx.h>
static volatile uint32_t Timer_starting; static volatile uint32_t Timer_starting;
@@ -80,7 +78,7 @@ void benchmark_timer_initialize(void)
Timer_starting = get_itimer(); Timer_starting = get_itimer();
} }
int benchmark_timer_read(void) benchmark_timer_t benchmark_timer_read(void)
{ {
uint32_t clicks; uint32_t clicks;
uint32_t total; uint32_t total;

View File

@@ -1,9 +1,11 @@
/* timer.c /**
* @file
* @brief
* *
* This file implements a benchmark timer using the PPC Timebase * This file implements a benchmark timer using the PPC Timebase
* */
* Notes: NONE
* /*
* COPYRIGHT (c) 1989-2000. * COPYRIGHT (c) 1989-2000.
* On-Line Applications Research Corporation (OAR). * On-Line Applications Research Corporation (OAR).
* *
@@ -12,10 +14,11 @@
* http://www.rtems.org/license/LICENSE. * http://www.rtems.org/license/LICENSE.
*/ */
#include <rtems/system.h>
#include <assert.h>
#include <rtems.h>
#include <bsp.h> #include <bsp.h>
#include <rtems.h>
#include <rtems/system.h>
#include <rtems/btimer.h>
#include <assert.h>
#include <libcpu/powerpc-utility.h> #include <libcpu/powerpc-utility.h>
@@ -58,7 +61,7 @@ void benchmark_timer_initialize(void)
* benchmark_timer_read * benchmark_timer_read
*/ */
int benchmark_timer_read(void) benchmark_timer_t benchmark_timer_read(void)
{ {
uint64_t total64; uint64_t total64;
uint32_t total; uint32_t total;

View File

@@ -1,15 +1,13 @@
/* timer.c /**
* @file
* @brief Timer for the PowerPC MPC860
* *
* This file manages the interval timer on the PowerPC MPC860.
* NOTE: This is not the PIT, but rather the RTEMS interval
* timer
* We shall use the bottom 32 bits of the timebase register, * We shall use the bottom 32 bits of the timebase register,
* *
* The following was in the 403 version of this file. I don't * @note This is not the PIT, but rather the RTEMS interval timer.
* know what it means. JTM 5/19/98 */
* NOTE: It is important that the timer start/stop overhead be
* determined when porting or modifying this code. /*
*
* Author: Andy Dachs <a.dachs@sstl.co.uk> * Author: Andy Dachs <a.dachs@sstl.co.uk>
* Surrey Satellite Technlogy Limited * Surrey Satellite Technlogy Limited
* Modified for MPC8260 * Modified for MPC8260
@@ -46,6 +44,7 @@
*/ */
#include <rtems.h> #include <rtems.h>
#include <rtems/btimer.h>
#include <mpc8260.h> #include <mpc8260.h>
static volatile uint32_t Timer_starting; static volatile uint32_t Timer_starting;
@@ -78,7 +77,7 @@ void benchmark_timer_initialize(void)
extern uint32_t bsp_timer_least_valid; extern uint32_t bsp_timer_least_valid;
extern uint32_t bsp_timer_average_overhead; extern uint32_t bsp_timer_average_overhead;
int benchmark_timer_read(void) benchmark_timer_t benchmark_timer_read(void)
{ {
uint32_t clicks; uint32_t clicks;
uint32_t total; uint32_t total;

View File

@@ -1,15 +1,14 @@
/* timer.c /**
* @file
* @brief Timer Driver for the PowerPC MPC8xx.
* *
* This file manages the interval timer on the PowerPC MPC8xx. * This file manages the interval timer on the PowerPC MPC8xx.
* NOTE: This is not the PIT, but rather the RTEMS interval
* timer
* We shall use the bottom 32 bits of the timebase register, * We shall use the bottom 32 bits of the timebase register,
* *
* The following was in the 403 version of this file. I don't * @note This is not the PIT, but rather the RTEMS interval timer
* know what it means. JTM 5/19/98 */
* NOTE: It is important that the timer start/stop overhead be
* determined when porting or modifying this code. /*
*
* Author: Jay Monkman (jmonkman@frasca.com) * Author: Jay Monkman (jmonkman@frasca.com)
* Copywright (C) 1998 by Frasca International, Inc. * Copywright (C) 1998 by Frasca International, Inc.
* *
@@ -41,6 +40,7 @@
*/ */
#include <rtems.h> #include <rtems.h>
#include <rtems/btimer.h>
#include <mpc8xx.h> #include <mpc8xx.h>
static volatile uint32_t Timer_starting; static volatile uint32_t Timer_starting;
@@ -69,7 +69,7 @@ void benchmark_timer_initialize(void)
Timer_starting = get_itimer(); Timer_starting = get_itimer();
} }
int benchmark_timer_read(void) benchmark_timer_t benchmark_timer_read(void)
{ {
uint32_t clicks; uint32_t clicks;
uint32_t total; uint32_t total;

View File

@@ -1,12 +1,13 @@
/* timer.c /**
* @file
* @brief Timer Driver for the PowerPC 405.
* *
* This file manages the interval timer on the PowerPC 405. * This file manages the interval timer on the PowerPC 405.
* We shall use the bottom 32 bits of the timebase register, * We shall use the bottom 32 bits of the timebase register,
* */
* NOTE: It is important that the timer start/stop overhead be
* determined when porting or modifying this code. /*
* * Author: Andrew Bray <andy@i-cubed.co.uk>
* Author: Andrew Bray <andy@i-cubed.co.uk>
* *
* COPYRIGHT (c) 1995 by i-cubed ltd. * COPYRIGHT (c) 1995 by i-cubed ltd.
* *
@@ -37,6 +38,7 @@
*/ */
#include <rtems.h> #include <rtems.h>
#include <rtems/btimer.h>
#include <libcpu/powerpc-utility.h> #include <libcpu/powerpc-utility.h>
extern uint32_t bsp_timer_least_valid; extern uint32_t bsp_timer_least_valid;
@@ -51,7 +53,7 @@ void benchmark_timer_initialize(void)
startedAt = ppc_time_base(); startedAt = ppc_time_base();
} }
int benchmark_timer_read(void) benchmark_timer_t benchmark_timer_read(void)
{ {
uint32_t clicks, total; uint32_t clicks, total;

View File

@@ -1,14 +1,9 @@
/**
* @file
* @brief Timer for the Hitachi SH 703X
*/
/* /*
* timer for the Hitachi SH 703X
*
* This file manages the benchmark timer used by the RTEMS Timing Test
* Suite. Each measured time period is demarcated by calls to
* benchmark_timer_initialize() and benchmark_timer_read(). benchmark_timer_read() usually returns
* the number of microseconds since benchmark_timer_initialize() exitted.
*
* NOTE: It is important that the timer start/stop overhead be
* determined when porting or modifying this code.
*
* Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and * Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and
* Bernd Becker (becker@faw.uni-ulm.de) * Bernd Becker (becker@faw.uni-ulm.de)
* *
@@ -27,6 +22,7 @@
*/ */
#include <rtems.h> #include <rtems.h>
#include <rtems/btimer.h>
#include <rtems/score/sh_io.h> #include <rtems/score/sh_io.h>
#include <rtems/score/ispsh7032.h> #include <rtems/score/ispsh7032.h>
@@ -147,7 +143,7 @@ void benchmark_timer_initialize( void )
/* This value is in microseconds. */ /* This value is in microseconds. */
#define LEAST_VALID 0 /* 20 */ /* Don't trust a clicks value lower than this */ #define LEAST_VALID 0 /* 20 */ /* Don't trust a clicks value lower than this */
int benchmark_timer_read( void ) benchmark_timer_t benchmark_timer_read( void )
{ {
uint32_t cclicks; uint32_t cclicks;
uint32_t total ; uint32_t total ;

View File

@@ -1,14 +1,9 @@
/**
* @file
* @brief Timer for the Hitachi SH 704X
*/
/* /*
* timer for the Hitachi SH 704X
*
* This file manages the benchmark timer used by the RTEMS Timing Test
* Suite. Each measured time period is demarcated by calls to
* benchmark_timer_initialize() and benchmark_timer_read(). benchmark_timer_read() usually returns
* the number of microseconds since benchmark_timer_initialize() exitted.
*
* NOTE: It is important that the timer start/stop overhead be
* determined when porting or modifying this code.
*
* Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and * Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and
* Bernd Becker (becker@faw.uni-ulm.de) * Bernd Becker (becker@faw.uni-ulm.de)
* *
@@ -27,6 +22,7 @@
*/ */
#include <rtems.h> #include <rtems.h>
#include <rtems/btimer.h>
#include <rtems/score/sh_io.h> #include <rtems/score/sh_io.h>
#include <rtems/score/iosh7045.h> #include <rtems/score/iosh7045.h>
@@ -143,7 +139,7 @@ void benchmark_timer_initialize( void )
/* This value is in microseconds. */ /* This value is in microseconds. */
#define LEAST_VALID 0 /* 20 */ /* Don't trust a clicks value lower than this */ #define LEAST_VALID 0 /* 20 */ /* Don't trust a clicks value lower than this */
int benchmark_timer_read( void ) benchmark_timer_t benchmark_timer_read( void )
{ {
uint32_t clicks; uint32_t clicks;
uint32_t total ; uint32_t total ;

View File

@@ -1,14 +1,9 @@
/**
* @file
* @brief Timer driver for the Hitachi SH 7750
*/
/* /*
* timer driver for the Hitachi SH 7750
*
* This file manages the benchmark timer used by the RTEMS Timing Test
* Suite. Each measured time period is demarcated by calls to
* benchmark_timer_initialize() and benchmark_timer_read(). benchmark_timer_read() usually returns
* the number of microseconds since benchmark_timer_initialize() exitted.
*
* NOTE: It is important that the timer start/stop overhead be
* determined when porting or modifying this code.
*
* Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia * Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
* Author: Victor V. Vengerov <vvv@oktet.ru> * Author: Victor V. Vengerov <vvv@oktet.ru>
* *
@@ -21,6 +16,7 @@
*/ */
#include <rtems.h> #include <rtems.h>
#include <rtems/btimer.h>
#include <rtems/score/sh_io.h> #include <rtems/score/sh_io.h>
#include <rtems/score/iosh7750.h> #include <rtems/score/iosh7750.h>
@@ -198,7 +194,7 @@ benchmark_timer_initialize(void)
* RETURNS: * RETURNS:
* number of microseconds since timer has been started * number of microseconds since timer has been started
*/ */
int benchmark_timer_t
benchmark_timer_read(void) benchmark_timer_read(void)
{ {
uint32_t clicks; uint32_t clicks;

View File

@@ -12,7 +12,6 @@ include_rtems_HEADERS += include/iosupp.h
include_rtems_HEADERS += include/ringbuf.h include_rtems_HEADERS += include/ringbuf.h
include_rtems_HEADERS += include/rtc.h include_rtems_HEADERS += include/rtc.h
include_rtems_HEADERS += include/spurious.h include_rtems_HEADERS += include/spurious.h
include_rtems_HEADERS += include/timerdrv.h
include_rtems_HEADERS += include/vmeintr.h include_rtems_HEADERS += include/vmeintr.h
## motorola ## motorola

View File

@@ -1,34 +0,0 @@
/**
* @file
*
* @brief Timer Driver for all Boards
*
* This file describes the Timer Driver for all boards.
*/
/*
*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
*/
#ifndef _RTEMS_TIMERDRV_H
#define _RTEMS_TIMERDRV_H
#include <rtems/btimer.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Intentionally empty */
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -46,10 +46,6 @@ $(PROJECT_INCLUDE)/rtems/spurious.h: include/spurious.h $(PROJECT_INCLUDE)/rtems
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/spurious.h $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/spurious.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/spurious.h PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/spurious.h
$(PROJECT_INCLUDE)/rtems/timerdrv.h: include/timerdrv.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/timerdrv.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/timerdrv.h
$(PROJECT_INCLUDE)/rtems/vmeintr.h: include/vmeintr.h $(PROJECT_INCLUDE)/rtems/$(dirstamp) $(PROJECT_INCLUDE)/rtems/vmeintr.h: include/vmeintr.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/vmeintr.h $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/vmeintr.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/vmeintr.h PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/vmeintr.h

View File

@@ -1319,7 +1319,7 @@ const rtems_libio_helper rtems_fs_init_helper =
#endif #endif
#ifdef CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER #ifdef CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
#endif #endif
#ifdef CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER #ifdef CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER

View File

@@ -44,7 +44,7 @@ time units (typically microseconds) that have elapsed since the last
call to @code{benchmark_timer_initialize}. call to @code{benchmark_timer_initialize}.
@example @example
int benchmark_timer_read(void) benchmark_timer_t benchmark_timer_read(void)
@{ @{
stop time = read the hardware timer stop time = read the hardware timer
if the subtract overhead feature is enabled if the subtract overhead feature is enabled

View File

@@ -12,7 +12,7 @@
#endif #endif
#include <timesys.h> #include <timesys.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
#include "test_support.h" #include "test_support.h"
#include <pthread.h> #include <pthread.h>

View File

@@ -13,7 +13,7 @@
#include <timesys.h> #include <timesys.h>
#include <tmacros.h> #include <tmacros.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
#include "test_support.h" #include "test_support.h"
#include <pthread.h> #include <pthread.h>

View File

@@ -17,7 +17,7 @@
#include "test_support.h" #include "test_support.h"
#include <pthread.h> #include <pthread.h>
#include <sched.h> #include <sched.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
const char rtems_test_name[] = "PSXTMBARRIER 03"; const char rtems_test_name[] = "PSXTMBARRIER 03";

View File

@@ -15,7 +15,7 @@
#include "test_support.h" #include "test_support.h"
#include <pthread.h> #include <pthread.h>
#include <sched.h> #include <sched.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
const char rtems_test_name[] = "PSXTMBARRIER 04"; const char rtems_test_name[] = "PSXTMBARRIER 04";

View File

@@ -17,7 +17,7 @@
#include "test_support.h" #include "test_support.h"
#include <pthread.h> #include <pthread.h>
#include <sched.h> #include <sched.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
const char rtems_test_name[] = "PSXTMCOND 01"; const char rtems_test_name[] = "PSXTMCOND 01";

View File

@@ -13,7 +13,7 @@
#include <timesys.h> #include <timesys.h>
#include <pthread.h> #include <pthread.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
#include "test_support.h" #include "test_support.h"
const char rtems_test_name[] = "PSXTMCOND 02"; const char rtems_test_name[] = "PSXTMCOND 02";

View File

@@ -17,7 +17,7 @@
#include "test_support.h" #include "test_support.h"
#include <pthread.h> #include <pthread.h>
#include <sched.h> #include <sched.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
const char rtems_test_name[] = "PSXTMCOND 03"; const char rtems_test_name[] = "PSXTMCOND 03";

View File

@@ -17,7 +17,7 @@
#include "test_support.h" #include "test_support.h"
#include <pthread.h> #include <pthread.h>
#include <sched.h> #include <sched.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
const char rtems_test_name[] = "PSXTMCOND 04"; const char rtems_test_name[] = "PSXTMCOND 04";

View File

@@ -13,7 +13,7 @@
#include <timesys.h> #include <timesys.h>
#include <pthread.h> #include <pthread.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
#include "test_support.h" #include "test_support.h"
const char rtems_test_name[] = "PSXTMCOND 05"; const char rtems_test_name[] = "PSXTMCOND 05";

View File

@@ -17,7 +17,7 @@
#include "test_support.h" #include "test_support.h"
#include <pthread.h> #include <pthread.h>
#include <sched.h> #include <sched.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
#define N 5 #define N 5

View File

@@ -17,7 +17,7 @@
#include "test_support.h" #include "test_support.h"
#include <pthread.h> #include <pthread.h>
#include <sched.h> #include <sched.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
#define N 1 #define N 1

View File

@@ -30,7 +30,7 @@
#include <sched.h> #include <sched.h>
#include <timesys.h> #include <timesys.h>
#include <tmacros.h> #include <tmacros.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
#include "test_support.h" #include "test_support.h"
#include <pthread.h> #include <pthread.h>

View File

@@ -12,7 +12,7 @@
#endif #endif
#include <timesys.h> #include <timesys.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
#include <errno.h> #include <errno.h>
#include <pthread.h> #include <pthread.h>
#include "test_support.h" #include "test_support.h"

View File

@@ -12,7 +12,7 @@
#endif #endif
#include <timesys.h> #include <timesys.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
#include <errno.h> #include <errno.h>
#include <pthread.h> #include <pthread.h>
#include "test_support.h" #include "test_support.h"

View File

@@ -13,7 +13,7 @@
#include <fcntl.h> #include <fcntl.h>
#include <timesys.h> #include <timesys.h>
#include <errno.h> #include <errno.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
#include "test_support.h" #include "test_support.h"
#include <tmacros.h> #include <tmacros.h>
#include <mqueue.h> #include <mqueue.h>

View File

@@ -12,7 +12,7 @@
#endif #endif
#include <timesys.h> #include <timesys.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
#include <errno.h> #include <errno.h>
#include <pthread.h> #include <pthread.h>
#include "test_support.h" #include "test_support.h"

View File

@@ -17,7 +17,7 @@
#include "test_support.h" #include "test_support.h"
#include <pthread.h> #include <pthread.h>
#include <sched.h> #include <sched.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
const char rtems_test_name[] = "PSXTMMUTEX 02"; const char rtems_test_name[] = "PSXTMMUTEX 02";

View File

@@ -12,7 +12,7 @@
#endif #endif
#include <timesys.h> #include <timesys.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
#include <errno.h> #include <errno.h>
#include <pthread.h> #include <pthread.h>
#include "test_support.h" #include "test_support.h"

View File

@@ -13,7 +13,7 @@
#include <timesys.h> #include <timesys.h>
#include <tmacros.h> #include <tmacros.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
#include "test_support.h" #include "test_support.h"
#include <pthread.h> #include <pthread.h>

View File

@@ -17,7 +17,7 @@
#include "test_support.h" #include "test_support.h"
#include <pthread.h> #include <pthread.h>
#include <sched.h> #include <sched.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
const char rtems_test_name[] = "PSXTMMUTEX 05"; const char rtems_test_name[] = "PSXTMMUTEX 05";

View File

@@ -17,7 +17,7 @@
#include "test_support.h" #include "test_support.h"
#include <pthread.h> #include <pthread.h>
#include <sched.h> #include <sched.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
const char rtems_test_name[] = "PSXTMMUTEX 06"; const char rtems_test_name[] = "PSXTMMUTEX 06";

View File

@@ -12,7 +12,7 @@
#endif #endif
#include <timesys.h> #include <timesys.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
#include <errno.h> #include <errno.h>
#include <pthread.h> #include <pthread.h>
#include "test_support.h" #include "test_support.h"

View File

@@ -12,7 +12,7 @@
#endif #endif
#include <timesys.h> #include <timesys.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
#include "test_support.h" #include "test_support.h"
const char rtems_test_name[] = "PSXTMNANOSLEEP 01"; const char rtems_test_name[] = "PSXTMNANOSLEEP 01";

View File

@@ -12,7 +12,7 @@
#endif #endif
#include <timesys.h> #include <timesys.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
#include "test_support.h" #include "test_support.h"
#include <pthread.h> #include <pthread.h>

View File

@@ -12,7 +12,7 @@
#endif #endif
#include <errno.h> #include <errno.h>
#include <timesys.h> #include <timesys.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
#include <pthread.h> #include <pthread.h>
#include "test_support.h" #include "test_support.h"

View File

@@ -16,7 +16,7 @@
#include <tmacros.h> #include <tmacros.h>
#include <pthread.h> #include <pthread.h>
#include <sched.h> #include <sched.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
#include "test_support.h" #include "test_support.h"
const char rtems_test_name[] = "PSXTMRWLOCK 02"; const char rtems_test_name[] = "PSXTMRWLOCK 02";

View File

@@ -16,7 +16,7 @@
#include <tmacros.h> #include <tmacros.h>
#include <sched.h> #include <sched.h>
#include <pthread.h> #include <pthread.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
#include "test_support.h" #include "test_support.h"
const char rtems_test_name[] = "PSXTMRWLOCK 03"; const char rtems_test_name[] = "PSXTMRWLOCK 03";

View File

@@ -16,7 +16,7 @@
#include <tmacros.h> #include <tmacros.h>
#include <sched.h> #include <sched.h>
#include <pthread.h> #include <pthread.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
#include "test_support.h" #include "test_support.h"
const char rtems_test_name[] = "PSXTMRWLOCK 04"; const char rtems_test_name[] = "PSXTMRWLOCK 04";

View File

@@ -16,7 +16,7 @@
#include <tmacros.h> #include <tmacros.h>
#include <sched.h> #include <sched.h>
#include <pthread.h> #include <pthread.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
#include "test_support.h" #include "test_support.h"
const char rtems_test_name[] = "PSXTMRWLOCK 05"; const char rtems_test_name[] = "PSXTMRWLOCK 05";

View File

@@ -17,7 +17,7 @@
#include <tmacros.h> #include <tmacros.h>
#include <timesys.h> #include <timesys.h>
#include "test_support.h" #include "test_support.h"
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
const char rtems_test_name[] = "PSXTMRWLOCK 06"; const char rtems_test_name[] = "PSXTMRWLOCK 06";

View File

@@ -17,7 +17,7 @@
#include "test_support.h" #include "test_support.h"
#include <pthread.h> #include <pthread.h>
#include <sched.h> #include <sched.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
const char rtems_test_name[] = "PSXTMRWLOCK 07"; const char rtems_test_name[] = "PSXTMRWLOCK 07";

View File

@@ -16,7 +16,7 @@
#include <semaphore.h> #include <semaphore.h>
#include <tmacros.h> #include <tmacros.h>
#include <timesys.h> #include <timesys.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
#include "test_support.h" #include "test_support.h"
const char rtems_test_name[] = "PSXTMSEM 01"; const char rtems_test_name[] = "PSXTMSEM 01";

View File

@@ -16,7 +16,7 @@
#include <semaphore.h> #include <semaphore.h>
#include <tmacros.h> #include <tmacros.h>
#include <timesys.h> #include <timesys.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
#include "test_support.h" #include "test_support.h"
const char rtems_test_name[] = "PSXTMSEM 02"; const char rtems_test_name[] = "PSXTMSEM 02";

View File

@@ -16,7 +16,7 @@
#include <semaphore.h> #include <semaphore.h>
#include <tmacros.h> #include <tmacros.h>
#include <timesys.h> #include <timesys.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
#include "test_support.h" #include "test_support.h"
#include <pthread.h> #include <pthread.h>
#include <sched.h> #include <sched.h>

View File

@@ -20,7 +20,7 @@
#include "test_support.h" #include "test_support.h"
#include <pthread.h> #include <pthread.h>
#include <sched.h> #include <sched.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
const char rtems_test_name[] = "PSXTMSEM 04"; const char rtems_test_name[] = "PSXTMSEM 04";

View File

@@ -20,7 +20,7 @@
#include "test_support.h" #include "test_support.h"
#include <pthread.h> #include <pthread.h>
#include <sched.h> #include <sched.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
const char rtems_test_name[] = "PSXTMSEM 05"; const char rtems_test_name[] = "PSXTMSEM 05";

View File

@@ -12,7 +12,7 @@
#endif #endif
#include <timesys.h> #include <timesys.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
#include "test_support.h" #include "test_support.h"
#include <unistd.h> #include <unistd.h>

View File

@@ -12,7 +12,7 @@
#endif #endif
#include <timesys.h> #include <timesys.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
#include "test_support.h" #include "test_support.h"
#include <pthread.h> #include <pthread.h>

View File

@@ -14,7 +14,7 @@
#include <timesys.h> #include <timesys.h>
#include <pthread.h> #include <pthread.h>
#include <sched.h> #include <sched.h>
#include <rtems/timerdrv.h> #include <rtems/btimer.h>
#include "test_support.h" #include "test_support.h"
const char rtems_test_name[] = "PSXTMTHREAD 02"; const char rtems_test_name[] = "PSXTMTHREAD 02";

Some files were not shown because too many files have changed in this diff Show More