From: Thierry Reding <thierry.reding@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>, Olof Johansson <olof@lixom.net>,
Fengguang Wu <fengguang.wu@intel.com>
Cc: Russell King <linux@arm.linux.org.uk>,
Catalin Marinas <catalin.marinas@arm.com>,
Stephen Boyd <sboyd@codeaurora.org>,
Sam Ravnborg <sam@ravnborg.org>,
linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org,
linux-s390@vger.kernel.org, sparclinux@vger.kernel.org,
x86@kernel.org, linux-serial@vger.kernel.org,
linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/9] ARM: ixp4xx: Properly override I/O accessors
Date: Mon, 6 Oct 2014 15:52:35 +0200 [thread overview]
Message-ID: <1412603561-27653-4-git-send-email-thierry.reding@gmail.com> (raw)
In-Reply-To: <1412603561-27653-1-git-send-email-thierry.reding@gmail.com>
From: Thierry Reding <treding@nvidia.com>
In order to override accessors properly they must be #define'd so that
subsequent generic headers (the one for ARM and finally the architecture
independent one) can properly detect it.
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
arch/arm/mach-ixp4xx/include/mach/io.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm/mach-ixp4xx/include/mach/io.h b/arch/arm/mach-ixp4xx/include/mach/io.h
index 559c69a47731..b47efdad95f4 100644
--- a/arch/arm/mach-ixp4xx/include/mach/io.h
+++ b/arch/arm/mach-ixp4xx/include/mach/io.h
@@ -226,6 +226,7 @@ static inline void __indirect_readsl(const volatile void __iomem *bus_addr,
* I/O functions.
*/
+#define outb outb
static inline void outb(u8 value, u32 addr)
{
u32 n, byte_enables, data;
@@ -235,12 +236,14 @@ static inline void outb(u8 value, u32 addr)
ixp4xx_pci_write(addr, byte_enables | NP_CMD_IOWRITE, data);
}
+#define outsb outsb
static inline void outsb(u32 io_addr, const u8 *vaddr, u32 count)
{
while (count--)
outb(*vaddr++, io_addr);
}
+#define outw outw
static inline void outw(u16 value, u32 addr)
{
u32 n, byte_enables, data;
@@ -250,23 +253,27 @@ static inline void outw(u16 value, u32 addr)
ixp4xx_pci_write(addr, byte_enables | NP_CMD_IOWRITE, data);
}
+#define outsw outsw
static inline void outsw(u32 io_addr, const u16 *vaddr, u32 count)
{
while (count--)
outw(cpu_to_le16(*vaddr++), io_addr);
}
+#define outl outl
static inline void outl(u32 value, u32 addr)
{
ixp4xx_pci_write(addr, NP_CMD_IOWRITE, value);
}
+#define outsl outsl
static inline void outsl(u32 io_addr, const u32 *vaddr, u32 count)
{
while (count--)
outl(cpu_to_le32(*vaddr++), io_addr);
}
+#define inb inb
static inline u8 inb(u32 addr)
{
u32 n, byte_enables, data;
@@ -278,12 +285,14 @@ static inline u8 inb(u32 addr)
return data >> (8*n);
}
+#define insb insb
static inline void insb(u32 io_addr, u8 *vaddr, u32 count)
{
while (count--)
*vaddr++ = inb(io_addr);
}
+#define inw inw
static inline u16 inw(u32 addr)
{
u32 n, byte_enables, data;
@@ -295,12 +304,14 @@ static inline u16 inw(u32 addr)
return data>>(8*n);
}
+#define insw insw
static inline void insw(u32 io_addr, u16 *vaddr, u32 count)
{
while (count--)
*vaddr++ = le16_to_cpu(inw(io_addr));
}
+#define inl inl
static inline u32 inl(u32 addr)
{
u32 data;
@@ -310,6 +321,7 @@ static inline u32 inl(u32 addr)
return data;
}
+#define insl insl
static inline void insl(u32 io_addr, u32 *vaddr, u32 count)
{
while (count--)
--
2.1.0
next prev parent reply other threads:[~2014-10-06 13:52 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-06 13:52 [PATCH v5 0/9] asm-generic/io.h overhaul Thierry Reding
2014-10-06 13:52 ` [PATCH 1/9] ARC: Remove redundant PCI_IOBASE declaration Thierry Reding
2014-10-06 13:52 ` Thierry Reding
2014-10-06 13:52 ` [PATCH 2/9] ARM: ebsa110: Properly override I/O accessors Thierry Reding
2014-10-06 13:52 ` Thierry Reding
2014-10-06 13:52 ` Thierry Reding [this message]
2014-10-06 13:52 ` [PATCH 3/9] ARM: ixp4xx: " Thierry Reding
2014-10-06 13:52 ` [PATCH 4/9] [IA64] Change xlate_dev_{kmem,mem}_ptr() prototypes Thierry Reding
2014-10-06 13:52 ` Thierry Reding
2014-10-06 13:52 ` [PATCH 5/9] /dev/mem: Use more consistent data types Thierry Reding
2014-10-06 13:52 ` Thierry Reding
2014-10-06 13:52 ` [PATCH 6/9] asm-generic/io.h: Reconcile I/O accessor overrides Thierry Reding
2014-10-06 13:52 ` Thierry Reding
2014-10-06 13:52 ` [PATCH 7/9] asm-generic/io.h: Implement generic {read,write}s*() Thierry Reding
2014-10-06 13:52 ` Thierry Reding
2014-10-06 13:52 ` [PATCH 8/9] ARM: Use include/asm-generic/io.h Thierry Reding
2014-10-06 13:52 ` [PATCH 9/9] arm64: " Thierry Reding
2014-10-06 13:52 ` Thierry Reding
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=1412603561-27653-4-git-send-email-thierry.reding@gmail.com \
--to=thierry.reding@gmail.com \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=fengguang.wu@intel.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=olof@lixom.net \
--cc=sam@ravnborg.org \
--cc=sboyd@codeaurora.org \
--cc=sparclinux@vger.kernel.org \
--cc=x86@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;
as well as URLs for NNTP newsgroup(s).