aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hurley2015-07-08 23:10:06 -0400
committerGreg Kroah-Hartman2015-07-23 18:08:28 -0700
commit7525a9901b5ee3c84933ad069e41506c37404ddc (patch)
tree019625796ce7919828032f7626074ea38843c9c2
parent907eda32a36fcdb979bdb91ea097abb3dd2c23c9 (diff)
m32r: Add ioreadXX/iowriteXX big-endian mmio accessors
commit c627f2ceb692 ("serial: 8250: Add support for big-endian MMIO accesses") added support for 32-bit big-endian mmio to the 8250 driver. Support for ioreadXXbe/iowriteXXbe io accessors was missing from m32r arch, which caused build errors. Add trivial macro mmio accessors. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Cc: Kevin Cernekee <cernekee@gmail.com> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--arch/m32r/include/asm/io.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/m32r/include/asm/io.h b/arch/m32r/include/asm/io.h
index 0c3f25ee3381..f8de767ce2bc 100644
--- a/arch/m32r/include/asm/io.h
+++ b/arch/m32r/include/asm/io.h
@@ -174,6 +174,11 @@ static inline void _writel(unsigned long l, unsigned long addr)
#define iowrite16 writew
#define iowrite32 writel
+#define ioread16be(addr) be16_to_cpu(readw(addr))
+#define ioread32be(addr) be32_to_cpu(readl(addr))
+#define iowrite16be(v, addr) writew(cpu_to_be16(v), (addr))
+#define iowrite32be(v, addr) writel(cpu_to_be32(v), (addr))
+
#define mmiowb()
#define flush_write_buffers() do { } while (0) /* M32R_FIXME */