ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / arch / arm / lib / io-acorn.S
1 /*
2  *  linux/arch/arm/lib/io-acorn.S
3  *
4  *  Copyright (C) 1995, 1996 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  * 27/03/03 Ian Molton Clean up CONFIG_CPU
11  *
12  */
13 #include <linux/linkage.h>
14 #include <asm/assembler.h>
15 #include <asm/hardware.h>
16
17                 .text
18                 .align
19
20                 .equ    diff_pcio_base, PCIO_BASE - IO_BASE
21
22                 .macro  outw2   rd
23                 mov     r8, \rd, lsl #16
24                 orr     r8, r8, r8, lsr #16
25                 str     r8, [r3, r0, lsl #2]
26                 mov     r8, \rd, lsr #16
27                 orr     r8, r8, r8, lsl #16
28                 str     r8, [r3, r0, lsl #2]
29                 .endm
30
31                 .macro  inw2    rd, mask, temp
32                 ldr     \rd, [r0]
33                 and     \rd, \rd, \mask
34                 ldr     \temp, [r0]
35                 orr     \rd, \rd, \temp, lsl #16
36                 .endm
37
38                 .macro  addr    rd
39                 tst     \rd, #0x80000000
40                 mov     \rd, \rd, lsl #2
41                 add     \rd, \rd, #IO_BASE
42                 addeq   \rd, \rd, #diff_pcio_base
43                 .endm
44
45 .iosl_warning:
46                 .ascii  "<4>insl/outsl not implemented, called from %08lX\0"
47                 .align
48
49 /*
50  * These make no sense on Acorn machines.
51  * Print a warning message.
52  */
53 ENTRY(insl)
54 ENTRY(outsl)
55                 adr     r0, .iosl_warning
56                 mov     r1, lr
57                 b       printk