19
19
#include <asm-generic/iomap.h>
20
20
#endif
21
21
22
+ #ifndef mmiowb
22
23
#define mmiowb () do {} while (0)
24
+ #endif
23
25
24
26
/*****************************************************************************/
25
27
/*
28
30
* differently. On the simple architectures, we just read/write the
29
31
* memory location directly.
30
32
*/
33
+ #ifndef __raw_readb
31
34
static inline u8 __raw_readb (const volatile void __iomem * addr )
32
35
{
33
36
return * (const volatile u8 __force * ) addr ;
34
37
}
38
+ #endif
35
39
40
+ #ifndef __raw_readw
36
41
static inline u16 __raw_readw (const volatile void __iomem * addr )
37
42
{
38
43
return * (const volatile u16 __force * ) addr ;
39
44
}
45
+ #endif
40
46
47
+ #ifndef __raw_readl
41
48
static inline u32 __raw_readl (const volatile void __iomem * addr )
42
49
{
43
50
return * (const volatile u32 __force * ) addr ;
44
51
}
52
+ #endif
45
53
46
54
#define readb __raw_readb
47
55
#define readw (addr ) __le16_to_cpu(__raw_readw(addr))
48
56
#define readl (addr ) __le32_to_cpu(__raw_readl(addr))
49
57
58
+ #ifndef __raw_writeb
50
59
static inline void __raw_writeb (u8 b , volatile void __iomem * addr )
51
60
{
52
61
* (volatile u8 __force * ) addr = b ;
53
62
}
63
+ #endif
54
64
65
+ #ifndef __raw_writew
55
66
static inline void __raw_writew (u16 b , volatile void __iomem * addr )
56
67
{
57
68
* (volatile u16 __force * ) addr = b ;
58
69
}
70
+ #endif
59
71
72
+ #ifndef __raw_writel
60
73
static inline void __raw_writel (u32 b , volatile void __iomem * addr )
61
74
{
62
75
* (volatile u32 __force * ) addr = b ;
63
76
}
77
+ #endif
64
78
65
79
#define writeb __raw_writeb
66
80
#define writew (b ,addr ) __raw_writew(__cpu_to_le16(b),addr)
@@ -122,6 +136,7 @@ static inline void outl(u32 b, unsigned long addr)
122
136
#define outw_p (x , addr ) outw((x), (addr))
123
137
#define outl_p (x , addr ) outl((x), (addr))
124
138
139
+ #ifndef insb
125
140
static inline void insb (unsigned long addr , void * buffer , int count )
126
141
{
127
142
if (count ) {
@@ -132,7 +147,9 @@ static inline void insb(unsigned long addr, void *buffer, int count)
132
147
} while (-- count );
133
148
}
134
149
}
150
+ #endif
135
151
152
+ #ifndef insw
136
153
static inline void insw (unsigned long addr , void * buffer , int count )
137
154
{
138
155
if (count ) {
@@ -143,7 +160,9 @@ static inline void insw(unsigned long addr, void *buffer, int count)
143
160
} while (-- count );
144
161
}
145
162
}
163
+ #endif
146
164
165
+ #ifndef insl
147
166
static inline void insl (unsigned long addr , void * buffer , int count )
148
167
{
149
168
if (count ) {
@@ -154,7 +173,9 @@ static inline void insl(unsigned long addr, void *buffer, int count)
154
173
} while (-- count );
155
174
}
156
175
}
176
+ #endif
157
177
178
+ #ifndef outsb
158
179
static inline void outsb (unsigned long addr , const void * buffer , int count )
159
180
{
160
181
if (count ) {
@@ -164,7 +185,9 @@ static inline void outsb(unsigned long addr, const void *buffer, int count)
164
185
} while (-- count );
165
186
}
166
187
}
188
+ #endif
167
189
190
+ #ifndef outsw
168
191
static inline void outsw (unsigned long addr , const void * buffer , int count )
169
192
{
170
193
if (count ) {
@@ -174,7 +197,9 @@ static inline void outsw(unsigned long addr, const void *buffer, int count)
174
197
} while (-- count );
175
198
}
176
199
}
200
+ #endif
177
201
202
+ #ifndef outsl
178
203
static inline void outsl (unsigned long addr , const void * buffer , int count )
179
204
{
180
205
if (count ) {
@@ -184,6 +209,7 @@ static inline void outsl(unsigned long addr, const void *buffer, int count)
184
209
} while (-- count );
185
210
}
186
211
}
212
+ #endif
187
213
188
214
#ifndef CONFIG_GENERIC_IOMAP
189
215
#define ioread8 (addr ) readb(addr)
0 commit comments