1 /* $NetBSD: rapide_io_asm.S,v 1.7 1998/12/12 17:28:05 mycroft Exp $ */
4 * Copyright (c) 1997 Mark Brinicombe.
5 * Copyright (c) 1997 Causality Limited.
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 * 3. All advertising materials mentioning features or use of this software
17 * must display the following acknowledgement:
18 * This product includes software developed by Mark Brinicombe
19 * for the NetBSD Project.
20 * 4. The name of the company nor the name of the author may be used to
21 * endorse or promote products derived from this software without specific
22 * prior written permission.
24 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
25 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
26 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
27 * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
28 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 #include <machine/asm.h>
40 * bus_space I/O functions for Yellowstone RapIDE podule
42 * These are optimised 32 bit transfer routines
56 /* xfer 4 bytes at a time */
66 /* xfer 32 bytes at a time */
73 bne rapide_rm_4_m8_loop
79 /* xfer 512 bytes at a time */
80 stmfd sp!, {r4-r12, r14}
82 rapide_rm_4_m128_loop:
83 ldmia r0, {r3-r12, r14}
84 stmia r1!, {r3-r12, r14}
85 ldmia r0, {r3-r12, r14}
86 stmia r1!, {r3-r12, r14}
87 ldmia r0, {r3-r12, r14}
88 stmia r1!, {r3-r12, r14}
89 ldmia r0, {r3-r12, r14}
90 stmia r1!, {r3-r12, r14}
91 ldmia r0, {r3-r12, r14}
92 stmia r1!, {r3-r12, r14}
93 ldmia r0, {r3-r12, r14}
94 stmia r1!, {r3-r12, r14}
95 ldmia r0, {r3-r12, r14}
96 stmia r1!, {r3-r12, r14}
97 ldmia r0, {r3-r12, r14}
98 stmia r1!, {r3-r12, r14}
99 ldmia r0, {r3-r12, r14}
100 stmia r1!, {r3-r12, r14}
101 ldmia r0, {r3-r12, r14}
102 stmia r1!, {r3-r12, r14}
103 ldmia r0, {r3-r12, r14}
104 stmia r1!, {r3-r12, r14}
108 bne rapide_rm_4_m128_loop
110 ldmfd sp!, {r4-r12, pc}
112 ENTRY(rapide_bs_wm_4)
121 /* xfer 4 bytes at a time */
123 ldr r3, [r1], #0x0004
131 /* xfer 32 bytes at a time */
138 bne rapide_wm_4_m8_loop
144 /* xfer 512 bytes at a time */
147 rapide_wm_4_m128_loop:
175 bne rapide_wm_4_m128_loop