Lines Matching +full:phyrst +full:- +full:a +full:- +full:enable
2 natsemi.c: A U-Boot driver for the NatSemi DP8381x series.
3 Author: Mark A. Rakes (mark_rakes@vivato.net)
14 Adapted from a Linux driver which was written by Donald Becker
21 Written/copyright 1999-2001 by Donald Becker.
27 a complete program and may only be used when the entire operating
48 * Initial U-Boot Release. Tested with Netgear FA311 board
61 #define EEPROM_SIZE 0xb /*12 16-bit chunks, or 24 bytes*/
71 Unlike software-only systems, device drivers interact with complex hardware.
91 /* These are from the spec, around page 78... on a separate table. */
128 PhyRst = 0x00000400, enumerator
248 #define bus_to_phys(a) pci_mem_to_phys((pci_dev_t)dev->priv, a) argument
249 #define phys_to_bus(a) pci_phys_to_mem((pci_dev_t)dev->priv, a) argument
254 return le16_to_cpu(*(vu_short *) (addr + dev->iobase)); in INW()
260 return le32_to_cpu(*(vu_long *) (addr + dev->iobase)); in INL()
266 *(vu_short *) ((addr + dev->iobase)) = cpu_to_le16(command); in OUTW()
272 *(vu_long *) ((addr + dev->iobase)) = cpu_to_le32(command); in OUTL()
314 printf("Error: Can not enable MEM access.\n"); in natsemi_initialize()
317 printf("Error: Can not enable Bus Mastering.\n"); in natsemi_initialize()
328 sprintf(dev->name, "dp83815#%d", card_number); in natsemi_initialize()
329 dev->iobase = bus_to_phys(iobase); in natsemi_initialize()
331 printf("natsemi: NatSemi ns8381[56] @ %#x\n", dev->iobase); in natsemi_initialize()
333 dev->priv = (void *) devno; in natsemi_initialize()
334 dev->init = natsemi_init; in natsemi_initialize()
335 dev->halt = natsemi_disable; in natsemi_initialize()
336 dev->send = natsemi_send; in natsemi_initialize()
337 dev->recv = natsemi_poll; in natsemi_initialize()
348 /* natsemi has a non-standard PM control register in natsemi_initialize()
369 dev->enetaddr[i*2] = (eedata << 1) + (prev_eedata >> 15); in natsemi_initialize()
370 dev->enetaddr[i*2+1] = eedata >> 7; in natsemi_initialize()
381 dev->name, (int) INL(dev, BasicStatus), advertising); in natsemi_initialize()
383 dev->name, chip_config & AnegMask ? "enabled, advertise" : in natsemi_initialize()
390 dev->name, chip_config & AnegMask ? "enabled, advertise" : in natsemi_initialize()
395 OUTL(dev, (chip_config | PhyRst), ChipConfig); in natsemi_initialize()
396 /*un-reset phy*/ in natsemi_initialize()
402 * implementations may have PME set to enable WakeOnLan. in natsemi_initialize()
416 access may need a delay. */
428 /* The EEPROM commands include the alway-set leading bit. */
445 dev->iobase + ee_addr, write_cmd, value);
447 /* Shift the write enable command bits out. */
448 for (i = 9; i >= 0; i--) {
461 for (i = 9; i >= 0; i--) {
505 for (i = 10; i >= 0; i--) { in read_eeprom()
529 dev->iobase + ee_addr, read_cmd, retval); in read_eeprom()
566 * implementations may have PME set to enable WakeOnLan. in natsemi_init()
580 printf("%s: Setting TxConfig Register %#08X\n", dev->name, tx_config); in natsemi_init()
581 printf("%s: Setting RxConfig Register %#08X\n", dev->name, rx_config); in natsemi_init()
639 OUTW(dev, dev->enetaddr[i] + (dev->enetaddr[i + 1] << 8), in natsemi_init_rxfilter()
736 printf("%s: Setting %s-duplex based on negotiated link" in natsemi_check_duplex()
737 " capability.\n", dev->name, duplex ? "full" : "half"); in natsemi_check_duplex()
752 * Description: transmits a packet and waits for completion or timeout.
770 /* set the transmit buffer descriptor and enable Transmit State Machine */ in natsemi_send()
791 dev->name, tx_status); in natsemi_send()
809 * Description: checks for a received packet and returns it if found.
817 * Returns (copies) the packet to the array dev->packet.
832 printf("natsemi_poll: got a packet: cur_rx:%d, status:%X\n", in natsemi_poll()
835 length = (rx_status & DSIZE) - CRC_SIZE; in natsemi_poll()
855 /* re-enable the potentially idle receive state machine */ in natsemi_poll()
880 /* Restore PME enable bit */ in natsemi_disable()