Changeset 3109857c in rtems


Ignore:
Timestamp:
Aug 26, 2013, 7:26:50 PM (6 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
a839d62
Parents:
db0e05ff
git-author:
Joel Sherrill <joel.sherrill@…> (08/26/13 19:26:50)
git-committer:
Gedare Bloom <gedare@…> (08/26/13 20:16:38)
Message:

bsps: Add and use CLOCK_DRIVER_ISRS_PER_TICK_VALUE

pc386 set CLOCK_DRIVER_ISRS_PER_TICK to a
string rather than a numeric value. Add
CLOCK_DRIVER_ISRS_PER_TICK_VALUE and
other clean up on the clock driver.

Location:
c/src/lib/libbsp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/i386/pc386/clock/ckinit.c

    rdb0e05ff r3109857c  
    5858
    5959/* this driver may need to count ISRs per tick */
    60 #define CLOCK_DRIVER_ISRS_PER_TICK pc386_isrs_per_tick
    61 
    62 /* if so, the driver may use the count in Clock_driver_support_at_tick */
    63 #ifdef CLOCK_DRIVER_ISRS_PER_TICK
     60#define CLOCK_DRIVER_ISRS_PER_TICK       1
     61#define CLOCK_DRIVER_ISRS_PER_TICK_VALUE pc386_isrs_per_tick
     62
     63/* The driver uses the count in Clock_driver_support_at_tick */
    6464extern volatile uint32_t Clock_driver_isrs;
    65 #endif
    6665
    6766#define READ_8254( _lsb, _msb )                               \
     
    8483static void Clock_driver_support_at_tick_tsc(void)
    8584{
    86 #ifdef CLOCK_DRIVER_ISRS_PER_TICK
    87   /*
    88    *  The driver is multiple ISRs per clock tick.
    89   */
    90   if (!Clock_driver_isrs)
    91     pc586_tsc_at_tick = rdtsc();
    92 #else
    93   /*
    94    *  The driver is one ISR per clock tick.
    95    */
    9685  pc586_tsc_at_tick = rdtsc();
    97 #endif
    9886}
    9987
     
    10694    _old = NULL; \
    10795  } while(0)
    108 
    109 extern volatile uint32_t Clock_driver_isrs;
    11096
    11197/*
     
    272258} /* Clock_exit */
    273259
     260#define Clock_driver_support_shutdown_hardware() clockOff()
    274261
    275262bool Clock_isr_enabled = false;
  • c/src/lib/libbsp/shared/clockdrv_shell.h

    rdb0e05ff r3109857c  
    184184   */
    185185  #if CLOCK_DRIVER_ISRS_PER_TICK
    186     Clock_driver_isrs = CLOCK_DRIVER_ISRS_PER_TICK;
     186    Clock_driver_isrs = CLOCK_DRIVER_ISRS_PER_TICK_VALUE;
    187187  #endif
    188188
Note: See TracChangeset for help on using the changeset viewer.