diff options
author | Matthew Leach <matthew@mattleach.net> | 2012-12-10 23:49:49 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-12-11 12:49:53 -0500 |
commit | 2925f6c0c7af32720dcbadc586463aeceb6baa22 (patch) | |
tree | 45a0927d4d662e8a9a1c83ba1a84c42d17854f23 | |
parent | a71258d79e3d05632e90c9f7db5ccf929d276529 (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>
-rw-r--r-- | drivers/net/ethernet/smsc/smc911x.h | 16 | ||||
-rw-r--r-- | drivers/net/ethernet/smsc/smsc911x.c | 8 |
2 files changed, 12 insertions, 12 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 */ |
diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c index 39a7a49d98e0..4616bf27d515 100644 --- a/drivers/net/ethernet/smsc/smsc911x.c +++ b/drivers/net/ethernet/smsc/smsc911x.c | |||
@@ -253,7 +253,7 @@ smsc911x_tx_writefifo(struct smsc911x_data *pdata, unsigned int *buf, | |||
253 | } | 253 | } |
254 | 254 | ||
255 | if (pdata->config.flags & SMSC911X_USE_32BIT) { | 255 | if (pdata->config.flags & SMSC911X_USE_32BIT) { |
256 | writesl(pdata->ioaddr + TX_DATA_FIFO, buf, wordcount); | 256 | iowrite32_rep(pdata->ioaddr + TX_DATA_FIFO, buf, wordcount); |
257 | goto out; | 257 | goto out; |
258 | } | 258 | } |
259 | 259 | ||
@@ -285,7 +285,7 @@ smsc911x_tx_writefifo_shift(struct smsc911x_data *pdata, unsigned int *buf, | |||
285 | } | 285 | } |
286 | 286 | ||
287 | if (pdata->config.flags & SMSC911X_USE_32BIT) { | 287 | if (pdata->config.flags & SMSC911X_USE_32BIT) { |
288 | writesl(pdata->ioaddr + __smsc_shift(pdata, | 288 | iowrite32_rep(pdata->ioaddr + __smsc_shift(pdata, |
289 | TX_DATA_FIFO), buf, wordcount); | 289 | TX_DATA_FIFO), buf, wordcount); |
290 | goto out; | 290 | goto out; |
291 | } | 291 | } |
@@ -319,7 +319,7 @@ smsc911x_rx_readfifo(struct smsc911x_data *pdata, unsigned int *buf, | |||
319 | } | 319 | } |
320 | 320 | ||
321 | if (pdata->config.flags & SMSC911X_USE_32BIT) { | 321 | if (pdata->config.flags & SMSC911X_USE_32BIT) { |
322 | readsl(pdata->ioaddr + RX_DATA_FIFO, buf, wordcount); | 322 | ioread32_rep(pdata->ioaddr + RX_DATA_FIFO, buf, wordcount); |
323 | goto out; | 323 | goto out; |
324 | } | 324 | } |
325 | 325 | ||
@@ -351,7 +351,7 @@ smsc911x_rx_readfifo_shift(struct smsc911x_data *pdata, unsigned int *buf, | |||
351 | } | 351 | } |
352 | 352 | ||
353 | if (pdata->config.flags & SMSC911X_USE_32BIT) { | 353 | if (pdata->config.flags & SMSC911X_USE_32BIT) { |
354 | readsl(pdata->ioaddr + __smsc_shift(pdata, | 354 | ioread32_rep(pdata->ioaddr + __smsc_shift(pdata, |
355 | RX_DATA_FIFO), buf, wordcount); | 355 | RX_DATA_FIFO), buf, wordcount); |
356 | goto out; | 356 | goto out; |
357 | } | 357 | } |