diff options
Diffstat (limited to 'drivers/net/fs_enet/mac-scc.c')
-rw-r--r-- | drivers/net/fs_enet/mac-scc.c | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/drivers/net/fs_enet/mac-scc.c b/drivers/net/fs_enet/mac-scc.c index add9e32d4f47..03134f47a4eb 100644 --- a/drivers/net/fs_enet/mac-scc.c +++ b/drivers/net/fs_enet/mac-scc.c | |||
@@ -191,7 +191,8 @@ static int allocate_bd(struct net_device *dev) | |||
191 | if (IS_ERR_VALUE(fep->ring_mem_addr)) | 191 | if (IS_ERR_VALUE(fep->ring_mem_addr)) |
192 | return -ENOMEM; | 192 | return -ENOMEM; |
193 | 193 | ||
194 | fep->ring_base = cpm_dpram_addr(fep->ring_mem_addr); | 194 | fep->ring_base = (void __iomem __force*) |
195 | cpm_dpram_addr(fep->ring_mem_addr); | ||
195 | 196 | ||
196 | return 0; | 197 | return 0; |
197 | } | 198 | } |
@@ -212,7 +213,7 @@ static void cleanup_data(struct net_device *dev) | |||
212 | static void set_promiscuous_mode(struct net_device *dev) | 213 | static void set_promiscuous_mode(struct net_device *dev) |
213 | { | 214 | { |
214 | struct fs_enet_private *fep = netdev_priv(dev); | 215 | struct fs_enet_private *fep = netdev_priv(dev); |
215 | scc_t *sccp = fep->scc.sccp; | 216 | scc_t __iomem *sccp = fep->scc.sccp; |
216 | 217 | ||
217 | S16(sccp, scc_psmr, SCC_PSMR_PRO); | 218 | S16(sccp, scc_psmr, SCC_PSMR_PRO); |
218 | } | 219 | } |
@@ -220,7 +221,7 @@ static void set_promiscuous_mode(struct net_device *dev) | |||
220 | static void set_multicast_start(struct net_device *dev) | 221 | static void set_multicast_start(struct net_device *dev) |
221 | { | 222 | { |
222 | struct fs_enet_private *fep = netdev_priv(dev); | 223 | struct fs_enet_private *fep = netdev_priv(dev); |
223 | scc_enet_t *ep = fep->scc.ep; | 224 | scc_enet_t __iomem *ep = fep->scc.ep; |
224 | 225 | ||
225 | W16(ep, sen_gaddr1, 0); | 226 | W16(ep, sen_gaddr1, 0); |
226 | W16(ep, sen_gaddr2, 0); | 227 | W16(ep, sen_gaddr2, 0); |
@@ -231,7 +232,7 @@ static void set_multicast_start(struct net_device *dev) | |||
231 | static void set_multicast_one(struct net_device *dev, const u8 * mac) | 232 | static void set_multicast_one(struct net_device *dev, const u8 * mac) |
232 | { | 233 | { |
233 | struct fs_enet_private *fep = netdev_priv(dev); | 234 | struct fs_enet_private *fep = netdev_priv(dev); |
234 | scc_enet_t *ep = fep->scc.ep; | 235 | scc_enet_t __iomem *ep = fep->scc.ep; |
235 | u16 taddrh, taddrm, taddrl; | 236 | u16 taddrh, taddrm, taddrl; |
236 | 237 | ||
237 | taddrh = ((u16) mac[5] << 8) | mac[4]; | 238 | taddrh = ((u16) mac[5] << 8) | mac[4]; |
@@ -247,8 +248,8 @@ static void set_multicast_one(struct net_device *dev, const u8 * mac) | |||
247 | static void set_multicast_finish(struct net_device *dev) | 248 | static void set_multicast_finish(struct net_device *dev) |
248 | { | 249 | { |
249 | struct fs_enet_private *fep = netdev_priv(dev); | 250 | struct fs_enet_private *fep = netdev_priv(dev); |
250 | scc_t *sccp = fep->scc.sccp; | 251 | scc_t __iomem *sccp = fep->scc.sccp; |
251 | scc_enet_t *ep = fep->scc.ep; | 252 | scc_enet_t __iomem *ep = fep->scc.ep; |
252 | 253 | ||
253 | /* clear promiscuous always */ | 254 | /* clear promiscuous always */ |
254 | C16(sccp, scc_psmr, SCC_PSMR_PRO); | 255 | C16(sccp, scc_psmr, SCC_PSMR_PRO); |
@@ -285,8 +286,8 @@ static void set_multicast_list(struct net_device *dev) | |||
285 | static void restart(struct net_device *dev) | 286 | static void restart(struct net_device *dev) |
286 | { | 287 | { |
287 | struct fs_enet_private *fep = netdev_priv(dev); | 288 | struct fs_enet_private *fep = netdev_priv(dev); |
288 | scc_t *sccp = fep->scc.sccp; | 289 | scc_t __iomem *sccp = fep->scc.sccp; |
289 | scc_enet_t *ep = fep->scc.ep; | 290 | scc_enet_t __iomem *ep = fep->scc.ep; |
290 | const struct fs_platform_info *fpi = fep->fpi; | 291 | const struct fs_platform_info *fpi = fep->fpi; |
291 | u16 paddrh, paddrm, paddrl; | 292 | u16 paddrh, paddrm, paddrl; |
292 | const unsigned char *mac; | 293 | const unsigned char *mac; |
@@ -296,7 +297,7 @@ static void restart(struct net_device *dev) | |||
296 | 297 | ||
297 | /* clear everything (slow & steady does it) */ | 298 | /* clear everything (slow & steady does it) */ |
298 | for (i = 0; i < sizeof(*ep); i++) | 299 | for (i = 0; i < sizeof(*ep); i++) |
299 | __fs_out8((char *)ep + i, 0); | 300 | __fs_out8((u8 __iomem *)ep + i, 0); |
300 | 301 | ||
301 | /* point to bds */ | 302 | /* point to bds */ |
302 | W16(ep, sen_genscc.scc_rbase, fep->ring_mem_addr); | 303 | W16(ep, sen_genscc.scc_rbase, fep->ring_mem_addr); |
@@ -397,7 +398,7 @@ static void restart(struct net_device *dev) | |||
397 | static void stop(struct net_device *dev) | 398 | static void stop(struct net_device *dev) |
398 | { | 399 | { |
399 | struct fs_enet_private *fep = netdev_priv(dev); | 400 | struct fs_enet_private *fep = netdev_priv(dev); |
400 | scc_t *sccp = fep->scc.sccp; | 401 | scc_t __iomem *sccp = fep->scc.sccp; |
401 | int i; | 402 | int i; |
402 | 403 | ||
403 | for (i = 0; (R16(sccp, scc_sccm) == 0) && i < SCC_RESET_DELAY; i++) | 404 | for (i = 0; (R16(sccp, scc_sccm) == 0) && i < SCC_RESET_DELAY; i++) |
@@ -441,7 +442,7 @@ static void post_free_irq(struct net_device *dev, int irq) | |||
441 | static void napi_clear_rx_event(struct net_device *dev) | 442 | static void napi_clear_rx_event(struct net_device *dev) |
442 | { | 443 | { |
443 | struct fs_enet_private *fep = netdev_priv(dev); | 444 | struct fs_enet_private *fep = netdev_priv(dev); |
444 | scc_t *sccp = fep->scc.sccp; | 445 | scc_t __iomem *sccp = fep->scc.sccp; |
445 | 446 | ||
446 | W16(sccp, scc_scce, SCC_NAPI_RX_EVENT_MSK); | 447 | W16(sccp, scc_scce, SCC_NAPI_RX_EVENT_MSK); |
447 | } | 448 | } |
@@ -449,7 +450,7 @@ static void napi_clear_rx_event(struct net_device *dev) | |||
449 | static void napi_enable_rx(struct net_device *dev) | 450 | static void napi_enable_rx(struct net_device *dev) |
450 | { | 451 | { |
451 | struct fs_enet_private *fep = netdev_priv(dev); | 452 | struct fs_enet_private *fep = netdev_priv(dev); |
452 | scc_t *sccp = fep->scc.sccp; | 453 | scc_t __iomem *sccp = fep->scc.sccp; |
453 | 454 | ||
454 | S16(sccp, scc_sccm, SCC_NAPI_RX_EVENT_MSK); | 455 | S16(sccp, scc_sccm, SCC_NAPI_RX_EVENT_MSK); |
455 | } | 456 | } |
@@ -457,7 +458,7 @@ static void napi_enable_rx(struct net_device *dev) | |||
457 | static void napi_disable_rx(struct net_device *dev) | 458 | static void napi_disable_rx(struct net_device *dev) |
458 | { | 459 | { |
459 | struct fs_enet_private *fep = netdev_priv(dev); | 460 | struct fs_enet_private *fep = netdev_priv(dev); |
460 | scc_t *sccp = fep->scc.sccp; | 461 | scc_t __iomem *sccp = fep->scc.sccp; |
461 | 462 | ||
462 | C16(sccp, scc_sccm, SCC_NAPI_RX_EVENT_MSK); | 463 | C16(sccp, scc_sccm, SCC_NAPI_RX_EVENT_MSK); |
463 | } | 464 | } |
@@ -475,7 +476,7 @@ static void tx_kickstart(struct net_device *dev) | |||
475 | static u32 get_int_events(struct net_device *dev) | 476 | static u32 get_int_events(struct net_device *dev) |
476 | { | 477 | { |
477 | struct fs_enet_private *fep = netdev_priv(dev); | 478 | struct fs_enet_private *fep = netdev_priv(dev); |
478 | scc_t *sccp = fep->scc.sccp; | 479 | scc_t __iomem *sccp = fep->scc.sccp; |
479 | 480 | ||
480 | return (u32) R16(sccp, scc_scce); | 481 | return (u32) R16(sccp, scc_scce); |
481 | } | 482 | } |
@@ -483,7 +484,7 @@ static u32 get_int_events(struct net_device *dev) | |||
483 | static void clear_int_events(struct net_device *dev, u32 int_events) | 484 | static void clear_int_events(struct net_device *dev, u32 int_events) |
484 | { | 485 | { |
485 | struct fs_enet_private *fep = netdev_priv(dev); | 486 | struct fs_enet_private *fep = netdev_priv(dev); |
486 | scc_t *sccp = fep->scc.sccp; | 487 | scc_t __iomem *sccp = fep->scc.sccp; |
487 | 488 | ||
488 | W16(sccp, scc_scce, int_events & 0xffff); | 489 | W16(sccp, scc_scce, int_events & 0xffff); |
489 | } | 490 | } |
@@ -498,20 +499,20 @@ static int get_regs(struct net_device *dev, void *p, int *sizep) | |||
498 | { | 499 | { |
499 | struct fs_enet_private *fep = netdev_priv(dev); | 500 | struct fs_enet_private *fep = netdev_priv(dev); |
500 | 501 | ||
501 | if (*sizep < sizeof(scc_t) + sizeof(scc_enet_t)) | 502 | if (*sizep < sizeof(scc_t) + sizeof(scc_enet_t __iomem *)) |
502 | return -EINVAL; | 503 | return -EINVAL; |
503 | 504 | ||
504 | memcpy_fromio(p, fep->scc.sccp, sizeof(scc_t)); | 505 | memcpy_fromio(p, fep->scc.sccp, sizeof(scc_t)); |
505 | p = (char *)p + sizeof(scc_t); | 506 | p = (char *)p + sizeof(scc_t); |
506 | 507 | ||
507 | memcpy_fromio(p, fep->scc.ep, sizeof(scc_enet_t)); | 508 | memcpy_fromio(p, fep->scc.ep, sizeof(scc_enet_t __iomem *)); |
508 | 509 | ||
509 | return 0; | 510 | return 0; |
510 | } | 511 | } |
511 | 512 | ||
512 | static int get_regs_len(struct net_device *dev) | 513 | static int get_regs_len(struct net_device *dev) |
513 | { | 514 | { |
514 | return sizeof(scc_t) + sizeof(scc_enet_t); | 515 | return sizeof(scc_t) + sizeof(scc_enet_t __iomem *); |
515 | } | 516 | } |
516 | 517 | ||
517 | static void tx_restart(struct net_device *dev) | 518 | static void tx_restart(struct net_device *dev) |