diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-01-26 14:20:08 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-01-26 14:20:08 +0000 |
commit | 21677c0e664f84ac20ffec33209348c52d00aace (patch) | |
tree | c6d3531ac6aec1613d6b2f844db4f91bb6fa56ed /c/src/lib/libcpu/a29k/clock/clock.S | |
parent | Now binutils, gcc, and gdb build into a "base" package that is shared (diff) | |
download | rtems-21677c0e664f84ac20ffec33209348c52d00aace.tar.bz2 |
Patch rtems-rc-20000118-0.diff from Ralf Corsepius <corsepiu@faw.uni-ulm.de>
that converts the a29k to automake.
This patch contains
* An initial merger of the libcpu/a29k stuff you sent yesterday. AFAIS,
most code inside them seems to be empty stubs. One file even contains a
function called mips_*** which might indicate that this part might
contain mips code or the code the initial porter used as template for
porting. Unfortunately, I don't know anything about the a29k so I can't
comment on the details.
* A dummy bsp_specs to libbsp/29k/portsw
* An update to the automake files related to the a29k.
Note:
* This patch is completely untested, because I don't have a toolchain
for it.
* The files in libcpu/a29k include bsp.h => The libbsp vs. libcpu-issue
hits again.
Diffstat (limited to '')
-rw-r--r-- | c/src/lib/libcpu/a29k/clock/clock.S | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/c/src/lib/libcpu/a29k/clock/clock.S b/c/src/lib/libcpu/a29k/clock/clock.S new file mode 100644 index 0000000000..b69e8566cf --- /dev/null +++ b/c/src/lib/libcpu/a29k/clock/clock.S @@ -0,0 +1,116 @@ +; +; .include "register.ah" + .include "amd.ah" + .include "pswmacro.ah" + + .text +; .equ IN,0x2000000 + .reg CLOCK,gr78 + .reg SECS,gr79 + .equ CPUCLK,16 + .equ RATE,100 + .reg it0,gr64 + .reg it1,gr65 + .reg v0,gr96 +timer_clear_sup: + const it0,IN + consth it0,IN + mfsr it1,tmr + andn it1,it1,it0 + mtsr tmr,it1 + const it0,RATE + cplt it0,CLOCK,it0 + jmpf it0,carry + add CLOCK,CLOCK,1 + iret +carry: + const CLOCK,0 + add SECS,SECS,1 + iret + + .equ TICKS,(CPUCLK*1000000/RATE) +; .equ IE,0x1000000 +timer_init_sup: + const it0,TICKS + consth it0,TICKS + mtsr tmc,it0 + const it0,(IE|TICKS) + consth it0,(IE|TICKS) + mtsr tmr,it0 + const SECS,0 + const CLOCK,0 + iret + +timer_get_sup: + add gr96,SECS,0 + iret + +timer_disable_sup: + mfsr it0,ops + const it1,TD + consth it1,TD + andn it0,it1,it0 + mtsr ops,it0 + iret + + .global _a29k_init_timer +_a29k_init_timer: + push msp,lr0 + const lr2,INIT_TIMER + consth lr2,INIT_TIMER + const lr3,timer_init_sup + consth lr3,timer_init_sup + const v0,__settrap + consth v0,__settrap + calli lr0,v0 + nop + + const lr2,CLEAR_TIMER + consth lr2,CLEAR_TIMER + const lr3,timer_clear_sup + consth lr3,timer_clear_sup + const v0,__settrap + consth v0,__settrap + calli lr0,v0 + nop + + const lr2,DISABLE_TIMER + consth lr2,DISABLE_TIMER + const lr3,timer_disable_sup + consth lr3,timer_disable_sup + const v0,__settrap + consth v0,__settrap + calli lr0,v0 + nop + + const lr2,GET_TIMER + consth lr2,GET_TIMER + const lr3,timer_get_sup + consth lr3,timer_get_sup + const v0,__settrap + consth v0,__settrap + calli lr0,v0 + nop + + asneq INIT_TIMER,gr1,gr1 + pop lr0,msp + jmpi lr0 + nop + + .global _a29k_clear_timer +_a29k_clear_timer: +; asneq CLEAR_TIMER,gr1,gr1 + jmpi lr0 + nop + + .global _a29k_disable_timer +_a29k_disable_timer: + asneq DISABLE_TIMER,gr1,gr1 + jmpi lr0 + nop + + .global _a29k_get_timer +_a29k_get_timer: + asneq GET_TIMER,gr1,gr1 + jmpi lr0 + nop |