mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: David Howells <dhowells@redhat.com>
Cc: linux-kernel@vger.kernel.org, Guenter Roeck <linux@roeck-us.net>,
	Kevin Cernekee <cernekee@gmail.com>,
	Rob Herring <robh@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [PATCH] frv: add io{read,write}{16,32}be functions
Date: Mon, 20 Apr 2015 08:36:15 -0700	[thread overview]
Message-ID: <1429544175-29047-1-git-send-email-linux@roeck-us.net> (raw)

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>
Cc: Rob Herring <robh@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fixes: c627f2ceb692 ("serial: 8250: Add support for big-endian MMIO
	accesses")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
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)
 		__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);
-- 
2.1.0


             reply	other threads:[~2015-04-20 15:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-20 15:36 Guenter Roeck [this message]
2015-04-20 16:36 ` Greg Kroah-Hartman
2015-04-23  4:11 ` Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1429544175-29047-1-git-send-email-linux@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=cernekee@gmail.com \
    --cc=dhowells@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome