aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sparc64/io.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-sparc64/io.h')
-rw-r--r--include/asm-sparc64/io.h29
1 files changed, 14 insertions, 15 deletions
diff --git a/include/asm-sparc64/io.h b/include/asm-sparc64/io.h
index cd7ef3097ac2..c299b853b5ba 100644
--- a/include/asm-sparc64/io.h
+++ b/include/asm-sparc64/io.h
@@ -1,4 +1,3 @@
1/* $Id: io.h,v 1.47 2001/12/13 10:36:02 davem Exp $ */
2#ifndef __SPARC64_IO_H 1#ifndef __SPARC64_IO_H
3#define __SPARC64_IO_H 2#define __SPARC64_IO_H
4 3
@@ -19,7 +18,7 @@ extern unsigned long kern_base, kern_size;
19#define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) 18#define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
20#define BIO_VMERGE_BOUNDARY 8192 19#define BIO_VMERGE_BOUNDARY 8192
21 20
22static __inline__ u8 _inb(unsigned long addr) 21static inline u8 _inb(unsigned long addr)
23{ 22{
24 u8 ret; 23 u8 ret;
25 24
@@ -30,7 +29,7 @@ static __inline__ u8 _inb(unsigned long addr)
30 return ret; 29 return ret;
31} 30}
32 31
33static __inline__ u16 _inw(unsigned long addr) 32static inline u16 _inw(unsigned long addr)
34{ 33{
35 u16 ret; 34 u16 ret;
36 35
@@ -41,7 +40,7 @@ static __inline__ u16 _inw(unsigned long addr)
41 return ret; 40 return ret;
42} 41}
43 42
44static __inline__ u32 _inl(unsigned long addr) 43static inline u32 _inl(unsigned long addr)
45{ 44{
46 u32 ret; 45 u32 ret;
47 46
@@ -52,21 +51,21 @@ static __inline__ u32 _inl(unsigned long addr)
52 return ret; 51 return ret;
53} 52}
54 53
55static __inline__ void _outb(u8 b, unsigned long addr) 54static inline void _outb(u8 b, unsigned long addr)
56{ 55{
57 __asm__ __volatile__("stba\t%r0, [%1] %2\t/* pci_outb */" 56 __asm__ __volatile__("stba\t%r0, [%1] %2\t/* pci_outb */"
58 : /* no outputs */ 57 : /* no outputs */
59 : "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); 58 : "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L));
60} 59}
61 60
62static __inline__ void _outw(u16 w, unsigned long addr) 61static inline void _outw(u16 w, unsigned long addr)
63{ 62{
64 __asm__ __volatile__("stha\t%r0, [%1] %2\t/* pci_outw */" 63 __asm__ __volatile__("stha\t%r0, [%1] %2\t/* pci_outw */"
65 : /* no outputs */ 64 : /* no outputs */
66 : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); 65 : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L));
67} 66}
68 67
69static __inline__ void _outl(u32 l, unsigned long addr) 68static inline void _outl(u32 l, unsigned long addr)
70{ 69{
71 __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* pci_outl */" 70 __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* pci_outl */"
72 : /* no outputs */ 71 : /* no outputs */
@@ -205,7 +204,7 @@ static inline void _writeq(u64 q, volatile void __iomem *addr)
205#define writeq(__q, __addr) _writeq(__q, __addr) 204#define writeq(__q, __addr) _writeq(__q, __addr)
206 205
207/* Now versions without byte-swapping. */ 206/* Now versions without byte-swapping. */
208static __inline__ u8 _raw_readb(unsigned long addr) 207static inline u8 _raw_readb(unsigned long addr)
209{ 208{
210 u8 ret; 209 u8 ret;
211 210
@@ -216,7 +215,7 @@ static __inline__ u8 _raw_readb(unsigned long addr)
216 return ret; 215 return ret;
217} 216}
218 217
219static __inline__ u16 _raw_readw(unsigned long addr) 218static inline u16 _raw_readw(unsigned long addr)
220{ 219{
221 u16 ret; 220 u16 ret;
222 221
@@ -227,7 +226,7 @@ static __inline__ u16 _raw_readw(unsigned long addr)
227 return ret; 226 return ret;
228} 227}
229 228
230static __inline__ u32 _raw_readl(unsigned long addr) 229static inline u32 _raw_readl(unsigned long addr)
231{ 230{
232 u32 ret; 231 u32 ret;
233 232
@@ -238,7 +237,7 @@ static __inline__ u32 _raw_readl(unsigned long addr)
238 return ret; 237 return ret;
239} 238}
240 239
241static __inline__ u64 _raw_readq(unsigned long addr) 240static inline u64 _raw_readq(unsigned long addr)
242{ 241{
243 u64 ret; 242 u64 ret;
244 243
@@ -249,28 +248,28 @@ static __inline__ u64 _raw_readq(unsigned long addr)
249 return ret; 248 return ret;
250} 249}
251 250
252static __inline__ void _raw_writeb(u8 b, unsigned long addr) 251static inline void _raw_writeb(u8 b, unsigned long addr)
253{ 252{
254 __asm__ __volatile__("stba\t%r0, [%1] %2\t/* pci_raw_writeb */" 253 __asm__ __volatile__("stba\t%r0, [%1] %2\t/* pci_raw_writeb */"
255 : /* no outputs */ 254 : /* no outputs */
256 : "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); 255 : "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E));
257} 256}
258 257
259static __inline__ void _raw_writew(u16 w, unsigned long addr) 258static inline void _raw_writew(u16 w, unsigned long addr)
260{ 259{
261 __asm__ __volatile__("stha\t%r0, [%1] %2\t/* pci_raw_writew */" 260 __asm__ __volatile__("stha\t%r0, [%1] %2\t/* pci_raw_writew */"
262 : /* no outputs */ 261 : /* no outputs */
263 : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); 262 : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E));
264} 263}
265 264
266static __inline__ void _raw_writel(u32 l, unsigned long addr) 265static inline void _raw_writel(u32 l, unsigned long addr)
267{ 266{
268 __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* pci_raw_writel */" 267 __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* pci_raw_writel */"
269 : /* no outputs */ 268 : /* no outputs */
270 : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); 269 : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E));
271} 270}
272 271
273static __inline__ void _raw_writeq(u64 q, unsigned long addr) 272static inline void _raw_writeq(u64 q, unsigned long addr)
274{ 273{
275 __asm__ __volatile__("stxa\t%r0, [%1] %2\t/* pci_raw_writeq */" 274 __asm__ __volatile__("stxa\t%r0, [%1] %2\t/* pci_raw_writeq */"
276 : /* no outputs */ 275 : /* no outputs */