Lines Matching refs:ioaddr
116 #define EL3WINDOW(win_num) outw(SelectWindow + (win_num), ioaddr + EL3_CMD)
186 static ushort read_eeprom(int ioaddr, int index);
268 static void el3_dev_fill(struct net_device *dev, __be16 *phys_addr, int ioaddr, in el3_dev_fill() argument
274 dev->base_addr = ioaddr; in el3_dev_fill()
283 int ioaddr, isa_irq, if_port, err; in el3_isa_match() local
294 ioaddr = 0x200 + ((iobase & 0x1f) << 4); in el3_isa_match()
306 if (!request_region(ioaddr, EL3_IO_EXTENT, "3c509-isa")) { in el3_isa_match()
315 outb((ioaddr >> 4) | 0xe0, id_port); in el3_isa_match()
318 if (inw(ioaddr) != 0x6d50) { in el3_isa_match()
324 outw(0x0f00, ioaddr + WN0_IRQ); in el3_isa_match()
326 el3_dev_fill(dev, phys_addr, ioaddr, isa_irq, if_port, EL3_ISA); in el3_isa_match()
355 int ioaddr = ndev->base_addr, err; in el3_isa_resume() local
365 outb((ioaddr >> 4) | 0xe0, id_port); in el3_isa_resume()
367 if (inw(ioaddr) != 0x6d50) in el3_isa_resume()
370 outw(0x0f00, ioaddr + WN0_IRQ); in el3_isa_resume()
404 int ioaddr, irq, if_port; in el3_pnp_probe() local
409 ioaddr = pnp_port_start(pdev, 0); in el3_pnp_probe()
410 if (!request_region(ioaddr, EL3_IO_EXTENT, "3c509-pnp")) in el3_pnp_probe()
415 phys_addr[i] = htons(read_eeprom(ioaddr, i)); in el3_pnp_probe()
416 if_port = read_eeprom(ioaddr, 8) >> 14; in el3_pnp_probe()
419 release_region(ioaddr, EL3_IO_EXTENT); in el3_pnp_probe()
424 el3_dev_fill(dev, phys_addr, ioaddr, irq, if_port, EL3_PNP); in el3_pnp_probe()
560 int ioaddr, irq, if_port; in el3_eisa_probe() local
568 ioaddr = edev->base_addr; in el3_eisa_probe()
570 if (!request_region(ioaddr, EL3_IO_EXTENT, "3c579-eisa")) in el3_eisa_probe()
574 outw(SelectWindow | 0, ioaddr + 0xC80 + EL3_CMD); in el3_eisa_probe()
576 irq = inw(ioaddr + WN0_IRQ) >> 12; in el3_eisa_probe()
577 if_port = inw(ioaddr + 6)>>14; in el3_eisa_probe()
579 phys_addr[i] = htons(read_eeprom(ioaddr, i)); in el3_eisa_probe()
582 read_eeprom(ioaddr, 3); in el3_eisa_probe()
586 release_region(ioaddr, EL3_IO_EXTENT); in el3_eisa_probe()
592 el3_dev_fill(dev, phys_addr, ioaddr, irq, if_port, EL3_EISA); in el3_eisa_probe()
623 static ushort read_eeprom(int ioaddr, int index) in read_eeprom() argument
625 outw(EEPROM_READ + index, ioaddr + 10); in read_eeprom()
629 return inw(ioaddr + 12); in read_eeprom()
658 int ioaddr = dev->base_addr; in el3_open() local
661 outw(TxReset, ioaddr + EL3_CMD); in el3_open()
662 outw(RxReset, ioaddr + EL3_CMD); in el3_open()
663 outw(SetStatusEnb | 0x00, ioaddr + EL3_CMD); in el3_open()
672 dev->irq, ioaddr + EL3_STATUS, inw(ioaddr + EL3_STATUS)); in el3_open()
678 dev->name, dev->irq, inw(ioaddr + EL3_STATUS)); in el3_open()
686 int ioaddr = dev->base_addr; in el3_tx_timeout() local
690 dev->name, inb(ioaddr + TX_STATUS), inw(ioaddr + EL3_STATUS), in el3_tx_timeout()
691 inw(ioaddr + TX_FREE)); in el3_tx_timeout()
695 outw(TxReset, ioaddr + EL3_CMD); in el3_tx_timeout()
696 outw(TxEnable, ioaddr + EL3_CMD); in el3_tx_timeout()
705 int ioaddr = dev->base_addr; in el3_start_xmit() local
714 dev->name, skb->len, inw(ioaddr + EL3_STATUS)); in el3_start_xmit()
730 outw(skb->len, ioaddr + TX_FIFO); in el3_start_xmit()
731 outw(0x00, ioaddr + TX_FIFO); in el3_start_xmit()
733 outsl(ioaddr + TX_FIFO, skb->data, (skb->len + 3) >> 2); in el3_start_xmit()
735 if (inw(ioaddr + TX_FREE) > 1536) in el3_start_xmit()
739 outw(SetTxThreshold + 1536, ioaddr + EL3_CMD); in el3_start_xmit()
750 while (--i > 0 && (tx_status = inb(ioaddr + TX_STATUS)) > 0) { in el3_start_xmit()
752 if (tx_status & 0x30) outw(TxReset, ioaddr + EL3_CMD); in el3_start_xmit()
753 if (tx_status & 0x3C) outw(TxEnable, ioaddr + EL3_CMD); in el3_start_xmit()
754 outb(0x00, ioaddr + TX_STATUS); /* Pop the status stack. */ in el3_start_xmit()
766 int ioaddr, status; in el3_interrupt() local
772 ioaddr = dev->base_addr; in el3_interrupt()
775 status = inw(ioaddr + EL3_STATUS); in el3_interrupt()
779 while ((status = inw(ioaddr + EL3_STATUS)) & in el3_interrupt()
789 outw(AckIntr | TxAvailable, ioaddr + EL3_CMD); in el3_interrupt()
798 outw(AckIntr | RxEarly, ioaddr + EL3_CMD); in el3_interrupt()
804 while (--i>0 && (tx_status = inb(ioaddr + TX_STATUS)) > 0) { in el3_interrupt()
806 if (tx_status & 0x30) outw(TxReset, ioaddr + EL3_CMD); in el3_interrupt()
807 if (tx_status & 0x3C) outw(TxEnable, ioaddr + EL3_CMD); in el3_interrupt()
808 outb(0x00, ioaddr + TX_STATUS); /* Pop the status stack. */ in el3_interrupt()
813 outw(RxReset, ioaddr + EL3_CMD); in el3_interrupt()
818 ioaddr + EL3_CMD); in el3_interrupt()
819 outw(RxEnable, ioaddr + EL3_CMD); /* Re-enable the receiver. */ in el3_interrupt()
820 outw(AckIntr | AdapterFailure, ioaddr + EL3_CMD); in el3_interrupt()
828 outw(AckIntr | 0xFF, ioaddr + EL3_CMD); in el3_interrupt()
832 outw(AckIntr | IntReq | IntLatch, ioaddr + EL3_CMD); /* Ack IRQ */ in el3_interrupt()
837 inw(ioaddr + EL3_STATUS)); in el3_interrupt()
881 int ioaddr = dev->base_addr; in update_stats() local
886 outw(StatsDisable, ioaddr + EL3_CMD); in update_stats()
889 dev->stats.tx_carrier_errors += inb(ioaddr + 0); in update_stats()
890 dev->stats.tx_heartbeat_errors += inb(ioaddr + 1); in update_stats()
891 /* Multiple collisions. */ inb(ioaddr + 2); in update_stats()
892 dev->stats.collisions += inb(ioaddr + 3); in update_stats()
893 dev->stats.tx_window_errors += inb(ioaddr + 4); in update_stats()
894 dev->stats.rx_fifo_errors += inb(ioaddr + 5); in update_stats()
895 dev->stats.tx_packets += inb(ioaddr + 6); in update_stats()
896 /* Rx packets */ inb(ioaddr + 7); in update_stats()
897 /* Tx deferrals */ inb(ioaddr + 8); in update_stats()
898 inw(ioaddr + 10); /* Total Rx and Tx octets. */ in update_stats()
899 inw(ioaddr + 12); in update_stats()
903 outw(StatsEnable, ioaddr + EL3_CMD); in update_stats()
909 int ioaddr = dev->base_addr; in el3_rx() local
914 inw(ioaddr+EL3_STATUS), inw(ioaddr+RX_STATUS)); in el3_rx()
915 while ((rx_status = inw(ioaddr + RX_STATUS)) > 0) { in el3_rx()
919 outw(RxDiscard, ioaddr + EL3_CMD); in el3_rx()
941 insl(ioaddr + RX_FIFO, skb_put(skb,pkt_len), in el3_rx()
944 outw(RxDiscard, ioaddr + EL3_CMD); /* Pop top Rx packet. */ in el3_rx()
951 outw(RxDiscard, ioaddr + EL3_CMD); in el3_rx()
957 inw(ioaddr + EL3_STATUS); /* Delay. */ in el3_rx()
958 while (inw(ioaddr + EL3_STATUS) & 0x1000) in el3_rx()
960 inw(ioaddr + EL3_STATUS) ); in el3_rx()
974 int ioaddr = dev->base_addr; in set_multicast_list() local
988 ioaddr + EL3_CMD); in set_multicast_list()
991 outw(SetRxFilter | RxStation | RxMulticast | RxBroadcast, ioaddr + EL3_CMD); in set_multicast_list()
994 outw(SetRxFilter | RxStation | RxBroadcast, ioaddr + EL3_CMD); in set_multicast_list()
1001 int ioaddr = dev->base_addr; in el3_close() local
1016 outw(0x0f00, ioaddr + WN0_IRQ); in el3_close()
1025 int ioaddr = dev->base_addr; in el3_link_ok() local
1029 tmp = inw(ioaddr + WN4_MEDIA); in el3_link_ok()
1038 int ioaddr = dev->base_addr; in el3_netdev_get_ecmd() local
1043 tmp = inw(ioaddr + WN0_ADDR_CONF); in el3_netdev_get_ecmd()
1060 tmp = inw(ioaddr + WN0_CONF_CTRL); in el3_netdev_get_ecmd()
1069 tmp = inw(ioaddr + WN4_NETDIAG); in el3_netdev_get_ecmd()
1085 int ioaddr = dev->base_addr; in el3_netdev_set_ecmd() local
1095 tmp = inw(ioaddr + WN0_ADDR_CONF); in el3_netdev_set_ecmd()
1113 outw(tmp, ioaddr + WN0_ADDR_CONF); in el3_netdev_set_ecmd()
1116 tmp = inw(ioaddr + WN0_ADDR_CONF); in el3_netdev_set_ecmd()
1118 outw(StartCoax, ioaddr + EL3_CMD); in el3_netdev_set_ecmd()
1125 tmp = inw(ioaddr + WN4_NETDIAG); in el3_netdev_set_ecmd()
1130 outw(tmp, ioaddr + WN4_NETDIAG); in el3_netdev_set_ecmd()
1197 int ioaddr = dev->base_addr; in el3_down() local
1202 outw(StatsDisable, ioaddr + EL3_CMD); in el3_down()
1205 outw(RxDisable, ioaddr + EL3_CMD); in el3_down()
1206 outw(TxDisable, ioaddr + EL3_CMD); in el3_down()
1210 outw(StopCoax, ioaddr + EL3_CMD); in el3_down()
1214 outw(inw(ioaddr + WN4_MEDIA) & ~MEDIA_TP, ioaddr + WN4_MEDIA); in el3_down()
1217 outw(SetIntrEnb | 0x0000, ioaddr + EL3_CMD); in el3_down()
1226 int ioaddr = dev->base_addr; in el3_up() local
1229 outw(0x0001, ioaddr + 4); in el3_up()
1232 outw((dev->irq << 12) | 0x0f00, ioaddr + WN0_IRQ); in el3_up()
1238 outb(dev->dev_addr[i], ioaddr + i); in el3_up()
1242 outw(StartCoax, ioaddr + EL3_CMD); in el3_up()
1247 sw_info = (read_eeprom(ioaddr, 0x14) & 0x400f) | in el3_up()
1248 (read_eeprom(ioaddr, 0x0d) & 0xBff0); in el3_up()
1251 net_diag = inw(ioaddr + WN4_NETDIAG); in el3_up()
1275 outw(net_diag, ioaddr + WN4_NETDIAG); in el3_up()
1280 outw(inw(ioaddr + WN4_MEDIA) | MEDIA_TP, ioaddr + WN4_MEDIA); in el3_up()
1284 outw(StatsDisable, ioaddr + EL3_CMD); in el3_up()
1287 inb(ioaddr + i); in el3_up()
1288 inw(ioaddr + 10); in el3_up()
1289 inw(ioaddr + 12); in el3_up()
1295 outw(SetRxFilter | RxStation | RxBroadcast, ioaddr + EL3_CMD); in el3_up()
1296 outw(StatsEnable, ioaddr + EL3_CMD); /* Turn on statistics. */ in el3_up()
1298 outw(RxEnable, ioaddr + EL3_CMD); /* Enable the receiver. */ in el3_up()
1299 outw(TxEnable, ioaddr + EL3_CMD); /* Enable transmitter. */ in el3_up()
1301 outw(SetStatusEnb | 0xff, ioaddr + EL3_CMD); in el3_up()
1304 ioaddr + EL3_CMD); in el3_up()
1306 ioaddr + EL3_CMD); in el3_up()
1320 int ioaddr; in el3_suspend() local
1324 ioaddr = dev->base_addr; in el3_suspend()
1332 outw(PowerDown, ioaddr + EL3_CMD); in el3_suspend()
1344 int ioaddr; in el3_resume() local
1348 ioaddr = dev->base_addr; in el3_resume()
1352 outw(PowerUp, ioaddr + EL3_CMD); in el3_resume()