diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2007-03-20 08:40:09 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-03-23 01:48:34 -0400 |
commit | 69a43ac0cf40577157111bbe25500e2b98e801ea (patch) | |
tree | dcdd02c325441b3f18506f54210147bfed750f03 /drivers | |
parent | 6f6881b846e3d97ee15f6ab1f6529cd1cc2f4c28 (diff) |
SAA9730: Fix large pile of warnings
The SAA9730 driver doesn't quite grok what the difference between an ioport
and memory mapped I/O is. It just happened to work on the one Linux
system the SAA9730 happens to spend it's misserable existence on.
drivers/net/saa9730.c: In function 'evm_saa9730_enable_lan_int':
drivers/net/saa9730.c:68: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c:70: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c:72: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c: In function 'evm_saa9730_disable_lan_int':
drivers/net/saa9730.c:78: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c:80: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c: In function 'evm_saa9730_clear_lan_int':
drivers/net/saa9730.c:85: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c: In function 'evm_saa9730_block_lan_int':
drivers/net/saa9730.c:91: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c: In function 'evm_saa9730_unblock_lan_int':
drivers/net/saa9730.c:97: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c: In function 'show_saa9730_regs':
drivers/net/saa9730.c:150: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c: In function 'lan_saa9730_allocate_buffers':
drivers/net/saa9730.c:292: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c:295: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c:302: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c:305: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c:312: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c: In function 'lan_saa9730_cam_load':
drivers/net/saa9730.c:329: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c:332: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c: In function 'lan_saa9730_mii_init':
drivers/net/saa9730.c:369: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c:395: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c:403: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c:410: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c:432: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c: In function 'lan_saa9730_control_init':
drivers/net/saa9730.c:470: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c:474: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c:478: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c:484: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c:487: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c:490: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c:493: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c: In function 'lan_saa9730_stop':
drivers/net/saa9730.c:505: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c:508: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c:510: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c: In function 'lan_saa9730_dma_init':
drivers/net/saa9730.c:536: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c: In function 'lan_saa9730_start':
drivers/net/saa9730.c:556: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c:560: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c:564: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c:567: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c: In function 'lan_saa9730_tx':
drivers/net/saa9730.c:590: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c: In function 'lan_saa9730_rx':
drivers/net/saa9730.c:664: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c:729: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c: In function 'lan_saa9730_write':
drivers/net/saa9730.c:848: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c: In function 'lan_saa9730_set_multicast':
drivers/net/saa9730.c:943: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
drivers/net/saa9730.c:949: warning: passing argument 2 of 'outl' makes integer from pointer without a cast
Fixed by using writel instead of outl. 42 warnings less.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/saa9730.c | 177 |
1 files changed, 88 insertions, 89 deletions
diff --git a/drivers/net/saa9730.c b/drivers/net/saa9730.c index b269513cde45..143958f1ef0a 100644 --- a/drivers/net/saa9730.c +++ b/drivers/net/saa9730.c | |||
@@ -64,37 +64,37 @@ static unsigned int pci_irq_line; | |||
64 | 64 | ||
65 | static void evm_saa9730_enable_lan_int(struct lan_saa9730_private *lp) | 65 | static void evm_saa9730_enable_lan_int(struct lan_saa9730_private *lp) |
66 | { | 66 | { |
67 | outl(readl(&lp->evm_saa9730_regs->InterruptBlock1) | EVM_LAN_INT, | 67 | writel(readl(&lp->evm_saa9730_regs->InterruptBlock1) | EVM_LAN_INT, |
68 | &lp->evm_saa9730_regs->InterruptBlock1); | 68 | &lp->evm_saa9730_regs->InterruptBlock1); |
69 | outl(readl(&lp->evm_saa9730_regs->InterruptStatus1) | EVM_LAN_INT, | 69 | writel(readl(&lp->evm_saa9730_regs->InterruptStatus1) | EVM_LAN_INT, |
70 | &lp->evm_saa9730_regs->InterruptStatus1); | 70 | &lp->evm_saa9730_regs->InterruptStatus1); |
71 | outl(readl(&lp->evm_saa9730_regs->InterruptEnable1) | EVM_LAN_INT | | 71 | writel(readl(&lp->evm_saa9730_regs->InterruptEnable1) | EVM_LAN_INT | |
72 | EVM_MASTER_EN, &lp->evm_saa9730_regs->InterruptEnable1); | 72 | EVM_MASTER_EN, &lp->evm_saa9730_regs->InterruptEnable1); |
73 | } | 73 | } |
74 | 74 | ||
75 | static void evm_saa9730_disable_lan_int(struct lan_saa9730_private *lp) | 75 | static void evm_saa9730_disable_lan_int(struct lan_saa9730_private *lp) |
76 | { | 76 | { |
77 | outl(readl(&lp->evm_saa9730_regs->InterruptBlock1) & ~EVM_LAN_INT, | 77 | writel(readl(&lp->evm_saa9730_regs->InterruptBlock1) & ~EVM_LAN_INT, |
78 | &lp->evm_saa9730_regs->InterruptBlock1); | 78 | &lp->evm_saa9730_regs->InterruptBlock1); |
79 | outl(readl(&lp->evm_saa9730_regs->InterruptEnable1) & ~EVM_LAN_INT, | 79 | writel(readl(&lp->evm_saa9730_regs->InterruptEnable1) & ~EVM_LAN_INT, |
80 | &lp->evm_saa9730_regs->InterruptEnable1); | 80 | &lp->evm_saa9730_regs->InterruptEnable1); |
81 | } | 81 | } |
82 | 82 | ||
83 | static void evm_saa9730_clear_lan_int(struct lan_saa9730_private *lp) | 83 | static void evm_saa9730_clear_lan_int(struct lan_saa9730_private *lp) |
84 | { | 84 | { |
85 | outl(EVM_LAN_INT, &lp->evm_saa9730_regs->InterruptStatus1); | 85 | writel(EVM_LAN_INT, &lp->evm_saa9730_regs->InterruptStatus1); |
86 | } | 86 | } |
87 | 87 | ||
88 | static void evm_saa9730_block_lan_int(struct lan_saa9730_private *lp) | 88 | static void evm_saa9730_block_lan_int(struct lan_saa9730_private *lp) |
89 | { | 89 | { |
90 | outl(readl(&lp->evm_saa9730_regs->InterruptBlock1) & ~EVM_LAN_INT, | 90 | writel(readl(&lp->evm_saa9730_regs->InterruptBlock1) & ~EVM_LAN_INT, |
91 | &lp->evm_saa9730_regs->InterruptBlock1); | 91 | &lp->evm_saa9730_regs->InterruptBlock1); |
92 | } | 92 | } |
93 | 93 | ||
94 | static void evm_saa9730_unblock_lan_int(struct lan_saa9730_private *lp) | 94 | static void evm_saa9730_unblock_lan_int(struct lan_saa9730_private *lp) |
95 | { | 95 | { |
96 | outl(readl(&lp->evm_saa9730_regs->InterruptBlock1) | EVM_LAN_INT, | 96 | writel(readl(&lp->evm_saa9730_regs->InterruptBlock1) | EVM_LAN_INT, |
97 | &lp->evm_saa9730_regs->InterruptBlock1); | 97 | &lp->evm_saa9730_regs->InterruptBlock1); |
98 | } | 98 | } |
99 | 99 | ||
100 | static void __attribute_used__ show_saa9730_regs(struct lan_saa9730_private *lp) | 100 | static void __attribute_used__ show_saa9730_regs(struct lan_saa9730_private *lp) |
@@ -147,7 +147,7 @@ static void __attribute_used__ show_saa9730_regs(struct lan_saa9730_private *lp) | |||
147 | printk("lp->lan_saa9730_regs->RxStatus = %x\n", | 147 | printk("lp->lan_saa9730_regs->RxStatus = %x\n", |
148 | readl(&lp->lan_saa9730_regs->RxStatus)); | 148 | readl(&lp->lan_saa9730_regs->RxStatus)); |
149 | for (i = 0; i < LAN_SAA9730_CAM_DWORDS; i++) { | 149 | for (i = 0; i < LAN_SAA9730_CAM_DWORDS; i++) { |
150 | outl(i, &lp->lan_saa9730_regs->CamAddress); | 150 | writel(i, &lp->lan_saa9730_regs->CamAddress); |
151 | printk("lp->lan_saa9730_regs->CamData = %x\n", | 151 | printk("lp->lan_saa9730_regs->CamData = %x\n", |
152 | readl(&lp->lan_saa9730_regs->CamData)); | 152 | readl(&lp->lan_saa9730_regs->CamData)); |
153 | } | 153 | } |
@@ -288,28 +288,27 @@ static int lan_saa9730_allocate_buffers(struct pci_dev *pdev, | |||
288 | * Set rx buffer A and rx buffer B to point to the first two buffer | 288 | * Set rx buffer A and rx buffer B to point to the first two buffer |
289 | * spaces. | 289 | * spaces. |
290 | */ | 290 | */ |
291 | outl(lp->dma_addr + rxoffset, | 291 | writel(lp->dma_addr + rxoffset, &lp->lan_saa9730_regs->RxBuffA); |
292 | &lp->lan_saa9730_regs->RxBuffA); | 292 | writel(lp->dma_addr + rxoffset + |
293 | outl(lp->dma_addr + rxoffset + | 293 | LAN_SAA9730_PACKET_SIZE * LAN_SAA9730_RCV_Q_SIZE, |
294 | LAN_SAA9730_PACKET_SIZE * LAN_SAA9730_RCV_Q_SIZE, | 294 | &lp->lan_saa9730_regs->RxBuffB); |
295 | &lp->lan_saa9730_regs->RxBuffB); | ||
296 | 295 | ||
297 | /* | 296 | /* |
298 | * Set txm_buf_a and txm_buf_b to point to the first two buffer | 297 | * Set txm_buf_a and txm_buf_b to point to the first two buffer |
299 | * space | 298 | * space |
300 | */ | 299 | */ |
301 | outl(lp->dma_addr + txoffset, | 300 | writel(lp->dma_addr + txoffset, |
302 | &lp->lan_saa9730_regs->TxBuffA); | 301 | &lp->lan_saa9730_regs->TxBuffA); |
303 | outl(lp->dma_addr + txoffset + | 302 | writel(lp->dma_addr + txoffset + |
304 | LAN_SAA9730_PACKET_SIZE * LAN_SAA9730_TXM_Q_SIZE, | 303 | LAN_SAA9730_PACKET_SIZE * LAN_SAA9730_TXM_Q_SIZE, |
305 | &lp->lan_saa9730_regs->TxBuffB); | 304 | &lp->lan_saa9730_regs->TxBuffB); |
306 | 305 | ||
307 | /* Set packet number */ | 306 | /* Set packet number */ |
308 | outl((lp->DmaRcvPackets << PK_COUNT_RX_A_SHF) | | 307 | writel((lp->DmaRcvPackets << PK_COUNT_RX_A_SHF) | |
309 | (lp->DmaRcvPackets << PK_COUNT_RX_B_SHF) | | 308 | (lp->DmaRcvPackets << PK_COUNT_RX_B_SHF) | |
310 | (lp->DmaTxmPackets << PK_COUNT_TX_A_SHF) | | 309 | (lp->DmaTxmPackets << PK_COUNT_TX_A_SHF) | |
311 | (lp->DmaTxmPackets << PK_COUNT_TX_B_SHF), | 310 | (lp->DmaTxmPackets << PK_COUNT_TX_B_SHF), |
312 | &lp->lan_saa9730_regs->PacketCount); | 311 | &lp->lan_saa9730_regs->PacketCount); |
313 | 312 | ||
314 | return 0; | 313 | return 0; |
315 | 314 | ||
@@ -326,10 +325,10 @@ static int lan_saa9730_cam_load(struct lan_saa9730_private *lp) | |||
326 | 325 | ||
327 | for (i = 0; i < LAN_SAA9730_CAM_DWORDS; i++) { | 326 | for (i = 0; i < LAN_SAA9730_CAM_DWORDS; i++) { |
328 | /* First set address to where data is written */ | 327 | /* First set address to where data is written */ |
329 | outl(i, &lp->lan_saa9730_regs->CamAddress); | 328 | writel(i, &lp->lan_saa9730_regs->CamAddress); |
330 | outl((NetworkAddress[0] << 24) | (NetworkAddress[1] << 16) | 329 | writel((NetworkAddress[0] << 24) | (NetworkAddress[1] << 16) | |
331 | | (NetworkAddress[2] << 8) | NetworkAddress[3], | 330 | (NetworkAddress[2] << 8) | NetworkAddress[3], |
332 | &lp->lan_saa9730_regs->CamData); | 331 | &lp->lan_saa9730_regs->CamData); |
333 | NetworkAddress += 4; | 332 | NetworkAddress += 4; |
334 | } | 333 | } |
335 | return 0; | 334 | return 0; |
@@ -365,8 +364,8 @@ static int lan_saa9730_mii_init(struct lan_saa9730_private *lp) | |||
365 | } | 364 | } |
366 | 365 | ||
367 | /* Now set the control and address register. */ | 366 | /* Now set the control and address register. */ |
368 | outl(MD_CA_BUSY | PHY_STATUS | PHY_ADDRESS << MD_CA_PHY_SHF, | 367 | writel(MD_CA_BUSY | PHY_STATUS | PHY_ADDRESS << MD_CA_PHY_SHF, |
369 | &lp->lan_saa9730_regs->StationMgmtCtl); | 368 | &lp->lan_saa9730_regs->StationMgmtCtl); |
370 | 369 | ||
371 | /* check link status, spin here till station is not busy */ | 370 | /* check link status, spin here till station is not busy */ |
372 | i = 0; | 371 | i = 0; |
@@ -391,23 +390,23 @@ static int lan_saa9730_mii_init(struct lan_saa9730_private *lp) | |||
391 | /* Link is down, reset the PHY first. */ | 390 | /* Link is down, reset the PHY first. */ |
392 | 391 | ||
393 | /* set PHY address = 'CONTROL' */ | 392 | /* set PHY address = 'CONTROL' */ |
394 | outl(PHY_ADDRESS << MD_CA_PHY_SHF | MD_CA_WR | PHY_CONTROL, | 393 | writel(PHY_ADDRESS << MD_CA_PHY_SHF | MD_CA_WR | PHY_CONTROL, |
395 | &lp->lan_saa9730_regs->StationMgmtCtl); | 394 | &lp->lan_saa9730_regs->StationMgmtCtl); |
396 | 395 | ||
397 | /* Wait for 1 ms. */ | 396 | /* Wait for 1 ms. */ |
398 | mdelay(1); | 397 | mdelay(1); |
399 | 398 | ||
400 | /* set 'CONTROL' = force reset and renegotiate */ | 399 | /* set 'CONTROL' = force reset and renegotiate */ |
401 | outl(PHY_CONTROL_RESET | PHY_CONTROL_AUTO_NEG | | 400 | writel(PHY_CONTROL_RESET | PHY_CONTROL_AUTO_NEG | |
402 | PHY_CONTROL_RESTART_AUTO_NEG, | 401 | PHY_CONTROL_RESTART_AUTO_NEG, |
403 | &lp->lan_saa9730_regs->StationMgmtData); | 402 | &lp->lan_saa9730_regs->StationMgmtData); |
404 | 403 | ||
405 | /* Wait for 50 ms. */ | 404 | /* Wait for 50 ms. */ |
406 | mdelay(50); | 405 | mdelay(50); |
407 | 406 | ||
408 | /* set 'BUSY' to start operation */ | 407 | /* set 'BUSY' to start operation */ |
409 | outl(MD_CA_BUSY | PHY_ADDRESS << MD_CA_PHY_SHF | MD_CA_WR | | 408 | writel(MD_CA_BUSY | PHY_ADDRESS << MD_CA_PHY_SHF | MD_CA_WR | |
410 | PHY_CONTROL, &lp->lan_saa9730_regs->StationMgmtCtl); | 409 | PHY_CONTROL, &lp->lan_saa9730_regs->StationMgmtCtl); |
411 | 410 | ||
412 | /* await completion */ | 411 | /* await completion */ |
413 | i = 0; | 412 | i = 0; |
@@ -427,9 +426,9 @@ static int lan_saa9730_mii_init(struct lan_saa9730_private *lp) | |||
427 | 426 | ||
428 | for (l = 0; l < 2; l++) { | 427 | for (l = 0; l < 2; l++) { |
429 | /* set PHY address = 'STATUS' */ | 428 | /* set PHY address = 'STATUS' */ |
430 | outl(MD_CA_BUSY | PHY_ADDRESS << MD_CA_PHY_SHF | | 429 | writel(MD_CA_BUSY | PHY_ADDRESS << MD_CA_PHY_SHF | |
431 | PHY_STATUS, | 430 | PHY_STATUS, |
432 | &lp->lan_saa9730_regs->StationMgmtCtl); | 431 | &lp->lan_saa9730_regs->StationMgmtCtl); |
433 | 432 | ||
434 | /* await completion */ | 433 | /* await completion */ |
435 | i = 0; | 434 | i = 0; |
@@ -462,35 +461,35 @@ static int lan_saa9730_mii_init(struct lan_saa9730_private *lp) | |||
462 | static int lan_saa9730_control_init(struct lan_saa9730_private *lp) | 461 | static int lan_saa9730_control_init(struct lan_saa9730_private *lp) |
463 | { | 462 | { |
464 | /* Initialize DMA control register. */ | 463 | /* Initialize DMA control register. */ |
465 | outl((LANMB_ANY << DMA_CTL_MAX_XFER_SHF) | | 464 | writel((LANMB_ANY << DMA_CTL_MAX_XFER_SHF) | |
466 | (LANEND_LITTLE << DMA_CTL_ENDIAN_SHF) | | 465 | (LANEND_LITTLE << DMA_CTL_ENDIAN_SHF) | |
467 | (LAN_SAA9730_RCV_Q_INT_THRESHOLD << DMA_CTL_RX_INT_COUNT_SHF) | 466 | (LAN_SAA9730_RCV_Q_INT_THRESHOLD << DMA_CTL_RX_INT_COUNT_SHF) |
468 | | DMA_CTL_RX_INT_TO_EN | DMA_CTL_RX_INT_EN | | 467 | | DMA_CTL_RX_INT_TO_EN | DMA_CTL_RX_INT_EN | |
469 | DMA_CTL_MAC_RX_INT_EN | DMA_CTL_MAC_TX_INT_EN, | 468 | DMA_CTL_MAC_RX_INT_EN | DMA_CTL_MAC_TX_INT_EN, |
470 | &lp->lan_saa9730_regs->LanDmaCtl); | 469 | &lp->lan_saa9730_regs->LanDmaCtl); |
471 | 470 | ||
472 | /* Initial MAC control register. */ | 471 | /* Initial MAC control register. */ |
473 | outl((MACCM_MII << MAC_CONTROL_CONN_SHF) | MAC_CONTROL_FULL_DUP, | 472 | writel((MACCM_MII << MAC_CONTROL_CONN_SHF) | MAC_CONTROL_FULL_DUP, |
474 | &lp->lan_saa9730_regs->MacCtl); | 473 | &lp->lan_saa9730_regs->MacCtl); |
475 | 474 | ||
476 | /* Initialize CAM control register. */ | 475 | /* Initialize CAM control register. */ |
477 | outl(CAM_CONTROL_COMP_EN | CAM_CONTROL_BROAD_ACC, | 476 | writel(CAM_CONTROL_COMP_EN | CAM_CONTROL_BROAD_ACC, |
478 | &lp->lan_saa9730_regs->CamCtl); | 477 | &lp->lan_saa9730_regs->CamCtl); |
479 | 478 | ||
480 | /* | 479 | /* |
481 | * Initialize CAM enable register, only turn on first entry, should | 480 | * Initialize CAM enable register, only turn on first entry, should |
482 | * contain own addr. | 481 | * contain own addr. |
483 | */ | 482 | */ |
484 | outl(0x0001, &lp->lan_saa9730_regs->CamEnable); | 483 | writel(0x0001, &lp->lan_saa9730_regs->CamEnable); |
485 | 484 | ||
486 | /* Initialize Tx control register */ | 485 | /* Initialize Tx control register */ |
487 | outl(TX_CTL_EN_COMP, &lp->lan_saa9730_regs->TxCtl); | 486 | writel(TX_CTL_EN_COMP, &lp->lan_saa9730_regs->TxCtl); |
488 | 487 | ||
489 | /* Initialize Rcv control register */ | 488 | /* Initialize Rcv control register */ |
490 | outl(RX_CTL_STRIP_CRC, &lp->lan_saa9730_regs->RxCtl); | 489 | writel(RX_CTL_STRIP_CRC, &lp->lan_saa9730_regs->RxCtl); |
491 | 490 | ||
492 | /* Reset DMA engine */ | 491 | /* Reset DMA engine */ |
493 | outl(DMA_TEST_SW_RESET, &lp->lan_saa9730_regs->DmaTest); | 492 | writel(DMA_TEST_SW_RESET, &lp->lan_saa9730_regs->DmaTest); |
494 | 493 | ||
495 | return 0; | 494 | return 0; |
496 | } | 495 | } |
@@ -500,14 +499,14 @@ static int lan_saa9730_stop(struct lan_saa9730_private *lp) | |||
500 | int i; | 499 | int i; |
501 | 500 | ||
502 | /* Stop DMA first */ | 501 | /* Stop DMA first */ |
503 | outl(readl(&lp->lan_saa9730_regs->LanDmaCtl) & | 502 | writel(readl(&lp->lan_saa9730_regs->LanDmaCtl) & |
504 | ~(DMA_CTL_EN_TX_DMA | DMA_CTL_EN_RX_DMA), | 503 | ~(DMA_CTL_EN_TX_DMA | DMA_CTL_EN_RX_DMA), |
505 | &lp->lan_saa9730_regs->LanDmaCtl); | 504 | &lp->lan_saa9730_regs->LanDmaCtl); |
506 | 505 | ||
507 | /* Set the SW Reset bits in DMA and MAC control registers */ | 506 | /* Set the SW Reset bits in DMA and MAC control registers */ |
508 | outl(DMA_TEST_SW_RESET, &lp->lan_saa9730_regs->DmaTest); | 507 | writel(DMA_TEST_SW_RESET, &lp->lan_saa9730_regs->DmaTest); |
509 | outl(readl(&lp->lan_saa9730_regs->MacCtl) | MAC_CONTROL_RESET, | 508 | writel(readl(&lp->lan_saa9730_regs->MacCtl) | MAC_CONTROL_RESET, |
510 | &lp->lan_saa9730_regs->MacCtl); | 509 | &lp->lan_saa9730_regs->MacCtl); |
511 | 510 | ||
512 | /* | 511 | /* |
513 | * Wait for MAC reset to have finished. The reset bit is auto cleared | 512 | * Wait for MAC reset to have finished. The reset bit is auto cleared |
@@ -532,8 +531,8 @@ static int lan_saa9730_dma_init(struct lan_saa9730_private *lp) | |||
532 | /* Stop lan controller. */ | 531 | /* Stop lan controller. */ |
533 | lan_saa9730_stop(lp); | 532 | lan_saa9730_stop(lp); |
534 | 533 | ||
535 | outl(LAN_SAA9730_DEFAULT_TIME_OUT_CNT, | 534 | writel(LAN_SAA9730_DEFAULT_TIME_OUT_CNT, |
536 | &lp->lan_saa9730_regs->Timeout); | 535 | &lp->lan_saa9730_regs->Timeout); |
537 | 536 | ||
538 | return 0; | 537 | return 0; |
539 | } | 538 | } |
@@ -552,19 +551,19 @@ static int lan_saa9730_start(struct lan_saa9730_private *lp) | |||
552 | lp->PendingTxmPacketIndex = 0; | 551 | lp->PendingTxmPacketIndex = 0; |
553 | lp->PendingTxmBufferIndex = 0; | 552 | lp->PendingTxmBufferIndex = 0; |
554 | 553 | ||
555 | outl(readl(&lp->lan_saa9730_regs->LanDmaCtl) | DMA_CTL_EN_TX_DMA | | 554 | writel(readl(&lp->lan_saa9730_regs->LanDmaCtl) | DMA_CTL_EN_TX_DMA | |
556 | DMA_CTL_EN_RX_DMA, &lp->lan_saa9730_regs->LanDmaCtl); | 555 | DMA_CTL_EN_RX_DMA, &lp->lan_saa9730_regs->LanDmaCtl); |
557 | 556 | ||
558 | /* For Tx, turn on MAC then DMA */ | 557 | /* For Tx, turn on MAC then DMA */ |
559 | outl(readl(&lp->lan_saa9730_regs->TxCtl) | TX_CTL_TX_EN, | 558 | writel(readl(&lp->lan_saa9730_regs->TxCtl) | TX_CTL_TX_EN, |
560 | &lp->lan_saa9730_regs->TxCtl); | 559 | &lp->lan_saa9730_regs->TxCtl); |
561 | 560 | ||
562 | /* For Rx, turn on DMA then MAC */ | 561 | /* For Rx, turn on DMA then MAC */ |
563 | outl(readl(&lp->lan_saa9730_regs->RxCtl) | RX_CTL_RX_EN, | 562 | writel(readl(&lp->lan_saa9730_regs->RxCtl) | RX_CTL_RX_EN, |
564 | &lp->lan_saa9730_regs->RxCtl); | 563 | &lp->lan_saa9730_regs->RxCtl); |
565 | 564 | ||
566 | /* Set Ok2Use to let hardware own the buffers. */ | 565 | /* Set Ok2Use to let hardware own the buffers. */ |
567 | outl(OK2USE_RX_A | OK2USE_RX_B, &lp->lan_saa9730_regs->Ok2Use); | 566 | writel(OK2USE_RX_A | OK2USE_RX_B, &lp->lan_saa9730_regs->Ok2Use); |
568 | 567 | ||
569 | return 0; | 568 | return 0; |
570 | } | 569 | } |
@@ -587,7 +586,7 @@ static int lan_saa9730_tx(struct net_device *dev) | |||
587 | printk("lan_saa9730_tx interrupt\n"); | 586 | printk("lan_saa9730_tx interrupt\n"); |
588 | 587 | ||
589 | /* Clear interrupt. */ | 588 | /* Clear interrupt. */ |
590 | outl(DMA_STATUS_MAC_TX_INT, &lp->lan_saa9730_regs->DmaStatus); | 589 | writel(DMA_STATUS_MAC_TX_INT, &lp->lan_saa9730_regs->DmaStatus); |
591 | 590 | ||
592 | while (1) { | 591 | while (1) { |
593 | pPacket = lp->TxmBuffer[lp->PendingTxmBufferIndex] | 592 | pPacket = lp->TxmBuffer[lp->PendingTxmBufferIndex] |
@@ -660,8 +659,8 @@ static int lan_saa9730_rx(struct net_device *dev) | |||
660 | printk("lan_saa9730_rx interrupt\n"); | 659 | printk("lan_saa9730_rx interrupt\n"); |
661 | 660 | ||
662 | /* Clear receive interrupts. */ | 661 | /* Clear receive interrupts. */ |
663 | outl(DMA_STATUS_MAC_RX_INT | DMA_STATUS_RX_INT | | 662 | writel(DMA_STATUS_MAC_RX_INT | DMA_STATUS_RX_INT | |
664 | DMA_STATUS_RX_TO_INT, &lp->lan_saa9730_regs->DmaStatus); | 663 | DMA_STATUS_RX_TO_INT, &lp->lan_saa9730_regs->DmaStatus); |
665 | 664 | ||
666 | /* Address next packet */ | 665 | /* Address next packet */ |
667 | BufferIndex = lp->NextRcvBufferIndex; | 666 | BufferIndex = lp->NextRcvBufferIndex; |
@@ -725,8 +724,8 @@ static int lan_saa9730_rx(struct net_device *dev) | |||
725 | *pPacket = cpu_to_le32(RXSF_READY << RX_STAT_CTL_OWNER_SHF); | 724 | *pPacket = cpu_to_le32(RXSF_READY << RX_STAT_CTL_OWNER_SHF); |
726 | 725 | ||
727 | /* Make sure A or B is available to hardware as appropriate. */ | 726 | /* Make sure A or B is available to hardware as appropriate. */ |
728 | outl(BufferIndex ? OK2USE_RX_B : OK2USE_RX_A, | 727 | writel(BufferIndex ? OK2USE_RX_B : OK2USE_RX_A, |
729 | &lp->lan_saa9730_regs->Ok2Use); | 728 | &lp->lan_saa9730_regs->Ok2Use); |
730 | 729 | ||
731 | /* Go to next packet in sequence. */ | 730 | /* Go to next packet in sequence. */ |
732 | lp->NextRcvPacketIndex++; | 731 | lp->NextRcvPacketIndex++; |
@@ -844,8 +843,8 @@ static int lan_saa9730_write(struct lan_saa9730_private *lp, | |||
844 | (len << TX_STAT_CTL_LENGTH_SHF)); | 843 | (len << TX_STAT_CTL_LENGTH_SHF)); |
845 | 844 | ||
846 | /* Make sure A or B is available to hardware as appropriate. */ | 845 | /* Make sure A or B is available to hardware as appropriate. */ |
847 | outl(BufferIndex ? OK2USE_TX_B : OK2USE_TX_A, | 846 | writel(BufferIndex ? OK2USE_TX_B : OK2USE_TX_A, |
848 | &lp->lan_saa9730_regs->Ok2Use); | 847 | &lp->lan_saa9730_regs->Ok2Use); |
849 | 848 | ||
850 | return 0; | 849 | return 0; |
851 | } | 850 | } |
@@ -938,15 +937,15 @@ static void lan_saa9730_set_multicast(struct net_device *dev) | |||
938 | 937 | ||
939 | if (dev->flags & IFF_PROMISC) { | 938 | if (dev->flags & IFF_PROMISC) { |
940 | /* accept all packets */ | 939 | /* accept all packets */ |
941 | outl(CAM_CONTROL_COMP_EN | CAM_CONTROL_STATION_ACC | | 940 | writel(CAM_CONTROL_COMP_EN | CAM_CONTROL_STATION_ACC | |
942 | CAM_CONTROL_GROUP_ACC | CAM_CONTROL_BROAD_ACC, | 941 | CAM_CONTROL_GROUP_ACC | CAM_CONTROL_BROAD_ACC, |
943 | &lp->lan_saa9730_regs->CamCtl); | 942 | &lp->lan_saa9730_regs->CamCtl); |
944 | } else { | 943 | } else { |
945 | if (dev->flags & IFF_ALLMULTI) { | 944 | if (dev->flags & IFF_ALLMULTI) { |
946 | /* accept all multicast packets */ | 945 | /* accept all multicast packets */ |
947 | outl(CAM_CONTROL_COMP_EN | CAM_CONTROL_GROUP_ACC | | 946 | writel(CAM_CONTROL_COMP_EN | CAM_CONTROL_GROUP_ACC | |
948 | CAM_CONTROL_BROAD_ACC, | 947 | CAM_CONTROL_BROAD_ACC, |
949 | &lp->lan_saa9730_regs->CamCtl); | 948 | &lp->lan_saa9730_regs->CamCtl); |
950 | } else { | 949 | } else { |
951 | /* | 950 | /* |
952 | * Will handle the multicast stuff later. -carstenl | 951 | * Will handle the multicast stuff later. -carstenl |