diff options
Diffstat (limited to 'drivers/net/stmmac/mac100.c')
-rw-r--r-- | drivers/net/stmmac/mac100.c | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/drivers/net/stmmac/mac100.c b/drivers/net/stmmac/mac100.c index 625171b6062b..45d0457ddb6e 100644 --- a/drivers/net/stmmac/mac100.c +++ b/drivers/net/stmmac/mac100.c | |||
@@ -467,19 +467,28 @@ static int mac100_get_rx_frame_len(struct dma_desc *p) | |||
467 | return p->des01.rx.frame_length; | 467 | return p->des01.rx.frame_length; |
468 | } | 468 | } |
469 | 469 | ||
470 | struct stmmac_ops mac100_driver = { | 470 | struct stmmac_ops mac100_ops = { |
471 | .core_init = mac100_core_init, | 471 | .core_init = mac100_core_init, |
472 | .dump_mac_regs = mac100_dump_mac_regs, | 472 | .dump_regs = mac100_dump_mac_regs, |
473 | .dma_init = mac100_dma_init, | 473 | .host_irq_status = mac100_irq_status, |
474 | .dump_dma_regs = mac100_dump_dma_regs, | 474 | .set_filter = mac100_set_filter, |
475 | .flow_ctrl = mac100_flow_ctrl, | ||
476 | .pmt = mac100_pmt, | ||
477 | .set_umac_addr = mac100_set_umac_addr, | ||
478 | .get_umac_addr = mac100_get_umac_addr, | ||
479 | }; | ||
480 | |||
481 | struct stmmac_dma_ops mac100_dma_ops = { | ||
482 | .init = mac100_dma_init, | ||
483 | .dump_regs = mac100_dump_dma_regs, | ||
475 | .dma_mode = mac100_dma_operation_mode, | 484 | .dma_mode = mac100_dma_operation_mode, |
476 | .dma_diagnostic_fr = mac100_dma_diagnostic_fr, | 485 | .dma_diagnostic_fr = mac100_dma_diagnostic_fr, |
486 | }; | ||
487 | |||
488 | struct stmmac_desc_ops mac100_desc_ops = { | ||
477 | .tx_status = mac100_get_tx_frame_status, | 489 | .tx_status = mac100_get_tx_frame_status, |
478 | .rx_status = mac100_get_rx_frame_status, | 490 | .rx_status = mac100_get_rx_frame_status, |
479 | .get_tx_len = mac100_get_tx_len, | 491 | .get_tx_len = mac100_get_tx_len, |
480 | .set_filter = mac100_set_filter, | ||
481 | .flow_ctrl = mac100_flow_ctrl, | ||
482 | .pmt = mac100_pmt, | ||
483 | .init_rx_desc = mac100_init_rx_desc, | 492 | .init_rx_desc = mac100_init_rx_desc, |
484 | .init_tx_desc = mac100_init_tx_desc, | 493 | .init_tx_desc = mac100_init_tx_desc, |
485 | .get_tx_owner = mac100_get_tx_owner, | 494 | .get_tx_owner = mac100_get_tx_owner, |
@@ -492,9 +501,6 @@ struct stmmac_ops mac100_driver = { | |||
492 | .set_tx_owner = mac100_set_tx_owner, | 501 | .set_tx_owner = mac100_set_tx_owner, |
493 | .set_rx_owner = mac100_set_rx_owner, | 502 | .set_rx_owner = mac100_set_rx_owner, |
494 | .get_rx_frame_len = mac100_get_rx_frame_len, | 503 | .get_rx_frame_len = mac100_get_rx_frame_len, |
495 | .host_irq_status = mac100_irq_status, | ||
496 | .set_umac_addr = mac100_set_umac_addr, | ||
497 | .get_umac_addr = mac100_get_umac_addr, | ||
498 | }; | 504 | }; |
499 | 505 | ||
500 | struct mac_device_info *mac100_setup(unsigned long ioaddr) | 506 | struct mac_device_info *mac100_setup(unsigned long ioaddr) |
@@ -505,13 +511,16 @@ struct mac_device_info *mac100_setup(unsigned long ioaddr) | |||
505 | 511 | ||
506 | pr_info("\tMAC 10/100\n"); | 512 | pr_info("\tMAC 10/100\n"); |
507 | 513 | ||
508 | mac->ops = &mac100_driver; | 514 | mac->mac = &mac100_ops; |
509 | mac->hw.pmt = PMT_NOT_SUPPORTED; | 515 | mac->desc = &mac100_desc_ops; |
510 | mac->hw.link.port = MAC_CONTROL_PS; | 516 | mac->dma = &mac100_dma_ops; |
511 | mac->hw.link.duplex = MAC_CONTROL_F; | 517 | |
512 | mac->hw.link.speed = 0; | 518 | mac->pmt = PMT_NOT_SUPPORTED; |
513 | mac->hw.mii.addr = MAC_MII_ADDR; | 519 | mac->link.port = MAC_CONTROL_PS; |
514 | mac->hw.mii.data = MAC_MII_DATA; | 520 | mac->link.duplex = MAC_CONTROL_F; |
521 | mac->link.speed = 0; | ||
522 | mac->mii.addr = MAC_MII_ADDR; | ||
523 | mac->mii.data = MAC_MII_DATA; | ||
515 | 524 | ||
516 | return mac; | 525 | return mac; |
517 | } | 526 | } |