summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/powerpc/mpc860/clock/clock.c
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/libcpu/powerpc/mpc860/clock/clock.c
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 '')
-rw-r--r--c/src/lib/libcpu/powerpc/mpc860/clock/clock.c42
1 files changed, 19 insertions, 23 deletions
diff --git a/c/src/lib/libcpu/powerpc/mpc860/clock/clock.c b/c/src/lib/libcpu/powerpc/mpc860/clock/clock.c
index 25af11ce9a..73a586aa6a 100644
--- a/c/src/lib/libcpu/powerpc/mpc860/clock/clock.c
+++ b/c/src/lib/libcpu/powerpc/mpc860/clock/clock.c
@@ -82,28 +82,26 @@ void Install_clock(rtems_isr_entry clock_isr)
if (pit_value > 0xffff) { /* pit is only 16 bits long */
rtems_fatal_error_occurred(-1);
}
- if ( rtems_configuration_get_ticks_per_timeslice() ) {
- /*
- * initialize the interval here
- * First tick is set to right amount of time in the future
- * Future ticks will be incremented over last value set
- * in order to provide consistent clicks in the face of
- * interrupt overhead
- */
-
- rtems_interrupt_catch(clock_isr, PPC_IRQ_LVL0, &previous_isr);
+ /*
+ * initialize the interval here
+ * First tick is set to right amount of time in the future
+ * Future ticks will be incremented over last value set
+ * in order to provide consistent clicks in the face of
+ * interrupt overhead
+ */
+
+ rtems_interrupt_catch(clock_isr, PPC_IRQ_LVL0, &previous_isr);
- m860.sccr &= ~(1<<24);
- m860.pitc = pit_value;
+ m860.sccr &= ~(1<<24);
+ m860.pitc = pit_value;
- /* set PIT irq level, enable PIT, PIT interrupts */
- /* and clear int. status */
- m860.piscr = M860_PISCR_PIRQ(0) |
- M860_PISCR_PTE | M860_PISCR_PS | M860_PISCR_PIE;
+ /* set PIT irq level, enable PIT, PIT interrupts */
+ /* and clear int. status */
+ m860.piscr = M860_PISCR_PIRQ(0) |
+ M860_PISCR_PTE | M860_PISCR_PS | M860_PISCR_PIE;
- m860.simask |= M860_SIMASK_LVM0;
- }
+ m860.simask |= M860_SIMASK_LVM0;
atexit(Clock_exit);
}
@@ -128,12 +126,10 @@ ReInstall_clock(rtems_isr_entry new_clock_isr)
void
Clock_exit(void)
{
- if ( rtems_configuration_get_ticks_per_timeslice() ) {
- /* disable PIT and PIT interrupts */
- m860.piscr &= ~(M860_PISCR_PTE | M860_PISCR_PIE);
+ /* disable PIT and PIT interrupts */
+ m860.piscr &= ~(M860_PISCR_PTE | M860_PISCR_PIE);
- (void) set_vector(0, PPC_IRQ_LVL0, 1);
- }
+ (void) set_vector(0, PPC_IRQ_LVL0, 1);
}
rtems_device_driver Clock_initialize(