aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/lib/ins.S
diff options
context:
space:
mode:
authorYi Li <yi.li@analog.com>2009-01-07 10:14:39 -0500
committerBryan Wu <cooloney@kernel.org>2009-01-07 10:14:39 -0500
commit6a01f230339321292cf065551f8cf55361052461 (patch)
tree7ac2ac8fc9f05a7315ef6a7f6f0a387433c62c14 /arch/blackfin/lib/ins.S
parent5105432a3201e3f0e6c219cd0a74feee1e5e262b (diff)
Blackfin arch: merge adeos blackfin part to arch/blackfin/
[Mike Frysinger <vapier.adi@gmail.com>: - handle bf531/bf532/bf534/bf536 variants in ipipe.h - cleanup IPIPE logic for bfin_set_irq_handler() - cleanup ipipe asm code a bit and add missing ENDPROC() - simplify IPIPE code in trap_c - unify some of the IPIPE code and fix style - simplify DO_IRQ_L1 handling with ipipe code - revert IRQ_SW_INT# addition from ipipe merge - remove duplicate get_{c,s}clk() prototypes ] Signed-off-by: Yi Li <yi.li@analog.com> Signed-off-by: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin/lib/ins.S')
-rw-r--r--arch/blackfin/lib/ins.S163
1 files changed, 160 insertions, 3 deletions
diff --git a/arch/blackfin/lib/ins.S b/arch/blackfin/lib/ins.S
index d60554dce87b..1b84b21ca7d1 100644
--- a/arch/blackfin/lib/ins.S
+++ b/arch/blackfin/lib/ins.S
@@ -56,7 +56,16 @@
56ENTRY(_insl) 56ENTRY(_insl)
57#ifdef CONFIG_BFIN_INS_LOWOVERHEAD 57#ifdef CONFIG_BFIN_INS_LOWOVERHEAD
58 P0 = R0; /* P0 = port */ 58 P0 = R0; /* P0 = port */
59#ifdef CONFIG_IPIPE
60 [--sp] = rets
61 [--sp] = (P5:0);
62 sp += -12
63 call ___ipipe_stall_root_raw
64 sp += 12
65 (P5:0) = [sp++];
66#else
59 cli R3; 67 cli R3;
68#endif
60 P1 = R1; /* P1 = address */ 69 P1 = R1; /* P1 = address */
61 P2 = R2; /* P2 = count */ 70 P2 = R2; /* P2 = count */
62 SSYNC; 71 SSYNC;
@@ -65,7 +74,14 @@ ENTRY(_insl)
65 [P1++] = R0; 74 [P1++] = R0;
66 NOP; 75 NOP;
67.Llong_loop_e: NOP; 76.Llong_loop_e: NOP;
77#ifdef CONFIG_IPIPE
78 sp += -12
79 call ___ipipe_unstall_root_raw
80 sp += 12
81 rets = [sp++]
82#else
68 sti R3; 83 sti R3;
84#endif
69 RTS; 85 RTS;
70#else 86#else
71 P0 = R0; /* P0 = port */ 87 P0 = R0; /* P0 = port */
@@ -74,13 +90,28 @@ ENTRY(_insl)
74 SSYNC; 90 SSYNC;
75 LSETUP( .Llong_loop_s, .Llong_loop_e) LC0 = P2; 91 LSETUP( .Llong_loop_s, .Llong_loop_e) LC0 = P2;
76.Llong_loop_s: 92.Llong_loop_s:
93#ifdef CONFIG_IPIPE
94 [--sp] = rets
95 [--sp] = (P5:0);
96 sp += -12
97 call ___ipipe_stall_root_raw
98 sp += 12
99 (P5:0) = [sp++];
100#else
77 CLI R3; 101 CLI R3;
102#endif
78 NOP; NOP; NOP; 103 NOP; NOP; NOP;
79 R0 = [P0]; 104 R0 = [P0];
80 [P1++] = R0; 105 [P1++] = R0;
81.Llong_loop_e: 106.Llong_loop_e:
107#ifdef CONFIG_IPIPE
108 sp += -12
109 call ___ipipe_unstall_root_raw
110 sp += 12
111 rets = [sp++]
112#else
82 STI R3; 113 STI R3;
83 114#endif
84 RTS; 115 RTS;
85#endif 116#endif
86ENDPROC(_insl) 117ENDPROC(_insl)
@@ -88,7 +119,16 @@ ENDPROC(_insl)
88ENTRY(_insw) 119ENTRY(_insw)
89#ifdef CONFIG_BFIN_INS_LOWOVERHEAD 120#ifdef CONFIG_BFIN_INS_LOWOVERHEAD
90 P0 = R0; /* P0 = port */ 121 P0 = R0; /* P0 = port */
122#ifdef CONFIG_IPIPE
123 [--sp] = rets
124 [--sp] = (P5:0);
125 sp += -12
126 call ___ipipe_stall_root_raw
127 sp += 12
128 (P5:0) = [sp++];
129#else
91 cli R3; 130 cli R3;
131#endif
92 P1 = R1; /* P1 = address */ 132 P1 = R1; /* P1 = address */
93 P2 = R2; /* P2 = count */ 133 P2 = R2; /* P2 = count */
94 SSYNC; 134 SSYNC;
@@ -97,7 +137,14 @@ ENTRY(_insw)
97 W[P1++] = R0; 137 W[P1++] = R0;
98 NOP; 138 NOP;
99.Lword_loop_e: NOP; 139.Lword_loop_e: NOP;
140#ifdef CONFIG_IPIPE
141 sp += -12
142 call ___ipipe_unstall_root_raw
143 sp += 12
144 rets = [sp++]
145#else
100 sti R3; 146 sti R3;
147#endif
101 RTS; 148 RTS;
102#else 149#else
103 P0 = R0; /* P0 = port */ 150 P0 = R0; /* P0 = port */
@@ -106,12 +153,28 @@ ENTRY(_insw)
106 SSYNC; 153 SSYNC;
107 LSETUP( .Lword_loop_s, .Lword_loop_e) LC0 = P2; 154 LSETUP( .Lword_loop_s, .Lword_loop_e) LC0 = P2;
108.Lword_loop_s: 155.Lword_loop_s:
156#ifdef CONFIG_IPIPE
157 [--sp] = rets
158 [--sp] = (P5:0);
159 sp += -12
160 call ___ipipe_stall_root_raw
161 sp += 12
162 (P5:0) = [sp++];
163#else
109 CLI R3; 164 CLI R3;
165#endif
110 NOP; NOP; NOP; 166 NOP; NOP; NOP;
111 R0 = W[P0]; 167 R0 = W[P0];
112 W[P1++] = R0; 168 W[P1++] = R0;
113.Lword_loop_e: 169.Lword_loop_e:
170#ifdef CONFIG_IPIPE
171 sp += -12
172 call ___ipipe_unstall_root_raw
173 sp += 12
174 rets = [sp++]
175#else
114 STI R3; 176 STI R3;
177#endif
115 RTS; 178 RTS;
116 179
117#endif 180#endif
@@ -120,7 +183,16 @@ ENDPROC(_insw)
120ENTRY(_insw_8) 183ENTRY(_insw_8)
121#ifdef CONFIG_BFIN_INS_LOWOVERHEAD 184#ifdef CONFIG_BFIN_INS_LOWOVERHEAD
122 P0 = R0; /* P0 = port */ 185 P0 = R0; /* P0 = port */
186#ifdef CONFIG_IPIPE
187 [--sp] = rets
188 [--sp] = (P5:0);
189 sp += -12
190 call ___ipipe_stall_root_raw
191 sp += 12
192 (P5:0) = [sp++];
193#else
123 cli R3; 194 cli R3;
195#endif
124 P1 = R1; /* P1 = address */ 196 P1 = R1; /* P1 = address */
125 P2 = R2; /* P2 = count */ 197 P2 = R2; /* P2 = count */
126 SSYNC; 198 SSYNC;
@@ -131,7 +203,14 @@ ENTRY(_insw_8)
131 B[P1++] = R0; 203 B[P1++] = R0;
132 NOP; 204 NOP;
133.Lword8_loop_e: NOP; 205.Lword8_loop_e: NOP;
206#ifdef CONFIG_IPIPE
207 sp += -12
208 call ___ipipe_unstall_root_raw
209 sp += 12
210 rets = [sp++]
211#else
134 sti R3; 212 sti R3;
213#endif
135 RTS; 214 RTS;
136#else 215#else
137 P0 = R0; /* P0 = port */ 216 P0 = R0; /* P0 = port */
@@ -140,7 +219,16 @@ ENTRY(_insw_8)
140 SSYNC; 219 SSYNC;
141 LSETUP( .Lword8_loop_s, .Lword8_loop_e) LC0 = P2; 220 LSETUP( .Lword8_loop_s, .Lword8_loop_e) LC0 = P2;
142.Lword8_loop_s: 221.Lword8_loop_s:
222#ifdef CONFIG_IPIPE
223 [--sp] = rets
224 [--sp] = (P5:0);
225 sp += -12
226 call ___ipipe_stall_root_raw
227 sp += 12
228 (P5:0) = [sp++];
229#else
143 CLI R3; 230 CLI R3;
231#endif
144 NOP; NOP; NOP; 232 NOP; NOP; NOP;
145 R0 = W[P0]; 233 R0 = W[P0];
146 B[P1++] = R0; 234 B[P1++] = R0;
@@ -148,8 +236,14 @@ ENTRY(_insw_8)
148 B[P1++] = R0; 236 B[P1++] = R0;
149 NOP; 237 NOP;
150.Lword8_loop_e: 238.Lword8_loop_e:
239#ifdef CONFIG_IPIPE
240 sp += -12
241 call ___ipipe_unstall_root_raw
242 sp += 12
243 rets = [sp++]
244#else
151 STI R3; 245 STI R3;
152 246#endif
153 RTS; 247 RTS;
154#endif 248#endif
155ENDPROC(_insw_8) 249ENDPROC(_insw_8)
@@ -157,7 +251,16 @@ ENDPROC(_insw_8)
157ENTRY(_insb) 251ENTRY(_insb)
158#ifdef CONFIG_BFIN_INS_LOWOVERHEAD 252#ifdef CONFIG_BFIN_INS_LOWOVERHEAD
159 P0 = R0; /* P0 = port */ 253 P0 = R0; /* P0 = port */
254#ifdef CONFIG_IPIPE
255 [--sp] = rets
256 [--sp] = (P5:0);
257 sp += -12
258 call ___ipipe_stall_root_raw
259 sp += 12
260 (P5:0) = [sp++];
261#else
160 cli R3; 262 cli R3;
263#endif
161 P1 = R1; /* P1 = address */ 264 P1 = R1; /* P1 = address */
162 P2 = R2; /* P2 = count */ 265 P2 = R2; /* P2 = count */
163 SSYNC; 266 SSYNC;
@@ -166,7 +269,14 @@ ENTRY(_insb)
166 B[P1++] = R0; 269 B[P1++] = R0;
167 NOP; 270 NOP;
168.Lbyte_loop_e: NOP; 271.Lbyte_loop_e: NOP;
272#ifdef CONFIG_IPIPE
273 sp += -12
274 call ___ipipe_unstall_root_raw
275 sp += 12
276 rets = [sp++]
277#else
169 sti R3; 278 sti R3;
279#endif
170 RTS; 280 RTS;
171#else 281#else
172 P0 = R0; /* P0 = port */ 282 P0 = R0; /* P0 = port */
@@ -175,13 +285,28 @@ ENTRY(_insb)
175 SSYNC; 285 SSYNC;
176 LSETUP( .Lbyte_loop_s, .Lbyte_loop_e) LC0 = P2; 286 LSETUP( .Lbyte_loop_s, .Lbyte_loop_e) LC0 = P2;
177.Lbyte_loop_s: 287.Lbyte_loop_s:
288#ifdef CONFIG_IPIPE
289 [--sp] = rets
290 [--sp] = (P5:0);
291 sp += -12
292 call ___ipipe_stall_root_raw
293 sp += 12
294 (P5:0) = [sp++];
295#else
178 CLI R3; 296 CLI R3;
297#endif
179 NOP; NOP; NOP; 298 NOP; NOP; NOP;
180 R0 = B[P0]; 299 R0 = B[P0];
181 B[P1++] = R0; 300 B[P1++] = R0;
182.Lbyte_loop_e: 301.Lbyte_loop_e:
302#ifdef CONFIG_IPIPE
303 sp += -12
304 call ___ipipe_unstall_root_raw
305 sp += 12
306 rets = [sp++]
307#else
183 STI R3; 308 STI R3;
184 309#endif
185 RTS; 310 RTS;
186#endif 311#endif
187ENDPROC(_insb) 312ENDPROC(_insb)
@@ -189,7 +314,16 @@ ENDPROC(_insb)
189ENTRY(_insl_16) 314ENTRY(_insl_16)
190#ifdef CONFIG_BFIN_INS_LOWOVERHEAD 315#ifdef CONFIG_BFIN_INS_LOWOVERHEAD
191 P0 = R0; /* P0 = port */ 316 P0 = R0; /* P0 = port */
317#ifdef CONFIG_IPIPE
318 [--sp] = rets
319 [--sp] = (P5:0);
320 sp += -12
321 call ___ipipe_stall_root_raw
322 sp += 12
323 (P5:0) = [sp++];
324#else
192 cli R3; 325 cli R3;
326#endif
193 P1 = R1; /* P1 = address */ 327 P1 = R1; /* P1 = address */
194 P2 = R2; /* P2 = count */ 328 P2 = R2; /* P2 = count */
195 SSYNC; 329 SSYNC;
@@ -200,7 +334,14 @@ ENTRY(_insl_16)
200 W[P1++] = R0; 334 W[P1++] = R0;
201 NOP; 335 NOP;
202.Llong16_loop_e: NOP; 336.Llong16_loop_e: NOP;
337#ifdef CONFIG_IPIPE
338 sp += -12
339 call ___ipipe_unstall_root_raw
340 sp += 12
341 rets = [sp++]
342#else
203 sti R3; 343 sti R3;
344#endif
204 RTS; 345 RTS;
205#else 346#else
206 P0 = R0; /* P0 = port */ 347 P0 = R0; /* P0 = port */
@@ -209,14 +350,30 @@ ENTRY(_insl_16)
209 SSYNC; 350 SSYNC;
210 LSETUP( .Llong16_loop_s, .Llong16_loop_e) LC0 = P2; 351 LSETUP( .Llong16_loop_s, .Llong16_loop_e) LC0 = P2;
211.Llong16_loop_s: 352.Llong16_loop_s:
353#ifdef CONFIG_IPIPE
354 [--sp] = rets
355 [--sp] = (P5:0);
356 sp += -12
357 call ___ipipe_stall_root_raw
358 sp += 12
359 (P5:0) = [sp++];
360#else
212 CLI R3; 361 CLI R3;
362#endif
213 NOP; NOP; NOP; 363 NOP; NOP; NOP;
214 R0 = [P0]; 364 R0 = [P0];
215 W[P1++] = R0; 365 W[P1++] = R0;
216 R0 = R0 >> 16; 366 R0 = R0 >> 16;
217 W[P1++] = R0; 367 W[P1++] = R0;
218.Llong16_loop_e: 368.Llong16_loop_e:
369#ifdef CONFIG_IPIPE
370 sp += -12
371 call ___ipipe_unstall_root_raw
372 sp += 12
373 rets = [sp++]
374#else
219 STI R3; 375 STI R3;
376#endif
220 RTS; 377 RTS;
221#endif 378#endif
222ENDPROC(_insl_16) 379ENDPROC(_insl_16)