Commit 31a5bb04d59931eb4657826213a439d37d12d4a9

Authored by Scott Wood
Committed by David S. Miller
1 parent 2b5b3a604a

fs_enet: sparse fixes

Mostly a bunch of __iomem annotations.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

Showing 6 changed files with 103 additions and 95 deletions Side-by-side Diff

drivers/net/fs_enet/fs_enet-main.c
... ... @@ -60,7 +60,7 @@
60 60 MODULE_LICENSE("GPL");
61 61 MODULE_VERSION(DRV_MODULE_VERSION);
62 62  
63   -int fs_enet_debug = -1; /* -1 == use FS_ENET_DEF_MSG_ENABLE as value */
  63 +static int fs_enet_debug = -1; /* -1 == use FS_ENET_DEF_MSG_ENABLE as value */
64 64 module_param(fs_enet_debug, int, 0);
65 65 MODULE_PARM_DESC(fs_enet_debug,
66 66 "Freescale bitmapped debugging message enable value");
... ... @@ -90,7 +90,7 @@
90 90 struct fs_enet_private *fep = container_of(napi, struct fs_enet_private, napi);
91 91 struct net_device *dev = to_net_dev(fep->dev);
92 92 const struct fs_platform_info *fpi = fep->fpi;
93   - cbd_t *bdp;
  93 + cbd_t __iomem *bdp;
94 94 struct sk_buff *skb, *skbn, *skbt;
95 95 int received = 0;
96 96 u16 pkt_len, sc;
... ... @@ -230,7 +230,7 @@
230 230 {
231 231 struct fs_enet_private *fep = netdev_priv(dev);
232 232 const struct fs_platform_info *fpi = fep->fpi;
233   - cbd_t *bdp;
  233 + cbd_t __iomem *bdp;
234 234 struct sk_buff *skb, *skbn, *skbt;
235 235 int received = 0;
236 236 u16 pkt_len, sc;
... ... @@ -355,7 +355,7 @@
355 355 static void fs_enet_tx(struct net_device *dev)
356 356 {
357 357 struct fs_enet_private *fep = netdev_priv(dev);
358   - cbd_t *bdp;
  358 + cbd_t __iomem *bdp;
359 359 struct sk_buff *skb;
360 360 int dirtyidx, do_wake, do_restart;
361 361 u16 sc;
... ... @@ -503,7 +503,7 @@
503 503 void fs_init_bds(struct net_device *dev)
504 504 {
505 505 struct fs_enet_private *fep = netdev_priv(dev);
506   - cbd_t *bdp;
  506 + cbd_t __iomem *bdp;
507 507 struct sk_buff *skb;
508 508 int i;
509 509  
... ... @@ -557,7 +557,7 @@
557 557 {
558 558 struct fs_enet_private *fep = netdev_priv(dev);
559 559 struct sk_buff *skb;
560   - cbd_t *bdp;
  560 + cbd_t __iomem *bdp;
561 561 int i;
562 562  
563 563 /*
... ... @@ -598,7 +598,7 @@
598 598 static int fs_enet_start_xmit(struct sk_buff *skb, struct net_device *dev)
599 599 {
600 600 struct fs_enet_private *fep = netdev_priv(dev);
601   - cbd_t *bdp;
  601 + cbd_t __iomem *bdp;
602 602 int curidx;
603 603 u16 sc;
604 604 unsigned long flags;
... ... @@ -1121,7 +1121,7 @@
1121 1121 unregister_netdev(ndev);
1122 1122  
1123 1123 dma_free_coherent(fep->dev, (fpi->tx_ring + fpi->rx_ring) * sizeof(cbd_t),
1124   - fep->ring_base, fep->ring_mem_addr);
  1124 + (void __force *)fep->ring_base, fep->ring_mem_addr);
1125 1125  
1126 1126 /* reset it */
1127 1127 (*fep->ops->cleanup_data)(ndev);
... ... @@ -1141,7 +1141,7 @@
1141 1141 /**************************************************************************************/
1142 1142  
1143 1143 /* handy pointer to the immap */
1144   -void *fs_enet_immap = NULL;
  1144 +void __iomem *fs_enet_immap = NULL;
1145 1145  
1146 1146 static int setup_immap(void)
1147 1147 {
drivers/net/fs_enet/fs_enet.h
... ... @@ -15,7 +15,7 @@
15 15 #include <asm/commproc.h>
16 16  
17 17 struct fec_info {
18   - fec_t *fecp;
  18 + fec_t __iomem *fecp;
19 19 u32 mii_speed;
20 20 };
21 21 #endif
22 22  
... ... @@ -81,14 +81,14 @@
81 81 const struct fs_ops *ops;
82 82 int rx_ring, tx_ring;
83 83 dma_addr_t ring_mem_addr;
84   - void *ring_base;
  84 + void __iomem *ring_base;
85 85 struct sk_buff **rx_skbuff;
86 86 struct sk_buff **tx_skbuff;
87   - cbd_t *rx_bd_base; /* Address of Rx and Tx buffers. */
88   - cbd_t *tx_bd_base;
89   - cbd_t *dirty_tx; /* ring entries to be free()ed. */
90   - cbd_t *cur_rx;
91   - cbd_t *cur_tx;
  87 + cbd_t __iomem *rx_bd_base; /* Address of Rx and Tx buffers. */
  88 + cbd_t __iomem *tx_bd_base;
  89 + cbd_t __iomem *dirty_tx; /* ring entries to be free()ed. */
  90 + cbd_t __iomem *cur_rx;
  91 + cbd_t __iomem *cur_tx;
92 92 int tx_free;
93 93 struct net_device_stats stats;
94 94 struct timer_list phy_timer_list;
95 95  
96 96  
... ... @@ -113,23 +113,23 @@
113 113 union {
114 114 struct {
115 115 int idx; /* FEC1 = 0, FEC2 = 1 */
116   - void *fecp; /* hw registers */
  116 + void __iomem *fecp; /* hw registers */
117 117 u32 hthi, htlo; /* state for multicast */
118 118 } fec;
119 119  
120 120 struct {
121 121 int idx; /* FCC1-3 = 0-2 */
122   - void *fccp; /* hw registers */
123   - void *ep; /* parameter ram */
124   - void *fcccp; /* hw registers cont. */
125   - void *mem; /* FCC DPRAM */
  122 + void __iomem *fccp; /* hw registers */
  123 + void __iomem *ep; /* parameter ram */
  124 + void __iomem *fcccp; /* hw registers cont. */
  125 + void __iomem *mem; /* FCC DPRAM */
126 126 u32 gaddrh, gaddrl; /* group address */
127 127 } fcc;
128 128  
129 129 struct {
130 130 int idx; /* FEC1 = 0, FEC2 = 1 */
131   - void *sccp; /* hw registers */
132   - void *ep; /* parameter ram */
  131 + void __iomem *sccp; /* hw registers */
  132 + void __iomem *ep; /* parameter ram */
133 133 u32 hthi, htlo; /* state for multicast */
134 134 } scc;
135 135  
... ... @@ -200,7 +200,7 @@
200 200 /*******************************************************************/
201 201  
202 202 /* handy pointer to the immap */
203   -extern void *fs_enet_immap;
  203 +extern void __iomem *fs_enet_immap;
204 204  
205 205 /*******************************************************************/
206 206  
drivers/net/fs_enet/mac-fcc.c
... ... @@ -81,8 +81,6 @@
81 81 static inline int fcc_cr_cmd(struct fs_enet_private *fep, u32 op)
82 82 {
83 83 const struct fs_platform_info *fpi = fep->fpi;
84   - cpm2_map_t *immap = fs_enet_immap;
85   - cpm_cpm2_t *cpmp = &immap->im_cpm;
86 84 int i;
87 85  
88 86 W32(cpmp, cp_cpcr, fpi->cp_command | op | CPM_CR_FLG);
... ... @@ -118,8 +116,8 @@
118 116 if (!fep->fcc.fcccp)
119 117 goto out_ep;
120 118  
121   - fep->fcc.mem = (void *)cpm_dpalloc(128, 8);
122   - fpi->dpram_offset = (u32)cpm2_immr;
  119 + fep->fcc.mem = (void __iomem *)cpm2_immr;
  120 + fpi->dpram_offset = cpm_dpalloc(128, 8);
123 121 if (IS_ERR_VALUE(fpi->dpram_offset)) {
124 122 ret = fpi->dpram_offset;
125 123 goto out_fcccp;
126 124  
127 125  
128 126  
129 127  
... ... @@ -146,29 +144,28 @@
146 144  
147 145 /* Attach the memory for the FCC Parameter RAM */
148 146 r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "fcc_pram");
149   - fep->fcc.ep = (void *)ioremap(r->start, r->end - r->start + 1);
  147 + fep->fcc.ep = ioremap(r->start, r->end - r->start + 1);
150 148 if (fep->fcc.ep == NULL)
151 149 return -EINVAL;
152 150  
153 151 r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "fcc_regs");
154   - fep->fcc.fccp = (void *)ioremap(r->start, r->end - r->start + 1);
  152 + fep->fcc.fccp = ioremap(r->start, r->end - r->start + 1);
155 153 if (fep->fcc.fccp == NULL)
156 154 return -EINVAL;
157 155  
158 156 if (fep->fpi->fcc_regs_c) {
159   -
160   - fep->fcc.fcccp = (void *)fep->fpi->fcc_regs_c;
  157 + fep->fcc.fcccp = (void __iomem *)fep->fpi->fcc_regs_c;
161 158 } else {
162 159 r = platform_get_resource_byname(pdev, IORESOURCE_MEM,
163 160 "fcc_regs_c");
164   - fep->fcc.fcccp = (void *)ioremap(r->start,
  161 + fep->fcc.fcccp = ioremap(r->start,
165 162 r->end - r->start + 1);
166 163 }
167 164  
168 165 if (fep->fcc.fcccp == NULL)
169 166 return -EINVAL;
170 167  
171   - fep->fcc.mem = (void *)fep->fpi->mem_offset;
  168 + fep->fcc.mem = (void __iomem *)fep->fpi->mem_offset;
172 169 if (fep->fcc.mem == NULL)
173 170 return -EINVAL;
174 171  
... ... @@ -212,7 +209,7 @@
212 209 struct fs_enet_private *fep = netdev_priv(dev);
213 210 const struct fs_platform_info *fpi = fep->fpi;
214 211  
215   - fep->ring_base = dma_alloc_coherent(fep->dev,
  212 + fep->ring_base = (void __iomem __force *)dma_alloc_coherent(fep->dev,
216 213 (fpi->tx_ring + fpi->rx_ring) *
217 214 sizeof(cbd_t), &fep->ring_mem_addr,
218 215 GFP_KERNEL);
... ... @@ -230,7 +227,7 @@
230 227 if (fep->ring_base)
231 228 dma_free_coherent(fep->dev,
232 229 (fpi->tx_ring + fpi->rx_ring) * sizeof(cbd_t),
233   - fep->ring_base, fep->ring_mem_addr);
  230 + (void __force *)fep->ring_base, fep->ring_mem_addr);
234 231 }
235 232  
236 233 static void cleanup_data(struct net_device *dev)
... ... @@ -241,7 +238,7 @@
241 238 static void set_promiscuous_mode(struct net_device *dev)
242 239 {
243 240 struct fs_enet_private *fep = netdev_priv(dev);
244   - fcc_t *fccp = fep->fcc.fccp;
  241 + fcc_t __iomem *fccp = fep->fcc.fccp;
245 242  
246 243 S32(fccp, fcc_fpsmr, FCC_PSMR_PRO);
247 244 }
... ... @@ -249,7 +246,7 @@
249 246 static void set_multicast_start(struct net_device *dev)
250 247 {
251 248 struct fs_enet_private *fep = netdev_priv(dev);
252   - fcc_enet_t *ep = fep->fcc.ep;
  249 + fcc_enet_t __iomem *ep = fep->fcc.ep;
253 250  
254 251 W32(ep, fen_gaddrh, 0);
255 252 W32(ep, fen_gaddrl, 0);
... ... @@ -258,7 +255,7 @@
258 255 static void set_multicast_one(struct net_device *dev, const u8 *mac)
259 256 {
260 257 struct fs_enet_private *fep = netdev_priv(dev);
261   - fcc_enet_t *ep = fep->fcc.ep;
  258 + fcc_enet_t __iomem *ep = fep->fcc.ep;
262 259 u16 taddrh, taddrm, taddrl;
263 260  
264 261 taddrh = ((u16)mac[5] << 8) | mac[4];
... ... @@ -274,8 +271,8 @@
274 271 static void set_multicast_finish(struct net_device *dev)
275 272 {
276 273 struct fs_enet_private *fep = netdev_priv(dev);
277   - fcc_t *fccp = fep->fcc.fccp;
278   - fcc_enet_t *ep = fep->fcc.ep;
  274 + fcc_t __iomem *fccp = fep->fcc.fccp;
  275 + fcc_enet_t __iomem *ep = fep->fcc.ep;
279 276  
280 277 /* clear promiscuous always */
281 278 C32(fccp, fcc_fpsmr, FCC_PSMR_PRO);
282 279  
283 280  
... ... @@ -310,12 +307,14 @@
310 307 {
311 308 struct fs_enet_private *fep = netdev_priv(dev);
312 309 const struct fs_platform_info *fpi = fep->fpi;
313   - fcc_t *fccp = fep->fcc.fccp;
314   - fcc_c_t *fcccp = fep->fcc.fcccp;
315   - fcc_enet_t *ep = fep->fcc.ep;
  310 + fcc_t __iomem *fccp = fep->fcc.fccp;
  311 + fcc_c_t __iomem *fcccp = fep->fcc.fcccp;
  312 + fcc_enet_t __iomem *ep = fep->fcc.ep;
316 313 dma_addr_t rx_bd_base_phys, tx_bd_base_phys;
317 314 u16 paddrh, paddrm, paddrl;
  315 +#ifndef CONFIG_PPC_CPM_NEW_BINDING
318 316 u16 mem_addr;
  317 +#endif
319 318 const unsigned char *mac;
320 319 int i;
321 320  
322 321  
323 322  
324 323  
... ... @@ -347,14 +346,22 @@
347 346 * this area.
348 347 */
349 348  
  349 +#ifdef CONFIG_PPC_CPM_NEW_BINDING
  350 + W16(ep, fen_genfcc.fcc_riptr, fpi->dpram_offset);
  351 + W16(ep, fen_genfcc.fcc_tiptr, fpi->dpram_offset + 32);
  352 +
  353 + W16(ep, fen_padptr, fpi->dpram_offset + 64);
  354 +#else
350 355 mem_addr = (u32) fep->fcc.mem; /* de-fixup dpram offset */
351 356  
352 357 W16(ep, fen_genfcc.fcc_riptr, (mem_addr & 0xffff));
353 358 W16(ep, fen_genfcc.fcc_tiptr, ((mem_addr + 32) & 0xffff));
  359 +
354 360 W16(ep, fen_padptr, mem_addr + 64);
  361 +#endif
355 362  
356 363 /* fill with special symbol... */
357   - memset(fep->fcc.mem + fpi->dpram_offset + 64, 0x88, 32);
  364 + memset_io(fep->fcc.mem + fpi->dpram_offset + 64, 0x88, 32);
358 365  
359 366 W32(ep, fen_genfcc.fcc_rbptr, 0);
360 367 W32(ep, fen_genfcc.fcc_tbptr, 0);
... ... @@ -470,7 +477,7 @@
470 477 static void stop(struct net_device *dev)
471 478 {
472 479 struct fs_enet_private *fep = netdev_priv(dev);
473   - fcc_t *fccp = fep->fcc.fccp;
  480 + fcc_t __iomem *fccp = fep->fcc.fccp;
474 481  
475 482 /* stop ethernet */
476 483 C32(fccp, fcc_gfmr, FCC_GFMR_ENR | FCC_GFMR_ENT);
... ... @@ -497,7 +504,7 @@
497 504 static void napi_clear_rx_event(struct net_device *dev)
498 505 {
499 506 struct fs_enet_private *fep = netdev_priv(dev);
500   - fcc_t *fccp = fep->fcc.fccp;
  507 + fcc_t __iomem *fccp = fep->fcc.fccp;
501 508  
502 509 W16(fccp, fcc_fcce, FCC_NAPI_RX_EVENT_MSK);
503 510 }
... ... @@ -505,7 +512,7 @@
505 512 static void napi_enable_rx(struct net_device *dev)
506 513 {
507 514 struct fs_enet_private *fep = netdev_priv(dev);
508   - fcc_t *fccp = fep->fcc.fccp;
  515 + fcc_t __iomem *fccp = fep->fcc.fccp;
509 516  
510 517 S16(fccp, fcc_fccm, FCC_NAPI_RX_EVENT_MSK);
511 518 }
... ... @@ -513,7 +520,7 @@
513 520 static void napi_disable_rx(struct net_device *dev)
514 521 {
515 522 struct fs_enet_private *fep = netdev_priv(dev);
516   - fcc_t *fccp = fep->fcc.fccp;
  523 + fcc_t __iomem *fccp = fep->fcc.fccp;
517 524  
518 525 C16(fccp, fcc_fccm, FCC_NAPI_RX_EVENT_MSK);
519 526 }
... ... @@ -526,7 +533,7 @@
526 533 static void tx_kickstart(struct net_device *dev)
527 534 {
528 535 struct fs_enet_private *fep = netdev_priv(dev);
529   - fcc_t *fccp = fep->fcc.fccp;
  536 + fcc_t __iomem *fccp = fep->fcc.fccp;
530 537  
531 538 S16(fccp, fcc_ftodr, 0x8000);
532 539 }
... ... @@ -534,7 +541,7 @@
534 541 static u32 get_int_events(struct net_device *dev)
535 542 {
536 543 struct fs_enet_private *fep = netdev_priv(dev);
537   - fcc_t *fccp = fep->fcc.fccp;
  544 + fcc_t __iomem *fccp = fep->fcc.fccp;
538 545  
539 546 return (u32)R16(fccp, fcc_fcce);
540 547 }
... ... @@ -542,7 +549,7 @@
542 549 static void clear_int_events(struct net_device *dev, u32 int_events)
543 550 {
544 551 struct fs_enet_private *fep = netdev_priv(dev);
545   - fcc_t *fccp = fep->fcc.fccp;
  552 + fcc_t __iomem *fccp = fep->fcc.fccp;
546 553  
547 554 W16(fccp, fcc_fcce, int_events & 0xffff);
548 555 }
... ... @@ -553,7 +560,7 @@
553 560 ": %s FS_ENET ERROR(s) 0x%x\n", dev->name, int_events);
554 561 }
555 562  
556   -int get_regs(struct net_device *dev, void *p, int *sizep)
  563 +static int get_regs(struct net_device *dev, void *p, int *sizep)
557 564 {
558 565 struct fs_enet_private *fep = netdev_priv(dev);
559 566  
... ... @@ -570,7 +577,7 @@
570 577 return 0;
571 578 }
572 579  
573   -int get_regs_len(struct net_device *dev)
  580 +static int get_regs_len(struct net_device *dev)
574 581 {
575 582 return sizeof(fcc_t) + sizeof(fcc_enet_t) + 1;
576 583 }
577 584  
... ... @@ -583,10 +590,10 @@
583 590 * CPM37, we must disable and then re-enable the transmitter
584 591 * following a Late Collision, Underrun, or Retry Limit error.
585 592 */
586   -void tx_restart(struct net_device *dev)
  593 +static void tx_restart(struct net_device *dev)
587 594 {
588 595 struct fs_enet_private *fep = netdev_priv(dev);
589   - fcc_t *fccp = fep->fcc.fccp;
  596 + fcc_t __iomem *fccp = fep->fcc.fccp;
590 597  
591 598 C32(fccp, fcc_gfmr, FCC_GFMR_ENT);
592 599 udelay(10);
drivers/net/fs_enet/mac-fec.c
... ... @@ -83,7 +83,7 @@
83 83 */
84 84 #define FEC_RESET_DELAY 50
85 85  
86   -static int whack_reset(fec_t * fecp)
  86 +static int whack_reset(fec_t __iomem *fecp)
87 87 {
88 88 int i;
89 89  
... ... @@ -159,7 +159,7 @@
159 159 struct fs_enet_private *fep = netdev_priv(dev);
160 160 const struct fs_platform_info *fpi = fep->fpi;
161 161  
162   - fep->ring_base = dma_alloc_coherent(fep->dev,
  162 + fep->ring_base = (void __force __iomem *)dma_alloc_coherent(fep->dev,
163 163 (fpi->tx_ring + fpi->rx_ring) *
164 164 sizeof(cbd_t), &fep->ring_mem_addr,
165 165 GFP_KERNEL);
... ... @@ -177,7 +177,7 @@
177 177 if(fep->ring_base)
178 178 dma_free_coherent(fep->dev, (fpi->tx_ring + fpi->rx_ring)
179 179 * sizeof(cbd_t),
180   - fep->ring_base,
  180 + (void __force *)fep->ring_base,
181 181 fep->ring_mem_addr);
182 182 }
183 183  
... ... @@ -189,7 +189,7 @@
189 189 static void set_promiscuous_mode(struct net_device *dev)
190 190 {
191 191 struct fs_enet_private *fep = netdev_priv(dev);
192   - fec_t *fecp = fep->fec.fecp;
  192 + fec_t __iomem *fecp = fep->fec.fecp;
193 193  
194 194 FS(fecp, r_cntrl, FEC_RCNTRL_PROM);
195 195 }
... ... @@ -237,7 +237,7 @@
237 237 static void set_multicast_finish(struct net_device *dev)
238 238 {
239 239 struct fs_enet_private *fep = netdev_priv(dev);
240   - fec_t *fecp = fep->fec.fecp;
  240 + fec_t __iomem *fecp = fep->fec.fecp;
241 241  
242 242 /* if all multi or too many multicasts; just enable all */
243 243 if ((dev->flags & IFF_ALLMULTI) != 0 ||
... ... @@ -271,7 +271,7 @@
271 271 u32 cptr;
272 272 #endif
273 273 struct fs_enet_private *fep = netdev_priv(dev);
274   - fec_t *fecp = fep->fec.fecp;
  274 + fec_t __iomem *fecp = fep->fec.fecp;
275 275 const struct fs_platform_info *fpi = fep->fpi;
276 276 dma_addr_t rx_bd_base_phys, tx_bd_base_phys;
277 277 int r;
... ... @@ -399,7 +399,7 @@
399 399 {
400 400 struct fs_enet_private *fep = netdev_priv(dev);
401 401 const struct fs_platform_info *fpi = fep->fpi;
402   - fec_t *fecp = fep->fec.fecp;
  402 + fec_t __iomem *fecp = fep->fec.fecp;
403 403  
404 404 struct fec_info* feci= fep->phydev->bus->priv;
405 405  
... ... @@ -461,7 +461,7 @@
461 461 static void napi_clear_rx_event(struct net_device *dev)
462 462 {
463 463 struct fs_enet_private *fep = netdev_priv(dev);
464   - fec_t *fecp = fep->fec.fecp;
  464 + fec_t __iomem *fecp = fep->fec.fecp;
465 465  
466 466 FW(fecp, ievent, FEC_NAPI_RX_EVENT_MSK);
467 467 }
... ... @@ -469,7 +469,7 @@
469 469 static void napi_enable_rx(struct net_device *dev)
470 470 {
471 471 struct fs_enet_private *fep = netdev_priv(dev);
472   - fec_t *fecp = fep->fec.fecp;
  472 + fec_t __iomem *fecp = fep->fec.fecp;
473 473  
474 474 FS(fecp, imask, FEC_NAPI_RX_EVENT_MSK);
475 475 }
... ... @@ -477,7 +477,7 @@
477 477 static void napi_disable_rx(struct net_device *dev)
478 478 {
479 479 struct fs_enet_private *fep = netdev_priv(dev);
480   - fec_t *fecp = fep->fec.fecp;
  480 + fec_t __iomem *fecp = fep->fec.fecp;
481 481  
482 482 FC(fecp, imask, FEC_NAPI_RX_EVENT_MSK);
483 483 }
... ... @@ -485,7 +485,7 @@
485 485 static void rx_bd_done(struct net_device *dev)
486 486 {
487 487 struct fs_enet_private *fep = netdev_priv(dev);
488   - fec_t *fecp = fep->fec.fecp;
  488 + fec_t __iomem *fecp = fep->fec.fecp;
489 489  
490 490 FW(fecp, r_des_active, 0x01000000);
491 491 }
... ... @@ -493,7 +493,7 @@
493 493 static void tx_kickstart(struct net_device *dev)
494 494 {
495 495 struct fs_enet_private *fep = netdev_priv(dev);
496   - fec_t *fecp = fep->fec.fecp;
  496 + fec_t __iomem *fecp = fep->fec.fecp;
497 497  
498 498 FW(fecp, x_des_active, 0x01000000);
499 499 }
... ... @@ -501,7 +501,7 @@
501 501 static u32 get_int_events(struct net_device *dev)
502 502 {
503 503 struct fs_enet_private *fep = netdev_priv(dev);
504   - fec_t *fecp = fep->fec.fecp;
  504 + fec_t __iomem *fecp = fep->fec.fecp;
505 505  
506 506 return FR(fecp, ievent) & FR(fecp, imask);
507 507 }
... ... @@ -509,7 +509,7 @@
509 509 static void clear_int_events(struct net_device *dev, u32 int_events)
510 510 {
511 511 struct fs_enet_private *fep = netdev_priv(dev);
512   - fec_t *fecp = fep->fec.fecp;
  512 + fec_t __iomem *fecp = fep->fec.fecp;
513 513  
514 514 FW(fecp, ievent, int_events);
515 515 }
... ... @@ -520,7 +520,7 @@
520 520 ": %s FEC ERROR(s) 0x%x\n", dev->name, int_events);
521 521 }
522 522  
523   -int get_regs(struct net_device *dev, void *p, int *sizep)
  523 +static int get_regs(struct net_device *dev, void *p, int *sizep)
524 524 {
525 525 struct fs_enet_private *fep = netdev_priv(dev);
526 526  
527 527  
... ... @@ -532,12 +532,12 @@
532 532 return 0;
533 533 }
534 534  
535   -int get_regs_len(struct net_device *dev)
  535 +static int get_regs_len(struct net_device *dev)
536 536 {
537 537 return sizeof(fec_t);
538 538 }
539 539  
540   -void tx_restart(struct net_device *dev)
  540 +static void tx_restart(struct net_device *dev)
541 541 {
542 542 /* nothing */
543 543 }
drivers/net/fs_enet/mac-scc.c
... ... @@ -191,7 +191,8 @@
191 191 if (IS_ERR_VALUE(fep->ring_mem_addr))
192 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 197 return 0;
197 198 }
... ... @@ -212,7 +213,7 @@
212 213 static void set_promiscuous_mode(struct net_device *dev)
213 214 {
214 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 218 S16(sccp, scc_psmr, SCC_PSMR_PRO);
218 219 }
... ... @@ -220,7 +221,7 @@
220 221 static void set_multicast_start(struct net_device *dev)
221 222 {
222 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 226 W16(ep, sen_gaddr1, 0);
226 227 W16(ep, sen_gaddr2, 0);
... ... @@ -231,7 +232,7 @@
231 232 static void set_multicast_one(struct net_device *dev, const u8 * mac)
232 233 {
233 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 236 u16 taddrh, taddrm, taddrl;
236 237  
237 238 taddrh = ((u16) mac[5] << 8) | mac[4];
... ... @@ -247,8 +248,8 @@
247 248 static void set_multicast_finish(struct net_device *dev)
248 249 {
249 250 struct fs_enet_private *fep = netdev_priv(dev);
250   - scc_t *sccp = fep->scc.sccp;
251   - scc_enet_t *ep = fep->scc.ep;
  251 + scc_t __iomem *sccp = fep->scc.sccp;
  252 + scc_enet_t __iomem *ep = fep->scc.ep;
252 253  
253 254 /* clear promiscuous always */
254 255 C16(sccp, scc_psmr, SCC_PSMR_PRO);
... ... @@ -285,8 +286,8 @@
285 286 static void restart(struct net_device *dev)
286 287 {
287 288 struct fs_enet_private *fep = netdev_priv(dev);
288   - scc_t *sccp = fep->scc.sccp;
289   - scc_enet_t *ep = fep->scc.ep;
  289 + scc_t __iomem *sccp = fep->scc.sccp;
  290 + scc_enet_t __iomem *ep = fep->scc.ep;
290 291 const struct fs_platform_info *fpi = fep->fpi;
291 292 u16 paddrh, paddrm, paddrl;
292 293 const unsigned char *mac;
... ... @@ -296,7 +297,7 @@
296 297  
297 298 /* clear everything (slow & steady does it) */
298 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 302 /* point to bds */
302 303 W16(ep, sen_genscc.scc_rbase, fep->ring_mem_addr);
... ... @@ -397,7 +398,7 @@
397 398 static void stop(struct net_device *dev)
398 399 {
399 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 402 int i;
402 403  
403 404 for (i = 0; (R16(sccp, scc_sccm) == 0) && i < SCC_RESET_DELAY; i++)
... ... @@ -441,7 +442,7 @@
441 442 static void napi_clear_rx_event(struct net_device *dev)
442 443 {
443 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 447 W16(sccp, scc_scce, SCC_NAPI_RX_EVENT_MSK);
447 448 }
... ... @@ -449,7 +450,7 @@
449 450 static void napi_enable_rx(struct net_device *dev)
450 451 {
451 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 455 S16(sccp, scc_sccm, SCC_NAPI_RX_EVENT_MSK);
455 456 }
... ... @@ -457,7 +458,7 @@
457 458 static void napi_disable_rx(struct net_device *dev)
458 459 {
459 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 463 C16(sccp, scc_sccm, SCC_NAPI_RX_EVENT_MSK);
463 464 }
... ... @@ -475,7 +476,7 @@
475 476 static u32 get_int_events(struct net_device *dev)
476 477 {
477 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 481 return (u32) R16(sccp, scc_scce);
481 482 }
... ... @@ -483,7 +484,7 @@
483 484 static void clear_int_events(struct net_device *dev, u32 int_events)
484 485 {
485 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 489 W16(sccp, scc_scce, int_events & 0xffff);
489 490 }
490 491  
491 492  
... ... @@ -498,20 +499,20 @@
498 499 {
499 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 503 return -EINVAL;
503 504  
504 505 memcpy_fromio(p, fep->scc.sccp, sizeof(scc_t));
505 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 510 return 0;
510 511 }
511 512  
512 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 518 static void tx_restart(struct net_device *dev)
drivers/net/fs_enet/mii-fec.c
... ... @@ -70,7 +70,7 @@
70 70 static int fs_mii_fec_init(struct fec_info* fec, struct fs_mii_fec_platform_info *fmpi)
71 71 {
72 72 struct resource *r;
73   - fec_t *fecp;
  73 + fec_t __iomem *fecp;
74 74 char* name = "fsl-cpm-fec";
75 75  
76 76 /* we need fec in order to be useful */
... ... @@ -85,7 +85,7 @@
85 85  
86 86 r = platform_get_resource_byname(fec_pdev, IORESOURCE_MEM, "regs");
87 87  
88   - fec->fecp = fecp = (fec_t*)ioremap(r->start,sizeof(fec_t));
  88 + fec->fecp = fecp = ioremap(r->start,sizeof(fec_t));
89 89 fec->mii_speed = fmpi->mii_speed;
90 90  
91 91 setbits32(&fecp->fec_r_cntrl, FEC_RCNTRL_MII_MODE); /* MII enable */
... ... @@ -100,7 +100,7 @@
100 100 static int fs_enet_fec_mii_read(struct mii_bus *bus , int phy_id, int location)
101 101 {
102 102 struct fec_info* fec = bus->priv;
103   - fec_t *fecp = fec->fecp;
  103 + fec_t __iomem *fecp = fec->fecp;
104 104 int i, ret = -1;
105 105  
106 106 if ((in_be32(&fecp->fec_r_cntrl) & FEC_RCNTRL_MII_MODE) == 0)
... ... @@ -124,7 +124,7 @@
124 124 static int fs_enet_fec_mii_write(struct mii_bus *bus, int phy_id, int location, u16 val)
125 125 {
126 126 struct fec_info* fec = bus->priv;
127   - fec_t *fecp = fec->fecp;
  127 + fec_t __iomem *fecp = fec->fecp;
128 128 int i;
129 129  
130 130 /* this must never happen */