Ignore:
Timestamp:
Jan 11, 2000, 5:34:20 PM (22 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
76c2b35
Parents:
bdb2899
Message:

Removed old hack of using Configuration Table entry ticks_per_timeslice
being set to 0 to indicate that there should be no Clock Tick. This
was used by the Timing Tests to avoid clock tick overhead perturbing
execution times. Now the Timing Tests simply leave the Clock Tick
Driver out of the Device Driver Table.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/m68k/gen68340/clock/ckinit.c

    rbdb2899 r0dd1d44  
    7878Clock_exit (void)
    7979{
    80         if (BSP_Configuration.ticks_per_timeslice ) {
    81                 /*
    82                  * Turn off periodic interval timer
    83                  */             
    84                 SIMPITR = 0;
    85         }
     80        /*
     81         * Turn off periodic interval timer
     82         */             
     83        SIMPITR = 0;
    8684}
    8785
     
    9795{
    9896        unsigned32 pitr_tmp;
     97        unsigned32 usecs_per_tick;
    9998
    10099        Clock_driver_ticks = 0;
    101         if ( BSP_Configuration.ticks_per_timeslice ) {
    102100
    103                 set_vector (clock_isr, CLOCK_VECTOR, 1);
     101        set_vector (clock_isr, CLOCK_VECTOR, 1);
    104102               
    105                 /* sets the Periodic Interrupt Control Register PICR */
    106                 /* voir a quoi correspond exactement le Clock Vector */
     103        /* sets the Periodic Interrupt Control Register PICR */
     104        /* voir a quoi correspond exactement le Clock Vector */
    107105
    108                 SIMPICR = ( CLOCK_IRQ_LEVEL << 8 ) | ( CLOCK_VECTOR );         
    109                                  
    110                 /* sets the PITR count value */
    111                 /* this assumes a 32.765 kHz crystal */
     106        SIMPICR = ( CLOCK_IRQ_LEVEL << 8 ) | ( CLOCK_VECTOR );         
     107                         
     108        /* sets the PITR count value */
     109        /* this assumes a 32.765 kHz crystal */
    112110               
    113                 /* find out whether prescaler should be enabled or not */
    114                 if ( BSP_Configuration.microseconds_per_tick <= 31128 ) {
    115                    pitr_tmp = ( BSP_Configuration.microseconds_per_tick * 8192 ) / 1000000 ;
    116                 }
    117                 else {
    118                    pitr_tmp = ( BSP_Configuration.microseconds_per_tick / 1000000 ) * 16;
    119                    /* enable it */                 
    120                    pitr_tmp |= 0x100;             
    121                 }
     111        usecs_per_tick = BSP_Configuration.microseconds_per_tick;
     112        /* find out whether prescaler should be enabled or not */
     113        if ( usecs_per_tick <= 31128 ) {
     114           pitr_tmp = ( usecs_per_tick * 8192 ) / 1000000 ;
     115        } else {
     116           pitr_tmp = ( usecs_per_tick / 1000000 ) * 16;
     117           /* enable it */                 
     118           pitr_tmp |= 0x100;             
     119        }
    122120
    123                 SIMPITR = (unsigned char) pitr_tmp;
     121        SIMPITR = (unsigned char) pitr_tmp;
    124122
    125                 atexit (Clock_exit);
    126         }
     123        atexit (Clock_exit);
    127124}
    128125
Note: See TracChangeset for help on using the changeset viewer.