aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-m68k/raw_io.h
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2006-01-12 04:06:24 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-12 12:09:02 -0500
commitad9ec4f8de264903c6b5ba7ae8d8e96432188858 (patch)
tree9ae7f2625eaa777abdb6b5cb2d505361d37ae675 /include/asm-m68k/raw_io.h
parent9a4729118c8851bce709a00eba1b3a8f1fd9ed58 (diff)
[PATCH] m68k: basic iomem annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-m68k/raw_io.h')
-rw-r--r--include/asm-m68k/raw_io.h40
1 files changed, 20 insertions, 20 deletions
diff --git a/include/asm-m68k/raw_io.h b/include/asm-m68k/raw_io.h
index 041f0a87b25d..5439bcaa57c6 100644
--- a/include/asm-m68k/raw_io.h
+++ b/include/asm-m68k/raw_io.h
@@ -19,9 +19,9 @@
19#define IOMAP_NOCACHE_NONSER 2 19#define IOMAP_NOCACHE_NONSER 2
20#define IOMAP_WRITETHROUGH 3 20#define IOMAP_WRITETHROUGH 3
21 21
22extern void iounmap(void *addr); 22extern void iounmap(void __iomem *addr);
23 23
24extern void *__ioremap(unsigned long physaddr, unsigned long size, 24extern void __iomem *__ioremap(unsigned long physaddr, unsigned long size,
25 int cacheflag); 25 int cacheflag);
26extern void __iounmap(void *addr, unsigned long size); 26extern void __iounmap(void *addr, unsigned long size);
27 27
@@ -30,21 +30,21 @@ extern void __iounmap(void *addr, unsigned long size);
30 * two accesses to memory, which may be undesirable for some devices. 30 * two accesses to memory, which may be undesirable for some devices.
31 */ 31 */
32#define in_8(addr) \ 32#define in_8(addr) \
33 ({ u8 __v = (*(volatile u8 *) (addr)); __v; }) 33 ({ u8 __v = (*(__force volatile u8 *) (addr)); __v; })
34#define in_be16(addr) \ 34#define in_be16(addr) \
35 ({ u16 __v = (*(volatile u16 *) (addr)); __v; }) 35 ({ u16 __v = (*(__force volatile u16 *) (addr)); __v; })
36#define in_be32(addr) \ 36#define in_be32(addr) \
37 ({ u32 __v = (*(volatile u32 *) (addr)); __v; }) 37 ({ u32 __v = (*(__force volatile u32 *) (addr)); __v; })
38#define in_le16(addr) \ 38#define in_le16(addr) \
39 ({ u16 __v = le16_to_cpu(*(volatile u16 *) (addr)); __v; }) 39 ({ u16 __v = le16_to_cpu(*(__force volatile u16 *) (addr)); __v; })
40#define in_le32(addr) \ 40#define in_le32(addr) \
41 ({ u32 __v = le32_to_cpu(*(volatile u32 *) (addr)); __v; }) 41 ({ u32 __v = le32_to_cpu(*(__force volatile u32 *) (addr)); __v; })
42 42
43#define out_8(addr,b) (void)((*(volatile u8 *) (addr)) = (b)) 43#define out_8(addr,b) (void)((*(__force volatile u8 *) (addr)) = (b))
44#define out_be16(addr,w) (void)((*(volatile u16 *) (addr)) = (w)) 44#define out_be16(addr,w) (void)((*(__force volatile u16 *) (addr)) = (w))
45#define out_be32(addr,l) (void)((*(volatile u32 *) (addr)) = (l)) 45#define out_be32(addr,l) (void)((*(__force volatile u32 *) (addr)) = (l))
46#define out_le16(addr,w) (void)((*(volatile u16 *) (addr)) = cpu_to_le16(w)) 46#define out_le16(addr,w) (void)((*(__force volatile u16 *) (addr)) = cpu_to_le16(w))
47#define out_le32(addr,l) (void)((*(volatile u32 *) (addr)) = cpu_to_le32(l)) 47#define out_le32(addr,l) (void)((*(__force volatile u32 *) (addr)) = cpu_to_le32(l))
48 48
49#define raw_inb in_8 49#define raw_inb in_8
50#define raw_inw in_be16 50#define raw_inw in_be16
@@ -54,7 +54,7 @@ extern void __iounmap(void *addr, unsigned long size);
54#define raw_outw(val,port) out_be16((port),(val)) 54#define raw_outw(val,port) out_be16((port),(val))
55#define raw_outl(val,port) out_be32((port),(val)) 55#define raw_outl(val,port) out_be32((port),(val))
56 56
57static inline void raw_insb(volatile u8 *port, u8 *buf, unsigned int len) 57static inline void raw_insb(volatile u8 __iomem *port, u8 *buf, unsigned int len)
58{ 58{
59 unsigned int i; 59 unsigned int i;
60 60
@@ -62,7 +62,7 @@ static inline void raw_insb(volatile u8 *port, u8 *buf, unsigned int len)
62 *buf++ = in_8(port); 62 *buf++ = in_8(port);
63} 63}
64 64
65static inline void raw_outsb(volatile u8 *port, const u8 *buf, 65static inline void raw_outsb(volatile u8 __iomem *port, const u8 *buf,
66 unsigned int len) 66 unsigned int len)
67{ 67{
68 unsigned int i; 68 unsigned int i;
@@ -71,7 +71,7 @@ static inline void raw_outsb(volatile u8 *port, const u8 *buf,
71 out_8(port, *buf++); 71 out_8(port, *buf++);
72} 72}
73 73
74static inline void raw_insw(volatile u16 *port, u16 *buf, unsigned int nr) 74static inline void raw_insw(volatile u16 __iomem *port, u16 *buf, unsigned int nr)
75{ 75{
76 unsigned int tmp; 76 unsigned int tmp;
77 77
@@ -110,7 +110,7 @@ static inline void raw_insw(volatile u16 *port, u16 *buf, unsigned int nr)
110 } 110 }
111} 111}
112 112
113static inline void raw_outsw(volatile u16 *port, const u16 *buf, 113static inline void raw_outsw(volatile u16 __iomem *port, const u16 *buf,
114 unsigned int nr) 114 unsigned int nr)
115{ 115{
116 unsigned int tmp; 116 unsigned int tmp;
@@ -150,7 +150,7 @@ static inline void raw_outsw(volatile u16 *port, const u16 *buf,
150 } 150 }
151} 151}
152 152
153static inline void raw_insl(volatile u32 *port, u32 *buf, unsigned int nr) 153static inline void raw_insl(volatile u32 __iomem *port, u32 *buf, unsigned int nr)
154{ 154{
155 unsigned int tmp; 155 unsigned int tmp;
156 156
@@ -189,7 +189,7 @@ static inline void raw_insl(volatile u32 *port, u32 *buf, unsigned int nr)
189 } 189 }
190} 190}
191 191
192static inline void raw_outsl(volatile u32 *port, const u32 *buf, 192static inline void raw_outsl(volatile u32 __iomem *port, const u32 *buf,
193 unsigned int nr) 193 unsigned int nr)
194{ 194{
195 unsigned int tmp; 195 unsigned int tmp;
@@ -230,7 +230,7 @@ static inline void raw_outsl(volatile u32 *port, const u32 *buf,
230} 230}
231 231
232 232
233static inline void raw_insw_swapw(volatile u16 *port, u16 *buf, 233static inline void raw_insw_swapw(volatile u16 __iomem *port, u16 *buf,
234 unsigned int nr) 234 unsigned int nr)
235{ 235{
236 if ((nr) % 8) 236 if ((nr) % 8)
@@ -283,7 +283,7 @@ static inline void raw_insw_swapw(volatile u16 *port, u16 *buf,
283 : "d0", "a0", "a1", "d6"); 283 : "d0", "a0", "a1", "d6");
284} 284}
285 285
286static inline void raw_outsw_swapw(volatile u16 *port, const u16 *buf, 286static inline void raw_outsw_swapw(volatile u16 __iomem *port, const u16 *buf,
287 unsigned int nr) 287 unsigned int nr)
288{ 288{
289 if ((nr) % 8) 289 if ((nr) % 8)