source: rtems/c/src/lib/libbsp/i960/rxgen960/timer/timerisr.S @ 3299388d

4.104.114.84.95
Last change on this file since 3299388d was 129daf3, checked in by Joel Sherrill <joel.sherrill@…>, on 09/04/03 at 18:51:33

2003-09-04 Joel Sherrill <joel@…>

  • clock/ckinit.c, console/console.c, include/bsp.h, startup/bspstart.c, startup/exit.c, startup/setvec.c, timer/timer.c, timer/timerisr.S: URL for license changed.
  • Property mode set to 100644
File size: 2.0 KB
Line 
1/*  timer_isr()
2 *
3 *  This routine initializes the Z8536 timer on the SQSIO4 SQUALL
4 *  board for the CVME961 board.  The timer is setup to provide a
5 *  tick every 0x10000 / 2 milliseconds.  This is used to time
6 *  executing code.
7 *
8 *  Input parameters:  NONE
9 *
10 *  Output parameters:  NONE
11 *
12 *  COPYRIGHT (c) 1989-1997.
13 *  On-Line Applications Research Corporation (OAR).
14 *
15 *  The license and distribution terms for this file may in
16 *  the file LICENSE in this distribution or at
17 *  http://www.rtems.com/license/LICENSE.
18 *
19 *  $Id$
20 */
21
22#include "asm.h"
23
24.set PORT_A,     0xc00000a8                 # port A
25.set PORT_B,     0xc00000a4                 # port B
26.set PORT_C,     0xc00000a0                 # port C
27.set CTL_PORT,   0xc00000ac                 # control port
28
29.set T1CSR,      0x0a                       # T1 command/status reg
30.set RELOAD,     0x24                       # clr IP & IUS,allow countdown
31
32/*
33 * Duplicating this symbol is stupid but eliminates
34 * toolset variation problems.
35 */
36        PUBLIC(timerisr)
37        PUBLIC(_timerisr)
38SYM (timerisr):
39SYM (_timerisr):
40        #ldconst   1,r4
41        #modpc     0,r4,r4               # enable tracing
42
43        ld      _Ttimer_val,r6           # r6 = test timer
44
45        ldconst T1CSR,r4                 # r4 = T1 control status reg
46        stob    r4,CTL_PORT              # select T1CSR
47        ldconst RELOAD,r5                # r5 = reset value
48        stob    r5,CTL_PORT              # reset countdown
49        addo    1,r6,r6
50        st      r6,_Ttimer_val           # increment test timer
51loop_til_cleared:
52        /* clrbit 4,sf0,sf0 XXX JRS */
53        /* bbs    4,sf0,loop_til_cleared XXX JRS */
54leaf:   ret
55
56        .leafproc _flush_reg, flush_reg.lf
57        .globl    _flush_reg, flush_reg.lf
58_flush_reg:
59        lda     leaf,g14                 # g14 = exit address
60flush_reg.lf:
61        flushreg
62        mov     g14,g0                   # g0 = exit address
63        ldconst 0,g14                    # set g14 for non-leaf
64        bx      (g0)
Note: See TracBrowser for help on using the repository browser.