diff options
author | Mike Frysinger <vapier@gentoo.org> | 2010-08-10 02:20:17 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-10 05:45:04 +0200 |
commit | 7387be3373277005c171b9f1509e91fae2e430f3 (patch) | |
tree | d16be00c6ed669456a3048f43c5d8d66d11d520a /include/asm-generic | |
parent | arch/um/kernel/ptrace.c: remove dead PROC_MM (diff) | |
download | linux-7387be3373277005c171b9f1509e91fae2e430f3.tar.xz linux-7387be3373277005c171b9f1509e91fae2e430f3.zip |
asm-generic/io.h: add big endian versions of io{read,write}{16,32}
The asm-generic/iomap.h provides these functions already, but the
non-generic fallback defines do not.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/io.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h index bcee6365dca0..118601fce92d 100644 --- a/include/asm-generic/io.h +++ b/include/asm-generic/io.h @@ -188,11 +188,15 @@ static inline void outsl(unsigned long addr, const void *buffer, int count) #ifndef CONFIG_GENERIC_IOMAP #define ioread8(addr) readb(addr) #define ioread16(addr) readw(addr) +#define ioread16be(addr) be16_to_cpu(ioread16(addr)) #define ioread32(addr) readl(addr) +#define ioread32be(addr) be32_to_cpu(ioread32(addr)) #define iowrite8(v, addr) writeb((v), (addr)) #define iowrite16(v, addr) writew((v), (addr)) +#define iowrite16be(v, addr) iowrite16(be16_to_cpu(v), (addr)) #define iowrite32(v, addr) writel((v), (addr)) +#define iowrite32be(v, addr) iowrite32(be32_to_cpu(v), (addr)) #define ioread8_rep(p, dst, count) \ insb((unsigned long) (p), (dst), (count)) |