• Home
  • Raw
  • Download

Lines Matching refs:ioaddr

131 #define EL3WINDOW(win_num) outw(SelectWindow + (win_num), ioaddr + EL3_CMD)
220 static void mdio_sync(unsigned int ioaddr, int bits);
221 static int mdio_read(unsigned int ioaddr, int phy_id, int location);
222 static void mdio_write(unsigned int ioaddr, int phy_id, int location,
224 static unsigned short read_eeprom(unsigned int ioaddr, int index);
308 unsigned int ioaddr; in tc574_config() local
341 ioaddr = dev->base_addr; in tc574_config()
356 phys_addr[i] = htons(read_eeprom(ioaddr, i + 10)); in tc574_config()
370 outw(2<<11, ioaddr + RunnerRdCtrl); in tc574_config()
371 mcr = inb(ioaddr + 2); in tc574_config()
372 outw(0<<11, ioaddr + RunnerRdCtrl); in tc574_config()
375 config = inl(ioaddr + Wn3_Config); in tc574_config()
386 outw(0x8040, ioaddr + Wn3_Options); in tc574_config()
388 outw(0xc040, ioaddr + Wn3_Options); in tc574_config()
392 outw(0x8040, ioaddr + Wn3_Options); in tc574_config()
397 mdio_sync(ioaddr, 32); in tc574_config()
398 mii_status = mdio_read(ioaddr, phy & 0x1f, 1); in tc574_config()
413 i = mdio_read(ioaddr, lp->phys, 16) | 0x40; in tc574_config()
414 mdio_write(ioaddr, lp->phys, 16, i); in tc574_config()
415 lp->advertising = mdio_read(ioaddr, lp->phys, 4); in tc574_config()
419 mdio_write(ioaddr, lp->phys, 4, lp->advertising); in tc574_config()
474 unsigned int ioaddr = dev->base_addr; in dump_status() local
477 inw(ioaddr+EL3_STATUS), in dump_status()
478 inw(ioaddr+RxStatus), inb(ioaddr+TxStatus), in dump_status()
479 inw(ioaddr+TxFree)); in dump_status()
482 inw(ioaddr+0x04), inw(ioaddr+0x06), in dump_status()
483 inw(ioaddr+0x08), inw(ioaddr+0x0a)); in dump_status()
503 static unsigned short read_eeprom(unsigned int ioaddr, int index) in read_eeprom() argument
506 outw(EEPROM_Read + index, ioaddr + Wn0EepromCmd); in read_eeprom()
509 if ((inw(ioaddr + Wn0EepromCmd) & 0x8000) == 0) in read_eeprom()
512 return inw(ioaddr + Wn0EepromData); in read_eeprom()
531 static void mdio_sync(unsigned int ioaddr, int bits) in mdio_sync() argument
533 unsigned int mdio_addr = ioaddr + Wn4_PhysicalMgmt; in mdio_sync()
542 static int mdio_read(unsigned int ioaddr, int phy_id, int location) in mdio_read() argument
547 unsigned int mdio_addr = ioaddr + Wn4_PhysicalMgmt; in mdio_read()
550 mdio_sync(ioaddr, 32); in mdio_read()
567 static void mdio_write(unsigned int ioaddr, int phy_id, int location, int value) in mdio_write() argument
570 unsigned int mdio_addr = ioaddr + Wn4_PhysicalMgmt; in mdio_write()
574 mdio_sync(ioaddr, 32); in mdio_write()
594 unsigned int ioaddr = dev->base_addr; in tc574_reset() local
601 outw(0, ioaddr + RunnerWrCtrl); in tc574_reset()
602 outw(0, ioaddr + RunnerRdCtrl); in tc574_reset()
607 outb(dev->dev_addr[i], ioaddr + i); in tc574_reset()
609 outw(0, ioaddr + i); in tc574_reset()
613 outb((dev->mtu > 1500 ? 0x40 : 0), ioaddr + Wn3_MAC_Ctrl); in tc574_reset()
615 ioaddr + Wn3_Config); in tc574_reset()
617 outw(0x8040, ioaddr + Wn3_Options); in tc574_reset()
619 outw(0xc040, ioaddr + Wn3_Options); in tc574_reset()
628 outw(0x8040, ioaddr + Wn3_Options); in tc574_reset()
631 outw(StatsDisable, ioaddr + EL3_CMD); in tc574_reset()
634 inb(ioaddr + i); in tc574_reset()
635 inw(ioaddr + 10); in tc574_reset()
636 inw(ioaddr + 12); in tc574_reset()
638 inb(ioaddr + 12); in tc574_reset()
639 inb(ioaddr + 13); in tc574_reset()
642 outw(0x0040, ioaddr + Wn4_NetDiag); in tc574_reset()
648 mdio_sync(ioaddr, 32); in tc574_reset()
649 mdio_write(ioaddr, lp->phys, 4, lp->advertising); in tc574_reset()
652 i = mdio_read(ioaddr, lp->phys, 16) | 0x20; in tc574_reset()
653 mdio_write(ioaddr, lp->phys, 16, i); in tc574_reset()
660 outw(StatsEnable, ioaddr + EL3_CMD); /* Turn on statistics. */ in tc574_reset()
661 outw(RxEnable, ioaddr + EL3_CMD); /* Enable the receiver. */ in tc574_reset()
662 outw(TxEnable, ioaddr + EL3_CMD); /* Enable transmitter. */ in tc574_reset()
664 outw(SetStatusEnb | 0xff, ioaddr + EL3_CMD); in tc574_reset()
667 ioaddr + EL3_CMD); in tc574_reset()
669 | AdapterFailure | RxEarly, ioaddr + EL3_CMD); in tc574_reset()
695 unsigned int ioaddr = dev->base_addr; in el3_tx_timeout() local
703 outw(TxEnable, ioaddr + EL3_CMD); in el3_tx_timeout()
709 unsigned int ioaddr = dev->base_addr; in pop_tx_status() local
714 u_char tx_status = inb(ioaddr + TxStatus); in pop_tx_status()
723 outw(TxEnable, ioaddr + EL3_CMD); in pop_tx_status()
726 outb(0x00, ioaddr + TxStatus); /* Pop the status stack. */ in pop_tx_status()
733 unsigned int ioaddr = dev->base_addr; in el3_start_xmit() local
739 inw(ioaddr + EL3_STATUS)); in el3_start_xmit()
746 outw(skb->len, ioaddr + TX_FIFO); in el3_start_xmit()
747 outw(0, ioaddr + TX_FIFO); in el3_start_xmit()
749 outsl(ioaddr + TX_FIFO, skb->data, (skb->len+3)>>2); in el3_start_xmit()
752 if (inw(ioaddr + TxFree) <= 1536) { in el3_start_xmit()
756 outw(SetTxThreshold + (1536>>2), ioaddr + EL3_CMD); in el3_start_xmit()
770 unsigned int ioaddr; in el3_interrupt() local
777 ioaddr = dev->base_addr; in el3_interrupt()
780 dev->name, inw(ioaddr + EL3_STATUS)); in el3_interrupt()
784 while ((status = inw(ioaddr + EL3_STATUS)) & in el3_interrupt()
800 outw(AckIntr | TxAvailable, ioaddr + EL3_CMD); in el3_interrupt()
813 outw(AckIntr | RxEarly, ioaddr + EL3_CMD); in el3_interrupt()
818 fifo_diag = inw(ioaddr + Wn4_FIFODiag); in el3_interrupt()
825 outw(TxEnable, ioaddr + EL3_CMD); in el3_interrupt()
831 outw(RxEnable, ioaddr + EL3_CMD); in el3_interrupt()
833 outw(AckIntr | AdapterFailure, ioaddr + EL3_CMD); in el3_interrupt()
841 outw(AckIntr | 0xFF, ioaddr + EL3_CMD); in el3_interrupt()
845 outw(AckIntr | IntReq | IntLatch, ioaddr + EL3_CMD); in el3_interrupt()
849 dev->name, inw(ioaddr + EL3_STATUS)); in el3_interrupt()
864 unsigned int ioaddr = dev->base_addr; in media_check() local
873 if ((inw(ioaddr + EL3_STATUS) & IntLatch) && (inb(ioaddr + Timer) == 0xff)) { in media_check()
892 media = mdio_read(ioaddr, lp->phys, 1); in media_check()
893 partner = mdio_read(ioaddr, lp->phys, 5); in media_check()
917 (dev->mtu > 1500 ? 0x40 : 0), ioaddr + Wn3_MAC_Ctrl); in media_check()
953 unsigned int ioaddr = dev->base_addr; in update_stats() local
958 if (inw(ioaddr+EL3_STATUS) == 0xffff) /* No card. */ in update_stats()
964 dev->stats.tx_carrier_errors += inb(ioaddr + 0); in update_stats()
965 dev->stats.tx_heartbeat_errors += inb(ioaddr + 1); in update_stats()
966 /* Multiple collisions. */ inb(ioaddr + 2); in update_stats()
967 dev->stats.collisions += inb(ioaddr + 3); in update_stats()
968 dev->stats.tx_window_errors += inb(ioaddr + 4); in update_stats()
969 dev->stats.rx_fifo_errors += inb(ioaddr + 5); in update_stats()
970 dev->stats.tx_packets += inb(ioaddr + 6); in update_stats()
971 up = inb(ioaddr + 9); in update_stats()
973 /* Rx packets */ inb(ioaddr + 7); in update_stats()
974 /* Tx deferrals */ inb(ioaddr + 8); in update_stats()
975 /* rx */ inw(ioaddr + 10); in update_stats()
976 /* tx */ inw(ioaddr + 12); in update_stats()
979 /* BadSSD */ inb(ioaddr + 12); in update_stats()
980 up = inb(ioaddr + 13); in update_stats()
987 unsigned int ioaddr = dev->base_addr; in el3_rx() local
991 dev->name, inw(ioaddr+EL3_STATUS), inw(ioaddr+RxStatus)); in el3_rx()
992 while (!((rx_status = inw(ioaddr + RxStatus)) & 0x8000) && in el3_rx()
1016 insl(ioaddr+RX_FIFO, skb_put(skb, pkt_len), in el3_rx()
1038 unsigned int ioaddr = dev->base_addr; in el3_ioctl() local
1056 saved_window = inw(ioaddr + EL3_CMD) >> 13; in el3_ioctl()
1058 data->val_out = mdio_read(ioaddr, data->phy_id & 0x1f, in el3_ioctl()
1070 saved_window = inw(ioaddr + EL3_CMD) >> 13; in el3_ioctl()
1072 mdio_write(ioaddr, data->phy_id & 0x1f, in el3_ioctl()
1093 unsigned int ioaddr = dev->base_addr; in set_rx_mode() local
1097 ioaddr + EL3_CMD); in set_rx_mode()
1099 outw(SetRxFilter|RxStation|RxMulticast|RxBroadcast, ioaddr + EL3_CMD); in set_rx_mode()
1101 outw(SetRxFilter | RxStation | RxBroadcast, ioaddr + EL3_CMD); in set_rx_mode()
1116 unsigned int ioaddr = dev->base_addr; in el3_close() local
1126 outw(StatsDisable, ioaddr + EL3_CMD); in el3_close()
1129 outw(RxDisable, ioaddr + EL3_CMD); in el3_close()
1130 outw(TxDisable, ioaddr + EL3_CMD); in el3_close()
1139 outw(SetIntrEnb | 0x0000, ioaddr + EL3_CMD); in el3_close()