Ignore:
Timestamp:
Jul 6, 2018, 6:12:40 AM (2 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
bca36d9
Parents:
6418c91d
git-author:
Sebastian Huber <sebastian.huber@…> (07/06/18 06:12:40)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/06/18 11:46:46)
Message:

riscv: Implement CPU counter

Update #3433.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bsps/riscv/riscv/clock/clockdrv.c

    r6418c91d rdd32e2b2  
    8888}
    8989
    90 CPU_Counter_ticks _CPU_Counter_read(void)
    91 {
    92   return riscv_clock_get_timecount(NULL);
    93 }
    94 
    9590static uint32_t riscv_clock_get_timebase_frequency(const void *fdt)
    9691{
     
    132127}
    133128
    134 CPU_Counter_ticks _CPU_Counter_difference(
    135   CPU_Counter_ticks second,
    136   CPU_Counter_ticks first
    137 )
     129uint32_t _CPU_Counter_frequency( void )
    138130{
    139   return second - first;
     131  return riscv_clock_get_timebase_frequency(bsp_fdt_get());
    140132}
    141133
Note: See TracChangeset for help on using the changeset viewer.