import of upstream 2.4.34.4 from kernel.org
[linux-2.4.git] / arch / ia64 / sn / kernel / sn2 / io.c
1 /* 
2  * This file is subject to the terms and conditions of the GNU General Public
3  * License.  See the file "COPYING" in the main directory of this archive
4  * for more details.
5  *
6  * Copyright (C) 2003 Silicon Graphics, Inc. All rights reserved.
7  *
8  * The generic kernel requires function pointers to these routines, so
9  * we wrap the inlines from asm/ia64/sn/sn2/io.h here.
10  */
11
12 #include <asm/sn/sn2/io.h>
13
14 unsigned int
15 sn_inb (unsigned long port)
16 {
17         return __sn_inb(port);
18 }
19
20 unsigned int
21 sn_inw (unsigned long port)
22 {
23         return __sn_inw(port);
24 }
25
26 unsigned int
27 sn_inl (unsigned long port)
28 {
29         return __sn_inl(port);
30 }
31
32 void
33 sn_outb (unsigned char val, unsigned long port)
34 {
35         __sn_outb(val, port);
36 }
37
38 void
39 sn_outw (unsigned short val, unsigned long port)
40 {
41         __sn_outw(val, port);
42 }
43
44 void
45 sn_outl (unsigned int val, unsigned long port)
46 {
47         __sn_outl(val, port);
48 }
49
50 unsigned char
51 sn_readb (void *addr)
52 {
53         return __sn_readb (addr);
54 }
55
56 unsigned short
57 sn_readw (void *addr)
58 {
59         return __sn_readw (addr);
60 }
61
62 unsigned int
63 sn_readl (void *addr)
64 {
65         return __sn_readl (addr);
66 }
67
68 unsigned long
69 sn_readq (void *addr)
70 {
71         return __sn_readq (addr);
72 }
73
74
75 /* define aliases: */
76
77 asm (".global __sn_inb, __sn_inw, __sn_inl");
78 asm ("__sn_inb = sn_inb");
79 asm ("__sn_inw = sn_inw");
80 asm ("__sn_inl = sn_inl");
81
82 asm (".global __sn_outb, __sn_outw, __sn_outl");
83 asm ("__sn_outb = sn_outb");
84 asm ("__sn_outw = sn_outw");
85 asm ("__sn_outl = sn_outl");
86
87 asm (".global __sn_readb, __sn_readw, __sn_readl, __sn_readq");
88 asm ("__sn_readb = sn_readb");
89 asm ("__sn_readw = sn_readw");
90 asm ("__sn_readl = sn_readl");
91 asm ("__sn_readq = sn_readq");