Benjamin Herrenschmidt | 4cb3cee | 2006-11-11 17:25:10 +1100 | [diff] [blame] | 1 | /* This file is meant to be include multiple times by other headers */ |
Ishizaki Kou | 7cfb62a | 2008-04-24 19:21:10 +1000 | [diff] [blame] | 2 | /* last 2 argments are used by platforms/cell/io-workarounds.[ch] */ |
Benjamin Herrenschmidt | 4cb3cee | 2006-11-11 17:25:10 +1100 | [diff] [blame] | 3 | |
Ishizaki Kou | 7cfb62a | 2008-04-24 19:21:10 +1000 | [diff] [blame] | 4 | DEF_PCI_AC_RET(readb, u8, (const PCI_IO_ADDR addr), (addr), mem, addr) |
| 5 | DEF_PCI_AC_RET(readw, u16, (const PCI_IO_ADDR addr), (addr), mem, addr) |
| 6 | DEF_PCI_AC_RET(readl, u32, (const PCI_IO_ADDR addr), (addr), mem, addr) |
| 7 | DEF_PCI_AC_RET(readw_be, u16, (const PCI_IO_ADDR addr), (addr), mem, addr) |
| 8 | DEF_PCI_AC_RET(readl_be, u32, (const PCI_IO_ADDR addr), (addr), mem, addr) |
| 9 | DEF_PCI_AC_NORET(writeb, (u8 val, PCI_IO_ADDR addr), (val, addr), mem, addr) |
| 10 | DEF_PCI_AC_NORET(writew, (u16 val, PCI_IO_ADDR addr), (val, addr), mem, addr) |
| 11 | DEF_PCI_AC_NORET(writel, (u32 val, PCI_IO_ADDR addr), (val, addr), mem, addr) |
| 12 | DEF_PCI_AC_NORET(writew_be, (u16 val, PCI_IO_ADDR addr), (val, addr), mem, addr) |
| 13 | DEF_PCI_AC_NORET(writel_be, (u32 val, PCI_IO_ADDR addr), (val, addr), mem, addr) |
Benjamin Herrenschmidt | 68a6435 | 2006-11-13 09:27:39 +1100 | [diff] [blame] | 14 | |
| 15 | #ifdef __powerpc64__ |
Ishizaki Kou | 7cfb62a | 2008-04-24 19:21:10 +1000 | [diff] [blame] | 16 | DEF_PCI_AC_RET(readq, u64, (const PCI_IO_ADDR addr), (addr), mem, addr) |
| 17 | DEF_PCI_AC_RET(readq_be, u64, (const PCI_IO_ADDR addr), (addr), mem, addr) |
| 18 | DEF_PCI_AC_NORET(writeq, (u64 val, PCI_IO_ADDR addr), (val, addr), mem, addr) |
| 19 | DEF_PCI_AC_NORET(writeq_be, (u64 val, PCI_IO_ADDR addr), (val, addr), mem, addr) |
Benjamin Herrenschmidt | 68a6435 | 2006-11-13 09:27:39 +1100 | [diff] [blame] | 20 | #endif /* __powerpc64__ */ |
Benjamin Herrenschmidt | 4cb3cee | 2006-11-11 17:25:10 +1100 | [diff] [blame] | 21 | |
Ishizaki Kou | 7cfb62a | 2008-04-24 19:21:10 +1000 | [diff] [blame] | 22 | DEF_PCI_AC_RET(inb, u8, (unsigned long port), (port), pio, port) |
| 23 | DEF_PCI_AC_RET(inw, u16, (unsigned long port), (port), pio, port) |
| 24 | DEF_PCI_AC_RET(inl, u32, (unsigned long port), (port), pio, port) |
| 25 | DEF_PCI_AC_NORET(outb, (u8 val, unsigned long port), (val, port), pio, port) |
| 26 | DEF_PCI_AC_NORET(outw, (u16 val, unsigned long port), (val, port), pio, port) |
| 27 | DEF_PCI_AC_NORET(outl, (u32 val, unsigned long port), (val, port), pio, port) |
Benjamin Herrenschmidt | 4cb3cee | 2006-11-11 17:25:10 +1100 | [diff] [blame] | 28 | |
Ishizaki Kou | 7cfb62a | 2008-04-24 19:21:10 +1000 | [diff] [blame] | 29 | DEF_PCI_AC_NORET(readsb, (const PCI_IO_ADDR a, void *b, unsigned long c), |
| 30 | (a, b, c), mem, a) |
| 31 | DEF_PCI_AC_NORET(readsw, (const PCI_IO_ADDR a, void *b, unsigned long c), |
| 32 | (a, b, c), mem, a) |
| 33 | DEF_PCI_AC_NORET(readsl, (const PCI_IO_ADDR a, void *b, unsigned long c), |
| 34 | (a, b, c), mem, a) |
| 35 | DEF_PCI_AC_NORET(writesb, (PCI_IO_ADDR a, const void *b, unsigned long c), |
| 36 | (a, b, c), mem, a) |
| 37 | DEF_PCI_AC_NORET(writesw, (PCI_IO_ADDR a, const void *b, unsigned long c), |
| 38 | (a, b, c), mem, a) |
| 39 | DEF_PCI_AC_NORET(writesl, (PCI_IO_ADDR a, const void *b, unsigned long c), |
| 40 | (a, b, c), mem, a) |
Benjamin Herrenschmidt | 4cb3cee | 2006-11-11 17:25:10 +1100 | [diff] [blame] | 41 | |
Ishizaki Kou | 7cfb62a | 2008-04-24 19:21:10 +1000 | [diff] [blame] | 42 | DEF_PCI_AC_NORET(insb, (unsigned long p, void *b, unsigned long c), |
| 43 | (p, b, c), pio, p) |
| 44 | DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c), |
| 45 | (p, b, c), pio, p) |
| 46 | DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c), |
| 47 | (p, b, c), pio, p) |
| 48 | DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c), |
| 49 | (p, b, c), pio, p) |
| 50 | DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c), |
| 51 | (p, b, c), pio, p) |
| 52 | DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c), |
| 53 | (p, b, c), pio, p) |
Benjamin Herrenschmidt | 4cb3cee | 2006-11-11 17:25:10 +1100 | [diff] [blame] | 54 | |
Ishizaki Kou | 7cfb62a | 2008-04-24 19:21:10 +1000 | [diff] [blame] | 55 | DEF_PCI_AC_NORET(memset_io, (PCI_IO_ADDR a, int c, unsigned long n), |
| 56 | (a, c, n), mem, a) |
| 57 | DEF_PCI_AC_NORET(memcpy_fromio, (void *d, const PCI_IO_ADDR s, unsigned long n), |
| 58 | (d, s, n), mem, s) |
| 59 | DEF_PCI_AC_NORET(memcpy_toio, (PCI_IO_ADDR d, const void *s, unsigned long n), |
| 60 | (d, s, n), mem, d) |