16 #define MYSON_BAR_SIZE 256 31 #define MYSON_TX_STAT_OWN 0x80000000UL 32 #define MYSON_TX_STAT_ABORT 0x00002000UL 33 #define MYSON_TX_STAT_CSL 0x00001000UL 36 #define MYSON_TX_CTRL_IC 0x80000000UL 37 #define MYSON_TX_CTRL_LD 0x20000000UL 38 #define MYSON_TX_CTRL_FD 0x10000000UL 39 #define MYSON_TX_CTRL_CRC 0x08000000UL 40 #define MYSON_TX_CTRL_PAD 0x04000000UL 41 #define MYSON_TX_CTRL_RTLC 0x02000000UL 42 #define MYSON_TX_CTRL_PKTS(x) ( (x) << 11 ) 43 #define MYSON_TX_CTRL_TBS(x) ( (x) << 0 ) 46 #define MYSON_RX_STAT_OWN 0x80000000UL 47 #define MYSON_RX_STAT_FLNG(status) ( ( (status) >> 16 ) & 0xfff ) 48 #define MYSON_RX_STAT_ES 0x00000080UL 51 #define MYSON_RX_CTRL_RBS(x) ( (x) << 0 ) 54 #define MYSON_RING_ALIGN 4 57 #define MYSON_PAR0 0x00 60 #define MYSON_PAR4 0x04 72 #define MYSON_TCR_RCR 0x18 73 #define MYSON_TCR_TXS 0x80000000UL 74 #define MYSON_TCR_TE 0x00040000UL 75 #define MYSON_RCR_RXS 0x00008000UL 76 #define MYSON_RCR_PROM 0x00000080UL 77 #define MYSON_RCR_AB 0x00000040UL 78 #define MYSON_RCR_AM 0x00000020UL 79 #define MYSON_RCR_ARP 0x00000008UL 80 #define MYSON_RCR_ALP 0x00000004UL 81 #define MYSON_RCR_RE 0x00000001UL 84 #define MYSON_IDLE_MAX_WAIT_MS 100 87 #define MYSON_BCR 0x1c 88 #define MYSON_BCR_RLE 0x00000100UL 89 #define MYSON_BCR_RME 0x00000080UL 90 #define MYSON_BCR_WIE 0x00000040UL 91 #define MYSON_BCR_PBL(x) ( (x) << 3 ) 92 #define MYSON_BCR_PBL_MASK MYSON_BCR_PBL ( 0x7 ) 93 #define MYSON_BCR_PBL_DEFAULT MYSON_BCR_PBL ( 0x6 ) 94 #define MYSON_BCR_SWR 0x00000001UL 97 #define MYSON_RESET_MAX_WAIT_MS 100 100 #define MYSON_TXPDR 0x20 103 #define MYSON_RXPDR 0x24 106 #define MYSON_TXLBA 0x2c 109 #define MYSON_NUM_TX_DESC 4 112 #define MYSON_RXLBA 0x30 115 #define MYSON_NUM_RX_DESC 4 118 #define MYSON_RX_MAX_LEN ( ETH_FRAME_LEN + 4 + 4 ) 121 #define MYSON_ISR 0x34 122 #define MYSON_IRQ_TI 0x00000008UL 123 #define MYSON_IRQ_RI 0x00000004UL 126 #define MYSON_ISR_IODELAY_COUNT 4 129 #define MYSON_IMR 0x38 132 #define MYSON_ROM_MII 0x40 133 #define MYSON_ROM_AUTOLD 0x00100000UL 136 #define MYSON_AUTOLD_MAX_WAIT_MS 100 194 if ( (
address & ~0xffffffffULL ) == 0 )
static unsigned int unsigned int reg
struct myson_descriptor * desc
Descriptors.
struct io_buffer * rx_iobuf[MYSON_NUM_RX_DESC]
Receive I/O buffers.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
unsigned int reg
Descriptor start address register.
struct myson_ring rx
Receive descriptor ring.
unsigned int prod
Producer index.
struct myson_ring tx
Transmit descriptor ring.
unsigned int cons
Consumer index.
#define MYSON_NUM_RX_DESC
Number of receive descriptors.
uint32_t address
Buffer start address.
unsigned int count
Number of descriptors.
static unsigned int count
struct myson_physical_address::@83 __attribute__((packed)) reg
union myson_physical_address __attribute__
uint32_t address
Buffer start address.
uint32_t next
Next descriptor address.