4.104.114.84.95
Last change
on this file since bf85b19 was
21677c0e,
checked in by Joel Sherrill <joel.sherrill@…>, on 01/26/00 at 14:20:08
|
Patch rtems-rc-20000118-0.diff from Ralf Corsepius <corsepiu@…>
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.
|
-
Property mode set to
100644
|
File size:
1.8 KB
|
Line | |
---|
1 | ; |
---|
2 | ; .include "register.ah" |
---|
3 | .include "amd.ah" |
---|
4 | .include "pswmacro.ah" |
---|
5 | |
---|
6 | .text |
---|
7 | ; .equ IN,0x2000000 |
---|
8 | .reg CLOCK,gr78 |
---|
9 | .reg SECS,gr79 |
---|
10 | .equ CPUCLK,16 |
---|
11 | .equ RATE,100 |
---|
12 | .reg it0,gr64 |
---|
13 | .reg it1,gr65 |
---|
14 | .reg v0,gr96 |
---|
15 | timer_clear_sup: |
---|
16 | const it0,IN |
---|
17 | consth it0,IN |
---|
18 | mfsr it1,tmr |
---|
19 | andn it1,it1,it0 |
---|
20 | mtsr tmr,it1 |
---|
21 | const it0,RATE |
---|
22 | cplt it0,CLOCK,it0 |
---|
23 | jmpf it0,carry |
---|
24 | add CLOCK,CLOCK,1 |
---|
25 | iret |
---|
26 | carry: |
---|
27 | const CLOCK,0 |
---|
28 | add SECS,SECS,1 |
---|
29 | iret |
---|
30 | |
---|
31 | .equ TICKS,(CPUCLK*1000000/RATE) |
---|
32 | ; .equ IE,0x1000000 |
---|
33 | timer_init_sup: |
---|
34 | const it0,TICKS |
---|
35 | consth it0,TICKS |
---|
36 | mtsr tmc,it0 |
---|
37 | const it0,(IE|TICKS) |
---|
38 | consth it0,(IE|TICKS) |
---|
39 | mtsr tmr,it0 |
---|
40 | const SECS,0 |
---|
41 | const CLOCK,0 |
---|
42 | iret |
---|
43 | |
---|
44 | timer_get_sup: |
---|
45 | add gr96,SECS,0 |
---|
46 | iret |
---|
47 | |
---|
48 | timer_disable_sup: |
---|
49 | mfsr it0,ops |
---|
50 | const it1,TD |
---|
51 | consth it1,TD |
---|
52 | andn it0,it1,it0 |
---|
53 | mtsr ops,it0 |
---|
54 | iret |
---|
55 | |
---|
56 | .global _a29k_init_timer |
---|
57 | _a29k_init_timer: |
---|
58 | push msp,lr0 |
---|
59 | const lr2,INIT_TIMER |
---|
60 | consth lr2,INIT_TIMER |
---|
61 | const lr3,timer_init_sup |
---|
62 | consth lr3,timer_init_sup |
---|
63 | const v0,__settrap |
---|
64 | consth v0,__settrap |
---|
65 | calli lr0,v0 |
---|
66 | nop |
---|
67 | |
---|
68 | const lr2,CLEAR_TIMER |
---|
69 | consth lr2,CLEAR_TIMER |
---|
70 | const lr3,timer_clear_sup |
---|
71 | consth lr3,timer_clear_sup |
---|
72 | const v0,__settrap |
---|
73 | consth v0,__settrap |
---|
74 | calli lr0,v0 |
---|
75 | nop |
---|
76 | |
---|
77 | const lr2,DISABLE_TIMER |
---|
78 | consth lr2,DISABLE_TIMER |
---|
79 | const lr3,timer_disable_sup |
---|
80 | consth lr3,timer_disable_sup |
---|
81 | const v0,__settrap |
---|
82 | consth v0,__settrap |
---|
83 | calli lr0,v0 |
---|
84 | nop |
---|
85 | |
---|
86 | const lr2,GET_TIMER |
---|
87 | consth lr2,GET_TIMER |
---|
88 | const lr3,timer_get_sup |
---|
89 | consth lr3,timer_get_sup |
---|
90 | const v0,__settrap |
---|
91 | consth v0,__settrap |
---|
92 | calli lr0,v0 |
---|
93 | nop |
---|
94 | |
---|
95 | asneq INIT_TIMER,gr1,gr1 |
---|
96 | pop lr0,msp |
---|
97 | jmpi lr0 |
---|
98 | nop |
---|
99 | |
---|
100 | .global _a29k_clear_timer |
---|
101 | _a29k_clear_timer: |
---|
102 | ; asneq CLEAR_TIMER,gr1,gr1 |
---|
103 | jmpi lr0 |
---|
104 | nop |
---|
105 | |
---|
106 | .global _a29k_disable_timer |
---|
107 | _a29k_disable_timer: |
---|
108 | asneq DISABLE_TIMER,gr1,gr1 |
---|
109 | jmpi lr0 |
---|
110 | nop |
---|
111 | |
---|
112 | .global _a29k_get_timer |
---|
113 | _a29k_get_timer: |
---|
114 | asneq GET_TIMER,gr1,gr1 |
---|
115 | jmpi lr0 |
---|
116 | nop |
---|
Note: See
TracBrowser
for help on using the repository browser.