@@ -128,98 +128,16 @@ static inline void gsc_writeq(unsigned long long val, unsigned long addr)
128
128
void __iomem * ioremap (unsigned long offset , unsigned long size );
129
129
#define ioremap_wc ioremap
130
130
#define ioremap_uc ioremap
131
+ #define pci_iounmap pci_iounmap
131
132
132
133
extern void iounmap (const volatile void __iomem * addr );
133
134
134
- static inline unsigned char __raw_readb (const volatile void __iomem * addr )
135
- {
136
- return (* (volatile unsigned char __force * ) (addr ));
137
- }
138
- static inline unsigned short __raw_readw (const volatile void __iomem * addr )
139
- {
140
- return * (volatile unsigned short __force * ) addr ;
141
- }
142
- static inline unsigned int __raw_readl (const volatile void __iomem * addr )
143
- {
144
- return * (volatile unsigned int __force * ) addr ;
145
- }
146
- static inline unsigned long long __raw_readq (const volatile void __iomem * addr )
147
- {
148
- return * (volatile unsigned long long __force * ) addr ;
149
- }
150
-
151
- static inline void __raw_writeb (unsigned char b , volatile void __iomem * addr )
152
- {
153
- * (volatile unsigned char __force * ) addr = b ;
154
- }
155
- static inline void __raw_writew (unsigned short b , volatile void __iomem * addr )
156
- {
157
- * (volatile unsigned short __force * ) addr = b ;
158
- }
159
- static inline void __raw_writel (unsigned int b , volatile void __iomem * addr )
160
- {
161
- * (volatile unsigned int __force * ) addr = b ;
162
- }
163
- static inline void __raw_writeq (unsigned long long b , volatile void __iomem * addr )
164
- {
165
- * (volatile unsigned long long __force * ) addr = b ;
166
- }
167
-
168
- static inline unsigned char readb (const volatile void __iomem * addr )
169
- {
170
- return __raw_readb (addr );
171
- }
172
- static inline unsigned short readw (const volatile void __iomem * addr )
173
- {
174
- return le16_to_cpu ((__le16 __force ) __raw_readw (addr ));
175
- }
176
- static inline unsigned int readl (const volatile void __iomem * addr )
177
- {
178
- return le32_to_cpu ((__le32 __force ) __raw_readl (addr ));
179
- }
180
- static inline unsigned long long readq (const volatile void __iomem * addr )
181
- {
182
- return le64_to_cpu ((__le64 __force ) __raw_readq (addr ));
183
- }
184
-
185
- static inline void writeb (unsigned char b , volatile void __iomem * addr )
186
- {
187
- __raw_writeb (b , addr );
188
- }
189
- static inline void writew (unsigned short w , volatile void __iomem * addr )
190
- {
191
- __raw_writew ((__u16 __force ) cpu_to_le16 (w ), addr );
192
- }
193
- static inline void writel (unsigned int l , volatile void __iomem * addr )
194
- {
195
- __raw_writel ((__u32 __force ) cpu_to_le32 (l ), addr );
196
- }
197
- static inline void writeq (unsigned long long q , volatile void __iomem * addr )
198
- {
199
- __raw_writeq ((__u64 __force ) cpu_to_le64 (q ), addr );
200
- }
201
-
202
- #define readb readb
203
- #define readw readw
204
- #define readl readl
205
- #define readq readq
206
- #define writeb writeb
207
- #define writew writew
208
- #define writel writel
209
- #define writeq writeq
210
-
211
- #define readb_relaxed (addr ) readb(addr)
212
- #define readw_relaxed (addr ) readw(addr)
213
- #define readl_relaxed (addr ) readl(addr)
214
- #define readq_relaxed (addr ) readq(addr)
215
- #define writeb_relaxed (b , addr ) writeb(b, addr)
216
- #define writew_relaxed (w , addr ) writew(w, addr)
217
- #define writel_relaxed (l , addr ) writel(l, addr)
218
- #define writeq_relaxed (q , addr ) writeq(q, addr)
219
-
220
135
void memset_io (volatile void __iomem * addr , unsigned char val , int count );
221
136
void memcpy_fromio (void * dst , const volatile void __iomem * src , int count );
222
137
void memcpy_toio (volatile void __iomem * dst , const void * src , int count );
138
+ #define memset_io memset_io
139
+ #define memcpy_fromio memcpy_fromio
140
+ #define memcpy_toio memcpy_toio
223
141
224
142
/* Port-space IO */
225
143
@@ -241,10 +159,15 @@ extern void eisa_out32(unsigned int data, unsigned short port);
241
159
extern unsigned char inb (int addr );
242
160
extern unsigned short inw (int addr );
243
161
extern unsigned int inl (int addr );
244
-
245
162
extern void outb (unsigned char b , int addr );
246
163
extern void outw (unsigned short b , int addr );
247
164
extern void outl (unsigned int b , int addr );
165
+ #define inb inb
166
+ #define inw inw
167
+ #define inl inl
168
+ #define outb outb
169
+ #define outw outw
170
+ #define outl outl
248
171
#elif defined(CONFIG_EISA )
249
172
#define inb eisa_in8
250
173
#define inw eisa_in16
@@ -270,7 +193,9 @@ static inline int inl(unsigned long addr)
270
193
BUG ();
271
194
return -1 ;
272
195
}
273
-
196
+ #define inb inb
197
+ #define inw inw
198
+ #define inl inl
274
199
#define outb (x , y ) ({(void)(x); (void)(y); BUG(); 0;})
275
200
#define outw (x , y ) ({(void)(x); (void)(y); BUG(); 0;})
276
201
#define outl (x , y ) ({(void)(x); (void)(y); BUG(); 0;})
@@ -285,7 +210,12 @@ extern void insl (unsigned long port, void *dst, unsigned long count);
285
210
extern void outsb (unsigned long port , const void * src , unsigned long count );
286
211
extern void outsw (unsigned long port , const void * src , unsigned long count );
287
212
extern void outsl (unsigned long port , const void * src , unsigned long count );
288
-
213
+ #define insb insb
214
+ #define insw insw
215
+ #define insl insl
216
+ #define outsb outsb
217
+ #define outsw outsw
218
+ #define outsl outsl
289
219
290
220
/* IO Port space is : BBiiii where BB is HBA number. */
291
221
#define IO_SPACE_LIMIT 0x00ffffff
@@ -307,6 +237,28 @@ extern void iowrite64(u64 val, void __iomem *addr);
307
237
extern void iowrite64be (u64 val , void __iomem * addr );
308
238
309
239
#include <asm-generic/iomap.h>
240
+ /*
241
+ * These get provided from <asm-generic/iomap.h> since parisc does not
242
+ * select GENERIC_IOMAP.
243
+ */
244
+ #define ioport_map ioport_map
245
+ #define ioport_unmap ioport_unmap
246
+ #define ioread8 ioread8
247
+ #define ioread16 ioread16
248
+ #define ioread32 ioread32
249
+ #define ioread16be ioread16be
250
+ #define ioread32be ioread32be
251
+ #define iowrite8 iowrite8
252
+ #define iowrite16 iowrite16
253
+ #define iowrite32 iowrite32
254
+ #define iowrite16be iowrite16be
255
+ #define iowrite32be iowrite32be
256
+ #define ioread8_rep ioread8_rep
257
+ #define ioread16_rep ioread16_rep
258
+ #define ioread32_rep ioread32_rep
259
+ #define iowrite8_rep iowrite8_rep
260
+ #define iowrite16_rep iowrite16_rep
261
+ #define iowrite32_rep iowrite32_rep
310
262
311
263
/*
312
264
* Convert a physical pointer to a virtual kernel pointer for /dev/mem
@@ -316,4 +268,6 @@ extern void iowrite64be(u64 val, void __iomem *addr);
316
268
317
269
extern int devmem_is_allowed (unsigned long pfn );
318
270
271
+ #include <asm-generic/io.h>
272
+
319
273
#endif
0 commit comments