diff options
author | Arthur Othieno <a.othieno@bluewin.ch> | 2005-08-20 21:48:47 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-09-09 08:11:38 -0400 |
commit | 766375362a1dcac63dc0c0fb61ce4143c8de63d9 (patch) | |
tree | 2d328be90eb7f68f273858e0e017566f8402bf82 /arch | |
parent | 1635317facea3094ddf34082cd86797efb1d9f7e (diff) |
[PATCH] ppc64: Big-endian I/O memory accessors.
I/O memory accessors. Big-endian version. For those busses/devices
that do export big-endian I/O memory.
Of notable relevance/reference:
http://lwn.net/Articles/132804/
http://ozlabs.org/pipermail/linuxppc-embedded/2005-August/019798.html
http://ozlabs.org/pipermail/linuxppc-embedded/2005-August/019752.html
Signed-Off-By: Arthur Othieno <a.othieno@bluewin.ch>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/ppc64/kernel/iomap.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/ppc64/kernel/iomap.c b/arch/ppc64/kernel/iomap.c index 153cc8b0f136..95b0baf87522 100644 --- a/arch/ppc64/kernel/iomap.c +++ b/arch/ppc64/kernel/iomap.c | |||
@@ -22,13 +22,23 @@ unsigned int fastcall ioread16(void __iomem *addr) | |||
22 | { | 22 | { |
23 | return readw(addr); | 23 | return readw(addr); |
24 | } | 24 | } |
25 | unsigned int fastcall ioread16be(void __iomem *addr) | ||
26 | { | ||
27 | return in_be16(addr); | ||
28 | } | ||
25 | unsigned int fastcall ioread32(void __iomem *addr) | 29 | unsigned int fastcall ioread32(void __iomem *addr) |
26 | { | 30 | { |
27 | return readl(addr); | 31 | return readl(addr); |
28 | } | 32 | } |
33 | unsigned int fastcall ioread32be(void __iomem *addr) | ||
34 | { | ||
35 | return in_be32(addr); | ||
36 | } | ||
29 | EXPORT_SYMBOL(ioread8); | 37 | EXPORT_SYMBOL(ioread8); |
30 | EXPORT_SYMBOL(ioread16); | 38 | EXPORT_SYMBOL(ioread16); |
39 | EXPORT_SYMBOL(ioread16be); | ||
31 | EXPORT_SYMBOL(ioread32); | 40 | EXPORT_SYMBOL(ioread32); |
41 | EXPORT_SYMBOL(ioread32be); | ||
32 | 42 | ||
33 | void fastcall iowrite8(u8 val, void __iomem *addr) | 43 | void fastcall iowrite8(u8 val, void __iomem *addr) |
34 | { | 44 | { |
@@ -38,13 +48,23 @@ void fastcall iowrite16(u16 val, void __iomem *addr) | |||
38 | { | 48 | { |
39 | writew(val, addr); | 49 | writew(val, addr); |
40 | } | 50 | } |
51 | void fastcall iowrite16be(u16 val, void __iomem *addr) | ||
52 | { | ||
53 | out_be16(addr, val); | ||
54 | } | ||
41 | void fastcall iowrite32(u32 val, void __iomem *addr) | 55 | void fastcall iowrite32(u32 val, void __iomem *addr) |
42 | { | 56 | { |
43 | writel(val, addr); | 57 | writel(val, addr); |
44 | } | 58 | } |
59 | void fastcall iowrite32be(u32 val, void __iomem *addr) | ||
60 | { | ||
61 | out_be32(addr, val); | ||
62 | } | ||
45 | EXPORT_SYMBOL(iowrite8); | 63 | EXPORT_SYMBOL(iowrite8); |
46 | EXPORT_SYMBOL(iowrite16); | 64 | EXPORT_SYMBOL(iowrite16); |
65 | EXPORT_SYMBOL(iowrite16be); | ||
47 | EXPORT_SYMBOL(iowrite32); | 66 | EXPORT_SYMBOL(iowrite32); |
67 | EXPORT_SYMBOL(iowrite32be); | ||
48 | 68 | ||
49 | /* | 69 | /* |
50 | * These are the "repeat read/write" functions. Note the | 70 | * These are the "repeat read/write" functions. Note the |