Home | History | Annotate | Line # | Download | only in ic
dc21040reg.h revision 1.8
      1  1.8  thorpej /*	$NetBSD: dc21040reg.h,v 1.8 1997/01/11 04:47:31 thorpej Exp $	*/
      2  1.2      cgd 
      3  1.1      cgd /*-
      4  1.8  thorpej  * Copyright (c) 1994, 1995, 1996 Matt Thomas <matt (at) 3am-software.com>
      5  1.1      cgd  * All rights reserved.
      6  1.1      cgd  *
      7  1.1      cgd  * Redistribution and use in source and binary forms, with or without
      8  1.1      cgd  * modification, are permitted provided that the following conditions
      9  1.1      cgd  * are met:
     10  1.1      cgd  * 1. Redistributions of source code must retain the above copyright
     11  1.1      cgd  *    notice, this list of conditions and the following disclaimer.
     12  1.1      cgd  * 2. The name of the author may not be used to endorse or promote products
     13  1.1      cgd  *    derived from this software withough specific prior written permission
     14  1.1      cgd  *
     15  1.1      cgd  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     16  1.1      cgd  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     17  1.1      cgd  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     18  1.1      cgd  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     19  1.1      cgd  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     20  1.1      cgd  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     21  1.1      cgd  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     22  1.1      cgd  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     23  1.1      cgd  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     24  1.1      cgd  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     25  1.8  thorpej  *
     26  1.8  thorpej  * Id: dc21040.h,v 1.21 1996/09/13 19:41:03 thomas Exp
     27  1.1      cgd  */
     28  1.1      cgd 
     29  1.1      cgd #if !defined(_DC21040_H)
     30  1.1      cgd #define _DC21040_H
     31  1.1      cgd 
     32  1.1      cgd #if defined(BYTE_ORDER) && BYTE_ORDER == BIG_ENDIAN
     33  1.1      cgd #define	TULIP_BITFIELD2(a, b)		      b, a
     34  1.1      cgd #define	TULIP_BITFIELD3(a, b, c)	   c, b, a
     35  1.1      cgd #define	TULIP_BITFIELD4(a, b, c, d)	d, c, b, a
     36  1.1      cgd #else
     37  1.1      cgd #define	TULIP_BITFIELD2(a, b)		a, b
     38  1.1      cgd #define	TULIP_BITFIELD3(a, b, c)	a, b, c
     39  1.1      cgd #define	TULIP_BITFIELD4(a, b, c, d)	a, b, c, d
     40  1.1      cgd #endif
     41  1.1      cgd 
     42  1.1      cgd typedef struct {
     43  1.8  thorpej     u_int32_t d_status;
     44  1.8  thorpej     u_int32_t TULIP_BITFIELD3(d_length1 : 11,
     45  1.8  thorpej 			      d_length2 : 11,
     46  1.8  thorpej 			      d_flag : 10);
     47  1.8  thorpej     u_int32_t d_addr1;
     48  1.8  thorpej     u_int32_t d_addr2;
     49  1.1      cgd } tulip_desc_t;
     50  1.1      cgd 
     51  1.8  thorpej #define	TULIP_DSTS_OWNER	0x80000000	/* Owner (1 = 21040) */
     52  1.1      cgd #define	TULIP_DSTS_ERRSUM	0x00008000	/* Error Summary */
     53  1.1      cgd /*
     54  1.1      cgd  * Transmit Status
     55  1.1      cgd  */
     56  1.1      cgd #define	TULIP_DSTS_TxBABBLE	0x00004000	/* Transmitter Babbled */
     57  1.1      cgd #define	TULIP_DSTS_TxCARRLOSS	0x00000800	/* Carrier Loss */
     58  1.1      cgd #define	TULIP_DSTS_TxNOCARR	0x00000400	/* No Carrier */
     59  1.1      cgd #define	TULIP_DSTS_TxLATECOLL	0x00000200	/* Late Collision */
     60  1.1      cgd #define	TULIP_DSTS_TxEXCCOLL	0x00000100	/* Excessive Collisions */
     61  1.1      cgd #define	TULIP_DSTS_TxNOHRTBT	0x00000080	/* No Heartbeat */
     62  1.1      cgd #define	TULIP_DSTS_TxCOLLMASK	0x00000078	/* Collision Count (mask) */
     63  1.1      cgd #define	TULIP_DSTS_V_TxCOLLCNT	0x00000003	/* Collision Count (bit) */
     64  1.1      cgd #define	TULIP_DSTS_TxLINKFAIL	0x00000004	/* Link Failure */
     65  1.1      cgd #define	TULIP_DSTS_TxUNDERFLOW	0x00000002	/* Underflow Error */
     66  1.1      cgd #define	TULIP_DSTS_TxDEFERRED	0x00000001	/* Initially Deferred */
     67  1.1      cgd /*
     68  1.1      cgd  * Receive Status
     69  1.1      cgd  */
     70  1.1      cgd #define	TULIP_DSTS_RxBADLENGTH	0x00004000	/* Length Error */
     71  1.1      cgd #define	TULIP_DSTS_RxDATATYPE	0x00003000	/* Data Type */
     72  1.1      cgd #define	TULIP_DSTS_RxRUNT	0x00000800	/* Runt Frame */
     73  1.1      cgd #define	TULIP_DSTS_RxMULTICAST	0x00000400	/* Multicast Frame */
     74  1.1      cgd #define	TULIP_DSTS_RxFIRSTDESC	0x00000200	/* First Descriptor */
     75  1.1      cgd #define	TULIP_DSTS_RxLASTDESC	0x00000100	/* Last Descriptor */
     76  1.1      cgd #define	TULIP_DSTS_RxTOOLONG	0x00000080	/* Frame Too Long */
     77  1.1      cgd #define	TULIP_DSTS_RxCOLLSEEN	0x00000040	/* Collision Seen */
     78  1.1      cgd #define	TULIP_DSTS_RxFRAMETYPE	0x00000020	/* Frame Type */
     79  1.1      cgd #define	TULIP_DSTS_RxWATCHDOG	0x00000010	/* Receive Watchdog */
     80  1.1      cgd #define	TULIP_DSTS_RxDRBBLBIT	0x00000004	/* Dribble Bit */
     81  1.1      cgd #define	TULIP_DSTS_RxBADCRC	0x00000002	/* CRC Error */
     82  1.1      cgd #define	TULIP_DSTS_RxOVERFLOW	0x00000001	/* Overflow */
     83  1.1      cgd 
     84  1.1      cgd 
     85  1.1      cgd #define	TULIP_DFLAG_ENDRING	0x0008		/* End of Transmit Ring */
     86  1.1      cgd #define	TULIP_DFLAG_CHAIN	0x0004		/* Chain using d_addr2 */
     87  1.1      cgd 
     88  1.1      cgd #define	TULIP_DFLAG_TxWANTINTR	0x0200		/* Signal Interrupt on Completion */
     89  1.1      cgd #define	TULIP_DFLAG_TxLASTSEG	0x0100		/* Last Segment */
     90  1.1      cgd #define	TULIP_DFLAG_TxFIRSTSEG	0x0080		/* First Segment */
     91  1.1      cgd #define	TULIP_DFLAG_TxINVRSFILT	0x0040		/* Inverse Filtering */
     92  1.1      cgd #define	TULIP_DFLAG_TxSETUPPKT	0x0020		/* Setup Packet */
     93  1.1      cgd #define	TULIP_DFLAG_TxHASCRC	0x0010		/* Don't Append the CRC */
     94  1.1      cgd #define	TULIP_DFLAG_TxNOPADDING	0x0002		/* Don't AutoPad */
     95  1.1      cgd #define	TULIP_DFLAG_TxHASHFILT	0x0001		/* Hash/Perfect Filtering */
     96  1.1      cgd 
     97  1.1      cgd /*
     98  1.8  thorpej  * The 21040 Registers (IO Space Addresses)
     99  1.1      cgd  */
    100  1.1      cgd #define	TULIP_REG_BUSMODE	0x00	/* CSR0  -- Bus Mode */
    101  1.1      cgd #define	TULIP_REG_TXPOLL	0x08	/* CSR1  -- Transmit Poll Demand */
    102  1.1      cgd #define	TULIP_REG_RXPOLL	0x10	/* CSR2  -- Receive Poll Demand */
    103  1.1      cgd #define	TULIP_REG_RXLIST	0x18	/* CSR3  -- Receive List Base Addr */
    104  1.1      cgd #define	TULIP_REG_TXLIST	0x20	/* CSR4  -- Transmit List Base Addr */
    105  1.1      cgd #define	TULIP_REG_STATUS	0x28	/* CSR5  -- Status */
    106  1.1      cgd #define	TULIP_REG_CMD		0x30	/* CSR6  -- Command */
    107  1.1      cgd #define	TULIP_REG_INTR		0x38	/* CSR7  -- Interrupt Control */
    108  1.1      cgd #define	TULIP_REG_MISSES	0x40	/* CSR8  -- Missed Frame Counter */
    109  1.1      cgd #define	TULIP_REG_ADDRROM	0x48	/* CSR9  -- ENET ROM Register */
    110  1.1      cgd #define	TULIP_REG_RSRVD		0x50	/* CSR10 -- Reserved */
    111  1.1      cgd #define	TULIP_REG_FULL_DUPLEX	0x58	/* CSR11 -- Full Duplex */
    112  1.1      cgd #define	TULIP_REG_SIA_STATUS	0x60	/* CSR12 -- SIA Status */
    113  1.1      cgd #define	TULIP_REG_SIA_CONN	0x68	/* CSR13 -- SIA Connectivity */
    114  1.1      cgd #define	TULIP_REG_SIA_TXRX	0x70	/* CSR14 -- SIA Tx Rx */
    115  1.1      cgd #define	TULIP_REG_SIA_GEN	0x78	/* CSR15 -- SIA General */
    116  1.1      cgd 
    117  1.1      cgd /*
    118  1.1      cgd  * CSR5 -- Status Register
    119  1.1      cgd  * CSR7 -- Interrupt Control
    120  1.1      cgd  */
    121  1.1      cgd #define	TULIP_STS_ERRORMASK	0x03800000L		/* ( R)  Error Bits (Valid when SYSERROR is set) */
    122  1.1      cgd #define	TULIP_STS_ERR_PARITY	0x00000000L		/*        000 - Parity Error (Perform Reset) */
    123  1.1      cgd #define	TULIP_STS_ERR_MASTER	0x00800000L		/*        001 - Master Abort */
    124  1.1      cgd #define	TULIP_STS_ERR_TARGET	0x01000000L		/*        010 - Target Abort */
    125  1.8  thorpej #define	TULIP_STS_ERR_SHIFT	23
    126  1.1      cgd #define	TULIP_STS_TXSTATEMASK	0x00700000L		/* ( R)  Transmission Process State */
    127  1.1      cgd #define	TULIP_STS_TXS_RESET	0x00000000L		/*        000 - Rset or transmit jabber expired */
    128  1.1      cgd #define	TULIP_STS_TXS_FETCH	0x00100000L		/*        001 - Fetching transmit descriptor */
    129  1.1      cgd #define	TULIP_STS_TXS_WAITEND	0x00200000L		/*        010 - Wait for end of transmission */
    130  1.1      cgd #define	TULIP_STS_TXS_READING	0x00300000L		/*        011 - Read buffer and enqueue data */
    131  1.1      cgd #define	TULIP_STS_TXS_RSRVD	0x00400000L		/*        100 - Reserved */
    132  1.1      cgd #define	TULIP_STS_TXS_SETUP	0x00500000L		/*        101 - Setup Packet */
    133  1.1      cgd #define	TULIP_STS_TXS_SUSPEND	0x00600000L		/*        110 - Transmit FIFO underflow or an
    134  1.1      cgd 								  unavailable transmit descriptor */
    135  1.1      cgd #define	TULIP_STS_TXS_CLOSE	0x00700000L		/*        111 - Close transmit descriptor */
    136  1.1      cgd #define	TULIP_STS_RXSTATEMASK	0x000E0000L		/* ( R)  Receive Process State*/
    137  1.1      cgd #define	TULIP_STS_RXS_STOPPED	0x00000000L		/*        000 - Stopped */
    138  1.1      cgd #define	TULIP_STS_RXS_FETCH	0x00020000L		/*        001 - Running -- Fetch receive descriptor */
    139  1.1      cgd #define	TULIP_STS_RXS_ENDCHECK	0x00040000L		/*        010 - Running -- Check for end of receive
    140  1.1      cgd 								  packet before prefetch of next descriptor */
    141  1.1      cgd #define	TULIP_STS_RXS_WAIT	0x00060000L		/*        011 - Running -- Wait for receive packet */
    142  1.1      cgd #define	TULIP_STS_RXS_SUSPEND	0x00080000L		/*        100 - Suspended -- As a result of
    143  1.1      cgd 								  unavailable receive buffers */
    144  1.1      cgd #define	TULIP_STS_RXS_CLOSE	0x000A0000L		/*        101 - Running -- Close receive descriptor */
    145  1.1      cgd #define	TULIP_STS_RXS_FLUSH	0x000C0000L		/*        110 - Running -- Flush the current frame
    146  1.1      cgd 								  from the receive FIFO as a result of
    147  1.1      cgd 								  an unavailable receive buffer */
    148  1.1      cgd #define	TULIP_STS_RXS_DEQUEUE	0x000E0000L		/*        111 - Running -- Dequeue the receive frame
    149  1.1      cgd 								  from the receive FIFO into the receive
    150  1.1      cgd 								  buffer. */
    151  1.1      cgd #define	TULIP_STS_NORMALINTR	0x00010000L		/* (RW)  Normal Interrupt */
    152  1.1      cgd #define	TULIP_STS_ABNRMLINTR	0x00008000L		/* (RW)  Abnormal Interrupt */
    153  1.1      cgd #define	TULIP_STS_SYSERROR	0x00002000L		/* (RW)  System Error */
    154  1.8  thorpej #define	TULIP_STS_LINKFAIL	0x00001000L		/* (RW)  Link Failure (21040) */
    155  1.8  thorpej #define	TULIP_STS_FULDPLXSHRT	0x00000800L		/* (RW)  Full Duplex Short Fram Rcvd (21040) */
    156  1.8  thorpej #define	TULIP_STS_GPTIMEOUT	0x00000800L		/* (RW)  General Purpose Timeout (21140) */
    157  1.8  thorpej #define	TULIP_STS_AUI		0x00000400L		/* (RW)  AUI/TP Switch (21040) */
    158  1.1      cgd #define	TULIP_STS_RXTIMEOUT	0x00000200L		/* (RW)  Receive Watchbog Timeout */
    159  1.1      cgd #define	TULIP_STS_RXSTOPPED	0x00000100L		/* (RW)  Receive Process Stopped */
    160  1.1      cgd #define	TULIP_STS_RXNOBUF	0x00000080L		/* (RW)  Receive Buffer Unavailable */
    161  1.1      cgd #define	TULIP_STS_RXINTR	0x00000040L		/* (RW)  Receive Interrupt */
    162  1.1      cgd #define	TULIP_STS_TXUNDERFLOW	0x00000020L		/* (RW)  Transmit Underflow */
    163  1.8  thorpej #define	TULIP_STS_LINKPASS	0x00000010L		/* (RW)  LinkPass (21041) */
    164  1.1      cgd #define	TULIP_STS_TXBABBLE	0x00000008L		/* (RW)  Transmit Jabber Timeout */
    165  1.1      cgd #define	TULIP_STS_TXNOBUF	0x00000004L		/* (RW)  Transmit Buffer Unavailable */
    166  1.1      cgd #define	TULIP_STS_TXSTOPPED	0x00000002L		/* (RW)  Transmit Process Stopped */
    167  1.1      cgd #define	TULIP_STS_TXINTR	0x00000001L		/* (RW)  Transmit Interrupt */
    168  1.1      cgd 
    169  1.1      cgd /*
    170  1.1      cgd  * CSR6 -- Command (Operation Mode) Register
    171  1.1      cgd  */
    172  1.8  thorpej #define	TULIP_CMD_MUSTBEONE	0x02000000L		/* (RW)  Must Be One (21140) */
    173  1.8  thorpej #define	TULIP_CMD_SCRAMBLER	0x01000000L		/* (RW)  Scrambler Mode (21140) */
    174  1.8  thorpej #define	TULIP_CMD_PCSFUNCTION	0x00800000L		/* (RW)  PCS Function (21140) */
    175  1.8  thorpej #define	TULIP_CMD_TXTHRSHLDCTL	0x00400000L		/* (RW)  Transmit Threshold Mode (21140) */
    176  1.8  thorpej #define	TULIP_CMD_STOREFWD	0x00200000L		/* (RW)  Store and Foward (21140) */
    177  1.8  thorpej #define	TULIP_CMD_NOHEARTBEAT	0x00080000L		/* (RW)  No Heartbeat (21140) */
    178  1.8  thorpej #define	TULIP_CMD_PORTSELECT	0x00040000L		/* (RW)  Post Select (100Mb) (21140) */
    179  1.8  thorpej #define	TULIP_CMD_ENHCAPTEFFCT	0x00040000L		/* (RW)  Enhanced Capture Effecty (21041) */
    180  1.1      cgd #define	TULIP_CMD_CAPTREFFCT	0x00020000L		/* (RW)  Capture Effect (!802.3) */
    181  1.8  thorpej #define	TULIP_CMD_BACKPRESSURE	0x00010000L		/* (RW)  Back Pressure (!802.3) (21040) */
    182  1.1      cgd #define	TULIP_CMD_THRESHOLDCTL	0x0000C000L		/* (RW)  Threshold Control */
    183  1.1      cgd #define	TULIP_CMD_THRSHLD72	0x00000000L		/*       00 - 72 Bytes */
    184  1.1      cgd #define	TULIP_CMD_THRSHLD96	0x00004000L		/*       01 - 96 Bytes */
    185  1.1      cgd #define	TULIP_CMD_THRSHLD128	0x00008000L		/*       10 - 128 bytes */
    186  1.1      cgd #define	TULIP_CMD_THRSHLD160	0x0000C000L		/*       11 - 160 Bytes */
    187  1.1      cgd #define	TULIP_CMD_TXRUN 	0x00002000L		/* (RW)  Start/Stop Transmitter */
    188  1.1      cgd #define	TULIP_CMD_FORCECOLL	0x00001000L		/* (RW)  Force Collisions */
    189  1.1      cgd #define	TULIP_CMD_OPERMODE	0x00000C00L		/* (RW)  Operating Mode */
    190  1.4      cgd #define	TULIP_CMD_FULLDUPLEX	0x00000200L		/* (RW)  Full Duplex Mode */
    191  1.1      cgd #define	TULIP_CMD_FLAKYOSCDIS	0x00000100L		/* (RW)  Flakey Oscillator Disable */
    192  1.1      cgd #define	TULIP_CMD_ALLMULTI	0x00000080L		/* (RW)  Pass All Multicasts */
    193  1.1      cgd #define	TULIP_CMD_PROMISCUOUS	0x00000040L		/* (RW)  Promiscuous Mode */
    194  1.1      cgd #define	TULIP_CMD_BACKOFFCTR	0x00000020L		/* (RW)  Start/Stop Backoff Counter (!802.3) */
    195  1.1      cgd #define	TULIP_CMD_INVFILTER	0x00000010L		/* (R )  Inverse Filtering */
    196  1.1      cgd #define	TULIP_CMD_PASSBADPKT	0x00000008L		/* (RW)  Pass Bad Frames  */
    197  1.1      cgd #define	TULIP_CMD_HASHONLYFLTR	0x00000004L		/* (R )  Hash Only Filtering */
    198  1.1      cgd #define	TULIP_CMD_RXRUN		0x00000002L		/* (RW)  Start/Stop Receive Filtering */
    199  1.1      cgd #define	TULIP_CMD_HASHPRFCTFLTR	0x00000001L		/* (R )  Hash/Perfect Receive Filtering */
    200  1.1      cgd 
    201  1.4      cgd #define TULIP_SIASTS_OTHERRXACTIVITY	0x00000200L
    202  1.4      cgd #define TULIP_SIASTS_RXACTIVITY		0x00000100L
    203  1.1      cgd #define	TULIP_SIASTS_LINKFAIL		0x00000004L
    204  1.1      cgd #define	TULIP_SIACONN_RESET		0x00000000L
    205  1.1      cgd 
    206  1.8  thorpej /*
    207  1.8  thorpej  * 21040 SIA definitions
    208  1.8  thorpej  */
    209  1.8  thorpej #define	TULIP_21040_PROBE_10BASET_TIMEOUT	2500
    210  1.8  thorpej #define	TULIP_21040_PROBE_AUIBNC_TIMEOUT	300
    211  1.8  thorpej #define	TULIP_21040_PROBE_EXTSIA_TIMEOUT	300
    212  1.8  thorpej 
    213  1.8  thorpej #define	TULIP_21040_SIACONN_10BASET	0x00008F01L
    214  1.8  thorpej #define	TULIP_21040_SIATXRX_10BASET	0x0000FFFFL
    215  1.8  thorpej #define	TULIP_21040_SIAGEN_10BASET	0x00000000L
    216  1.8  thorpej 
    217  1.8  thorpej #define	TULIP_21040_SIACONN_10BASET_FD	0x00008F01L
    218  1.8  thorpej #define	TULIP_21040_SIATXRX_10BASET_FD	0x0000FFFDL
    219  1.8  thorpej #define	TULIP_21040_SIAGEN_10BASET_FD	0x00000000L
    220  1.8  thorpej 
    221  1.8  thorpej #define	TULIP_21040_SIACONN_AUIBNC	0x00008F09L
    222  1.8  thorpej #define	TULIP_21040_SIATXRX_AUIBNC	0x00000705L
    223  1.8  thorpej #define	TULIP_21040_SIAGEN_AUIBNC	0x00000006L
    224  1.8  thorpej 
    225  1.8  thorpej #define	TULIP_21040_SIACONN_EXTSIA	0x00003041L
    226  1.8  thorpej #define	TULIP_21040_SIATXRX_EXTSIA	0x00000000L
    227  1.8  thorpej #define	TULIP_21040_SIAGEN_EXTSIA	0x00000006L
    228  1.8  thorpej 
    229  1.8  thorpej /*
    230  1.8  thorpej  * 21041 SIA definitions
    231  1.8  thorpej  */
    232  1.8  thorpej 
    233  1.8  thorpej #define	TULIP_21041_PROBE_10BASET_TIMEOUT	2500
    234  1.8  thorpej #define	TULIP_21041_PROBE_AUIBNC_TIMEOUT	300
    235  1.8  thorpej 
    236  1.8  thorpej #define	TULIP_21041_SIACONN_10BASET		0x0000EF01L
    237  1.8  thorpej #define	TULIP_21041_SIATXRX_10BASET		0x0000FF3FL
    238  1.8  thorpej #define	TULIP_21041_SIAGEN_10BASET		0x00000000L
    239  1.8  thorpej 
    240  1.8  thorpej #define	TULIP_21041P2_SIACONN_10BASET		0x0000EF01L
    241  1.8  thorpej #define	TULIP_21041P2_SIATXRX_10BASET		0x0000FFFFL
    242  1.8  thorpej #define	TULIP_21041P2_SIAGEN_10BASET		0x00000000L
    243  1.8  thorpej 
    244  1.8  thorpej #define	TULIP_21041_SIACONN_10BASET_FD		0x0000EF01L
    245  1.8  thorpej #define	TULIP_21041_SIATXRX_10BASET_FD		0x0000FF3DL
    246  1.8  thorpej #define	TULIP_21041_SIAGEN_10BASET_FD		0x00000000L
    247  1.8  thorpej 
    248  1.8  thorpej #define	TULIP_21041P2_SIACONN_10BASET_FD	0x0000EF01L
    249  1.8  thorpej #define	TULIP_21041P2_SIATXRX_10BASET_FD	0x0000FFFFL
    250  1.8  thorpej #define	TULIP_21041P2_SIAGEN_10BASET_FD		0x00000000L
    251  1.8  thorpej 
    252  1.8  thorpej #define	TULIP_21041_SIACONN_AUI			0x0000EF09L
    253  1.8  thorpej #define	TULIP_21041_SIATXRX_AUI			0x0000F73DL
    254  1.8  thorpej #define	TULIP_21041_SIAGEN_AUI			0x0000000EL
    255  1.8  thorpej 
    256  1.8  thorpej #define	TULIP_21041P2_SIACONN_AUI		0x0000EF09L
    257  1.8  thorpej #define	TULIP_21041P2_SIATXRX_AUI		0x0000F7FDL
    258  1.8  thorpej #define	TULIP_21041P2_SIAGEN_AUI		0x0000000EL
    259  1.8  thorpej 
    260  1.8  thorpej #define	TULIP_21041_SIACONN_BNC			0x0000EF09L
    261  1.8  thorpej #define	TULIP_21041_SIATXRX_BNC			0x0000F73DL
    262  1.8  thorpej #define	TULIP_21041_SIAGEN_BNC			0x00000006L
    263  1.8  thorpej 
    264  1.8  thorpej #define	TULIP_21041P2_SIACONN_BNC		0x0000EF09L
    265  1.8  thorpej #define	TULIP_21041P2_SIATXRX_BNC		0x0000F7FDL
    266  1.8  thorpej #define	TULIP_21041P2_SIAGEN_BNC		0x00000006L
    267  1.8  thorpej 
    268  1.8  thorpej /*
    269  1.8  thorpej  * 21142 SIA definitions
    270  1.8  thorpej  */
    271  1.8  thorpej 
    272  1.8  thorpej #define	TULIP_21142_PROBE_10BASET_TIMEOUT	2500
    273  1.8  thorpej #define	TULIP_21142_PROBE_AUIBNC_TIMEOUT	300
    274  1.8  thorpej 
    275  1.8  thorpej #define	TULIP_21142_SIACONN_10BASET		0x00000001L
    276  1.8  thorpej #define	TULIP_21142_SIATXRX_10BASET		0x0000F3FFL
    277  1.8  thorpej #define	TULIP_21142_SIAGEN_10BASET		0x00000000L
    278  1.8  thorpej 
    279  1.8  thorpej #define	TULIP_21142_SIACONN_10BASET_FD		0x00000001L
    280  1.8  thorpej #define	TULIP_21142_SIATXRX_10BASET_FD		0x0000F3FDL
    281  1.8  thorpej #define	TULIP_21142_SIAGEN_10BASET_FD		0x00000000L
    282  1.8  thorpej 
    283  1.8  thorpej #define	TULIP_21142_SIACONN_AUI			0x00000009L
    284  1.8  thorpej #define	TULIP_21142_SIATXRX_AUI			0x0000F3FDL
    285  1.8  thorpej #define	TULIP_21142_SIAGEN_AUI			0x0000000EL
    286  1.8  thorpej 
    287  1.8  thorpej #define	TULIP_21142_SIACONN_BNC			0x00000009L
    288  1.8  thorpej #define	TULIP_21142_SIATXRX_BNC			0x0000F3FDL
    289  1.8  thorpej #define	TULIP_21142_SIAGEN_BNC			0x00000006L
    290  1.8  thorpej 
    291  1.8  thorpej 
    292  1.1      cgd 
    293  1.4      cgd 
    294  1.7      tls #define	TULIP_WATCHDOG_TXDISABLE	0x00000001L
    295  1.7      tls #define	TULIP_WATCHDOG_RXDISABLE	0x00000010L
    296  1.7      tls 
    297  1.1      cgd #define	TULIP_BUSMODE_SWRESET		0x00000001L
    298  1.1      cgd #define	TULIP_BUSMODE_DESCSKIPLEN_MASK	0x0000007CL
    299  1.1      cgd #define	TULIP_BUSMODE_BIGENDIAN		0x00000080L
    300  1.1      cgd #define	TULIP_BUSMODE_BURSTLEN_MASK	0x00003F00L
    301  1.1      cgd #define	TULIP_BUSMODE_BURSTLEN_DEFAULT	0x00000000L
    302  1.1      cgd #define	TULIP_BUSMODE_BURSTLEN_1LW	0x00000100L
    303  1.1      cgd #define	TULIP_BUSMODE_BURSTLEN_2LW	0x00000200L
    304  1.1      cgd #define	TULIP_BUSMODE_BURSTLEN_4LW	0x00000400L
    305  1.1      cgd #define	TULIP_BUSMODE_BURSTLEN_8LW	0x00000800L
    306  1.1      cgd #define	TULIP_BUSMODE_BURSTLEN_16LW	0x00001000L
    307  1.1      cgd #define	TULIP_BUSMODE_BURSTLEN_32LW	0x00002000L
    308  1.1      cgd #define	TULIP_BUSMODE_CACHE_NOALIGN	0x00000000L
    309  1.1      cgd #define	TULIP_BUSMODE_CACHE_ALIGN8	0x00004000L
    310  1.1      cgd #define	TULIP_BUSMODE_CACHE_ALIGN16	0x00008000L
    311  1.1      cgd #define	TULIP_BUSMODE_CACHE_ALIGN32	0x0000C000L
    312  1.1      cgd #define	TULIP_BUSMODE_TXPOLL_NEVER	0x00000000L
    313  1.4      cgd #define	TULIP_BUSMODE_TXPOLL_200000ns	0x00020000L
    314  1.4      cgd #define	TULIP_BUSMODE_TXPOLL_800000ns	0x00040000L
    315  1.4      cgd #define	TULIP_BUSMODE_TXPOLL_1600000ns	0x00060000L
    316  1.8  thorpej #define	TULIP_BUSMODE_TXPOLL_12800ns	0x00080000L	/* 21041 only */
    317  1.8  thorpej #define	TULIP_BUSMODE_TXPOLL_25600ns	0x000A0000L	/* 21041 only */
    318  1.8  thorpej #define	TULIP_BUSMODE_TXPOLL_51200ns	0x000C0000L	/* 21041 only */
    319  1.8  thorpej #define	TULIP_BUSMODE_TXPOLL_102400ns	0x000E0000L	/* 21041 only */
    320  1.8  thorpej #define	TULIP_BUSMODE_DESC_BIGENDIAN	0x00100000L	/* 21041 only */
    321  1.8  thorpej #define	TULIP_BUSMODE_READMULTIPLE	0x00200000L	/* */
    322  1.8  thorpej 
    323  1.8  thorpej #define	TULIP_REG_CFDA			0x40
    324  1.8  thorpej #define	TULIP_CFDA_SLEEP		0x80000000L
    325  1.8  thorpej #define	TULIP_CFDA_SNOOZE		0x40000000L
    326  1.1      cgd 
    327  1.8  thorpej #define	TULIP_GP_PINSET			0x00000100L
    328  1.1      cgd /*
    329  1.8  thorpej  * These are the defintitions used for the DEC 21140
    330  1.1      cgd  * evaluation board.
    331  1.1      cgd  */
    332  1.4      cgd #define	TULIP_GP_EB_PINS		0x0000011F	/* General Purpose Pin directions */
    333  1.4      cgd #define	TULIP_GP_EB_OK10		0x00000080	/* 10 Mb/sec Signal Detect gep<7> */
    334  1.4      cgd #define	TULIP_GP_EB_OK100		0x00000040	/* 100 Mb/sec Signal Detect gep<6> */
    335  1.4      cgd #define	TULIP_GP_EB_INIT		0x0000000B	/* No loopback --- point-to-point */
    336  1.1      cgd 
    337  1.1      cgd /*
    338  1.8  thorpej  * These are the defintitions used for the SMC9332 (21140) board.
    339  1.1      cgd  */
    340  1.8  thorpej #define	TULIP_GP_SMC_9332_PINS		0x0000013F	/* General Purpose Pin directions */
    341  1.8  thorpej #define	TULIP_GP_SMC_9332_OK10		0x00000080	/* 10 Mb/sec Signal Detect gep<7> */
    342  1.8  thorpej #define	TULIP_GP_SMC_9332_OK100		0x00000040	/* 100 Mb/sec Signal Detect gep<6> */
    343  1.8  thorpej #define	TULIP_GP_SMC_9332_INIT		0x00000009	/* No loopback --- point-to-point */
    344  1.8  thorpej 
    345  1.8  thorpej #define	TULIP_OUI_SMC_0			0x00
    346  1.8  thorpej #define	TULIP_OUI_SMC_1			0x00
    347  1.8  thorpej #define	TULIP_OUI_SMC_2			0xC0
    348  1.8  thorpej 
    349  1.8  thorpej /*
    350  1.8  thorpej  * There are the definitions used for the DEC DE500
    351  1.8  thorpej  * 10/100 family of boards
    352  1.8  thorpej  */
    353  1.8  thorpej #define	TULIP_GP_DE500_PINS		0x0000011FL
    354  1.8  thorpej #define	TULIP_GP_DE500_LINK_PASS	0x00000080L
    355  1.8  thorpej #define	TULIP_GP_DE500_SYM_LINK		0x00000040L
    356  1.8  thorpej #define	TULIP_GP_DE500_SIGNAL_DETECT	0x00000020L
    357  1.8  thorpej #define	TULIP_GP_DE500_PHY_RESET	0x00000010L
    358  1.1      cgd #define	TULIP_GP_DE500_HALFDUPLEX	0x00000008L
    359  1.8  thorpej #define	TULIP_GP_DE500_PHY_LOOPBACK	0x00000004L
    360  1.8  thorpej #define	TULIP_GP_DE500_FORCE_LED	0x00000002L
    361  1.1      cgd #define	TULIP_GP_DE500_FORCE_100	0x00000001L
    362  1.1      cgd 
    363  1.1      cgd /*
    364  1.1      cgd  * These are the defintitions used for the Cogent EM100
    365  1.8  thorpej  * 21140 board.
    366  1.1      cgd  */
    367  1.4      cgd #define	TULIP_GP_EM100_PINS		0x0000013F	/* General Purpose Pin directions */
    368  1.4      cgd #define	TULIP_GP_EM100_INIT		0x00000009	/* No loopback --- point-to-point */
    369  1.4      cgd #define	TULIP_OUI_COGENT_0		0x00
    370  1.4      cgd #define	TULIP_OUI_COGENT_1		0x00
    371  1.7      tls #define	TULIP_OUI_COGENT_2		0x92
    372  1.4      cgd #define	TULIP_COGENT_EM100_ID		0x12
    373  1.4      cgd 
    374  1.4      cgd 
    375  1.4      cgd /*
    376  1.4      cgd  * These are the defintitions used for the Znyx ZX342
    377  1.4      cgd  * 10/100 board
    378  1.4      cgd  */
    379  1.4      cgd #define	TULIP_OUI_ZNYX_0		0x00
    380  1.4      cgd #define	TULIP_OUI_ZNYX_1		0xC0
    381  1.4      cgd #define	TULIP_OUI_ZNYX_2		0x95
    382  1.4      cgd 
    383  1.8  thorpej #define	TULIP_ZNYX_ID_ZX312		0x0602
    384  1.8  thorpej #define	TULIP_ZNYX_ID_ZX312T		0x0622
    385  1.8  thorpej #define	TULIP_ZNYX_ID_ZX314_INTA	0x0701
    386  1.8  thorpej #define	TULIP_ZNYX_ID_ZX314		0x0711
    387  1.8  thorpej #define	TULIP_ZNYX_ID_ZX315_INTA	0x0801
    388  1.8  thorpej #define	TULIP_ZNYX_ID_ZX315		0x0811
    389  1.8  thorpej #define	TULIP_ZNYX_ID_ZX342		0x0901
    390  1.8  thorpej #define	TULIP_ZNYX_ID_ZX342B		0x0921
    391  1.8  thorpej #define	TULIP_ZNYX_ID_ZX342_X3		0x0902
    392  1.8  thorpej #define	TULIP_ZNYX_ID_ZX342_X4		0x0903
    393  1.8  thorpej #define	TULIP_ZNYX_ID_ZX344		0x0A01
    394  1.8  thorpej #define	TULIP_ZNYX_ID_ZX351		0x0B01
    395  1.8  thorpej #define	TULIP_ZNYX_ID_ZX345		0x0C01
    396  1.8  thorpej #define	TULIP_ZNYX_ID_ZX311		0x0D01
    397  1.8  thorpej #define	TULIP_ZNYX_ID_ZX346		0x0E01
    398  1.8  thorpej 
    399  1.8  thorpej #define	TULIP_GP_ZX34X_PINS		0x0000011F	/* General Purpose Pin directions */
    400  1.8  thorpej #define	TULIP_GP_ZX344_PINS		0x0000010B	/* General Purpose Pin directions */
    401  1.8  thorpej #define	TULIP_GP_ZX345_PINS		0x00000103	/* General Purpose Pin directions */
    402  1.8  thorpej #define	TULIP_GP_ZX346_PINS		0x00000143	/* General Purpose Pin directions */
    403  1.8  thorpej #define	TULIP_GP_ZX34X_LNKFAIL		0x00000080	/* 10Mb/s Link Failure */
    404  1.8  thorpej #define	TULIP_GP_ZX34X_SYMDET		0x00000040	/* 100Mb/s Symbol Detect */
    405  1.8  thorpej #define	TULIP_GP_ZX345_PHYACT		0x00000040	/* PHY Activity */
    406  1.8  thorpej #define	TULIP_GP_ZX34X_SIGDET		0x00000020	/* 100Mb/s Signal Detect */
    407  1.8  thorpej #define	TULIP_GP_ZX346_AUTONEG_ENABLED	0x00000020	/* 802.3u autoneg enabled */
    408  1.8  thorpej #define	TULIP_GP_ZX342_COLENA		0x00000008	/* 10t Ext LB */
    409  1.8  thorpej #define	TULIP_GP_ZX344_ROTINT		0x00000008	/* PPB IRQ rotation */
    410  1.8  thorpej #define	TULIP_GP_ZX345_SPEED10		0x00000008	/* 10Mb speed detect */
    411  1.8  thorpej #define	TULIP_GP_ZX346_SPEED100		0x00000008	/* 100Mb speed detect */
    412  1.8  thorpej #define	TULIP_GP_ZX34X_NCOLENA		0x00000004	/* 10t Int LB */
    413  1.8  thorpej #define	TULIP_GP_ZX34X_RXMATCH		0x00000004	/* RX Match */
    414  1.8  thorpej #define	TULIP_GP_ZX346_FULLDUPLEX	0x00000004	/* Full Duplex Sensed */
    415  1.8  thorpej #define	TULIP_GP_ZX34X_LB102		0x00000002	/* 100tx twister LB */
    416  1.8  thorpej #define	TULIP_GP_ZX34X_NLB101		0x00000001	/* PDT/PDR LB */
    417  1.8  thorpej #define	TULIP_GP_ZX34X_INIT		0x00000009
    418  1.4      cgd 
    419  1.1      cgd /*
    420  1.8  thorpej  * Compex's OUI.  We need to twiddle a bit on their 21041 card.
    421  1.1      cgd  */
    422  1.8  thorpej #define	TULIP_OUI_COMPEX_0		0x00
    423  1.8  thorpej #define	TULIP_OUI_COMPEX_1		0x80
    424  1.8  thorpej #define	TULIP_OUI_COMPEX_2		0x48
    425  1.8  thorpej #define	TULIP_21041_COMPEX_XREGDATA	1
    426  1.8  thorpej /*
    427  1.8  thorpej  * SROM definitions for the 21140 and 21041.
    428  1.8  thorpej  */
    429  1.8  thorpej #define	SROMXREG	0x0400
    430  1.1      cgd #define SROMSEL         0x0800
    431  1.1      cgd #define SROMRD          0x4000
    432  1.1      cgd #define SROMWR          0x2000
    433  1.1      cgd #define SROMDIN         0x0008
    434  1.1      cgd #define SROMDOUT        0x0004
    435  1.1      cgd #define SROMDOUTON      0x0004
    436  1.1      cgd #define SROMDOUTOFF     0x0004
    437  1.1      cgd #define SROMCLKON       0x0002
    438  1.1      cgd #define SROMCLKOFF      0x0002
    439  1.1      cgd #define SROMCSON        0x0001
    440  1.1      cgd #define SROMCSOFF       0x0001
    441  1.1      cgd #define SROMCS          0x0001
    442  1.1      cgd 
    443  1.1      cgd #define	SROMCMD_MODE	4
    444  1.1      cgd #define	SROMCMD_WR	5
    445  1.1      cgd #define	SROMCMD_RD	6
    446  1.1      cgd 
    447  1.1      cgd #define	SROM_BITWIDTH	6
    448  1.5      cgd 
    449  1.5      cgd /*
    450  1.8  thorpej  * MII Definitions for the 21041 and 21140/21140A/21142
    451  1.8  thorpej  */
    452  1.8  thorpej #define	MII_PREAMBLE		(~0)
    453  1.8  thorpej #define	MII_TEST		0xAAAAAAAA
    454  1.8  thorpej #define	MII_RDCMD		0xF6		/* 1111.0110 */
    455  1.8  thorpej #define	MII_WRCMD		0xF5		/* 1111.0101 */
    456  1.8  thorpej #define	MII_DIN			0x00080000
    457  1.8  thorpej #define	MII_RD			0x00040000
    458  1.8  thorpej #define	MII_WR			0x00000000
    459  1.8  thorpej #define	MII_DOUT		0x00020000
    460  1.8  thorpej #define	MII_CLK			0x00010000
    461  1.8  thorpej #define	MII_CLKON		MII_CLK
    462  1.8  thorpej #define	MII_CLKOFF		MII_CLK
    463  1.8  thorpej 
    464  1.8  thorpej #define	PHYREG_CONTROL			0
    465  1.8  thorpej #define	PHYREG_STATUS			1
    466  1.8  thorpej #define	PHYREG_IDLOW			2
    467  1.8  thorpej #define	PHYREG_IDHIGH			3
    468  1.8  thorpej #define	PHYREG_AUTONEG_ADVERTISEMENT	4
    469  1.8  thorpej #define	PHYREG_AUTONEG_ABILITIES	5
    470  1.8  thorpej #define	PHYREG_AUTONEG_EXPANSION	6
    471  1.8  thorpej #define	PHYREG_AUTONEG_NEXTPAGE		7
    472  1.8  thorpej 
    473  1.8  thorpej #define	PHYSTS_100BASET4	0x8000
    474  1.8  thorpej #define	PHYSTS_100BASETX_FD	0x4000
    475  1.8  thorpej #define	PHYSTS_100BASETX	0x2000
    476  1.8  thorpej #define	PHYSTS_10BASET_FD	0x1000
    477  1.8  thorpej #define	PHYSTS_10BASET		0x0800
    478  1.8  thorpej #define	PHYSTS_AUTONEG_DONE	0x0020
    479  1.8  thorpej #define	PHYSTS_REMOTE_FAULT	0x0010
    480  1.8  thorpej #define	PHYSTS_CAN_AUTONEG	0x0008
    481  1.8  thorpej #define	PHYSTS_LINK_UP		0x0004
    482  1.8  thorpej #define	PHYSTS_JABBER_DETECT	0x0002
    483  1.8  thorpej #define	PHYSTS_EXTENDED_REGS	0x0001
    484  1.8  thorpej 
    485  1.8  thorpej #define	PHYCTL_RESET		0x8000
    486  1.8  thorpej #define	PHYCTL_SELECT_100MB	0x2000
    487  1.8  thorpej #define	PHYCTL_AUTONEG_ENABLE	0x1000
    488  1.8  thorpej #define	PHYCTL_ISOLATE		0x0400
    489  1.8  thorpej #define	PHYCTL_AUTONEG_RESTART	0x0200
    490  1.8  thorpej #define	PHYCTL_FULL_DUPLEX	0x0100
    491  1.8  thorpej 
    492  1.8  thorpej 
    493  1.8  thorpej #define MII_RD          0x00040000
    494  1.8  thorpej #define MII_WR          0x00000000
    495  1.8  thorpej #define MII_DIN         0x00080000
    496  1.8  thorpej #define MII_DOUT        0x00020000
    497  1.8  thorpej #define MII_DOUTON      MII_DOUT
    498  1.8  thorpej #define MII_DOUTOFF     MII_DOUT
    499  1.8  thorpej #define MII_CLK		0x00010000
    500  1.8  thorpej #define MII_CLKON       MII_CLK
    501  1.8  thorpej #define MII_CLKOFF      MII_CLK
    502  1.8  thorpej 
    503  1.8  thorpej /*
    504  1.5      cgd  * Definitions for the DE425.
    505  1.5      cgd  */
    506  1.5      cgd #define	DE425_CFID		0x08	/* Configuration Id */
    507  1.5      cgd #define	DE425_CFCS		0x0C	/* Configuration Command-Status */
    508  1.5      cgd #define	DE425_CFRV		0x18	/* Configuration Revision */
    509  1.5      cgd #define	DE425_CFLT		0x1C	/* Configuration Latency Timer */
    510  1.5      cgd #define	DE425_CBIO		0x28	/* Configuration Base IO Address */
    511  1.5      cgd #define	DE425_CFDA		0x2C	/* Configuration Driver Area */
    512  1.5      cgd #define	DE425_ENETROM_OFFSET	0xC90	/* Offset in I/O space for ENETROM */
    513  1.5      cgd #define	DE425_CFG0		0xC88	/* IRQ register */
    514  1.8  thorpej #define	DE425_EISAID		0x10a34250 /* EISA device id */
    515  1.8  thorpej #define	DE425_EISA_IOSIZE	0x100
    516  1.5      cgd 
    517  1.5      cgd #define	DEC_VENDORID		0x1011
    518  1.8  thorpej #define	CHIPID_21040		0x0002
    519  1.8  thorpej #define	CHIPID_21140		0x0009
    520  1.8  thorpej #define	CHIPID_21041		0x0014
    521  1.8  thorpej #define	CHIPID_21142		0x0019
    522  1.5      cgd #define	PCI_VENDORID(x)		((x) & 0xFFFF)
    523  1.5      cgd #define	PCI_CHIPID(x)		(((x) >> 16) & 0xFFFF)
    524  1.8  thorpej 
    525  1.8  thorpej /*
    526  1.8  thorpej  * Generic SROM Format
    527  1.8  thorpej  *
    528  1.8  thorpej  *
    529  1.8  thorpej  */
    530  1.8  thorpej 
    531  1.8  thorpej typedef struct {
    532  1.8  thorpej     u_int8_t sh_idbuf[18];
    533  1.8  thorpej     u_int8_t sh_version;
    534  1.8  thorpej     u_int8_t sh_adapter_count;
    535  1.8  thorpej     u_int8_t sh_ieee802_address[6];
    536  1.8  thorpej } tulip_srom_header_t;
    537  1.8  thorpej 
    538  1.8  thorpej typedef struct {
    539  1.8  thorpej     u_int8_t sai_device;
    540  1.8  thorpej     u_int8_t sai_leaf_offset_lowbyte;
    541  1.8  thorpej     u_int8_t sai_leaf_offset_highbyte;
    542  1.8  thorpej } tulip_srom_adapter_info_t;
    543  1.8  thorpej 
    544  1.8  thorpej typedef enum {
    545  1.8  thorpej     TULIP_SROM_CONNTYPE_10BASET			=0x0000,
    546  1.8  thorpej     TULIP_SROM_CONNTYPE_BNC			=0x0001,
    547  1.8  thorpej     TULIP_SROM_CONNTYPE_AUI			=0x0002,
    548  1.8  thorpej     TULIP_SROM_CONNTYPE_100BASETX		=0x0003,
    549  1.8  thorpej     TULIP_SROM_CONNTYPE_100BASET4		=0x0006,
    550  1.8  thorpej     TULIP_SROM_CONNTYPE_100BASEFX		=0x0007,
    551  1.8  thorpej     TULIP_SROM_CONNTYPE_MII_10BASET		=0x0009,
    552  1.8  thorpej     TULIP_SROM_CONNTYPE_MII_100BASETX		=0x000D,
    553  1.8  thorpej     TULIP_SROM_CONNTYPE_MII_100BASET4		=0x000F,
    554  1.8  thorpej     TULIP_SROM_CONNTYPE_MII_100BASEFX		=0x0010,
    555  1.8  thorpej     TULIP_SROM_CONNTYPE_10BASET_NWAY		=0x0100,
    556  1.8  thorpej     TULIP_SROM_CONNTYPE_10BASET_FD		=0x0204,
    557  1.8  thorpej     TULIP_SROM_CONNTYPE_MII_10BASET_FD		=0x020A,
    558  1.8  thorpej     TULIP_SROM_CONNTYPE_100BASETX_FD		=0x020E,
    559  1.8  thorpej     TULIP_SROM_CONNTYPE_MII_100BASETX_FD	=0x0211,
    560  1.8  thorpej     TULIP_SROM_CONNTYPE_10BASET_NOLINKPASS	=0x0400,
    561  1.8  thorpej     TULIP_SROM_CONNTYPE_AUTOSENSE		=0x0800,
    562  1.8  thorpej     TULIP_SROM_CONNTYPE_AUTOSENSE_POWERUP	=0x8800,
    563  1.8  thorpej     TULIP_SROM_CONNTYPE_AUTOSENSE_NWAY		=0x9000,
    564  1.8  thorpej     TULIP_SROM_CONNTYPE_NOT_USED		=0xFFFF
    565  1.8  thorpej } tulip_srom_connection_t;
    566  1.8  thorpej 
    567  1.8  thorpej typedef enum {
    568  1.8  thorpej     TULIP_SROM_MEDIA_10BASET			=0x0000,
    569  1.8  thorpej     TULIP_SROM_MEDIA_BNC			=0x0001,
    570  1.8  thorpej     TULIP_SROM_MEDIA_AUI			=0x0002,
    571  1.8  thorpej     TULIP_SROM_MEDIA_100BASETX			=0x0003,
    572  1.8  thorpej     TULIP_SROM_MEDIA_10BASET_FD			=0x0004,
    573  1.8  thorpej     TULIP_SROM_MEDIA_100BASETX_FD		=0x0005,
    574  1.8  thorpej     TULIP_SROM_MEDIA_100BASET4			=0x0006,
    575  1.8  thorpej     TULIP_SROM_MEDIA_100BASEFX			=0x0007,
    576  1.8  thorpej     TULIP_SROM_MEDIA_100BASEFX_FD		=0x0008
    577  1.8  thorpej } tulip_srom_media_t;
    578  1.8  thorpej 
    579  1.8  thorpej #define	TULIP_SROM_21041_EXTENDED	0x40
    580  1.8  thorpej 
    581  1.8  thorpej #define	TULIP_SROM_2114X_NOINDICATOR	0x8000
    582  1.8  thorpej #define	TULIP_SROM_2114X_DEFAULT	0x4000
    583  1.8  thorpej #define	TULIP_SROM_2114X_POLARITY	0x0080
    584  1.8  thorpej #define	TULIP_SROM_2114X_CMDBITS(n)	(((n) & 0x0071) << 18)
    585  1.8  thorpej #define	TULIP_SROM_2114X_BITPOS(b)	(1 << (((b) & 0x0E) >> 1))
    586  1.8  thorpej 
    587  1.8  thorpej 
    588  1.5      cgd 
    589  1.1      cgd #endif /* !defined(_DC21040_H) */
    590