|
iPXE
|
RDC R6040 network driver. More...
Go to the source code of this file.
Data Structures | |
| struct | rdc_descriptor |
| An RDC descriptor. More... | |
| union | rdc_mac |
| A MAC address. More... | |
| struct | rdc_ring |
| A descriptor ring. More... | |
| struct | rdc_nic |
| An RDC network card. More... | |
Macros | |
| #define | RDC_BAR_SIZE 256 |
| RDC BAR size. More... | |
| #define | RDC_FL_OWNED 0x8000 |
| Descriptor is owned by NIC. More... | |
| #define | RDC_FL_OK 0x4000 |
| Packet OK. More... | |
| #define | RDC_MCR0 0x00 |
| MAC control register 0. More... | |
| #define | RDC_MCR0_FD 0x8000 |
| Full duplex. More... | |
| #define | RDC_MCR0_TXEN 0x1000 |
| Transmit enable. More... | |
| #define | RDC_MCR0_PROMISC 0x0020 |
| Promiscuous mode. More... | |
| #define | RDC_MCR0_RXEN 0x0002 |
| Receive enable. More... | |
| #define | RDC_MCR1 0x04 |
| MAC control register 1. More... | |
| #define | RDC_MCR1_RST 0x0001 |
| MAC reset. More... | |
| #define | RDC_RESET_MAX_WAIT_MS 10 |
| Maximum time to wait for reset. More... | |
| #define | RDC_MTPR 0x14 |
| MAC transmit poll command register. More... | |
| #define | RDC_MTPR_TM2TX 0x0001 |
| Trigger MAC to transmit. More... | |
| #define | RDC_MRBSR 0x18 |
| MAC receive buffer size register. More... | |
| #define | RDC_MMDIO 0x20 |
| MAC MDIO control register. More... | |
| #define | RDC_MMDIO_MIIWR 0x4000 |
| MDIO write. More... | |
| #define | RDC_MMDIO_MIIRD 0x2000 |
| MDIO read. More... | |
| #define | RDC_MMDIO_PHYAD(x) ( (x) << 8 ) |
| PHY address. More... | |
| #define | RDC_MMDIO_REGAD(x) ( (x) << 0 ) |
| Register address. More... | |
| #define | RDC_MII_MAX_WAIT_US 2048 |
| Maximum time to wait for an MII read or write. More... | |
| #define | RDC_MMRD 0x24 |
| MAC MDIO read data register. More... | |
| #define | RDC_MMWD 0x28 |
| MAC MDIO write data register. More... | |
| #define | RDC_MTDSA 0x2c |
| MAC transmit descriptor start address. More... | |
| #define | RDC_MRDSA 0x34 |
| MAC receive descriptor start address. More... | |
| #define | RDC_MxDSA_LO 0x0 |
| MAC descriptor start address low half. More... | |
| #define | RDC_MxDSA_HI 0x4 |
| MAC descriptor start address low half. More... | |
| #define | RDC_MISR 0x3c |
| MAC interrupt status register. More... | |
| #define | RDC_MIRQ_LINK 0x0200 |
| Link status changed. More... | |
| #define | RDC_MIRQ_TX 0x0010 |
| Transmit complete. More... | |
| #define | RDC_MIRQ_RX_EARLY 0x0008 |
| Receive early interrupt. More... | |
| #define | RDC_MIRQ_RX_EMPTY 0x0002 |
| Receive descriptor unavailable. More... | |
| #define | RDC_MIRQ_RX 0x0001 |
| Receive complete. More... | |
| #define | RDC_MIER 0x40 |
| MAC interrupt enable register. More... | |
| #define | RDC_MID0 0x68 |
| MAC address word 0. More... | |
| #define | RDC_MID1 0x6a |
| MAC address word 1. More... | |
| #define | RDC_MID2 0x6c |
| MAC address word 2. More... | |
| #define | RDC_MPSCCR 0x88 |
| MAC PHY status change configuration register. More... | |
| #define | RDC_MPSCCR_EN 0x8000 |
| PHY status change enable. More... | |
| #define | RDC_MPSCCR_PHYAD(x) ( (x) << 8 ) |
| PHY address. More... | |
| #define | RDC_MPSCCR_SLOW 0x0007 |
| Poll slowly. More... | |
| #define | RDC_MACSM 0xac |
| MAC state machine register. More... | |
| #define | RDC_MACSM_RST 0x0002 |
| Reset state machine. More... | |
| #define | RDC_MACSM_RESET_DELAY_MS 10 |
| Time to wait after resetting MAC state machine. More... | |
| #define | RDC_NUM_TX_DESC 16 |
| Number of transmit descriptors. More... | |
| #define | RDC_NUM_RX_DESC 8 |
| Number of receive descriptors. More... | |
| #define | RDC_RX_MAX_LEN ( ETH_FRAME_LEN + 4 /* VLAN */ + 4 /* CRC */ ) |
| Receive buffer length. More... | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| static void | rdc_init_ring (struct rdc_ring *ring, unsigned int count, unsigned int reg) |
| Initialise descriptor ring. More... | |
RDC R6040 network driver.
Definition in file rdc.h.
| #define RDC_RESET_MAX_WAIT_MS 10 |
| #define RDC_MII_MAX_WAIT_US 2048 |
| #define RDC_MxDSA_LO 0x0 |
| #define RDC_MxDSA_HI 0x4 |
| #define RDC_MIRQ_RX_EMPTY 0x0002 |
| #define RDC_MPSCCR 0x88 |
| #define RDC_MACSM_RESET_DELAY_MS 10 |
| #define RDC_NUM_TX_DESC 16 |
| #define RDC_NUM_RX_DESC 8 |
| #define RDC_RX_MAX_LEN ( ETH_FRAME_LEN + 4 /* VLAN */ + 4 /* CRC */ ) |
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
inlinestatic |
Initialise descriptor ring.
| ring | Descriptor ring |
| count | Number of descriptors |
| reg | Start address register 0 |
Definition at line 154 of file rdc.h.
References rdc_ring::count, count, rdc_ring::reg, and reg.
Referenced by rdc_probe().
1.8.15