From 601e3ad9def147f714c1b66fd397d138ba5dbd3b Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Mon, 20 Apr 2015 08:37:42 -0700 Subject: mn10300: 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 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 Acked-by: Greg Kroah-Hartman Fixes: c627f2ceb692 ("serial: 8250: Add support for big-endian MMIO accesses") Signed-off-by: Guenter Roeck Signed-off-by: Rob Herring --- arch/mn10300/include/asm/io.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch') diff --git a/arch/mn10300/include/asm/io.h b/arch/mn10300/include/asm/io.h index 897ba3c12b32..cc4a2ba9e228 100644 --- a/arch/mn10300/include/asm/io.h +++ b/arch/mn10300/include/asm/io.h @@ -197,6 +197,11 @@ static inline void outsl(unsigned long addr, const void *buffer, int count) #define iowrite16(v, addr) writew((v), (addr)) #define iowrite32(v, addr) writel((v), (addr)) +#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 ioread8_rep(p, dst, count) \ insb((unsigned long) (p), (dst), (count)) #define ioread16_rep(p, dst, count) \ -- cgit v1.2.3 From 04fca0e390e80d88c2f959aef86e0bb7f26fea01 Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Mon, 20 Apr 2015 08:36:15 -0700 Subject: 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 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 Acked-by: Greg Kroah-Hartman Fixes: c627f2ceb692 ("serial: 8250: Add support for big-endian MMIO accesses") Signed-off-by: Guenter Roeck Signed-off-by: Rob Herring --- arch/frv/include/asm/io.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch') diff --git a/arch/frv/include/asm/io.h b/arch/frv/include/asm/io.h index 99bb7efaf9b7..0b78bc89e840 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) __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); -- cgit v1.2.3