16#define ICP_BAR_SIZE 0x200
22#define ICP_BASE_LO 0x0
25#define ICP_BASE_HI 0x4
28#define ICP_ASICCTRL 0x30
29#define ICP_ASICCTRL_PHYSPEED1000 0x00000040UL
30#define ICP_ASICCTRL_GLOBALRESET 0x00010000UL
31#define ICP_ASICCTRL_DMA 0x00080000UL
32#define ICP_ASICCTRL_FIFO 0x00100000UL
33#define ICP_ASICCTRL_NETWORK 0x00200000UL
34#define ICP_ASICCTRL_HOST 0x00400000UL
35#define ICP_ASICCTRL_AUTOINIT 0x00800000UL
36#define ICP_ASICCTRL_RESETBUSY 0x04000000UL
39#define ICP_RESET_MAX_WAIT_MS 1000
42#define ICP_DMACTRL 0x00
43#define ICP_DMACTRL_RXPOLLNOW 0x0010
44#define ICP_DMACTRL_TXPOLLNOW 0x1000
47#define ICP_EEPROMCTRL 0x4a
48#define ICP_EEPROMCTRL_ADDRESS( x ) ( (x) << 0 )
49#define ICP_EEPROMCTRL_OPCODE( x ) ( (x) << 8 )
50#define ICP_EEPROMCTRL_OPCODE_READ \
51 ICP_EEPROMCTRL_OPCODE ( 2 )
52#define ICP_EEPROMCTRL_BUSY 0x8000
55#define ICP_EEPROM_MAX_WAIT_MS 1000
58#define ICP_EEPROM_WORD_LEN_LOG2 1
61#define ICP_EEPROM_MIN_SIZE_WORDS 0x20
64#define ICP_EEPROM_MAC 0x10
67#define ICP_EEPROMDATA 0x48
70#define ICP_INTSTATUS 0x5e
71#define ICP_INTSTATUS_TXCOMPLETE 0x0004
72#define ICP_INTSTATUS_LINKEVENT 0x0100
73#define ICP_INTSTATUS_RXDMACOMPLETE 0x0400
76#define ICP_MACCTRL 0x6c
77#define ICP_MACCTRL_DUPLEX 0x00000020UL
78#define ICP_MACCTRL_TXENABLE 0x01000000UL
79#define ICP_MACCTRL_TXDISABLE 0x02000000UL
80#define ICP_MACCTRL_RXENABLE 0x08000000UL
81#define ICP_MACCTRL_RXDISABLE 0x10000000UL
84#define ICP_PHYCTRL 0x76
85#define ICP_PHYCTRL_MGMTCLK 0x01
86#define ICP_PHYCTRL_MGMTDATA 0x02
87#define ICP_PHYCTRL_MGMTDIR 0x04
88#define ICP_PHYCTRL_LINKSPEED 0xc0
91#define ICP_RXMODE 0x88
92#define ICP_RXMODE_UNICAST 0x0001
93#define ICP_RXMODE_MULTICAST 0x0002
94#define ICP_RXMODE_BROADCAST 0x0004
95#define ICP_RXMODE_ALLFRAMES 0x0008
98#define ICP_RFDLISTPTR 0x1c
101#define ICP_TFDLISTPTR 0x10
104#define ICP_TXSTATUS 0x60
105#define ICP_TXSTATUS_ERROR 0x00000001UL
144#define ICP_TX_UNALIGN 0x01
147#define ICP_TX_INDICATE 0x40
150#define ICP_TX_SOLE_FRAG 0x01
153#define ICP_RX_ERR_OVERRUN 0x01
156#define ICP_RX_ERR_RUNT 0x02
159#define ICP_RX_ERR_ALIGN 0x04
162#define ICP_RX_ERR_FCS 0x08
165#define ICP_RX_ERR_OVERSIZED 0x10
168#define ICP_RX_ERR_LEN 0x20
183#define ICP_NUM_DESC 4
186#define ICP_RX_MAX_LEN ETH_FRAME_LEN
unsigned long long uint64_t
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define ICP_NUM_DESC
Number of descriptors.
MII bit-bashing interface.
Transmit or receive descriptor.
union icplus_fragment data
Data buffer.
uint16_t reserved_a
Reserved.
uint64_t next
Address of next descriptor.
uint16_t len
Actual length.
uint8_t reserved_b[8]
Reserved.
struct icplus_ring tx
Transmit descriptor ring.
struct icplus_ring rx
Receive descriptor ring.
struct mii_bit_basher miibit
MII bit bashing interface.
struct io_buffer * rx_iobuf[ICP_NUM_DESC]
Receive I/O buffers.
struct mii_device mii
MII device.
struct nvs_device eeprom
EEPROM.
struct icplus_descriptor * entry
Ring entries.
unsigned int cons
Consumer counter.
unsigned int prod
Producer counter.
A bit-bashing MII interface.
A non-volatile storage device.
uint64_t address
Address of data.
uint8_t reserved[6]
Reserved.
uint16_t len
Length of data.