aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/smsc/smc911x.h
diff options
context:
space:
mode:
authorMatthew Leach <matthew@mattleach.net>2012-12-10 23:49:49 -0500
committerDavid S. Miller <davem@davemloft.net>2012-12-11 12:49:53 -0500
commit2925f6c0c7af32720dcbadc586463aeceb6baa22 (patch)
tree45a0927d4d662e8a9a1c83ba1a84c42d17854f23 /drivers/net/ethernet/smsc/smc911x.h
parenta71258d79e3d05632e90c9f7db5ccf929d276529 (diff)
net: smc911x: use io{read,write}*_rep accessors
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/smsc/smc911x.h')
-rw-r--r--drivers/net/ethernet/smsc/smc911x.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/ethernet/smsc/smc911x.h b/drivers/net/ethernet/smsc/smc911x.h
index 3269292efecc..d51261ba4642 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,
159 void __iomem *ioaddr = lp->base + reg; 159 void __iomem *ioaddr = lp->base + reg;
160 160
161 if (lp->cfg.flags & SMC911X_USE_32BIT) { 161 if (lp->cfg.flags & SMC911X_USE_32BIT) {
162 readsl(ioaddr, addr, count); 162 ioread32_rep(ioaddr, addr, count);
163 return; 163 return;
164 } 164 }
165 165
166 if (lp->cfg.flags & SMC911X_USE_16BIT) { 166 if (lp->cfg.flags & SMC911X_USE_16BIT) {
167 readsw(ioaddr, addr, count * 2); 167 ioread16_rep(ioaddr, addr, count * 2);
168 return; 168 return;
169 } 169 }
170 170
@@ -177,12 +177,12 @@ static inline void SMC_outsl(struct smc911x_local *lp, int reg,
177 void __iomem *ioaddr = lp->base + reg; 177 void __iomem *ioaddr = lp->base + reg;
178 178
179 if (lp->cfg.flags & SMC911X_USE_32BIT) { 179 if (lp->cfg.flags & SMC911X_USE_32BIT) {
180 writesl(ioaddr, addr, count); 180 iowrite32_rep(ioaddr, addr, count);
181 return; 181 return;
182 } 182 }
183 183
184 if (lp->cfg.flags & SMC911X_USE_16BIT) { 184 if (lp->cfg.flags & SMC911X_USE_16BIT) {
185 writesw(ioaddr, addr, count * 2); 185 iowrite16_rep(ioaddr, addr, count * 2);
186 return; 186 return;
187 } 187 }
188 188
@@ -196,14 +196,14 @@ static inline void SMC_outsl(struct smc911x_local *lp, int reg,
196 writew(v & 0xFFFF, (lp)->base + (r)); \ 196 writew(v & 0xFFFF, (lp)->base + (r)); \
197 writew(v >> 16, (lp)->base + (r) + 2); \ 197 writew(v >> 16, (lp)->base + (r) + 2); \
198 } while (0) 198 } while (0)
199#define SMC_insl(lp, r, p, l) readsw((short*)((lp)->base + (r)), p, l*2) 199#define SMC_insl(lp, r, p, l) ioread16_rep((short*)((lp)->base + (r)), p, l*2)
200#define SMC_outsl(lp, r, p, l) writesw((short*)((lp)->base + (r)), p, l*2) 200#define SMC_outsl(lp, r, p, l) iowrite16_rep((short*)((lp)->base + (r)), p, l*2)
201 201
202#elif SMC_USE_32BIT 202#elif SMC_USE_32BIT
203#define SMC_inl(lp, r) readl((lp)->base + (r)) 203#define SMC_inl(lp, r) readl((lp)->base + (r))
204#define SMC_outl(v, lp, r) writel(v, (lp)->base + (r)) 204#define SMC_outl(v, lp, r) writel(v, (lp)->base + (r))
205#define SMC_insl(lp, r, p, l) readsl((int*)((lp)->base + (r)), p, l) 205#define SMC_insl(lp, r, p, l) ioread32_rep((int*)((lp)->base + (r)), p, l)
206#define SMC_outsl(lp, r, p, l) writesl((int*)((lp)->base + (r)), p, l) 206#define SMC_outsl(lp, r, p, l) iowrite32_rep((int*)((lp)->base + (r)), p, l)
207 207
208#endif /* SMC_USE_16BIT */ 208#endif /* SMC_USE_16BIT */
209#endif /* SMC_DYNAMIC_BUS_CONFIG */ 209#endif /* SMC_DYNAMIC_BUS_CONFIG */