Skip to content

Commit

Permalink
asm-generic/io.h: add big endian versions of io{read,write}{16,32}
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mike Frysinger authored and Linus Torvalds committed Aug 10, 2010
1 parent 7833e7c commit 7387be3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/asm-generic/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 7387be3

Please sign in to comment.