blob: 03691ab6921732f7df4b0b86e809a90bb61bda68 [file] [log] [blame]
Benjamin Herrenschmidt4cb3cee2006-11-11 17:25:10 +11001/* This file is meant to be include multiple times by other headers */
2
3DEF_PCI_AC_RET(readb, u8, (const PCI_IO_ADDR addr), (addr))
4DEF_PCI_AC_RET(readw, u16, (const PCI_IO_ADDR addr), (addr))
5DEF_PCI_AC_RET(readl, u32, (const PCI_IO_ADDR addr), (addr))
Benjamin Herrenschmidt4cb3cee2006-11-11 17:25:10 +11006DEF_PCI_AC_RET(readw_be, u16, (const PCI_IO_ADDR addr), (addr))
7DEF_PCI_AC_RET(readl_be, u32, (const PCI_IO_ADDR addr), (addr))
Benjamin Herrenschmidt4cb3cee2006-11-11 17:25:10 +11008DEF_PCI_AC_NORET(writeb, (u8 val, PCI_IO_ADDR addr), (val, addr))
9DEF_PCI_AC_NORET(writew, (u16 val, PCI_IO_ADDR addr), (val, addr))
10DEF_PCI_AC_NORET(writel, (u32 val, PCI_IO_ADDR addr), (val, addr))
Benjamin Herrenschmidt4cb3cee2006-11-11 17:25:10 +110011DEF_PCI_AC_NORET(writew_be, (u16 val, PCI_IO_ADDR addr), (val, addr))
12DEF_PCI_AC_NORET(writel_be, (u32 val, PCI_IO_ADDR addr), (val, addr))
Benjamin Herrenschmidt68a64352006-11-13 09:27:39 +110013
14#ifdef __powerpc64__
15DEF_PCI_AC_RET(readq, u64, (const PCI_IO_ADDR addr), (addr))
16DEF_PCI_AC_RET(readq_be, u64, (const PCI_IO_ADDR addr), (addr))
17DEF_PCI_AC_NORET(writeq, (u64 val, PCI_IO_ADDR addr), (val, addr))
Benjamin Herrenschmidt4cb3cee2006-11-11 17:25:10 +110018DEF_PCI_AC_NORET(writeq_be, (u64 val, PCI_IO_ADDR addr), (val, addr))
Benjamin Herrenschmidt68a64352006-11-13 09:27:39 +110019#endif /* __powerpc64__ */
Benjamin Herrenschmidt4cb3cee2006-11-11 17:25:10 +110020
21DEF_PCI_AC_RET(inb, u8, (unsigned long port), (port))
22DEF_PCI_AC_RET(inw, u16, (unsigned long port), (port))
23DEF_PCI_AC_RET(inl, u32, (unsigned long port), (port))
24DEF_PCI_AC_NORET(outb, (u8 val, unsigned long port), (val, port))
25DEF_PCI_AC_NORET(outw, (u16 val, unsigned long port), (val, port))
26DEF_PCI_AC_NORET(outl, (u32 val, unsigned long port), (val, port))
27
28DEF_PCI_AC_NORET(readsb, (const PCI_IO_ADDR a, void *b, unsigned long c), \
29 (a, b, c))
30DEF_PCI_AC_NORET(readsw, (const PCI_IO_ADDR a, void *b, unsigned long c), \
31 (a, b, c))
32DEF_PCI_AC_NORET(readsl, (const PCI_IO_ADDR a, void *b, unsigned long c), \
33 (a, b, c))
34DEF_PCI_AC_NORET(writesb, (PCI_IO_ADDR a, const void *b, unsigned long c), \
35 (a, b, c))
36DEF_PCI_AC_NORET(writesw, (PCI_IO_ADDR a, const void *b, unsigned long c), \
37 (a, b, c))
38DEF_PCI_AC_NORET(writesl, (PCI_IO_ADDR a, const void *b, unsigned long c), \
39 (a, b, c))
40
41DEF_PCI_AC_NORET(insb, (unsigned long p, void *b, unsigned long c), \
42 (p, b, c))
43DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c), \
44 (p, b, c))
45DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c), \
46 (p, b, c))
47DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c), \
48 (p, b, c))
49DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c), \
50 (p, b, c))
51DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c), \
52 (p, b, c))
53
54DEF_PCI_AC_NORET(memset_io, (PCI_IO_ADDR a, int c, unsigned long n), \
55 (a, c, n))
56DEF_PCI_AC_NORET(memcpy_fromio,(void *d,const PCI_IO_ADDR s,unsigned long n), \
57 (d, s, n))
58DEF_PCI_AC_NORET(memcpy_toio,(PCI_IO_ADDR d,const void *s,unsigned long n), \
59 (d, s, n))