Go to the documentation of this file.
10 #include <linux/if_ether.h>
30 #ifdef CONFIG_NET_POLL_CONTROLLER
49 static inline struct net_device *alloc_ei_netdev(
void)
67 static inline struct net_device *alloc_eip_netdev(
void)
102 #ifdef AX88796_PLATFORM
103 unsigned char rxcr_base;
108 #define MAX_SERVICE 12
111 #define TX_TIMEOUT (20*HZ/100)
113 #define ei_status (*(struct ei_device *)netdev_priv(dev))
116 #define E8390_TX_IRQ_MASK 0xa
117 #define E8390_RX_IRQ_MASK 0x5
119 #ifdef AX88796_PLATFORM
120 #define E8390_RXCONFIG (ei_status.rxcr_base | 0x04)
121 #define E8390_RXOFF (ei_status.rxcr_base | 0x20)
123 #define E8390_RXCONFIG 0x4
124 #define E8390_RXOFF 0x20
127 #define E8390_TXCONFIG 0x00
128 #define E8390_TXOFF 0x02
132 #define E8390_STOP 0x01
133 #define E8390_START 0x02
134 #define E8390_TRANS 0x04
135 #define E8390_RREAD 0x08
136 #define E8390_RWRITE 0x10
137 #define E8390_NODMA 0x20
138 #define E8390_PAGE0 0x00
139 #define E8390_PAGE1 0x40
140 #define E8390_PAGE2 0x80
149 #define ei_inb(_p) inb(_p)
150 #define ei_outb(_v,_p) outb(_v,_p)
151 #define ei_inb_p(_p) inb(_p)
152 #define ei_outb_p(_v,_p) outb(_v,_p)
156 #define EI_SHIFT(x) (x)
159 #define E8390_CMD EI_SHIFT(0x00)
161 #define EN0_CLDALO EI_SHIFT(0x01)
162 #define EN0_STARTPG EI_SHIFT(0x01)
163 #define EN0_CLDAHI EI_SHIFT(0x02)
164 #define EN0_STOPPG EI_SHIFT(0x02)
165 #define EN0_BOUNDARY EI_SHIFT(0x03)
166 #define EN0_TSR EI_SHIFT(0x04)
167 #define EN0_TPSR EI_SHIFT(0x04)
168 #define EN0_NCR EI_SHIFT(0x05)
169 #define EN0_TCNTLO EI_SHIFT(0x05)
170 #define EN0_FIFO EI_SHIFT(0x06)
171 #define EN0_TCNTHI EI_SHIFT(0x06)
172 #define EN0_ISR EI_SHIFT(0x07)
173 #define EN0_CRDALO EI_SHIFT(0x08)
174 #define EN0_RSARLO EI_SHIFT(0x08)
175 #define EN0_CRDAHI EI_SHIFT(0x09)
176 #define EN0_RSARHI EI_SHIFT(0x09)
177 #define EN0_RCNTLO EI_SHIFT(0x0a)
178 #define EN0_RCNTHI EI_SHIFT(0x0b)
179 #define EN0_RSR EI_SHIFT(0x0c)
180 #define EN0_RXCR EI_SHIFT(0x0c)
181 #define EN0_TXCR EI_SHIFT(0x0d)
182 #define EN0_COUNTER0 EI_SHIFT(0x0d)
183 #define EN0_DCFG EI_SHIFT(0x0e)
184 #define EN0_COUNTER1 EI_SHIFT(0x0e)
185 #define EN0_IMR EI_SHIFT(0x0f)
186 #define EN0_COUNTER2 EI_SHIFT(0x0f)
189 #define ENISR_RX 0x01
190 #define ENISR_TX 0x02
191 #define ENISR_RX_ERR 0x04
192 #define ENISR_TX_ERR 0x08
193 #define ENISR_OVER 0x10
194 #define ENISR_COUNTERS 0x20
195 #define ENISR_RDC 0x40
196 #define ENISR_RESET 0x80
197 #define ENISR_ALL 0x3f
200 #define ENDCFG_WTS 0x01
201 #define ENDCFG_BOS 0x02
204 #define EN1_PHYS EI_SHIFT(0x01)
205 #define EN1_PHYS_SHIFT(i) EI_SHIFT(i+1)
206 #define EN1_CURPAG EI_SHIFT(0x07)
207 #define EN1_MULT EI_SHIFT(0x08)
208 #define EN1_MULT_SHIFT(i) EI_SHIFT(8+i)
211 #define ENRSR_RXOK 0x01
212 #define ENRSR_CRC 0x02
213 #define ENRSR_FAE 0x04
214 #define ENRSR_FO 0x08
215 #define ENRSR_MPA 0x10
216 #define ENRSR_PHY 0x20
217 #define ENRSR_DIS 0x40
218 #define ENRSR_DEF 0x80
221 #define ENTSR_PTX 0x01
222 #define ENTSR_ND 0x02
223 #define ENTSR_COL 0x04
224 #define ENTSR_ABT 0x08
225 #define ENTSR_CRS 0x10
226 #define ENTSR_FU 0x20
227 #define ENTSR_CDH 0x40
228 #define ENTSR_OWC 0x80