Lines Matching +full:phyrst +full:- +full:a +full:- +full:enable
2 ns8382x.c: A U-Boot driver for the NatSemi DP8382[01].
3 ported by: Mark A. Rakes (mark_rakes@vivato.net)
13 Adapted from a Linux driver which was written by Donald Becker
18 2. A Linux driver by Donald Becker, ns820.c:
19 Written/copyright 1999-2002 by Donald Becker.
25 a complete program and may only be used when the entire operating
44 * Initial U-Boot Release.
48 * a programmed EEPROM device (if present) in order to work
108 PhyRst = 0x00000400, enumerator
230 /* 1K-base T control register */
270 #define bus_to_phys(a) pci_mem_to_phys((pci_dev_t)dev->priv, a) argument
271 #define phys_to_bus(a) pci_phys_to_mem((pci_dev_t)dev->priv, a) argument
276 return le16_to_cpu(*(vu_short *) (addr + dev->iobase)); in INW()
282 return le32_to_cpu(*(vu_long *) (addr + dev->iobase)); in INL()
288 *(vu_short *) ((addr + dev->iobase)) = cpu_to_le16(command); in OUTW()
294 *(vu_long *) ((addr + dev->iobase)) = cpu_to_le32(command); in OUTL()
332 printf("Error: Can not enable MEM access.\n"); in ns8382x_initialize()
335 printf("Error: Can not enable Bus Mastering.\n"); in ns8382x_initialize()
346 sprintf(dev->name, "dp8382x#%d", card_number); in ns8382x_initialize()
347 dev->iobase = bus_to_phys(iobase); in ns8382x_initialize()
348 dev->priv = (void *) devno; in ns8382x_initialize()
349 dev->init = ns8382x_init; in ns8382x_initialize()
350 dev->halt = ns8382x_disable; in ns8382x_initialize()
351 dev->send = ns8382x_send; in ns8382x_initialize()
352 dev->recv = ns8382x_poll; in ns8382x_initialize()
354 /* ns8382x has a non-standard PM control register in ns8382x_initialize()
366 char *mac = (char *)&dev->enetaddr[i * 2]; in ns8382x_initialize()
404 OUTL(dev, (chip_config | PhyRst), ChipConfig); in ns8382x_initialize()
414 debug("%s: Transceiver 10%s %s duplex.\n", dev->name, in ns8382x_initialize()
418 debug("%s: %02x:%02x:%02x:%02x:%02x:%02x\n", dev->name, in ns8382x_initialize()
419 dev->enetaddr[0], dev->enetaddr[1], in ns8382x_initialize()
420 dev->enetaddr[2], dev->enetaddr[3], in ns8382x_initialize()
421 dev->enetaddr[4], dev->enetaddr[5]); in ns8382x_initialize()
427 * implementations may have PME set to enable WakeOnLan. in ns8382x_initialize()
445 Read and write MII registers using software-generated serial MDIO
449 must flush writes to the PCI bus with a PCI read. */
457 a few older transceivers. */
464 while (--bits >= 0) { in mdio_sync()
479 for (i = 15; i >= 0; i--) { in mdio_read()
487 /* Read the two transition, 16 data, and wire-idle bits. */ in mdio_read()
488 for (i = 19; i > 0; i--) { in mdio_read()
506 for (i = 31; i >= 0; i--) { in mdio_write()
515 for (i = 2; i > 0; i--) { in mdio_write()
541 * implementations may have PME set to enable WakeOnLan. in ns8382x_init()
552 /*turn off 64 bit ops && Ten-bit interface in ns8382x_init()
553 * && big-endian mode && extended status */ in ns8382x_init()
562 debug("%s: Setting TxConfig Register %#08X\n", dev->name, tx_config); in ns8382x_init()
563 debug("%s: Setting RxConfig Register %#08X\n", dev->name, rx_config); in ns8382x_init()
606 OUTW(dev, dev->enetaddr[i] + (dev->enetaddr[i + 1] << 8), in ns8382x_init_rxfilter()
703 debug("%s: Setting 10%s %s-duplex based on negotiated link" in ns8382x_check_duplex()
704 " capability.\n", dev->name, (gig) ? "00" : (hun) ? "0" : "", in ns8382x_check_duplex()
715 debug("%s: Resetting TxConfig Register %#08X\n", dev->name, tx_config); in ns8382x_check_duplex()
716 debug("%s: Resetting RxConfig Register %#08X\n", dev->name, rx_config); in ns8382x_check_duplex()
729 debug("%s: %setting Mode1000\n", dev->name, (gig) ? "S" : "Uns"); in ns8382x_check_duplex()
735 * Description: transmits a packet and waits for completion or timeout.
747 /* set the transmit buffer descriptor and enable Transmit State Machine */ in ns8382x_send()
768 dev->name, tx_stat); in ns8382x_send()
786 * Description: checks for a received packet and returns it if found.
791 * Returns (copies) the packet to the array dev->packet.
805 debug("ns8382x_poll: got a packet: cur_rx:%u, status:%lx\n", in ns8382x_poll()
808 length = (rx_status & DSIZE) - CRC_SIZE; in ns8382x_poll()
829 /* re-enable the potentially idle receive state machine */ in ns8382x_poll()
851 /* Restore PME enable bit */ in ns8382x_disable()