xref: /illumos-gate/usr/src/uts/common/io/chxge/com/vsc7321_reg.h (revision 4aac33d31b41cc7e3ac6fb66747ff2cae63d08cf)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 
22 /*
23  * Copyright (C) 2003-2005 Chelsio Communications.  All rights reserved.
24  */
25 
26 #pragma ident	"%Z%%M%	%I%	%E% SMI"	/* vsc7321_reg.h */
27 
28 #ifndef _VSC7321_REG_H_
29 #define _VSC7321_REG_H_
30 
31 /* Register definitions for Vitesse VSC7321 (Meigs II) MAC
32  *
33  * Straight off the data sheet, VMDS-10038 Rev 2.0 and
34  * PD0011-01-14-Meigs-II 2002-12-12
35  */
36 
37 /* Just 'cause it's in here doesn't mean it's used. */
38 
39 #define CRA(blk,sub,adr) ((((blk) & 0x7) << 13) | (((sub) & 0xf) << 9) | (((adr) & 0xff) << 1))
40 
41 /* System and CPU comm's registers */
42 #define REG_CHIP_ID		CRA(0x7,0xf,0x00)	/* Chip ID */
43 #define REG_BLADE_ID		CRA(0x7,0xf,0x01)	/* Blade ID */
44 #define REG_SW_RESET		CRA(0x7,0xf,0x02)	/* Global Soft Reset */
45 #define REG_IFACE_MODE		CRA(0x7,0xf,0x07)	/* Interface mode */
46 #define REG_CRC_CNT		CRA(0x7,0xf,0x0a)	/* CRC error count */
47 #define REG_CRC_CFG		CRA(0x7,0xf,0x0b)	/* CRC config */
48 #define REG_SI_TRANSFER_SEL	CRA(0x7,0xf,0x18)	/* SI Transfer Select */
49 #define REG_PLL_CLK_SPEED	CRA(0x7,0xf,0x19)	/* Clock Speed Selection */
50 #define REG_SYS_CLK_SELECT	CRA(0x7,0xf,0x1c)	/* System Clock Select */
51 #define REG_GPIO_CTRL		CRA(0x7,0xf,0x1d)	/* GPIO Control */
52 #define REG_GPIO_OUT		CRA(0x7,0xf,0x1e)	/* GPIO Out */
53 #define REG_GPIO_IN		CRA(0x7,0xf,0x1f)	/* GPIO In */
54 #define REG_CPU_TRANSFER_SEL	CRA(0x7,0xf,0x20)	/* CPU Transfer Select */
55 #define REG_LOCAL_DATA		CRA(0x7,0xf,0xfe)	/* Local CPU Data Register */
56 #define REG_LOCAL_STATUS	CRA(0x7,0xf,0xff)	/* Local CPU Status Register */
57 
58 /* Aggregator registers */
59 #define REG_AGGR_SETUP		CRA(0x7,0x1,0x00)	/* Aggregator Setup */
60 #define REG_PMAP_TABLE		CRA(0x7,0x1,0x01)	/* Port map table */
61 #define REG_MPLS_BIT0		CRA(0x7,0x1,0x08)	/* MPLS bit0 position */
62 #define REG_MPLS_BIT1		CRA(0x7,0x1,0x09)	/* MPLS bit1 position */
63 #define REG_MPLS_BIT2		CRA(0x7,0x1,0x0a)	/* MPLS bit2 position */
64 #define REG_MPLS_BIT3		CRA(0x7,0x1,0x0b)	/* MPLS bit3 position */
65 #define REG_MPLS_BITMASK	CRA(0x7,0x1,0x0c)	/* MPLS bit mask */
66 #define REG_PRE_BIT0POS		CRA(0x7,0x1,0x10)	/* Preamble bit0 position */
67 #define REG_PRE_BIT1POS		CRA(0x7,0x1,0x11)	/* Preamble bit1 position */
68 #define REG_PRE_BIT2POS		CRA(0x7,0x1,0x12)	/* Preamble bit2 position */
69 #define REG_PRE_BIT3POS		CRA(0x7,0x1,0x13)	/* Preamble bit3 position */
70 #define REG_PRE_ERR_CNT		CRA(0x7,0x1,0x14)	/* Preamble parity error count */
71 
72 /* BIST registers */
73 #define REG_RAM_BIST_CMD	CRA(0x7,0x2,0x00)	/* RAM BIST Command Register */
74 #define REG_RAM_BIST_RESULT	CRA(0x7,0x2,0x01)	/* RAM BIST Read Status/Result */
75 #define   BIST_PORT_SELECT	0x00			/* BIST port select */
76 #define   BIST_COMMAND		0x01			/* BIST enable/disable */
77 #define   BIST_STATUS		0x02			/* BIST operation status */
78 #define   BIST_ERR_CNT_LSB	0x03			/* BIST error count lo 8b */
79 #define   BIST_ERR_CNT_MSB	0x04			/* BIST error count hi 8b */
80 #define   BIST_ERR_SEL_LSB	0x05			/* BIST error select lo 8b */
81 #define   BIST_ERR_SEL_MSB	0x06			/* BIST error select hi 8b */
82 #define   BIST_ERROR_STATE	0x07			/* BIST engine internal state */
83 #define   BIST_ERR_ADR0		0x08			/* BIST error address lo 8b */
84 #define   BIST_ERR_ADR1		0x09			/* BIST error address lomid 8b */
85 #define   BIST_ERR_ADR2		0x0a			/* BIST error address himid 8b */
86 #define   BIST_ERR_ADR3		0x0b			/* BIST error address hi 8b */
87 
88 /* FIFO registers
89  *   ie = 0 for ingress, 1 for egress
90  *   fn = FIFO number, 0-9
91  */
92 #define REG_TEST(ie,fn)		CRA(0x2,ie&1,0x00+fn)	/* Mode & Test Register */
93 #define REG_TOP_BOTTOM(ie,fn)	CRA(0x2,ie&1,0x10+fn)	/* FIFO Buffer Top & Bottom */
94 #define REG_TAIL(ie,fn)		CRA(0x2,ie&1,0x20+fn)	/* FIFO Write Pointer */
95 #define REG_HEAD(ie,fn)		CRA(0x2,ie&1,0x30+fn)	/* FIFO Read Pointer */
96 #define REG_HIGH_LOW_WM(ie,fn)	CRA(0x2,ie&1,0x40+fn)	/* Flow Control Water Marks */
97 #define REG_CT_THRHLD(ie,fn)	CRA(0x2,ie&1,0x50+fn)	/* Cut Through Threshold */
98 #define REG_FIFO_DROP_CNT(ie,fn) CRA(0x2,ie&1,0x60+fn)	/* Drop & CRC Error Counter */
99 #define REG_DEBUG_BUF_CNT(ie,fn) CRA(0x2,ie&1,0x70+fn)	/* Input Side Debug Counter */
100 
101 /* Traffic shaper buckets
102  *   ie = 0 for ingress, 1 for egress
103  *   bn = bucket number 0-10 (yes, 11 buckets)
104  */
105 /* OK, this one's kinda ugly.  Some hardware designers are perverse. */
106 #define REG_TRAFFIC_SHAPER_BUCKET(ie,bn) CRA(0x2,ie&1,0x0a + (bn>7) | ((bn&7)<<4))
107 #define REG_TRAFFIC_SHAPER_CONTROL(ie)	CRA(0x2,ie&1,0x3b)
108 
109 #define REG_SRAM_ADR(ie)	CRA(0x2,ie&1,0x0e)	/* FIFO SRAM address */
110 #define REG_SRAM_WR_STRB(ie)	CRA(0x2,ie&1,0x1e)	/* FIFO SRAM write strobe */
111 #define REG_SRAM_RD_STRB(ie)	CRA(0x2,ie&1,0x2e)	/* FIFO SRAM read strobe */
112 #define REG_SRAM_DATA_0(ie)	CRA(0x2,ie&1,0x3e)	/* FIFO SRAM data lo 8b */
113 #define REG_SRAM_DATA_1(ie)	CRA(0x2,ie&1,0x4e)	/* FIFO SRAM data lomid 8b */
114 #define REG_SRAM_DATA_2(ie)	CRA(0x2,ie&1,0x5e)	/* FIFO SRAM data himid 8b */
115 #define REG_SRAM_DATA_3(ie)	CRA(0x2,ie&1,0x6e)	/* FIFO SRAM data hi 8b */
116 #define REG_SRAM_DATA_BLK_TYPE(ie) CRA(0x2,ie&1,0x7e)	/* FIFO SRAM tag */
117 /* REG_ING_CONTROL equals REG_CONTROL with ie = 0, likewise REG_EGR_CONTROL is ie = 1 */
118 #define REG_CONTROL(ie)		CRA(0x2,ie&1,0x0f)	/* FIFO control */
119 #define REG_ING_CONTROL		CRA(0x2,0x0,0x0f)	/* Ingress control (alias) */
120 #define REG_EGR_CONTROL		CRA(0x2,0x1,0x0f)	/* Egress control (alias) */
121 #define REG_AGE_TIMER(ie)	CRA(0x2,ie&1,0x1f)	/* Aging timer */
122 #define REG_AGE_INC(ie)		CRA(0x2,ie&1,0x2f)	/* Aging increment */
123 #define DEBUG_OUT(ie)		CRA(0x2,ie&1,0x3f)	/* Output debug counter control */
124 #define DEBUG_CNT(ie)		CRA(0x2,ie&1,0x4f)	/* Output debug counter */
125 
126 /* SPI4 interface */
127 #define REG_SPI4_MISC		CRA(0x5,0x0,0x00)	/* Misc Register */
128 #define REG_SPI4_STATUS		CRA(0x5,0x0,0x01)	/* CML Status */
129 #define REG_SPI4_ING_SETUP0	CRA(0x5,0x0,0x02)	/* Ingress Status Channel Setup */
130 #define REG_SPI4_ING_SETUP1	CRA(0x5,0x0,0x03)	/* Ingress Data Training Setup */
131 #define REG_SPI4_ING_SETUP2	CRA(0x5,0x0,0x04)	/* Ingress Data Burst Size Setup */
132 #define REG_SPI4_EGR_SETUP0	CRA(0x5,0x0,0x05)	/* Egress Status Channel Setup */
133 #define REG_SPI4_DBG_CNT(n)	CRA(0x5,0x0,0x10+n)	/* Debug counters 0-9 */
134 #define REG_SPI4_DBG_SETUP	CRA(0x5,0x0,0x1A)	/* Debug counters setup */
135 #define REG_SPI4_TEST		CRA(0x5,0x0,0x20)	/* Test Setup Register */
136 #define REG_TPGEN_UP0		CRA(0x5,0x0,0x21)	/* Test Pattern generator user pattern 0 */
137 #define REG_TPGEN_UP1		CRA(0x5,0x0,0x22)	/* Test Pattern generator user pattern 1 */
138 #define REG_TPCHK_UP0		CRA(0x5,0x0,0x23)	/* Test Pattern checker user pattern 0 */
139 #define REG_TPCHK_UP1		CRA(0x5,0x0,0x24)	/* Test Pattern checker user pattern 1 */
140 #define REG_TPSAM_P0		CRA(0x5,0x0,0x25)	/* Sampled pattern 0 */
141 #define REG_TPSAM_P1		CRA(0x5,0x0,0x26)	/* Sampled pattern 1 */
142 #define REG_TPERR_CNT		CRA(0x5,0x0,0x27)	/* Pattern checker error counter */
143 #define REG_SPI4_STICKY		CRA(0x5,0x0,0x30)	/* Sticky bits register */
144 #define REG_SPI4_DBG_INH	CRA(0x5,0x0,0x31)	/* Core egress & ingress inhibit */
145 #define REG_SPI4_DBG_STATUS	CRA(0x5,0x0,0x32)	/* Sampled ingress status */
146 #define REG_SPI4_DBG_GRANT	CRA(0x5,0x0,0x33)	/* Ingress cranted credit value */
147 
148 /* 10GbE MAC Block Registers */
149 /* Note that those registers that are exactly the same for 10GbE as for
150  * tri-speed are only defined with the version that needs a port number.
151  * Pass 0xa in those cases.
152  *
153  * Also note that despite the presence of a MAC address register, this part
154  * does no ingress MAC address filtering.  That register is used only for
155  * pause frame detection and generation.
156  */
157 /* 10GbE specific, and different from tri-speed */
158 #define REG_MISC_10G		CRA(0x1,0xa,0x00)	/* Misc 10GbE setup */
159 #define REG_PAUSE_10G		CRA(0x1,0xa,0x01)	/* Pause register */
160 #define REG_NORMALIZER_10G	CRA(0x1,0xa,0x05)	/* 10G normalizer */
161 #define REG_STICKY_RX		CRA(0x1,0xa,0x06)	/* RX debug register */
162 #define REG_DENORM_10G		CRA(0x1,0xa,0x07)	/* Denormalizer  */
163 #define REG_STICKY_TX		CRA(0x1,0xa,0x08)	/* TX sticky bits */
164 #define REG_MAX_RXHIGH		CRA(0x1,0xa,0x0a)	/* XGMII lane 0-3 debug */
165 #define REG_MAX_RXLOW		CRA(0x1,0xa,0x0b)	/* XGMII lane 4-7 debug */
166 #define REG_MAC_TX_STICKY	CRA(0x1,0xa,0x0c)	/* MAC Tx state sticky debug */
167 #define REG_MAC_TX_RUNNING	CRA(0x1,0xa,0x0d)	/* MAC Tx state running debug */
168 #define REG_TX_ABORT_AGE	CRA(0x1,0xa,0x14)	/* Aged Tx frames discarded */
169 #define REG_TX_ABORT_SHORT	CRA(0x1,0xa,0x15)	/* Short Tx frames discarded */
170 #define REG_TX_ABORT_TAXI	CRA(0x1,0xa,0x16)	/* Taxi error frames discarded */
171 #define REG_TX_ABORT_UNDERRUN	CRA(0x1,0xa,0x17)	/* Tx Underrun abort counter */
172 #define REG_TX_DENORM_DISCARD	CRA(0x1,0xa,0x18)	/* Tx denormalizer discards */
173 #define REG_XAUI_STAT_A		CRA(0x1,0xa,0x20)	/* XAUI status A */
174 #define REG_XAUI_STAT_B		CRA(0x1,0xa,0x21)	/* XAUI status B */
175 #define REG_XAUI_STAT_C		CRA(0x1,0xa,0x22)	/* XAUI status C */
176 #define REG_XAUI_CONF_A		CRA(0x1,0xa,0x23)	/* XAUI configuration A */
177 #define REG_XAUI_CONF_B		CRA(0x1,0xa,0x24)	/* XAUI configuration B */
178 #define REG_XAUI_CODE_GRP_CNT	CRA(0x1,0xa,0x25)	/* XAUI code group error count */
179 #define REG_XAUI_CONF_TEST_A	CRA(0x1,0xa,0x26)	/* XAUI test register A */
180 #define REG_PDERRCNT		CRA(0x1,0xa,0x27)	/* XAUI test register B */
181 
182 /* pn = port number 0-9 for tri-speed, 10 for 10GbE */
183 /* Both tri-speed and 10GbE */
184 #define REG_MAX_LEN(pn)		CRA(0x1,pn,0x02)	/* Max length */
185 #define REG_MAC_HIGH_ADDR(pn)	CRA(0x1,pn,0x03)	/* Upper 24 bits of MAC addr */
186 #define REG_MAC_LOW_ADDR(pn)	CRA(0x1,pn,0x04)	/* Lower 24 bits of MAC addr */
187 
188 /* tri-speed only
189  * pn = port number, 0-9
190  */
191 #define REG_MODE_CFG(pn)	CRA(0x1,pn,0x00)	/* Mode configuration */
192 #define REG_PAUSE_CFG(pn)	CRA(0x1,pn,0x01)	/* Pause configuration */
193 #define REG_NORMALIZER(pn)	CRA(0x1,pn,0x05)	/* Normalizer */
194 #define REG_TBI_STATUS(pn)	CRA(0x1,pn,0x06)	/* TBI status */
195 #define REG_PCS_STATUS_DBG(pn)	CRA(0x1,pn,0x07)	/* PCS status debug */
196 #define REG_PCS_CTRL(pn)	CRA(0x1,pn,0x08)	/* PCS control */
197 #define REG_TBI_CONFIG(pn)	CRA(0x1,pn,0x09)	/* TBI configuration */
198 #define REG_STICK_BIT(pn)	CRA(0x1,pn,0x0a)	/* Sticky bits */
199 #define REG_DEV_SETUP(pn)	CRA(0x1,pn,0x0b)	/* MAC clock/reset setup */
200 #define REG_DROP_CNT(pn)	CRA(0x1,pn,0x0c)	/* Drop counter */
201 #define REG_PORT_POS(pn)	CRA(0x1,pn,0x0d)	/* Preamble port position */
202 #define REG_SERDES_CONF(pn)	CRA(0x1,pn,0x0f)	/* SerDes configuration */
203 #define REG_SERDES_TEST(pn)	CRA(0x1,pn,0x10)	/* SerDes test */
204 #define REG_SERDES_STAT(pn)	CRA(0x1,pn,0x11)	/* SerDes status */
205 #define REG_SERDES_COM_CNT(pn)	CRA(0x1,pn,0x12)	/* SerDes comma counter */
206 #define REG_DENORM(pn)		CRA(0x1,pn,0x15)	/* Frame denormalization */
207 
208 /* Statistics */
209 /* pn = port number, 0-a, a = 10GbE */
210 #define REG_RX_IN_BYTES(pn)	CRA(0x4,pn,0x00)	/* # Rx in octets */
211 #define REG_RX_SYMBOL_CARRIER(pn) CRA(0x4,pn,0x01)	/* Frames w/ symbol errors */
212 #define REG_RX_PAUSE(pn)	CRA(0x4,pn,0x02)	/* # pause frames received */
213 #define REG_RX_UNSUP_OPCODE(pn)	CRA(0x4,pn,0x03)	/* # control frames with unsupported opcode */
214 #define REG_RX_OK_BYTES(pn)	CRA(0x4,pn,0x04)	/* # octets in good frames */
215 #define REG_RX_BAD_BYTES(pn)	CRA(0x4,pn,0x05)	/* # octets in bad frames */
216 #define REG_RX_UNICAST(pn)	CRA(0x4,pn,0x06)	/* # good unicast frames */
217 #define REG_RX_MULTICAST(pn)	CRA(0x4,pn,0x07)	/* # good multicast frames */
218 #define REG_RX_BROADCAST(pn)	CRA(0x4,pn,0x08)	/* # good broadcast frames */
219 #define REG_CRC(pn)		CRA(0x4,pn,0x09)	/* # frames w/ bad CRC only */
220 #define REG_RX_ALIGNMENT(pn)	CRA(0x4,pn,0x0a)	/* # frames w/ alignment err */
221 #define REG_RX_UNDERSIZE(pn)	CRA(0x4,pn,0x0b)	/* # frames undersize */
222 #define REG_RX_FRAGMENTS(pn)	CRA(0x4,pn,0x0c)	/* # frames undersize w/ crc err */
223 #define REG_RX_IN_RANGE_LENGTH_ERROR(pn) CRA(0x4,pn,0x0d)	/* # frames with length error */
224 #define REG_RX_OUT_OF_RANGE_ERROR(pn) CRA(0x4,pn,0x0e)	/* # frames with illegal length field */
225 #define REG_RX_OVERSIZE(pn)	CRA(0x4,pn,0x0f)	/* # frames oversize */
226 #define REG_RX_JABBERS(pn)	CRA(0x4,pn,0x10)	/* # frames oversize w/ crc err */
227 #define REG_RX_SIZE_64(pn)	CRA(0x4,pn,0x11)	/* # frames 64 octets long */
228 #define REG_RX_SIZE_65_TO_127(pn) CRA(0x4,pn,0x12)	/* # frames 65-127 octets */
229 #define REG_RX_SIZE_128_TO_255(pn) CRA(0x4,pn,0x13)	/* # frames 128-255 */
230 #define REG_RX_SIZE_256_TO_511(pn) CRA(0x4,pn,0x14)	/* # frames 256-511 */
231 #define REG_RX_SIZE_512_TO_1023(pn) CRA(0x4,pn,0x15)	/* # frames 512-1023 */
232 #define REG_RX_SIZE_1024_TO_1518(pn) CRA(0x4,pn,0x16)	/* # frames 1024-1518 */
233 #define REG_RX_SIZE_1519_TO_MAX(pn) CRA(0x4,pn,0x17)	/* # frames 1519-max */
234 
235 #define REG_TX_OUT_BYTES(pn)	CRA(0x4,pn,0x18)	/* # octets tx */
236 #define REG_TX_PAUSE(pn)	CRA(0x4,pn,0x19)	/* # pause frames sent */
237 #define REG_TX_OK_BYTES(pn)	CRA(0x4,pn,0x1a)	/* # octets tx OK */
238 #define REG_TX_UNICAST(pn)	CRA(0x4,pn,0x1b)	/* # frames unicast */
239 #define REG_TX_MULTICAST(pn)	CRA(0x4,pn,0x1c)	/* # frames multicast */
240 #define REG_TX_BROADCAST(pn)	CRA(0x4,pn,0x1d)	/* # frames broadcast */
241 #define REG_TX_MULTIPLE_COLL(pn) CRA(0x4,pn,0x1e)	/* # frames tx after multiple collisions */
242 #define REG_TX_LATE_COLL(pn)	CRA(0x4,pn,0x1f)	/* # late collisions detected */
243 #define REG_TX_XCOLL(pn)	CRA(0x4,pn,0x20)	/* # frames lost, excessive collisions */
244 #define REG_TX_DEFER(pn)	CRA(0x4,pn,0x21)	/* # frames deferred on first tx attempt */
245 #define REG_TX_XDEFER(pn)	CRA(0x4,pn,0x22)	/* # frames excessively deferred */
246 #define REG_TX_CSENSE(pn)	CRA(0x4,pn,0x23)	/* carrier sense errors at frame end */
247 #define REG_TX_SIZE_64(pn)	CRA(0x4,pn,0x24)	/* # frames 64 octets long */
248 #define REG_TX_SIZE_65_TO_127(pn) CRA(0x4,pn,0x25)	/* # frames 65-127 octets */
249 #define REG_TX_SIZE_128_TO_255(pn) CRA(0x4,pn,0x26)	/* # frames 128-255 */
250 #define REG_TX_SIZE_256_TO_511(pn) CRA(0x4,pn,0x27)	/* # frames 256-511 */
251 #define REG_TX_SIZE_512_TO_1023(pn) CRA(0x4,pn,0x28)	/* # frames 512-1023 */
252 #define REG_TX_SIZE_1024_TO_1518(pn) CRA(0x4,pn,0x29)	/* # frames 1024-1518 */
253 #define REG_TX_SIZE_1519_TO_MAX(pn) CRA(0x4,pn,0x2a)	/* # frames 1519-max */
254 #define REG_TX_SINGLE_COLL(pn)	CRA(0x4,pn,0x2b)	/* # frames tx after single collision */
255 #define REG_TX_BACKOFF2(pn)	CRA(0x4,pn,0x2c)	/* # frames tx ok after 2 backoffs/collisions */
256 #define REG_TX_BACKOFF3(pn)	CRA(0x4,pn,0x2d)	/*   after 3 backoffs/collisions */
257 #define REG_TX_BACKOFF4(pn)	CRA(0x4,pn,0x2e)	/*   after 4 */
258 #define REG_TX_BACKOFF5(pn)	CRA(0x4,pn,0x2f)	/*   after 5 */
259 #define REG_TX_BACKOFF6(pn)	CRA(0x4,pn,0x30)	/*   after 6 */
260 #define REG_TX_BACKOFF7(pn)	CRA(0x4,pn,0x31)	/*   after 7 */
261 #define REG_TX_BACKOFF8(pn)	CRA(0x4,pn,0x32)	/*   after 8 */
262 #define REG_TX_BACKOFF9(pn)	CRA(0x4,pn,0x33)	/*   after 9 */
263 #define REG_TX_BACKOFF10(pn)	CRA(0x4,pn,0x34)	/*   after 10 */
264 #define REG_TX_BACKOFF11(pn)	CRA(0x4,pn,0x35)	/*   after 11 */
265 #define REG_TX_BACKOFF12(pn)	CRA(0x4,pn,0x36)	/*   after 12 */
266 #define REG_TX_BACKOFF13(pn)	CRA(0x4,pn,0x37)	/*   after 13 */
267 #define REG_TX_BACKOFF14(pn)	CRA(0x4,pn,0x38)	/*   after 14 */
268 #define REG_TX_BACKOFF15(pn)	CRA(0x4,pn,0x39)	/*   after 15 */
269 #define REG_TX_UNDERRUN(pn)	CRA(0x4,pn,0x3a)	/* # frames dropped from underrun */
270 #define REG_RX_XGMII_PROT_ERR	CRA(0x4,0xa,0x3b)	/* # protocol errors detected on XGMII interface */
271 #define REG_RX_IPG_SHRINK(pn)	CRA(0x4,pn,0x3c)	/* # of IPG shrinks detected */
272 
273 #define REG_STAT_STICKY1G(pn)	CRA(0x4,pn,0x3e)	/* tri-speed sticky bits */
274 #define REG_STAT_STICKY10G	CRA(0x4,0xa,0x3e)	/* 10GbE sticky bits */
275 #define REG_STAT_INIT(pn)	CRA(0x4,pn,0x3f)	/* Clear all statistics */
276 
277 /* MII-Management Block registers */
278 /* These are for MII-M interface 0, which is the bidirectional LVTTL one.  If
279  * we hooked up to the one with separate directions, the middle 0x0 needs to
280  * change to 0x1.  And the current errata states that MII-M 1 doesn't work.
281  */
282 
283 #define REG_MIIM_STATUS		CRA(0x3,0x0,0x00)	/* MII-M Status */
284 #define REG_MIIM_CMD		CRA(0x3,0x0,0x01)	/* MII-M Command */
285 #define REG_MIIM_DATA		CRA(0x3,0x0,0x02)	/* MII-M Data */
286 #define REG_MIIM_PRESCALE	CRA(0x3,0x0,0x03)	/* MII-M MDC Prescale */
287 
288 
289 /* Whew. */
290 
291 #endif
292