summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/m68k/gen68340
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-01-11 17:34:20 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-01-11 17:34:20 +0000
commit0dd1d44582dd2b39a791aa60f76358ff9bba8cd8 (patch)
tree6be7a7b7d21975f08ba16993958e4bca5177dc76 /c/src/lib/libbsp/m68k/gen68340
parentPatch from Emmanuel Raguet <raguet@crf.canon.fr> to correct macro (diff)
downloadrtems-0dd1d44582dd2b39a791aa60f76358ff9bba8cd8.tar.bz2
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.
Diffstat (limited to 'c/src/lib/libbsp/m68k/gen68340')
-rw-r--r--c/src/lib/libbsp/m68k/gen68340/clock/ckinit.c49
1 files changed, 23 insertions, 26 deletions
diff --git a/c/src/lib/libbsp/m68k/gen68340/clock/ckinit.c b/c/src/lib/libbsp/m68k/gen68340/clock/ckinit.c
index 85acdd3ea6..b4373d48b7 100644
--- a/c/src/lib/libbsp/m68k/gen68340/clock/ckinit.c
+++ b/c/src/lib/libbsp/m68k/gen68340/clock/ckinit.c
@@ -77,12 +77,10 @@ Clock_isr (rtems_vector_number vector)
void
Clock_exit (void)
{
- if (BSP_Configuration.ticks_per_timeslice ) {
- /*
- * Turn off periodic interval timer
- */
- SIMPITR = 0;
- }
+ /*
+ * Turn off periodic interval timer
+ */
+ SIMPITR = 0;
}
/******************************************************
@@ -96,34 +94,33 @@ static void
Install_clock (rtems_isr_entry clock_isr)
{
unsigned32 pitr_tmp;
+ unsigned32 usecs_per_tick;
Clock_driver_ticks = 0;
- if ( BSP_Configuration.ticks_per_timeslice ) {
- set_vector (clock_isr, CLOCK_VECTOR, 1);
+ set_vector (clock_isr, CLOCK_VECTOR, 1);
- /* sets the Periodic Interrupt Control Register PICR */
- /* voir a quoi correspond exactement le Clock Vector */
+ /* sets the Periodic Interrupt Control Register PICR */
+ /* voir a quoi correspond exactement le Clock Vector */
- SIMPICR = ( CLOCK_IRQ_LEVEL << 8 ) | ( CLOCK_VECTOR );
-
- /* sets the PITR count value */
- /* this assumes a 32.765 kHz crystal */
+ SIMPICR = ( CLOCK_IRQ_LEVEL << 8 ) | ( CLOCK_VECTOR );
+
+ /* sets the PITR count value */
+ /* this assumes a 32.765 kHz crystal */
- /* find out whether prescaler should be enabled or not */
- if ( BSP_Configuration.microseconds_per_tick <= 31128 ) {
- pitr_tmp = ( BSP_Configuration.microseconds_per_tick * 8192 ) / 1000000 ;
- }
- else {
- pitr_tmp = ( BSP_Configuration.microseconds_per_tick / 1000000 ) * 16;
- /* enable it */
- pitr_tmp |= 0x100;
- }
+ usecs_per_tick = BSP_Configuration.microseconds_per_tick;
+ /* find out whether prescaler should be enabled or not */
+ if ( usecs_per_tick <= 31128 ) {
+ pitr_tmp = ( usecs_per_tick * 8192 ) / 1000000 ;
+ } else {
+ pitr_tmp = ( usecs_per_tick / 1000000 ) * 16;
+ /* enable it */
+ pitr_tmp |= 0x100;
+ }
- SIMPITR = (unsigned char) pitr_tmp;
+ SIMPITR = (unsigned char) pitr_tmp;
- atexit (Clock_exit);
- }
+ atexit (Clock_exit);
}
/******************************************************