Skip to content

Commit

Permalink
frv: add io{read,write}{16,32}be functions
Browse files Browse the repository at this point in the history
These functions are used in various drivers, including the latest
version of the 8250 driver. The latter causes the following build
failure.

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 <cernekee@gmail.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fixes: c627f2c ("serial: 8250: Add support for big-endian MMIO
	accesses")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Rob Herring <robh@kernel.org>
  • Loading branch information
Guenter Roeck authored and Rob Herring committed Apr 23, 2015
1 parent 601e3ad commit 04fca0e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/frv/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,11 @@ static inline void iowrite32(u32 val, void __iomem *p)
__flush_PCI_writes();
}

#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);
Expand Down

0 comments on commit 04fca0e

Please sign in to comment.