blob: 061a1f144a015f9d8b95da66308fcb27a50df809 [file] [log] [blame]
Russell Kinga09e64f2008-08-05 16:14:15 +01001/*
2 * arch/arm/mach-ixp4xx/include/mach/io.h
3 *
4 * Author: Deepak Saxena <dsaxena@plexity.net>
5 *
6 * Copyright (C) 2002-2005 MontaVista Software, Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#ifndef __ASM_ARM_ARCH_IO_H
14#define __ASM_ARM_ARCH_IO_H
15
16#include <linux/bitops.h>
17
18#include <mach/hardware.h>
19
Mikael Petterssondee2b902009-08-09 21:21:57 +020020#define IO_SPACE_LIMIT 0x0000ffff
Russell Kinga09e64f2008-08-05 16:14:15 +010021
22extern int (*ixp4xx_pci_read)(u32 addr, u32 cmd, u32* data);
23extern int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data);
24
25
26/*
27 * IXP4xx provides two methods of accessing PCI memory space:
28 *
29 * 1) A direct mapped window from 0x48000000 to 0x4bffffff (64MB).
30 * To access PCI via this space, we simply ioremap() the BAR
31 * into the kernel and we can use the standard read[bwl]/write[bwl]
32 * macros. This is the preffered method due to speed but it
33 * limits the system to just 64MB of PCI memory. This can be
34 * problamatic if using video cards and other memory-heavy
35 * targets.
36 *
37 * 2) If > 64MB of memory space is required, the IXP4xx can be configured
38 * to use indirect registers to access PCI (as we do below for I/O
39 * transactions). This allows for up to 128MB (0x48000000 to 0x4fffffff)
40 * of memory on the bus. The disadvantage of this is that every
41 * PCI access requires three local register accesses plus a spinlock,
42 * but in some cases the performance hit is acceptable. In addition,
43 * you cannot mmap() PCI devices in this case.
44 *
45 */
46#ifndef CONFIG_IXP4XX_INDIRECT_PCI
47
48#define __mem_pci(a) (a)
49
50#else
51
Russell Kinga09e64f2008-08-05 16:14:15 +010052/*
53 * In the case of using indirect PCI, we simply return the actual PCI
54 * address and our read/write implementation use that to drive the
55 * access registers. If something outside of PCI is ioremap'd, we
56 * fallback to the default.
57 */
Krzysztof Hałasa28f85cd2009-11-14 19:44:44 +010058static inline void __iomem * __indirect_ioremap(unsigned long addr, size_t size,
59 unsigned int mtype)
Russell Kinga09e64f2008-08-05 16:14:15 +010060{
61 if((addr < PCIBIOS_MIN_MEM) || (addr > 0x4fffffff))
62 return __arm_ioremap(addr, size, mtype);
63
64 return (void __iomem *)addr;
65}
66
Krzysztof Hałasa28f85cd2009-11-14 19:44:44 +010067static inline void __indirect_iounmap(void __iomem *addr)
Russell Kinga09e64f2008-08-05 16:14:15 +010068{
69 if ((__force u32)addr >= VMALLOC_START)
70 __iounmap(addr);
71}
72
Krzysztof Hałasa28f85cd2009-11-14 19:44:44 +010073#define __arch_ioremap(a, s, f) __indirect_ioremap(a, s, f)
74#define __arch_iounmap(a) __indirect_iounmap(a)
Russell Kinga09e64f2008-08-05 16:14:15 +010075
Krzysztof Hałasa28f85cd2009-11-14 19:44:44 +010076#define writeb(v, p) __indirect_writeb(v, p)
77#define writew(v, p) __indirect_writew(v, p)
78#define writel(v, p) __indirect_writel(v, p)
Russell Kinga09e64f2008-08-05 16:14:15 +010079
Krzysztof Hałasa28f85cd2009-11-14 19:44:44 +010080#define writesb(p, v, l) __indirect_writesb(p, v, l)
81#define writesw(p, v, l) __indirect_writesw(p, v, l)
82#define writesl(p, v, l) __indirect_writesl(p, v, l)
Russell Kinga09e64f2008-08-05 16:14:15 +010083
Krzysztof Hałasa28f85cd2009-11-14 19:44:44 +010084#define readb(p) __indirect_readb(p)
85#define readw(p) __indirect_readw(p)
86#define readl(p) __indirect_readl(p)
87
88#define readsb(p, v, l) __indirect_readsb(p, v, l)
89#define readsw(p, v, l) __indirect_readsw(p, v, l)
90#define readsl(p, v, l) __indirect_readsl(p, v, l)
91
92static inline void __indirect_writeb(u8 value, volatile void __iomem *p)
Russell Kinga09e64f2008-08-05 16:14:15 +010093{
94 u32 addr = (u32)p;
95 u32 n, byte_enables, data;
96
97 if (addr >= VMALLOC_START) {
98 __raw_writeb(value, addr);
99 return;
100 }
101
102 n = addr % 4;
103 byte_enables = (0xf & ~BIT(n)) << IXP4XX_PCI_NP_CBE_BESL;
104 data = value << (8*n);
105 ixp4xx_pci_write(addr, byte_enables | NP_CMD_MEMWRITE, data);
106}
107
Krzysztof Hałasa28f85cd2009-11-14 19:44:44 +0100108static inline void __indirect_writesb(volatile void __iomem *bus_addr,
109 const u8 *vaddr, int count)
Russell Kinga09e64f2008-08-05 16:14:15 +0100110{
111 while (count--)
112 writeb(*vaddr++, bus_addr);
113}
114
Krzysztof Hałasa28f85cd2009-11-14 19:44:44 +0100115static inline void __indirect_writew(u16 value, volatile void __iomem *p)
Russell Kinga09e64f2008-08-05 16:14:15 +0100116{
117 u32 addr = (u32)p;
118 u32 n, byte_enables, data;
119
120 if (addr >= VMALLOC_START) {
121 __raw_writew(value, addr);
122 return;
123 }
124
125 n = addr % 4;
126 byte_enables = (0xf & ~(BIT(n) | BIT(n+1))) << IXP4XX_PCI_NP_CBE_BESL;
127 data = value << (8*n);
128 ixp4xx_pci_write(addr, byte_enables | NP_CMD_MEMWRITE, data);
129}
130
Krzysztof Hałasa28f85cd2009-11-14 19:44:44 +0100131static inline void __indirect_writesw(volatile void __iomem *bus_addr,
132 const u16 *vaddr, int count)
Russell Kinga09e64f2008-08-05 16:14:15 +0100133{
134 while (count--)
135 writew(*vaddr++, bus_addr);
136}
137
Krzysztof Hałasa28f85cd2009-11-14 19:44:44 +0100138static inline void __indirect_writel(u32 value, volatile void __iomem *p)
Russell Kinga09e64f2008-08-05 16:14:15 +0100139{
140 u32 addr = (__force u32)p;
141 if (addr >= VMALLOC_START) {
142 __raw_writel(value, p);
143 return;
144 }
145
146 ixp4xx_pci_write(addr, NP_CMD_MEMWRITE, value);
147}
148
Krzysztof Hałasa28f85cd2009-11-14 19:44:44 +0100149static inline void __indirect_writesl(volatile void __iomem *bus_addr,
150 const u32 *vaddr, int count)
Russell Kinga09e64f2008-08-05 16:14:15 +0100151{
152 while (count--)
153 writel(*vaddr++, bus_addr);
154}
155
Krzysztof Hałasa28f85cd2009-11-14 19:44:44 +0100156static inline unsigned char __indirect_readb(const volatile void __iomem *p)
Russell Kinga09e64f2008-08-05 16:14:15 +0100157{
158 u32 addr = (u32)p;
159 u32 n, byte_enables, data;
160
161 if (addr >= VMALLOC_START)
162 return __raw_readb(addr);
163
164 n = addr % 4;
165 byte_enables = (0xf & ~BIT(n)) << IXP4XX_PCI_NP_CBE_BESL;
166 if (ixp4xx_pci_read(addr, byte_enables | NP_CMD_MEMREAD, &data))
167 return 0xff;
168
169 return data >> (8*n);
170}
171
Krzysztof Hałasa28f85cd2009-11-14 19:44:44 +0100172static inline void __indirect_readsb(const volatile void __iomem *bus_addr,
173 u8 *vaddr, u32 count)
Russell Kinga09e64f2008-08-05 16:14:15 +0100174{
175 while (count--)
176 *vaddr++ = readb(bus_addr);
177}
178
Krzysztof Hałasa28f85cd2009-11-14 19:44:44 +0100179static inline unsigned short __indirect_readw(const volatile void __iomem *p)
Russell Kinga09e64f2008-08-05 16:14:15 +0100180{
181 u32 addr = (u32)p;
182 u32 n, byte_enables, data;
183
184 if (addr >= VMALLOC_START)
185 return __raw_readw(addr);
186
187 n = addr % 4;
188 byte_enables = (0xf & ~(BIT(n) | BIT(n+1))) << IXP4XX_PCI_NP_CBE_BESL;
189 if (ixp4xx_pci_read(addr, byte_enables | NP_CMD_MEMREAD, &data))
190 return 0xffff;
191
192 return data>>(8*n);
193}
194
Krzysztof Hałasa28f85cd2009-11-14 19:44:44 +0100195static inline void __indirect_readsw(const volatile void __iomem *bus_addr,
196 u16 *vaddr, u32 count)
Russell Kinga09e64f2008-08-05 16:14:15 +0100197{
198 while (count--)
199 *vaddr++ = readw(bus_addr);
200}
201
Krzysztof Hałasa28f85cd2009-11-14 19:44:44 +0100202static inline unsigned long __indirect_readl(const volatile void __iomem *p)
Russell Kinga09e64f2008-08-05 16:14:15 +0100203{
204 u32 addr = (__force u32)p;
205 u32 data;
206
207 if (addr >= VMALLOC_START)
208 return __raw_readl(p);
209
210 if (ixp4xx_pci_read(addr, NP_CMD_MEMREAD, &data))
211 return 0xffffffff;
212
213 return data;
214}
215
Krzysztof Hałasa28f85cd2009-11-14 19:44:44 +0100216static inline void __indirect_readsl(const volatile void __iomem *bus_addr,
217 u32 *vaddr, u32 count)
Russell Kinga09e64f2008-08-05 16:14:15 +0100218{
219 while (count--)
220 *vaddr++ = readl(bus_addr);
221}
222
223
224/*
225 * We can use the built-in functions b/c they end up calling writeb/readb
226 */
227#define memset_io(c,v,l) _memset_io((c),(v),(l))
228#define memcpy_fromio(a,c,l) _memcpy_fromio((a),(c),(l))
229#define memcpy_toio(c,a,l) _memcpy_toio((c),(a),(l))
230
Krzysztof Hałasa28f85cd2009-11-14 19:44:44 +0100231#endif /* CONFIG_IXP4XX_INDIRECT_PCI */
Russell Kinga09e64f2008-08-05 16:14:15 +0100232
233#ifndef CONFIG_PCI
234
Russell King0560cf52008-11-30 11:45:54 +0000235#define __io(v) __typesafe_io(v)
Russell Kinga09e64f2008-08-05 16:14:15 +0100236
237#else
238
239/*
240 * IXP4xx does not have a transparent cpu -> PCI I/O translation
241 * window. Instead, it has a set of registers that must be tweaked
242 * with the proper byte lanes, command types, and address for the
243 * transaction. This means that we need to override the default
244 * I/O functions.
245 */
246#define outb(p, v) __ixp4xx_outb(p, v)
247#define outw(p, v) __ixp4xx_outw(p, v)
248#define outl(p, v) __ixp4xx_outl(p, v)
249
250#define outsb(p, v, l) __ixp4xx_outsb(p, v, l)
251#define outsw(p, v, l) __ixp4xx_outsw(p, v, l)
252#define outsl(p, v, l) __ixp4xx_outsl(p, v, l)
253
254#define inb(p) __ixp4xx_inb(p)
255#define inw(p) __ixp4xx_inw(p)
256#define inl(p) __ixp4xx_inl(p)
257
258#define insb(p, v, l) __ixp4xx_insb(p, v, l)
259#define insw(p, v, l) __ixp4xx_insw(p, v, l)
260#define insl(p, v, l) __ixp4xx_insl(p, v, l)
261
262
263static inline void
264__ixp4xx_outb(u8 value, u32 addr)
265{
266 u32 n, byte_enables, data;
267 n = addr % 4;
268 byte_enables = (0xf & ~BIT(n)) << IXP4XX_PCI_NP_CBE_BESL;
269 data = value << (8*n);
270 ixp4xx_pci_write(addr, byte_enables | NP_CMD_IOWRITE, data);
271}
272
273static inline void
274__ixp4xx_outsb(u32 io_addr, const u8 *vaddr, u32 count)
275{
276 while (count--)
277 outb(*vaddr++, io_addr);
278}
279
280static inline void
281__ixp4xx_outw(u16 value, u32 addr)
282{
283 u32 n, byte_enables, data;
284 n = addr % 4;
285 byte_enables = (0xf & ~(BIT(n) | BIT(n+1))) << IXP4XX_PCI_NP_CBE_BESL;
286 data = value << (8*n);
287 ixp4xx_pci_write(addr, byte_enables | NP_CMD_IOWRITE, data);
288}
289
290static inline void
291__ixp4xx_outsw(u32 io_addr, const u16 *vaddr, u32 count)
292{
293 while (count--)
294 outw(cpu_to_le16(*vaddr++), io_addr);
295}
296
297static inline void
298__ixp4xx_outl(u32 value, u32 addr)
299{
300 ixp4xx_pci_write(addr, NP_CMD_IOWRITE, value);
301}
302
303static inline void
304__ixp4xx_outsl(u32 io_addr, const u32 *vaddr, u32 count)
305{
306 while (count--)
Krzysztof Hałasa9f2c9492009-11-11 00:21:48 +0100307 outl(cpu_to_le32(*vaddr++), io_addr);
Russell Kinga09e64f2008-08-05 16:14:15 +0100308}
309
310static inline u8
311__ixp4xx_inb(u32 addr)
312{
313 u32 n, byte_enables, data;
314 n = addr % 4;
315 byte_enables = (0xf & ~BIT(n)) << IXP4XX_PCI_NP_CBE_BESL;
316 if (ixp4xx_pci_read(addr, byte_enables | NP_CMD_IOREAD, &data))
317 return 0xff;
318
319 return data >> (8*n);
320}
321
322static inline void
323__ixp4xx_insb(u32 io_addr, u8 *vaddr, u32 count)
324{
325 while (count--)
326 *vaddr++ = inb(io_addr);
327}
328
329static inline u16
330__ixp4xx_inw(u32 addr)
331{
332 u32 n, byte_enables, data;
333 n = addr % 4;
334 byte_enables = (0xf & ~(BIT(n) | BIT(n+1))) << IXP4XX_PCI_NP_CBE_BESL;
335 if (ixp4xx_pci_read(addr, byte_enables | NP_CMD_IOREAD, &data))
336 return 0xffff;
337
338 return data>>(8*n);
339}
340
341static inline void
342__ixp4xx_insw(u32 io_addr, u16 *vaddr, u32 count)
343{
344 while (count--)
345 *vaddr++ = le16_to_cpu(inw(io_addr));
346}
347
348static inline u32
349__ixp4xx_inl(u32 addr)
350{
351 u32 data;
352 if (ixp4xx_pci_read(addr, NP_CMD_IOREAD, &data))
353 return 0xffffffff;
354
355 return data;
356}
357
358static inline void
359__ixp4xx_insl(u32 io_addr, u32 *vaddr, u32 count)
360{
361 while (count--)
Krzysztof Hałasa9f2c9492009-11-11 00:21:48 +0100362 *vaddr++ = le32_to_cpu(inl(io_addr));
Russell Kinga09e64f2008-08-05 16:14:15 +0100363}
364
365#define PIO_OFFSET 0x10000UL
366#define PIO_MASK 0x0ffffUL
367
368#define __is_io_address(p) (((unsigned long)p >= PIO_OFFSET) && \
369 ((unsigned long)p <= (PIO_MASK + PIO_OFFSET)))
Krzysztof Hałasa9f2c9492009-11-11 00:21:48 +0100370
Russell Kinga09e64f2008-08-05 16:14:15 +0100371static inline unsigned int
372__ixp4xx_ioread8(const void __iomem *addr)
373{
374 unsigned long port = (unsigned long __force)addr;
375 if (__is_io_address(port))
Krzysztof Hałasa9f2c9492009-11-11 00:21:48 +0100376 return (unsigned int)__ixp4xx_inb(port & PIO_MASK);
Russell Kinga09e64f2008-08-05 16:14:15 +0100377 else
378#ifndef CONFIG_IXP4XX_INDIRECT_PCI
379 return (unsigned int)__raw_readb(port);
380#else
Krzysztof Hałasa28f85cd2009-11-14 19:44:44 +0100381 return (unsigned int)__indirect_readb(addr);
Russell Kinga09e64f2008-08-05 16:14:15 +0100382#endif
383}
384
385static inline void
386__ixp4xx_ioread8_rep(const void __iomem *addr, void *vaddr, u32 count)
387{
388 unsigned long port = (unsigned long __force)addr;
389 if (__is_io_address(port))
390 __ixp4xx_insb(port & PIO_MASK, vaddr, count);
391 else
392#ifndef CONFIG_IXP4XX_INDIRECT_PCI
393 __raw_readsb(addr, vaddr, count);
394#else
Krzysztof Hałasa28f85cd2009-11-14 19:44:44 +0100395 __indirect_readsb(addr, vaddr, count);
Russell Kinga09e64f2008-08-05 16:14:15 +0100396#endif
397}
398
399static inline unsigned int
400__ixp4xx_ioread16(const void __iomem *addr)
401{
402 unsigned long port = (unsigned long __force)addr;
403 if (__is_io_address(port))
404 return (unsigned int)__ixp4xx_inw(port & PIO_MASK);
405 else
406#ifndef CONFIG_IXP4XX_INDIRECT_PCI
407 return le16_to_cpu(__raw_readw((u32)port));
408#else
Krzysztof Hałasa28f85cd2009-11-14 19:44:44 +0100409 return (unsigned int)__indirect_readw(addr);
Russell Kinga09e64f2008-08-05 16:14:15 +0100410#endif
411}
412
413static inline void
414__ixp4xx_ioread16_rep(const void __iomem *addr, void *vaddr, u32 count)
415{
416 unsigned long port = (unsigned long __force)addr;
417 if (__is_io_address(port))
418 __ixp4xx_insw(port & PIO_MASK, vaddr, count);
419 else
420#ifndef CONFIG_IXP4XX_INDIRECT_PCI
421 __raw_readsw(addr, vaddr, count);
422#else
Krzysztof Hałasa28f85cd2009-11-14 19:44:44 +0100423 __indirect_readsw(addr, vaddr, count);
Russell Kinga09e64f2008-08-05 16:14:15 +0100424#endif
425}
426
427static inline unsigned int
428__ixp4xx_ioread32(const void __iomem *addr)
429{
430 unsigned long port = (unsigned long __force)addr;
431 if (__is_io_address(port))
432 return (unsigned int)__ixp4xx_inl(port & PIO_MASK);
433 else {
434#ifndef CONFIG_IXP4XX_INDIRECT_PCI
435 return le32_to_cpu((__force __le32)__raw_readl(addr));
436#else
Krzysztof Hałasa28f85cd2009-11-14 19:44:44 +0100437 return (unsigned int)__indirect_readl(addr);
Russell Kinga09e64f2008-08-05 16:14:15 +0100438#endif
439 }
440}
441
442static inline void
443__ixp4xx_ioread32_rep(const void __iomem *addr, void *vaddr, u32 count)
444{
445 unsigned long port = (unsigned long __force)addr;
446 if (__is_io_address(port))
447 __ixp4xx_insl(port & PIO_MASK, vaddr, count);
448 else
449#ifndef CONFIG_IXP4XX_INDIRECT_PCI
450 __raw_readsl(addr, vaddr, count);
451#else
Krzysztof Hałasa28f85cd2009-11-14 19:44:44 +0100452 __indirect_readsl(addr, vaddr, count);
Russell Kinga09e64f2008-08-05 16:14:15 +0100453#endif
454}
455
456static inline void
457__ixp4xx_iowrite8(u8 value, void __iomem *addr)
458{
459 unsigned long port = (unsigned long __force)addr;
460 if (__is_io_address(port))
461 __ixp4xx_outb(value, port & PIO_MASK);
462 else
463#ifndef CONFIG_IXP4XX_INDIRECT_PCI
464 __raw_writeb(value, port);
465#else
Krzysztof Hałasa28f85cd2009-11-14 19:44:44 +0100466 __indirect_writeb(value, addr);
Russell Kinga09e64f2008-08-05 16:14:15 +0100467#endif
468}
469
470static inline void
471__ixp4xx_iowrite8_rep(void __iomem *addr, const void *vaddr, u32 count)
472{
473 unsigned long port = (unsigned long __force)addr;
474 if (__is_io_address(port))
475 __ixp4xx_outsb(port & PIO_MASK, vaddr, count);
476 else
477#ifndef CONFIG_IXP4XX_INDIRECT_PCI
478 __raw_writesb(addr, vaddr, count);
479#else
Krzysztof Hałasa28f85cd2009-11-14 19:44:44 +0100480 __indirect_writesb(addr, vaddr, count);
Russell Kinga09e64f2008-08-05 16:14:15 +0100481#endif
482}
483
484static inline void
485__ixp4xx_iowrite16(u16 value, void __iomem *addr)
486{
487 unsigned long port = (unsigned long __force)addr;
488 if (__is_io_address(port))
489 __ixp4xx_outw(value, port & PIO_MASK);
490 else
491#ifndef CONFIG_IXP4XX_INDIRECT_PCI
492 __raw_writew(cpu_to_le16(value), addr);
493#else
Krzysztof Hałasa28f85cd2009-11-14 19:44:44 +0100494 __indirect_writew(value, addr);
Russell Kinga09e64f2008-08-05 16:14:15 +0100495#endif
496}
497
498static inline void
499__ixp4xx_iowrite16_rep(void __iomem *addr, const void *vaddr, u32 count)
500{
501 unsigned long port = (unsigned long __force)addr;
502 if (__is_io_address(port))
503 __ixp4xx_outsw(port & PIO_MASK, vaddr, count);
504 else
505#ifndef CONFIG_IXP4XX_INDIRECT_PCI
506 __raw_writesw(addr, vaddr, count);
507#else
Krzysztof Hałasa28f85cd2009-11-14 19:44:44 +0100508 __indirect_writesw(addr, vaddr, count);
Russell Kinga09e64f2008-08-05 16:14:15 +0100509#endif
510}
511
512static inline void
513__ixp4xx_iowrite32(u32 value, void __iomem *addr)
514{
515 unsigned long port = (unsigned long __force)addr;
516 if (__is_io_address(port))
517 __ixp4xx_outl(value, port & PIO_MASK);
518 else
519#ifndef CONFIG_IXP4XX_INDIRECT_PCI
520 __raw_writel((u32 __force)cpu_to_le32(value), addr);
521#else
Krzysztof Hałasa28f85cd2009-11-14 19:44:44 +0100522 __indirect_writel(value, addr);
Russell Kinga09e64f2008-08-05 16:14:15 +0100523#endif
524}
525
526static inline void
527__ixp4xx_iowrite32_rep(void __iomem *addr, const void *vaddr, u32 count)
528{
529 unsigned long port = (unsigned long __force)addr;
530 if (__is_io_address(port))
531 __ixp4xx_outsl(port & PIO_MASK, vaddr, count);
532 else
533#ifndef CONFIG_IXP4XX_INDIRECT_PCI
534 __raw_writesl(addr, vaddr, count);
535#else
Krzysztof Hałasa28f85cd2009-11-14 19:44:44 +0100536 __indirect_writesl(addr, vaddr, count);
Russell Kinga09e64f2008-08-05 16:14:15 +0100537#endif
538}
539
540#define ioread8(p) __ixp4xx_ioread8(p)
541#define ioread16(p) __ixp4xx_ioread16(p)
542#define ioread32(p) __ixp4xx_ioread32(p)
543
544#define ioread8_rep(p, v, c) __ixp4xx_ioread8_rep(p, v, c)
545#define ioread16_rep(p, v, c) __ixp4xx_ioread16_rep(p, v, c)
546#define ioread32_rep(p, v, c) __ixp4xx_ioread32_rep(p, v, c)
547
548#define iowrite8(v,p) __ixp4xx_iowrite8(v,p)
549#define iowrite16(v,p) __ixp4xx_iowrite16(v,p)
550#define iowrite32(v,p) __ixp4xx_iowrite32(v,p)
551
552#define iowrite8_rep(p, v, c) __ixp4xx_iowrite8_rep(p, v, c)
553#define iowrite16_rep(p, v, c) __ixp4xx_iowrite16_rep(p, v, c)
554#define iowrite32_rep(p, v, c) __ixp4xx_iowrite32_rep(p, v, c)
555
556#define ioport_map(port, nr) ((void __iomem*)(port + PIO_OFFSET))
557#define ioport_unmap(addr)
558#endif // !CONFIG_PCI
559
560#endif // __ASM_ARM_ARCH_IO_H
561