summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/m68k/mvme162/timer
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib/libbsp/m68k/mvme162/timer')
-rw-r--r--c/src/lib/libbsp/m68k/mvme162/timer/timer.c91
-rw-r--r--c/src/lib/libbsp/m68k/mvme162/timer/timerisr.s46
2 files changed, 0 insertions, 137 deletions
diff --git a/c/src/lib/libbsp/m68k/mvme162/timer/timer.c b/c/src/lib/libbsp/m68k/mvme162/timer/timer.c
deleted file mode 100644
index c000fadd28..0000000000
--- a/c/src/lib/libbsp/m68k/mvme162/timer/timer.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/* Timer_init()
- *
- * This routine initializes the Tick Timer 1 on the MVME162 board.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * NOTE: This routine will not work if the optimizer is enabled
- * for some compilers. The multiple writes
- * may be optimized away.
- *
- * It is important that the timer start/stop overhead be
- * determined when porting or modifying this code.
- *
- * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
- * On-Line Applications Research Corporation (OAR).
- * All rights assigned to U.S. Government, 1994.
- *
- * This material may be reproduced by or for the U.S. Government pursuant
- * to the copyright license under the clause at DFARS 252.227-7013. This
- * notice must appear in all copies of this file and its derivatives.
- *
- * Modifications of respective RTEMS file: COPYRIGHT (c) 1994.
- * EISCAT Scientific Association. M.Savitski
- *
- * This material is a part of the MVME162 Board Support Package
- * for the RTEMS executive. Its licensing policies are those of the
- * RTEMS above.
- *
- * $Id$
- */
-
-
-#include <rtems.h>
-#include <bsp.h>
-
-/* Periodic tick interval */
-#define TICK_INTERVAL 0x10000
-#define TIMER_INT_LEVEL 6
-
-int Ttimer_val;
-rtems_boolean Timer_driver_Find_average_overhead;
-
-rtems_isr timerisr();
-
-void Timer_initialize()
-{
- (void) set_vector( timerisr, (VECTOR_BASE >> 28) * 0x10 + 0x8, 0 );
-
- Ttimer_val = 0; /* clear timer ISR count */
- lcsr->vector_base = 0x67800000; /* set vb, enable interrupts */
- lcsr->to_ctl = 0xE7; /* prescaler to 1 MHz (see Appendix A1) */
- lcsr->timer_cmp_1 = TICK_INTERVAL;
- lcsr->timer_cnt_1 = 0; /* clear counter */
- lcsr->board_ctl |= 7; /* increment, reset-on-compare, clear-ovfl-cnt */
-
- lcsr->intr_level[0] |= TIMER_INT_LEVEL; /* set int level */
- lcsr->intr_ena |= 0x01000000; /* enable tick timer 1 interrupt */
-}
-
-#define AVG_OVERHEAD 6 /* It typically takes 3.0 microseconds */
- /* (6 countdowns) to start/stop the timer. */
-#define LEAST_VALID 10 /* Don't trust a value lower than this */
-
-int Read_timer()
-{
- unsigned long total;
-
- total = (Ttimer_val * TICK_INTERVAL) + lcsr->timer_cnt_1;
-
- if ( Timer_driver_Find_average_overhead == 1 )
- return total; /* in one-half microsecond units */
-
- if ( total < LEAST_VALID )
- return 0; /* below timer resolution */
-
- return (total-AVG_OVERHEAD); /* in musec units */
-}
-
-rtems_status_code Empty_function( void )
-{
- return RTEMS_SUCCESSFUL;
-}
-
-void Set_find_average_overhead(
- rtems_boolean find_flag
-)
-{
- Timer_driver_Find_average_overhead = find_flag;
-}
diff --git a/c/src/lib/libbsp/m68k/mvme162/timer/timerisr.s b/c/src/lib/libbsp/m68k/mvme162/timer/timerisr.s
deleted file mode 100644
index af31e4276b..0000000000
--- a/c/src/lib/libbsp/m68k/mvme162/timer/timerisr.s
+++ /dev/null
@@ -1,46 +0,0 @@
-/* timer_isr()
- *
- * This routine provides the ISR for the Z8036 timer on the MVME136
- * board. The timer is set up to generate an interrupt at maximum
- * intervals.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
- * On-Line Applications Research Corporation (OAR).
- * All rights assigned to U.S. Government, 1994.
- *
- * This material may be reproduced by or for the U.S. Government pursuant
- * to the copyright license under the clause at DFARS 252.227-7013. This
- * notice must appear in all copies of this file and its derivatives.
- *
- * Modifications of respective RTEMS file: COPYRIGHT (c) 1994.
- * EISCAT Scientific Association. M.Savitski
- *
- * This material is a part of the MVME162 Board Support Package
- * for the RTEMS executive. Its licensing policies are those of the
- * RTEMS above.
- *
- * $Id$
- */
-
-#include "asm.h"
-
-BEGIN_CODE
-
-.set INTR_CLEAR_REG, 0xfff40074 | interrupt clear register
-.set RELOAD, 0x01000000 | clear tick 1 interrupt
-
- PUBLIC (timerisr)
-SYM (timerisr):
- move.l a0, -(a7) | save a0
- movea.l #INTR_CLEAR_REG, a0 | a0 = addr of cmd status reg
- ori.l #RELOAD, (a0) | reload countdown
- addq.l #1, SYM (Ttimer_val) | increment timer value
- move.l (a7)+, a0 | restore a0
- rte
-
-END_CODE
-END