[lkml]   [2015]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] frv: add io{read,write}{16,32}be functions
These functions are used in various drivers, including the latest
version of the 8250 driver. The latter causes the following build

drivers/tty/serial/8250/8250_core.c: In function 'mem32be_serial_out':
drivers/tty/serial/8250/8250_core.c:456:2: error:
implicit declaration of function 'iowrite32be'
drivers/tty/serial/8250/8250_core.c: In function 'mem32be_serial_in':
drivers/tty/serial/8250/8250_core.c:462:2: error:
implicit declaration of function 'ioread32be'

Cc: Kevin Cernekee <>
Cc: Rob Herring <>
Cc: Greg Kroah-Hartman <>
Fixes: c627f2ceb692 ("serial: 8250: Add support for big-endian MMIO
Signed-off-by: Guenter Roeck <>
Build failure seen in next-20150420.

arch/frv/include/asm/io.h | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/arch/frv/include/asm/io.h b/arch/frv/include/asm/io.h
index 99bb7ef..0b78bc8 100644
--- a/arch/frv/include/asm/io.h
+++ b/arch/frv/include/asm/io.h
@@ -342,6 +342,11 @@ static inline void iowrite32(u32 val, void __iomem *p)

+#define ioread16be(addr) be16_to_cpu(ioread16(addr))
+#define ioread32be(addr) be32_to_cpu(ioread32(addr))
+#define iowrite16be(v, addr) iowrite16(cpu_to_be16(v), (addr))
+#define iowrite32be(v, addr) iowrite32(cpu_to_be32(v), (addr))
static inline void ioread8_rep(void __iomem *p, void *dst, unsigned long count)
io_insb((unsigned long) p, dst, count);

 \ /
  Last update: 2015-04-20 18:21    [W:0.077 / U:4.832 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site