OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libbsp/] [i960/] [cvme961/] [timer/] [timerisr.S] - Blame information for rev 493

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*  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-1999.
13
 *  On-Line Applications Research Corporation (OAR).
14
 *
15
 *  The license and distribution terms for this file may be
16
 *  found in the file LICENSE in this distribution or at
17
 *  http://www.OARcorp.com/rtems/license.html.
18
 *
19
 *  $Id: timerisr.S,v 1.2 2001-09-27 11:59:58 chris Exp $
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)
38
SYM (timerisr):
39
SYM (_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
51
loop_til_cleared:
52
        clrbit 4,sf0,sf0
53
        bbs    4,sf0,loop_til_cleared
54
leaf:   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
60
flush_reg.lf:
61
        flushreg
62
        mov     g14,g0                   # g0 = exit address
63
        ldconst 0,g14                    # set g14 for non-leaf
64
        bx      (g0)

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.