aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/io-defs.h
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2008-08-01 01:20:30 -0400
committerPaul Mackerras <paulus@samba.org>2008-08-03 22:02:00 -0400
commitb8b572e1015f81b4e748417be2629dfe51ab99f9 (patch)
tree7df58667d5ed71d6c8f8f4ce40ca16b6fb776d0b /arch/powerpc/include/asm/io-defs.h
parent2b12a4c524812fb3f6ee590a02e65b95c8c32229 (diff)
powerpc: Move include files to arch/powerpc/include/asm
from include/asm-powerpc. This is the result of a mkdir arch/powerpc/include/asm git mv include/asm-powerpc/* arch/powerpc/include/asm Followed by a few documentation/comment fixups and a couple of places where <asm-powepc/...> was being used explicitly. Of the latter only one was outside the arch code and it is a driver only built for powerpc. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/include/asm/io-defs.h')
-rw-r--r--arch/powerpc/include/asm/io-defs.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/io-defs.h b/arch/powerpc/include/asm/io-defs.h
new file mode 100644
index 000000000000..44d7927aec69
--- /dev/null
+++ b/arch/powerpc/include/asm/io-defs.h
@@ -0,0 +1,60 @@
1/* This file is meant to be include multiple times by other headers */
2/* last 2 argments are used by platforms/cell/io-workarounds.[ch] */
3
4DEF_PCI_AC_RET(readb, u8, (const PCI_IO_ADDR addr), (addr), mem, addr)
5DEF_PCI_AC_RET(readw, u16, (const PCI_IO_ADDR addr), (addr), mem, addr)
6DEF_PCI_AC_RET(readl, u32, (const PCI_IO_ADDR addr), (addr), mem, addr)
7DEF_PCI_AC_RET(readw_be, u16, (const PCI_IO_ADDR addr), (addr), mem, addr)
8DEF_PCI_AC_RET(readl_be, u32, (const PCI_IO_ADDR addr), (addr), mem, addr)
9DEF_PCI_AC_NORET(writeb, (u8 val, PCI_IO_ADDR addr), (val, addr), mem, addr)
10DEF_PCI_AC_NORET(writew, (u16 val, PCI_IO_ADDR addr), (val, addr), mem, addr)
11DEF_PCI_AC_NORET(writel, (u32 val, PCI_IO_ADDR addr), (val, addr), mem, addr)
12DEF_PCI_AC_NORET(writew_be, (u16 val, PCI_IO_ADDR addr), (val, addr), mem, addr)
13DEF_PCI_AC_NORET(writel_be, (u32 val, PCI_IO_ADDR addr), (val, addr), mem, addr)
14
15#ifdef __powerpc64__
16DEF_PCI_AC_RET(readq, u64, (const PCI_IO_ADDR addr), (addr), mem, addr)
17DEF_PCI_AC_RET(readq_be, u64, (const PCI_IO_ADDR addr), (addr), mem, addr)
18DEF_PCI_AC_NORET(writeq, (u64 val, PCI_IO_ADDR addr), (val, addr), mem, addr)
19DEF_PCI_AC_NORET(writeq_be, (u64 val, PCI_IO_ADDR addr), (val, addr), mem, addr)
20#endif /* __powerpc64__ */
21
22DEF_PCI_AC_RET(inb, u8, (unsigned long port), (port), pio, port)
23DEF_PCI_AC_RET(inw, u16, (unsigned long port), (port), pio, port)
24DEF_PCI_AC_RET(inl, u32, (unsigned long port), (port), pio, port)
25DEF_PCI_AC_NORET(outb, (u8 val, unsigned long port), (val, port), pio, port)
26DEF_PCI_AC_NORET(outw, (u16 val, unsigned long port), (val, port), pio, port)
27DEF_PCI_AC_NORET(outl, (u32 val, unsigned long port), (val, port), pio, port)
28
29DEF_PCI_AC_NORET(readsb, (const PCI_IO_ADDR a, void *b, unsigned long c),
30 (a, b, c), mem, a)
31DEF_PCI_AC_NORET(readsw, (const PCI_IO_ADDR a, void *b, unsigned long c),
32 (a, b, c), mem, a)
33DEF_PCI_AC_NORET(readsl, (const PCI_IO_ADDR a, void *b, unsigned long c),
34 (a, b, c), mem, a)
35DEF_PCI_AC_NORET(writesb, (PCI_IO_ADDR a, const void *b, unsigned long c),
36 (a, b, c), mem, a)
37DEF_PCI_AC_NORET(writesw, (PCI_IO_ADDR a, const void *b, unsigned long c),
38 (a, b, c), mem, a)
39DEF_PCI_AC_NORET(writesl, (PCI_IO_ADDR a, const void *b, unsigned long c),
40 (a, b, c), mem, a)
41
42DEF_PCI_AC_NORET(insb, (unsigned long p, void *b, unsigned long c),
43 (p, b, c), pio, p)
44DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
45 (p, b, c), pio, p)
46DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
47 (p, b, c), pio, p)
48DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
49 (p, b, c), pio, p)
50DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
51 (p, b, c), pio, p)
52DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
53 (p, b, c), pio, p)
54
55DEF_PCI_AC_NORET(memset_io, (PCI_IO_ADDR a, int c, unsigned long n),
56 (a, c, n), mem, a)
57DEF_PCI_AC_NORET(memcpy_fromio, (void *d, const PCI_IO_ADDR s, unsigned long n),
58 (d, s, n), mem, s)
59DEF_PCI_AC_NORET(memcpy_toio, (PCI_IO_ADDR d, const void *s, unsigned long n),
60 (d, s, n), mem, d)