Ignore:
Timestamp:
May 23, 2018, 12:17:25 PM (2 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
762fa62
Parents:
4c7b18e3
git-author:
Sebastian Huber <sebastian.huber@…> (05/23/18 12:17:25)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/15/18 11:02:44)
Message:

Add _CPU_Counter_frequency()

Add rtems_counter_frequency() API function. Use it to initialize the
counter value converter via the new system initialization step
(RTEMS_SYSINIT_CPU_COUNTER). This decouples the counter implementation
and the counter converter. It avoids an unnecessary pull in of the
64-bit integer division from libgcc.

Update #3456.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bsps/powerpc/ss555/start/bspstart.c

    r4c7b18e3 r65f868c  
    4040uint32_t   bsp_clicks_per_usec;
    4141uint32_t   bsp_clock_speed;            /* Serial clocks per second */
     42
     43uint32_t _CPU_Counter_frequency(void)
     44{
     45  return BSP_CRYSTAL_HZ / 4;
     46}
    4247
    4348/*
     
    8994  bsp_clicks_per_usec = BSP_CRYSTAL_HZ / 4 / 1000000;
    9095  bsp_clock_speed     = BSP_CLOCK_HZ;   /* for SCI baud rate generator */
    91   rtems_counter_initialize_converter(BSP_CRYSTAL_HZ / 4);
    9296
    9397  /*
Note: See TracChangeset for help on using the changeset viewer.