From: Will Deacon <will.deacon@arm.com>
To: linux-kernel@vger.kernel.org
Cc: linux-arch@vger.kernel.org, benh@kernel.crashing.org,
arnd@arndb.de, james.hogan@imgtec.com,
Matthew Leach <matthew@mattleach.net>,
netdev@vger.kernel.org, Will Deacon <will.deacon@arm.com>
Subject: [PATCH v2 04/10] net: smc911x: use io{read,write}*_rep accessors
Date: Mon, 10 Dec 2012 19:12:36 +0000 [thread overview]
Message-ID: <1355166762-15133-5-git-send-email-will.deacon@arm.com> (raw)
In-Reply-To: <1355166762-15133-1-git-send-email-will.deacon@arm.com>
From: Matthew Leach <matthew@mattleach.net>
The {read,write}s{b,w,l} operations are not defined by all
architectures and are being removed from the asm-generic/io.h
interface.
This patch replaces the usage of these string functions in the smc911x
accessors with io{read,write}{8,16,32}_rep calls instead.
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Ben Herrenschmidt <benh@kernel.crashing.org>
Cc: netdev@vger.kernel.org
Signed-off-by: Matthew Leach <matthew@mattleach.net>
Signed-off-by: Will Deacon <will.deacon@arm.com>
---
drivers/net/ethernet/smsc/smc911x.h | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/smsc/smc911x.h b/drivers/net/ethernet/smsc/smc911x.h
index 3269292..d51261b 100644
--- a/drivers/net/ethernet/smsc/smc911x.h
+++ b/drivers/net/ethernet/smsc/smc911x.h
@@ -159,12 +159,12 @@ static inline void SMC_insl(struct smc911x_local *lp, int reg,
void __iomem *ioaddr = lp->base + reg;
if (lp->cfg.flags & SMC911X_USE_32BIT) {
- readsl(ioaddr, addr, count);
+ ioread32_rep(ioaddr, addr, count);
return;
}
if (lp->cfg.flags & SMC911X_USE_16BIT) {
- readsw(ioaddr, addr, count * 2);
+ ioread16_rep(ioaddr, addr, count * 2);
return;
}
@@ -177,12 +177,12 @@ static inline void SMC_outsl(struct smc911x_local *lp, int reg,
void __iomem *ioaddr = lp->base + reg;
if (lp->cfg.flags & SMC911X_USE_32BIT) {
- writesl(ioaddr, addr, count);
+ iowrite32_rep(ioaddr, addr, count);
return;
}
if (lp->cfg.flags & SMC911X_USE_16BIT) {
- writesw(ioaddr, addr, count * 2);
+ iowrite16_rep(ioaddr, addr, count * 2);
return;
}
@@ -196,14 +196,14 @@ static inline void SMC_outsl(struct smc911x_local *lp, int reg,
writew(v & 0xFFFF, (lp)->base + (r)); \
writew(v >> 16, (lp)->base + (r) + 2); \
} while (0)
-#define SMC_insl(lp, r, p, l) readsw((short*)((lp)->base + (r)), p, l*2)
-#define SMC_outsl(lp, r, p, l) writesw((short*)((lp)->base + (r)), p, l*2)
+#define SMC_insl(lp, r, p, l) ioread16_rep((short*)((lp)->base + (r)), p, l*2)
+#define SMC_outsl(lp, r, p, l) iowrite16_rep((short*)((lp)->base + (r)), p, l*2)
#elif SMC_USE_32BIT
#define SMC_inl(lp, r) readl((lp)->base + (r))
#define SMC_outl(v, lp, r) writel(v, (lp)->base + (r))
-#define SMC_insl(lp, r, p, l) readsl((int*)((lp)->base + (r)), p, l)
-#define SMC_outsl(lp, r, p, l) writesl((int*)((lp)->base + (r)), p, l)
+#define SMC_insl(lp, r, p, l) ioread32_rep((int*)((lp)->base + (r)), p, l)
+#define SMC_outsl(lp, r, p, l) iowrite32_rep((int*)((lp)->base + (r)), p, l)
#endif /* SMC_USE_16BIT */
#endif /* SMC_DYNAMIC_BUS_CONFIG */
--
1.8.0
next prev parent reply other threads:[~2012-12-10 19:12 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-10 19:12 [PATCH v2 00/10] Fix endianness of generic I/O accessors Will Deacon
2012-12-10 19:12 ` [PATCH v2 01/10] asm-generic: io: don't perform swab during {in,out} string functions Will Deacon
2012-12-10 19:12 ` Will Deacon
2012-12-10 19:12 ` [PATCH v2 02/10] mmc: mmci: use io{read,write}*_rep accessors instead of " Will Deacon
2012-12-10 19:12 ` Will Deacon
2012-12-10 19:12 ` [PATCH v2 03/10] net: smc91x: " Will Deacon
2012-12-10 19:12 ` Will Deacon
2012-12-10 20:47 ` David Miller
2012-12-10 20:47 ` David Miller
2012-12-10 19:12 ` Will Deacon [this message]
2012-12-10 19:12 ` [PATCH v2 04/10] net: smc911x: use io{read,write}*_rep accessors Will Deacon
2012-12-10 20:47 ` David Miller
2012-12-11 14:49 ` Will Deacon
2012-12-11 17:51 ` David Miller
2012-12-10 19:12 ` [PATCH v2 05/10] net: dm9000: " Will Deacon
2012-12-10 19:12 ` Will Deacon
2012-12-10 20:47 ` David Miller
2012-12-10 20:47 ` David Miller
2012-12-10 19:12 ` [PATCH v2 06/10] net: 8390: " Will Deacon
2012-12-10 19:12 ` Will Deacon
2012-12-10 20:47 ` David Miller
2012-12-10 19:12 ` [PATCH v2 07/10] mtd: nand/gpio: " Will Deacon
2012-12-10 19:12 ` Will Deacon
2012-12-13 11:28 ` Artem Bityutskiy
2012-12-13 11:28 ` Artem Bityutskiy
2012-12-10 19:12 ` [PATCH v2 08/10] musb: tusb6010: " Will Deacon
2012-12-10 19:12 ` Will Deacon
2012-12-10 19:12 ` [PATCH v2 09/10] usb: musb: " Will Deacon
2012-12-10 19:12 ` Will Deacon
2012-12-10 19:12 ` [PATCH v2 10/10] asm-generic: io: remove {read,write} string functions Will Deacon
2012-12-10 19:12 ` Will Deacon
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=1355166762-15133-5-git-send-email-will.deacon@arm.com \
--to=will.deacon@arm.com \
--cc=arnd@arndb.de \
--cc=benh@kernel.crashing.org \
--cc=james.hogan@imgtec.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew@mattleach.net \
--cc=netdev@vger.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).