aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m32r
diff options
context:
space:
mode:
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>2015-12-29 17:54:19 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-12-29 20:45:49 -0500
commit92a8ed4c7643809123ef0a65424569eaacc5c6b0 (patch)
tree6e682d1078bdebae30611bacd1dde304bab25e5f /arch/m32r
parent6122192eb6f2a3311bbf4600c5537fbe1c223022 (diff)
m32r: add io*_rep helpers
m32r allmodconfig was failing with the error: error: implicit declaration of function 'read' On checking io.h it turned out that 'read' is not defined but 'readb' is defined and 'ioread8' will then obviously mean 'readb'. At the same time some of the helper functions ioreadN_rep() and iowriteN_rep() were missing which also led to the build failure. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/m32r')
-rw-r--r--arch/m32r/include/asm/io.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/m32r/include/asm/io.h b/arch/m32r/include/asm/io.h
index 61b8931bc192..4b0f5e001d4d 100644
--- a/arch/m32r/include/asm/io.h
+++ b/arch/m32r/include/asm/io.h
@@ -168,13 +168,21 @@ static inline void _writel(unsigned long l, unsigned long addr)
168#define writew_relaxed writew 168#define writew_relaxed writew
169#define writel_relaxed writel 169#define writel_relaxed writel
170 170
171#define ioread8 read 171#define ioread8 readb
172#define ioread16 readw 172#define ioread16 readw
173#define ioread32 readl 173#define ioread32 readl
174#define iowrite8 writeb 174#define iowrite8 writeb
175#define iowrite16 writew 175#define iowrite16 writew
176#define iowrite32 writel 176#define iowrite32 writel
177 177
178#define ioread8_rep(p, dst, count) insb((unsigned long)(p), (dst), (count))
179#define ioread16_rep(p, dst, count) insw((unsigned long)(p), (dst), (count))
180#define ioread32_rep(p, dst, count) insl((unsigned long)(p), (dst), (count))
181
182#define iowrite8_rep(p, src, count) outsb((unsigned long)(p), (src), (count))
183#define iowrite16_rep(p, src, count) outsw((unsigned long)(p), (src), (count))
184#define iowrite32_rep(p, src, count) outsl((unsigned long)(p), (src), (count))
185
178#define ioread16be(addr) be16_to_cpu(readw(addr)) 186#define ioread16be(addr) be16_to_cpu(readw(addr))
179#define ioread32be(addr) be32_to_cpu(readl(addr)) 187#define ioread32be(addr) be32_to_cpu(readl(addr))
180#define iowrite16be(v, addr) writew(cpu_to_be16(v), (addr)) 188#define iowrite16be(v, addr) writew(cpu_to_be16(v), (addr))