Changeset 6427f1a in rtems


Ignore:
Timestamp:
Aug 31, 2008, 5:03:54 PM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.9, master
Children:
19b2223
Parents:
a903b7b
Message:

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

  • mpc505/timer/timer.c, mpc5xx/timer/timer.c, mpc6xx/timer/timer.c, mpc8260/timer/timer.c, mpc8xx/timer/timer.c, ppc403/timer/timer.c: Rename timer driver methods to follow RTEMS programming conventions.
Location:
c/src/lib/libcpu/powerpc
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libcpu/powerpc/ChangeLog

    ra903b7b r6427f1a  
     12008-08-31      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * mpc505/timer/timer.c, mpc5xx/timer/timer.c, mpc6xx/timer/timer.c,
     4        mpc8260/timer/timer.c, mpc8xx/timer/timer.c, ppc403/timer/timer.c:
     5        Rename timer driver methods to follow RTEMS programming conventions.
     6
    172008-08-26      Thomas Doerfler <Thomas.Doerflerr@embedded-brains.de>
    28
  • c/src/lib/libcpu/powerpc/mpc505/timer/timer.c

    ra903b7b r6427f1a  
    33 *  This file manages the benchmark timer used by the RTEMS Timing Test
    44 *  Suite.  Each measured time period is demarcated by calls to
    5  *  Timer_initialize() and Read_timer().  Read_timer() usually returns
    6  *  the number of microseconds since Timer_initialize() exitted.
     5 *  benchmark_timer_initialize() and benchmark_timer_read().  benchmark_timer_read() usually returns
     6 *  the number of microseconds since benchmark_timer_initialize() exitted.
    77 *
    88 *  NOTE: It is important that the timer start/stop overhead be
     
    1717#include <rtems.h>
    1818
    19 rtems_boolean Timer_driver_Find_average_overhead;
     19rtems_boolean benchmark_timer_find_average_overhead;
    2020
    2121static unsigned int volatile lastInitValue;
    2222
    23 void Timer_initialize( void )
     23void benchmark_timer_initialize( void )
    2424{
    2525  asm volatile( " mftb %0": "=r" (lastInitValue) );
     
    2727
    2828/*
    29  *  The following controls the behavior of Read_timer().
     29 *  The following controls the behavior of benchmark_timer_read().
    3030 *
    3131 *  AVG_OVEREHAD is the overhead for starting and stopping the timer.  It
     
    4141#define LEAST_VALID       1  /* Don't trust a clicks value lower than this */
    4242
    43 int Read_timer( void )
     43int benchmark_timer_read( void )
    4444{
    4545  uint32_t   value;
     
    4848}
    4949
    50 /*
    51  *  Empty function call used in loops to measure basic cost of looping
    52  *  in Timing Test Suite.
    53  */
    54 
    55 rtems_status_code Empty_function( void )
    56 {
    57   return RTEMS_SUCCESSFUL;
    58 }
    59 
    60 void Set_find_average_overhead(
     50void benchmark_timer_disable_subtracting_average_overhead(
    6151  rtems_boolean find_flag
    6252)
    6353{
    64   Timer_driver_Find_average_overhead = find_flag;
     54  benchmark_timer_find_average_overhead = find_flag;
    6555}
  • c/src/lib/libcpu/powerpc/mpc5xx/timer/timer.c

    ra903b7b r6427f1a  
    5353
    5454static volatile uint32_t Timer_starting;
    55 static rtems_boolean Timer_driver_Find_average_overhead;
     55static rtems_boolean benchmark_timer_find_average_overhead;
    5656
    5757/*
     
    6767}
    6868
    69 void Timer_initialize(void)
     69void benchmark_timer_initialize(void)
    7070{
    7171  /* set interrupt level and enable timebase. This should never */
     
    8080}
    8181
    82 int Read_timer(void)
     82int benchmark_timer_read(void)
    8383{
    8484  uint32_t clicks;
     
    9191  total = clicks - Timer_starting;
    9292
    93   if ( Timer_driver_Find_average_overhead == 1 )
     93  if ( benchmark_timer_find_average_overhead == 1 )
    9494    return total;          /* in XXX microsecond units */
    9595
     
    102102}
    103103
    104 rtems_status_code Empty_function(void)
     104void benchmark_timer_disable_subtracting_average_overhead(rtems_boolean find_flag)
    105105{
    106   return RTEMS_SUCCESSFUL;
     106  benchmark_timer_find_average_overhead = find_flag;
    107107}
    108 
    109 void Set_find_average_overhead(rtems_boolean find_flag)
    110 {
    111   Timer_driver_Find_average_overhead = find_flag;
    112 }
  • c/src/lib/libcpu/powerpc/mpc6xx/timer/timer.c

    ra903b7b r6427f1a  
    2222uint64_t   Timer_driver_Start_time;
    2323
    24 rtems_boolean Timer_driver_Find_average_overhead = 0;
     24rtems_boolean benchmark_timer_find_average_overhead = 0;
    2525unsigned clicks_overhead = 0;
    2626
     
    4141
    4242/*
    43  * Timer_initialize
     43 * benchmark_timer_initialize
    4444 */
    45 void Timer_initialize(void)
     45void benchmark_timer_initialize(void)
    4646{
    4747
     
    5656
    5757/*
    58  *  Read_timer
     58 *  benchmark_timer_read
    5959 */
    6060
    61 int Read_timer(void)
     61int benchmark_timer_read(void)
    6262{
    6363  uint64_t    total64;
     
    7272  total = (uint32_t) total64;
    7373
    74   if ( Timer_driver_Find_average_overhead == 1 )
     74  if ( benchmark_timer_find_average_overhead == 1 )
    7575    return total;          /* in "clicks" of the decrementer units */
    7676
     
    8686}
    8787
    88 rtems_status_code Empty_function( void )
    89 {
    90   return RTEMS_SUCCESSFUL;
    91 }
    92 
    93 void Set_find_average_overhead(
     88void benchmark_timer_disable_subtracting_average_overhead(
    9489  rtems_boolean find_flag
    9590)
    9691{
    97   Timer_driver_Find_average_overhead = find_flag;
     92  benchmark_timer_find_average_overhead = find_flag;
    9893}
  • c/src/lib/libcpu/powerpc/mpc8260/timer/timer.c

    ra903b7b r6427f1a  
    5252
    5353static volatile uint32_t   Timer_starting;
    54 static rtems_boolean Timer_driver_Find_average_overhead;
     54static rtems_boolean benchmark_timer_find_average_overhead;
    5555
    5656/*
     
    6666}
    6767
    68 void Timer_initialize(void)
     68void benchmark_timer_initialize(void)
    6969{
    7070  /* set interrupt level and enable timebase. This should never */
     
    7979}
    8080
    81 int Read_timer(void)
     81int benchmark_timer_read(void)
    8282{
    8383  uint32_t   clicks;
     
    9090  total = clicks - Timer_starting;
    9191
    92   if ( Timer_driver_Find_average_overhead == 1 )
     92  if ( benchmark_timer_find_average_overhead == 1 )
    9393    return total;          /* in XXX microsecond units */
    9494
     
    101101}
    102102
    103 rtems_status_code Empty_function(void)
     103void benchmark_timer_disable_subtracting_average_overhead(rtems_boolean find_flag)
    104104{
    105   return RTEMS_SUCCESSFUL;
     105  benchmark_timer_find_average_overhead = find_flag;
    106106}
    107 
    108 void Set_find_average_overhead(rtems_boolean find_flag)
    109 {
    110   Timer_driver_Find_average_overhead = find_flag;
    111 }
  • c/src/lib/libcpu/powerpc/mpc8xx/timer/timer.c

    ra903b7b r6427f1a  
    4747
    4848static volatile uint32_t   Timer_starting;
    49 static rtems_boolean Timer_driver_Find_average_overhead;
     49static rtems_boolean benchmark_timer_find_average_overhead;
    5050
    5151/*
     
    6161}
    6262
    63 void Timer_initialize(void)
     63void benchmark_timer_initialize(void)
    6464{
    6565  /* set interrupt level and enable timebase. This should never */
     
    7070}
    7171
    72 int Read_timer(void)
     72int benchmark_timer_read(void)
    7373{
    7474  uint32_t   clicks;
     
    8181  total = clicks - Timer_starting;
    8282
    83   if ( Timer_driver_Find_average_overhead == 1 )
     83  if ( benchmark_timer_find_average_overhead == 1 )
    8484    return total;          /* in XXX microsecond units */
    8585
     
    9292}
    9393
    94 rtems_status_code Empty_function(void)
     94void benchmark_timer_disable_subtracting_average_overhead(rtems_boolean find_flag)
    9595{
    96   return RTEMS_SUCCESSFUL;
     96  benchmark_timer_find_average_overhead = find_flag;
    9797}
    98 
    99 void Set_find_average_overhead(rtems_boolean find_flag)
    100 {
    101   Timer_driver_Find_average_overhead = find_flag;
    102 }
  • c/src/lib/libcpu/powerpc/ppc403/timer/timer.c

    ra903b7b r6427f1a  
    4848static rtems_boolean            subtractOverhead;
    4949
    50 void Timer_initialize(void)
     50void benchmark_timer_initialize(void)
    5151{
    5252  /* We are going to rely on clock.c to sort out where the clock comes from */
     
    5454}
    5555
    56 int Read_timer(void)
     56int benchmark_timer_read(void)
    5757{
    5858        uint32_t   clicks, total;
     
    6868}
    6969
    70 rtems_status_code Empty_function( void )
    71 {
    72         return RTEMS_SUCCESSFUL;
    73 }
    74 
    75 void Set_find_average_overhead( rtems_boolean find_flag)
     70void benchmark_timer_disable_subtracting_average_overhead( rtems_boolean find_flag)
    7671{
    7772        subtractOverhead = find_flag;
Note: See TracChangeset for help on using the changeset viewer.