Lines Matching refs:ioc3
81 struct ioc3 *regs;
150 __res = ioc3->reg; \
156 (ioc3->reg = (val)); \
166 nic_wait(struct ioc3 *ioc3) in nic_wait() argument
178 nic_reset(struct ioc3 *ioc3) in nic_reset() argument
183 presence = nic_wait(ioc3); in nic_reset()
186 nic_wait(ioc3); in nic_reset()
192 nic_read_bit(struct ioc3 *ioc3) in nic_read_bit() argument
197 result = nic_wait(ioc3); in nic_read_bit()
199 nic_wait(ioc3); in nic_read_bit()
205 nic_write_bit(struct ioc3 *ioc3, int bit) in nic_write_bit() argument
212 nic_wait(ioc3); in nic_write_bit()
219 nic_read_byte(struct ioc3 *ioc3) in nic_read_byte() argument
225 result = (result >> 1) | (nic_read_bit(ioc3) << 7); in nic_read_byte()
234 nic_write_byte(struct ioc3 *ioc3, int byte) in nic_write_byte() argument
242 nic_write_bit(ioc3, bit); in nic_write_byte()
247 nic_find(struct ioc3 *ioc3, int *last) in nic_find() argument
252 nic_reset(ioc3); in nic_find()
254 nic_write_byte(ioc3, 0xf0); in nic_find()
258 a = nic_read_bit(ioc3); in nic_find()
259 b = nic_read_bit(ioc3); in nic_find()
275 nic_write_bit(ioc3, address & (1UL << index)); in nic_find()
282 nic_write_bit(ioc3, a); in nic_find()
292 static int nic_init(struct ioc3 *ioc3) in nic_init() argument
303 reg = nic_find(ioc3, &save); in nic_init()
317 nic_reset(ioc3); in nic_init()
320 nic_write_byte(ioc3, 0x55); in nic_init()
322 nic_write_byte(ioc3, (reg >> (i << 3)) & 0xff); in nic_init()
350 struct ioc3 *ioc3 = ip->regs; in ioc3_get_eaddr_nic() local
358 if (!nic_init(ioc3)) in ioc3_get_eaddr_nic()
369 nic_write_byte(ioc3, 0xf0); in ioc3_get_eaddr_nic()
370 nic_write_byte(ioc3, 0x00); in ioc3_get_eaddr_nic()
371 nic_write_byte(ioc3, 0x00); in ioc3_get_eaddr_nic()
374 nic[i] = nic_read_byte(ioc3); in ioc3_get_eaddr_nic()
408 struct ioc3 *ioc3 = ip->regs; in mii_read() local
411 while (ioc3->micr & MICR_BUSY); in mii_read()
412 ioc3->micr = (phy << MICR_PHYADDR_SHIFT) | reg | MICR_READTRIG; in mii_read()
413 while (ioc3->micr & MICR_BUSY); in mii_read()
415 return ioc3->midr_r & MIDR_DATA_MASK; in mii_read()
420 struct ioc3 *ioc3 = ip->regs; in mii_write() local
423 while (ioc3->micr & MICR_BUSY); in mii_write()
424 ioc3->midr_w = data; in mii_write()
425 ioc3->micr = (phy << MICR_PHYADDR_SHIFT) | reg; in mii_write()
426 while (ioc3->micr & MICR_BUSY); in mii_write()
434 struct ioc3 *ioc3 = ip->regs; in ioc3_get_stats() local
436 ip->stats.collisions += (ioc3->etcdc & ETCDC_COLLCNT_MASK); in ioc3_get_stats()
444 struct ioc3 *ioc3 = ip->regs; in ioc3_rx() local
511 ioc3->erpir = (n_entry << 3) | ERPIR_ARM; in ioc3_rx()
520 struct ioc3 *ioc3 = ip->regs; in ioc3_tx() local
526 etcir = ioc3->etcir; in ioc3_tx()
542 etcir = ioc3->etcir; /* More pkts sent? */ in ioc3_tx()
597 struct ioc3 *ioc3 = ip->regs; in ioc3_interrupt() local
603 eisr = ioc3->eisr & enabled; in ioc3_interrupt()
606 ioc3->eisr = eisr; in ioc3_interrupt()
607 ioc3->eisr; /* Flush */ in ioc3_interrupt()
617 eisr = ioc3->eisr & enabled; in ioc3_interrupt()
721 struct ioc3 *ioc3 = ip->regs; in ioc3_set_link_modes() local
755 ioc3->emcr = ip->emcr; in ioc3_set_link_modes()
756 ioc3->emcr; in ioc3_set_link_modes()
1180 struct ioc3 *ioc3) in ioc3_alloc_rings() argument
1231 struct ioc3 *ioc3) in ioc3_init_rings() argument
1236 ioc3_alloc_rings(dev, ip, ioc3); in ioc3_init_rings()
1243 ioc3->erbr_h = ring >> 32; in ioc3_init_rings()
1244 ioc3->erbr_l = ring & 0xffffffff; in ioc3_init_rings()
1245 ioc3->ercir = (ip->rx_ci << 3); in ioc3_init_rings()
1246 ioc3->erpir = (ip->rx_pi << 3) | ERPIR_ARM; in ioc3_init_rings()
1253 ioc3->etbr_h = ring >> 32; in ioc3_init_rings()
1254 ioc3->etbr_l = ring & 0xffffffff; in ioc3_init_rings()
1255 ioc3->etpir = (ip->tx_pi << 7); in ioc3_init_rings()
1256 ioc3->etcir = (ip->tx_ci << 7); in ioc3_init_rings()
1257 ioc3->etcir; /* Flush */ in ioc3_init_rings()
1263 struct ioc3 *ioc3 = ip->regs; in ioc3_ssram_disc() local
1264 volatile u32 *ssram0 = &ioc3->ssram[0x0000]; in ioc3_ssram_disc()
1265 volatile u32 *ssram1 = &ioc3->ssram[0x4000]; in ioc3_ssram_disc()
1269 ioc3->emcr |= (EMCR_BUFSIZ | EMCR_RAMPAR); in ioc3_ssram_disc()
1278 ioc3->emcr &= ~EMCR_BUFSIZ; in ioc3_ssram_disc()
1287 struct ioc3 *ioc3 = ip->regs; in ioc3_init() local
1291 ioc3->emcr = EMCR_RST; /* Reset */ in ioc3_init()
1292 ioc3->emcr; /* Flush WB */ in ioc3_init()
1294 ioc3->emcr = 0; in ioc3_init()
1295 ioc3->emcr; in ioc3_init()
1298 ioc3->erbar = 0; in ioc3_init()
1299 ioc3->etcsr = (17<<ETCSR_IPGR2_SHIFT) | (11<<ETCSR_IPGR1_SHIFT) | 21; in ioc3_init()
1300 ioc3->etcdc; /* Clear on read */ in ioc3_init()
1301 ioc3->ercsr = 15; /* RX low watermark */ in ioc3_init()
1302 ioc3->ertr = 0; /* Interrupt immediately */ in ioc3_init()
1303 ioc3->emar_h = (dev->dev_addr[5] << 8) | dev->dev_addr[4]; in ioc3_init()
1304 ioc3->emar_l = (dev->dev_addr[3] << 24) | (dev->dev_addr[2] << 16) | in ioc3_init()
1306 ioc3->ehar_h = ip->ehar_h; in ioc3_init()
1307 ioc3->ehar_l = ip->ehar_l; in ioc3_init()
1308 ioc3->ersr = 42; /* XXX should be random */ in ioc3_init()
1310 ioc3_init_rings(ip->dev, ip, ioc3); in ioc3_init()
1314 ioc3->emcr = ip->emcr; in ioc3_init()
1315 ioc3->eier = EISR_RXTIMERINT | EISR_RXOFLO | EISR_RXBUFOFLO | in ioc3_init()
1318 ioc3->eier; in ioc3_init()
1323 struct ioc3 *ioc3 = ip->regs; in ioc3_stop() local
1325 ioc3->emcr = 0; /* Shutup */ in ioc3_stop()
1326 ioc3->eier = 0; /* Disable interrupts */ in ioc3_stop()
1327 ioc3->eier; /* Flush */ in ioc3_stop()
1392 struct ioc3 *ioc3) in ioc3_serial_probe() argument
1417 req.iomem_base = (unsigned char *) &ioc3->sregs.uarta; in ioc3_serial_probe()
1420 req.iomem_base = (unsigned char *) &ioc3->sregs.uartb; in ioc3_serial_probe()
1429 struct ioc3 *ioc3; in ioc3_probe() local
1450 ioc3 = (struct ioc3 *) ioremap(ioc3_base, ioc3_size); in ioc3_probe()
1451 if (!ioc3) { in ioc3_probe()
1457 ip->regs = ioc3; in ioc3_probe()
1460 ioc3_serial_probe(pdev, ioc3); in ioc3_probe()
1520 struct ioc3 *ioc3 = ip->regs; in ioc3_remove_one() local
1523 iounmap(ioc3); in ioc3_remove_one()
1556 struct ioc3 *ioc3 = ip->regs; in ioc3_start_xmit() local
1608 ioc3->etpir = produce << 7; /* Fire ... */ in ioc3_start_xmit()
1666 struct ioc3 *ioc3 = ip->regs; in ioc3_ioctl() local
1684 while (ioc3->micr & MICR_BUSY); in ioc3_ioctl()
1685 ioc3->micr = (phy << MICR_PHYADDR_SHIFT) | reg | MICR_READTRIG; in ioc3_ioctl()
1686 while (ioc3->micr & MICR_BUSY); in ioc3_ioctl()
1687 data[3] = (ioc3->midr_r & MIDR_DATA_MASK); in ioc3_ioctl()
1703 while (ioc3->micr & MICR_BUSY); in ioc3_ioctl()
1704 ioc3->midr_w = data[2]; in ioc3_ioctl()
1705 ioc3->micr = (phy << MICR_PHYADDR_SHIFT) | reg; in ioc3_ioctl()
1706 while (ioc3->micr & MICR_BUSY); in ioc3_ioctl()
1785 struct ioc3 *ioc3 = ip->regs; in ioc3_set_multicast_list() local
1795 ioc3->emcr = ip->emcr; in ioc3_set_multicast_list()
1796 ioc3->emcr; in ioc3_set_multicast_list()
1799 ioc3->emcr = ip->emcr; /* Clear promiscuous. */ in ioc3_set_multicast_list()
1800 ioc3->emcr; in ioc3_set_multicast_list()
1821 ioc3->ehar_h = ip->ehar_h; in ioc3_set_multicast_list()
1822 ioc3->ehar_l = ip->ehar_l; in ioc3_set_multicast_list()