summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/m68k/idp/clock
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/idp/clock
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/idp/clock')
-rw-r--r--c/src/lib/libbsp/m68k/idp/clock/ckinit.c65
1 files changed, 30 insertions, 35 deletions
diff --git a/c/src/lib/libbsp/m68k/idp/clock/ckinit.c b/c/src/lib/libbsp/m68k/idp/clock/ckinit.c
index f8a517ed48..ab56f8a981 100644
--- a/c/src/lib/libbsp/m68k/idp/clock/ckinit.c
+++ b/c/src/lib/libbsp/m68k/idp/clock/ckinit.c
@@ -96,37 +96,35 @@ rtems_isr_entry clock_isr;
Clock_driver_ticks = 0;
Clock_isrs = (int)(Configuration.microseconds_per_tick / 1000);
- if ( Configuration.ticks_per_timeslice ) {
/* led_putnum('c'); * for debugging purposes */
Old_ticker = (rtems_isr_entry) set_vector( clock_isr, CLOCK_VECTOR, 1 );
- /* Disable timer for initialization */
- MC68230_WRITE (TCR, 0x00);
-
- /* some PI/T initialization stuff here -- see comment in the ckisr.c
- file in this directory to understand why I use the values that I do */
- /* Set up the interrupt vector on the MC68230 chip:
- TIVR = CLOCK_VECTOR; */
- MC68230_WRITE (TIVR, CLOCK_VECTOR);
-
- /* Set CPRH through CPRL to 193 (not 203) decimal for countdown--see ckisr.c
- CPRH = 0x00;
- CPRM = 0x00;
- CPRL = 0xC1; */
- MC68230_WRITE (CPRH, 0x00);
- MC68230_WRITE (CPRM, 0x00);
- MC68230_WRITE (CPRL, 0xC1);
-
- /* Enable timer and use it as an external periodic interrupt generator
- TCR = 0xA1; */
+ /* Disable timer for initialization */
+ MC68230_WRITE (TCR, 0x00);
+
+ /* some PI/T initialization stuff here -- see comment in the ckisr.c
+ file in this directory to understand why I use the values that I do */
+ /* Set up the interrupt vector on the MC68230 chip:
+ TIVR = CLOCK_VECTOR; */
+ MC68230_WRITE (TIVR, CLOCK_VECTOR);
+
+ /* Set CPRH through CPRL to 193 (not 203) decimal for countdown--see ckisr.c
+ CPRH = 0x00;
+ CPRM = 0x00;
+ CPRL = 0xC1; */
+ MC68230_WRITE (CPRH, 0x00);
+ MC68230_WRITE (CPRM, 0x00);
+ MC68230_WRITE (CPRL, 0xC1);
+
+ /* Enable timer and use it as an external periodic interrupt generator
+ TCR = 0xA1; */
/* led_putnum('a'); * for debugging purposes */
- MC68230_WRITE (TCR, 0xA1);
+ MC68230_WRITE (TCR, 0xA1);
- /*
- * Schedule the clock cleanup routine to execute if the application exits.
- */
- atexit( Clock_exit );
- }
+ /*
+ * Schedule the clock cleanup routine to execute if the application exits.
+ */
+ atexit( Clock_exit );
}
/* The following was added for debugging purposes */
@@ -134,16 +132,13 @@ void Clock_exit( void )
{
rtems_unsigned8 data;
- if ( Configuration.ticks_per_timeslice ) {
-
- /* disable timer
- data = TCR;
- TCR = (data & 0xFE); */
- MC68230_READ (TCR, data);
- MC68230_WRITE (TCR, (data & 0xFE));
+ /* disable timer
+ data = TCR;
+ TCR = (data & 0xFE); */
+ MC68230_READ (TCR, data);
+ MC68230_WRITE (TCR, (data & 0xFE));
- /* do not restore old vector */
- }
+ /* do not restore old vector */
}
rtems_device_driver Clock_initialize(