summaryrefslogtreecommitdiffstats
path: root/include/asm-generic
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-10-27 03:52:59 +0200
committerMike Frysinger <vapier@gentoo.org>2011-01-10 13:18:03 +0100
commitefb2d31c1c62de9a0e42b2b1981d1a90fc0b4618 (patch)
tree02696675f9365c97fa079f0b6960cbe97d4e1e62 /include/asm-generic
parentnet/irda: bfin_sir: back out transitional defines (diff)
downloadlinux-efb2d31c1c62de9a0e42b2b1981d1a90fc0b4618.tar.xz
linux-efb2d31c1c62de9a0e42b2b1981d1a90fc0b4618.zip
asm-generic/io.h: add reads[bwl]/writes[bwl] helpers
A bunch of arches define reads[bwl]/writes[bwl] helpers for accessing memory mapped registers. Since the Blackfin ones aren't specific to Blackfin code, move them to the common asm-generic/io.h for people. Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/io.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
index 3577ca11a0be..4644c9a7f724 100644
--- a/include/asm-generic/io.h
+++ b/include/asm-generic/io.h
@@ -211,6 +211,36 @@ static inline void outsl(unsigned long addr, const void *buffer, int count)
}
#endif
+static inline void readsl(const void __iomem *addr, void *buf, int len)
+{
+ insl((unsigned long)addr, buf, len);
+}
+
+static inline void readsw(const void __iomem *addr, void *buf, int len)
+{
+ insw((unsigned long)addr, buf, len);
+}
+
+static inline void readsb(const void __iomem *addr, void *buf, int len)
+{
+ insb((unsigned long)addr, buf, len);
+}
+
+static inline void writesl(const void __iomem *addr, const void *buf, int len)
+{
+ outsl((unsigned long)addr, buf, len);
+}
+
+static inline void writesw(const void __iomem *addr, const void *buf, int len)
+{
+ outsw((unsigned long)addr, buf, len);
+}
+
+static inline void writesb(const void __iomem *addr, const void *buf, int len)
+{
+ outsb((unsigned long)addr, buf, len);
+}
+
#ifndef CONFIG_GENERIC_IOMAP
#define ioread8(addr) readb(addr)
#define ioread16(addr) readw(addr)