1 /* mostly stolen from FreeBSD if_de.c, if_devar.h */
3 #define TULIP_CSR_READ(csr) (membase[csr*2])
4 #define CSR_READ(csr) (membase[csr*2])
5 #define TULIP_CSR_WRITE(csr, val) (membase[csr*2] = val)
6 #define CSR_WRITE(csr, val) (membase[csr*2] = val)
25 #define csr_busmode csr_0
26 #define csr_txpoll csr_1
27 #define csr_rxpoll csr_2
28 #define csr_rxlist csr_3
29 #define csr_txlist csr_4
30 #define csr_status csr_5
31 #define csr_command csr_6
32 #define csr_intr csr_7
33 #define csr_missed_frames csr_8
34 #define csr_enetrom csr_9 /* 21040 */
35 #define csr_reserved csr_10 /* 21040 */
36 #define csr_full_duplex csr_11 /* 21040 */
37 #define csr_bootrom csr_10 /* 21041/21140A/?? */
38 #define csr_gp csr_12 /* 21140* */
39 #define csr_watchdog csr_15 /* 21140* */
40 #define csr_gp_timer csr_11 /* 21041/21140* */
41 #define csr_srom_mii csr_9 /* 21041/21140* */
42 #define csr_sia_status csr_12 /* 2104x */
43 #define csr_sia_connectivity csr_13 /* 2104x */
44 #define csr_sia_tx_rx csr_14 /* 2104x */
45 #define csr_sia_general csr_15 /* 2104x */
47 #define SROMSEL 0x0800
49 #define SROMCLKON 0x0002
50 #define SROMCLKOFF 0x0002
53 #define SROM_BITWIDTH 6
55 #define SROMCSON 0x0001
56 #define SROMDOUT 0x0004
57 #define SROMDIN 0x0008
61 unsigned long status
; /* owner, status */
62 unsigned long buf1sz
:11, /* size of buffer 1 */
63 buf2sz
:11, /* size of buffer 2 */
64 control
:10; /* control bits */
65 const unsigned char *buf1addr
; /* buffer 1 address */
66 const unsigned char *buf2addr
; /* buffer 2 address */
70 unsigned long status
; /* owner, status */
71 unsigned long buf1sz
:11, /* size of buffer 1 */
72 buf2sz
:11, /* size of buffer 2 */
73 control
:10; /* control bits */
74 unsigned char *buf1addr
; /* buffer 1 address */
75 unsigned char *buf2addr
; /* buffer 2 address */