diff options
author | Sudip Mukherjee <sudipm.mukherjee@gmail.com> | 2015-12-29 14:54:19 -0800 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2017-10-12 15:27:21 +0100 |
commit | cefa3724f1f806bb63402962bab92687437e145a (patch) | |
tree | 64af5b4e2b72d3bc59fe2b655f74eccb6b76aec9 | |
parent | aa17149de8631218f22f0a23f3239b03f458f6e5 (diff) |
m32r: add io*_rep helpers
commit 92a8ed4c7643809123ef0a65424569eaacc5c6b0 upstream.
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>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r-- | arch/m32r/include/asm/io.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/m32r/include/asm/io.h b/arch/m32r/include/asm/io.h index f9f4fb6506a3..cea944caca61 100644 --- a/arch/m32r/include/asm/io.h +++ b/arch/m32r/include/asm/io.h @@ -163,13 +163,21 @@ static inline void _writel(unsigned long l, unsigned long addr) #define __raw_writew writew #define __raw_writel writel -#define ioread8 read +#define ioread8 readb #define ioread16 readw #define ioread32 readl #define iowrite8 writeb #define iowrite16 writew #define iowrite32 writel +#define ioread8_rep(p, dst, count) insb((unsigned long)(p), (dst), (count)) +#define ioread16_rep(p, dst, count) insw((unsigned long)(p), (dst), (count)) +#define ioread32_rep(p, dst, count) insl((unsigned long)(p), (dst), (count)) + +#define iowrite8_rep(p, src, count) outsb((unsigned long)(p), (src), (count)) +#define iowrite16_rep(p, src, count) outsw((unsigned long)(p), (src), (count)) +#define iowrite32_rep(p, src, count) outsl((unsigned long)(p), (src), (count)) + #define mmiowb() #define flush_write_buffers() do { } while (0) /* M32R_FIXME */ |