source: rtems/c/src/lib/libbsp/m68k/mvme167/timer/timerisr.S @ f68401e

4.115
Last change on this file since f68401e was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 1.9 KB
Line 
1/*  timer_isr()
2 *
3 *  This ISR is used to bump a count of interval "overflow" interrupts which
4 *  have occurred since the timer was started. The number of overflows is taken
5 *  into account in the benchmark_timer_read() routine.
6 *
7 *  Input parameters:  NONE
8 *
9 *  Output parameters:  NONE
10 *
11 *  COPYRIGHT (c) 1989-1999.
12 *  On-Line Applications Research Corporation (OAR).
13 *
14 *  The license and distribution terms for this file may be
15 *  found in the file LICENSE in this distribution or at
16 *  http://www.rtems.com/license/LICENSE.
17 *
18 *  Modifications of respective RTEMS file: COPYRIGHT (c) 1994.
19 *  Copyright (c) 1998, National Research Council of Canada
20 */
21
22#include <rtems/asm.h>
23
24BEGIN_CODE
25
26.set INTR_CLEAR_REG,    0xfff40074      | interrupt clear register
27.set T1_CNTRL_REG,      0xfff40060      | tick timer 1 control register
28.set CLEAR_INT,         0x01000000      | clear tick 1 interrupt
29.set CLEAR_OVF,         0x00000004      | clear tick 1 overflow counter
30
31        PUBLIC (Ttimer_val)
32        PUBLIC (timerisr)
33SYM (timerisr):
34        move.l  a0, -(a7)               | save a0
35        move.l  d0, -(a7)               | save d0
36        move.w  sr, -(a7)               | save ccr
37        movea.l #INTR_CLEAR_REG, a0     | a0 = addr of intr clr reg
38        ori.l   #CLEAR_INT, (a0)        | clear tick timer 1 intr
39        movea.l #T1_CNTRL_REG, a0       | a0 = addr of t1 cntrl reg
40        move.l  (a0), d0                | read overflow counter
41        lsr.l   #4, d0                  | put overflow in low order bits
42        andi.l  #0xF, d0                | keep only overflow
43        add.l   d0, SYM (Ttimer_val)    | increment timer value
44        ori.l   #CLEAR_OVF, (a0)        | clear overflow counter
45        move.w  (a7)+, sr               | restore ccr
46        move.l  (a7)+, d0               | restore d0
47        move.l  (a7)+, a0               | restore a0
48        rte
49
50END_CODE
51END
Note: See TracBrowser for help on using the repository browser.