http://downloads.netgear.com/files/GPL/GPL_Source_V361j_DM111PSP_series_consumer_rele...
[bcm963xx.git] / kernel / linux / arch / arm / lib / io-writesl.S
1 /*
2  *  linux/arch/arm/lib/io-writesl.S
3  *
4  *  Copyright (C) 1995-2000 Russell King
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  */
10 #include <linux/linkage.h>
11 #include <asm/assembler.h>
12 #include <asm/hardware.h>
13
14 ENTRY(__raw_writesl)
15                 teq     r2, #0          @ do we have to check for the zero len?
16                 moveq   pc, lr
17                 ands    ip, r1, #3
18                 bne     2f
19
20                 tst     r2, #1
21                 ldrne   r3, [r1], #4
22                 strne   r3, [r0, #0]
23 1:              subs    r2, r2, #2
24                 ldrcs   r3, [r1], #4
25                 ldrcs   ip, [r1], #4
26                 strcs   r3, [r0, #0]
27                 strcs   ip, [r0, #0]
28                 bcs     1b
29                 mov     pc, lr
30
31 2:              bic     r1, r1, #3
32                 cmp     ip, #2
33                 ldr     r3, [r1], #4
34                 bgt     4f
35                 blt     5f
36
37 3:              mov     ip, r3, lsr #16
38                 ldr     r3, [r1], #4
39                 subs    r2, r2, #1
40                 orr     ip, ip, r3, lsl #16
41                 str     ip, [r0, #0]
42                 bne     3b
43                 mov     pc, lr
44
45 4:              mov     ip, r3, lsr #24
46                 ldr     r3, [r1], #4
47                 subs    r2, r2, #1
48                 orr     ip, ip, r3, lsl #8
49                 str     ip, [r0, #0]
50                 bne     4b
51                 mov     pc, lr
52
53 5:              mov     ip, r3, lsr #8
54                 ldr     r3, [r1], #4
55                 subs    r2, r2, #1
56                 orr     ip, ip, r3, lsl #24
57                 str     ip, [r0, #0]
58                 bne     5b
59                 mov     pc, lr
60
61