Changeset f7588eba in rtems


Ignore:
Timestamp:
Apr 17, 2007, 5:41:19 PM (14 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
0ab34c90
Parents:
62f93db
Message:

2007-04-17 Joel Sherrill <joel@…>

  • mpc6xx/clock/c_clock.c: Add initial cut at nanoseconds since last tick handler.
Location:
c/src/lib/libcpu/powerpc
Files:
2 edited

Legend:

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

    r62f93db rf7588eba  
     12007-04-17      Joel Sherrill <joel@OARcorp.com>
     2
     3        * mpc6xx/clock/c_clock.c: Add initial cut at nanoseconds since last
     4        tick handler.
     5
    162007-04-02      Ralf Corsépius <ralf.corsepius@rtems.org>
    27
  • c/src/lib/libcpu/powerpc/mpc6xx/clock/c_clock.c

    r62f93db rf7588eba  
    77 *  microseconds per tick.
    88 *
    9  *  COPYRIGHT (c) 1989-1997.
     9 *  COPYRIGHT (c) 1989-2007.
    1010 *  On-Line Applications Research Corporation (OAR).
    1111 *
     
    131131}
    132132 
     133uint32_t Clock_driver_nanoseconds_since_last_tick(void)
     134{
     135  uint32_t clicks, tmp;
     136
     137  PPC_Get_decrementer( clicks );
     138
     139  tmp = (Clock_Decrementer_value - clicks) * 1000000;
     140  tmp /= (BSP_bus_frequency/BSP_time_base_divisor);
     141
     142  return tmp;
     143}
     144
    133145/*
    134146 *  Clock_initialize
     
    146158 *    rtems_device_driver status code
    147159 */
    148 
    149160rtems_device_driver Clock_initialize(
    150161  rtems_device_major_number major,
     
    160171   */
    161172  PPC_Set_decrementer( (unsigned)-1 );
     173
     174  /*
     175   *  Set the nanoseconds since last tick handler
     176   */
     177  rtems_clock_set_nanoseconds_extension(
     178    Clock_driver_nanoseconds_since_last_tick
     179  );
    162180
    163181  /* if a decrementer exception was pending, it is cleared by
Note: See TracChangeset for help on using the changeset viewer.