xref: /onnv-gate/usr/src/uts/common/sys/nxge/nxge_sr_hw.h (revision 3859:19804e7fd496)
1*3859Sml29623 /*
2*3859Sml29623  * CDDL HEADER START
3*3859Sml29623  *
4*3859Sml29623  * The contents of this file are subject to the terms of the
5*3859Sml29623  * Common Development and Distribution License (the "License").
6*3859Sml29623  * You may not use this file except in compliance with the License.
7*3859Sml29623  *
8*3859Sml29623  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*3859Sml29623  * or http://www.opensolaris.org/os/licensing.
10*3859Sml29623  * See the License for the specific language governing permissions
11*3859Sml29623  * and limitations under the License.
12*3859Sml29623  *
13*3859Sml29623  * When distributing Covered Code, include this CDDL HEADER in each
14*3859Sml29623  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*3859Sml29623  * If applicable, add the following below this CDDL HEADER, with the
16*3859Sml29623  * fields enclosed by brackets "[]" replaced with your own identifying
17*3859Sml29623  * information: Portions Copyright [yyyy] [name of copyright owner]
18*3859Sml29623  *
19*3859Sml29623  * CDDL HEADER END
20*3859Sml29623  */
21*3859Sml29623 /*
22*3859Sml29623  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
23*3859Sml29623  * Use is subject to license terms.
24*3859Sml29623  */
25*3859Sml29623 
26*3859Sml29623 #ifndef	_SYS_NXGE_NXGE_SR_HW_H
27*3859Sml29623 #define	_SYS_NXGE_NXGE_SR_HW_H
28*3859Sml29623 
29*3859Sml29623 #pragma ident	"%Z%%M%	%I%	%E% SMI"
30*3859Sml29623 
31*3859Sml29623 #ifdef	__cplusplus
32*3859Sml29623 extern "C" {
33*3859Sml29623 #endif
34*3859Sml29623 
35*3859Sml29623 #define	ESR_NEPTUNE_DEV_ADDR	0x1E
36*3859Sml29623 #define	ESR_NEPTUNE_BASE	0
37*3859Sml29623 #define	ESR_PORT_ADDR_BASE	0
38*3859Sml29623 #define	PCISR_DEV_ADDR		0x1E
39*3859Sml29623 #define	PCISR_BASE		0
40*3859Sml29623 #define	PCISR_PORT_ADDR_BASE	2
41*3859Sml29623 
42*3859Sml29623 #define	PB	0
43*3859Sml29623 
44*3859Sml29623 #define	SR_RX_TX_COMMON_CONTROL	PB + 0x000
45*3859Sml29623 #define	SR_RX_TX_RESET_CONTROL	PB + 0x004
46*3859Sml29623 #define	SR_RX_POWER_CONTROL	PB + 0x008
47*3859Sml29623 #define	SR_TX_POWER_CONTROL	PB + 0x00C
48*3859Sml29623 #define	SR_MISC_POWER_CONTROL	PB + 0x010
49*3859Sml29623 #define	SR_RX_TX_CONTROL_A	PB + 0x100
50*3859Sml29623 #define	SR_RX_TX_TUNING_A	PB + 0x104
51*3859Sml29623 #define	SR_RX_SYNCCHAR_A	PB + 0x108
52*3859Sml29623 #define	SR_RX_TX_TEST_A		PB + 0x10C
53*3859Sml29623 #define	SR_GLUE_CONTROL0_A	PB + 0x110
54*3859Sml29623 #define	SR_GLUE_CONTROL1_A	PB + 0x114
55*3859Sml29623 #define	SR_RX_TX_CONTROL_B	PB + 0x120
56*3859Sml29623 #define	SR_RX_TX_TUNING_B	PB + 0x124
57*3859Sml29623 #define	SR_RX_SYNCCHAR_B	PB + 0x128
58*3859Sml29623 #define	SR_RX_TX_TEST_B		PB + 0x12C
59*3859Sml29623 #define	SR_GLUE_CONTROL0_B	PB + 0x130
60*3859Sml29623 #define	SR_GLUE_CONTROL1_B	PB + 0x134
61*3859Sml29623 #define	SR_RX_TX_CONTROL_C	PB + 0x140
62*3859Sml29623 #define	SR_RX_TX_TUNING_C	PB + 0x144
63*3859Sml29623 #define	SR_RX_SYNCCHAR_C	PB + 0x148
64*3859Sml29623 #define	SR_RX_TX_TEST_C		PB + 0x14C
65*3859Sml29623 #define	SR_GLUE_CONTROL0_C	PB + 0x150
66*3859Sml29623 #define	SR_GLUE_CONTROL1_C	PB + 0x154
67*3859Sml29623 #define	SR_RX_TX_CONTROL_D	PB + 0x160
68*3859Sml29623 #define	SR_RX_TX_TUNING_D	PB + 0x164
69*3859Sml29623 #define	SR_RX_SYNCCHAR_D	PB + 0x168
70*3859Sml29623 #define	SR_RX_TX_TEST_D		PB + 0x16C
71*3859Sml29623 #define	SR_GLUE_CONTROL0_D	PB + 0x170
72*3859Sml29623 #define	SR_GLUE_CONTROL1_D	PB + 0x174
73*3859Sml29623 #define	SR_RX_TX_TUNING_1_A	PB + 0x184
74*3859Sml29623 #define	SR_RX_TX_TUNING_1_B	PB + 0x1A4
75*3859Sml29623 #define	SR_RX_TX_TUNING_1_C	PB + 0x1C4
76*3859Sml29623 #define	SR_RX_TX_TUNING_1_D	PB + 0x1E4
77*3859Sml29623 #define	SR_RX_TX_TUNING_2_A	PB + 0x204
78*3859Sml29623 #define	SR_RX_TX_TUNING_2_B	PB + 0x224
79*3859Sml29623 #define	SR_RX_TX_TUNING_2_C	PB + 0x244
80*3859Sml29623 #define	SR_RX_TX_TUNING_2_D	PB + 0x264
81*3859Sml29623 #define	SR_RX_TX_TUNING_3_A	PB + 0x284
82*3859Sml29623 #define	SR_RX_TX_TUNING_3_B	PB + 0x2A4
83*3859Sml29623 #define	SR_RX_TX_TUNING_3_C	PB + 0x2C4
84*3859Sml29623 #define	SR_RX_TX_TUNING_3_D	PB + 0x2E4
85*3859Sml29623 
86*3859Sml29623 /*
87*3859Sml29623  * Shift right by 1 because the PRM requires that all the serdes register
88*3859Sml29623  * address be divided by 2
89*3859Sml29623  */
90*3859Sml29623 #define	ESR_NEP_RX_TX_COMMON_CONTROL_L_ADDR()	(ESR_NEPTUNE_BASE +\
91*3859Sml29623 						(SR_RX_TX_COMMON_CONTROL >> 1))
92*3859Sml29623 #define	ESR_NEP_RX_TX_COMMON_CONTROL_H_ADDR()	(ESR_NEPTUNE_BASE +\
93*3859Sml29623 						(SR_RX_TX_COMMON_CONTROL >> 1)\
94*3859Sml29623 						+ 1)
95*3859Sml29623 #define	ESR_NEP_RX_TX_RESET_CONTROL_L_ADDR()	(ESR_NEPTUNE_BASE +\
96*3859Sml29623 						(SR_RX_TX_RESET_CONTROL >> 1))
97*3859Sml29623 #define	ESR_NEP_RX_TX_RESET_CONTROL_H_ADDR()	(ESR_NEPTUNE_BASE +\
98*3859Sml29623 						(SR_RX_TX_RESET_CONTROL >> 1)\
99*3859Sml29623 						+ 1)
100*3859Sml29623 #define	ESR_NEP_RX_POWER_CONTROL_L_ADDR()	(ESR_NEPTUNE_BASE +\
101*3859Sml29623 						(SR_RX_POWER_CONTROL >> 1))
102*3859Sml29623 #define	ESR_NEP_RX_POWER_CONTROL_H_ADDR()	(ESR_NEPTUNE_BASE +\
103*3859Sml29623 						(SR_RX_POWER_CONTROL >> 1) + 1)
104*3859Sml29623 #define	ESR_NEP_TX_POWER_CONTROL_L_ADDR()	(ESR_NEPTUNE_BASE +\
105*3859Sml29623 						(SR_TX_POWER_CONTROL >> 1))
106*3859Sml29623 #define	ESR_NEP_TX_POWER_CONTROL_H_ADDR()	(ESR_NEPTUNE_BASE +\
107*3859Sml29623 						(SR_TX_POWER_CONTROL >> 1) + 1)
108*3859Sml29623 #define	ESR_NEP_MISC_POWER_CONTROL_L_ADDR()	(ESR_NEPTUNE_BASE +\
109*3859Sml29623 						(SR_MISC_POWER_CONTROL >> 1))
110*3859Sml29623 #define	ESR_NEP_MISC_POWER_CONTROL_H_ADDR()	(ESR_NEPTUNE_BASE +\
111*3859Sml29623 						(SR_MISC_POWER_CONTROL >> 1)\
112*3859Sml29623 						+ 1)
113*3859Sml29623 #define	ESR_NEP_RX_TX_CONTROL_L_ADDR(chan)	((ESR_NEPTUNE_BASE +\
114*3859Sml29623 						SR_RX_TX_CONTROL_A +\
115*3859Sml29623 						(chan * 0x20)) >> 1)
116*3859Sml29623 #define	ESR_NEP_RX_TX_CONTROL_H_ADDR(chan)	((ESR_NEPTUNE_BASE +\
117*3859Sml29623 						SR_RX_TX_CONTROL_A +\
118*3859Sml29623 						(chan * 0x20)) >> 1) + 1
119*3859Sml29623 #define	ESR_NEP_RX_TX_TUNING_L_ADDR(chan)	((ESR_NEPTUNE_BASE +\
120*3859Sml29623 						SR_RX_TX_TUNING_A +\
121*3859Sml29623 						(chan * 0x20)) >> 1)
122*3859Sml29623 #define	ESR_NEP_RX_TX_TUNING_H_ADDR(chan)	((ESR_NEPTUNE_BASE +\
123*3859Sml29623 						SR_RX_TX_TUNING_A +\
124*3859Sml29623 						(chan * 0x20)) >> 1) + 1
125*3859Sml29623 #define	ESR_NEP_RX_TX_SYNCCHAR_L_ADDR(chan)	((ESR_NEPTUNE_BASE +\
126*3859Sml29623 						SR_RX_SYNCCHAR_A +\
127*3859Sml29623 						(chan * 0x20)) >> 1)
128*3859Sml29623 #define	ESR_NEP_RX_TX_SYNCCHAR_H_ADDR(chan)	((ESR_NEPTUNE_BASE +\
129*3859Sml29623 						SR_RX_SYNCCHAR_A +\
130*3859Sml29623 						(chan * 0x20)) >> 1) + 1
131*3859Sml29623 #define	ESR_NEP_RX_TX_TEST_L_ADDR(chan)		((ESR_NEPTUNE_BASE +\
132*3859Sml29623 						SR_RX_TX_TEST_A +\
133*3859Sml29623 						(chan * 0x20)) >> 1)
134*3859Sml29623 #define	ESR_NEP_RX_TX_TEST_H_ADDR(chan)		((ESR_NEPTUNE_BASE +\
135*3859Sml29623 						SR_RX_TX_TEST_A +\
136*3859Sml29623 						(chan * 0x20)) >> 1) + 1
137*3859Sml29623 #define	ESR_NEP_GLUE_CONTROL0_L_ADDR(chan)	((ESR_NEPTUNE_BASE +\
138*3859Sml29623 						SR_GLUE_CONTROL0_A +\
139*3859Sml29623 						(chan * 0x20)) >> 1)
140*3859Sml29623 #define	ESR_NEP_GLUE_CONTROL0_H_ADDR(chan)	((ESR_NEPTUNE_BASE +\
141*3859Sml29623 						SR_GLUE_CONTROL0_A +\
142*3859Sml29623 						(chan * 0x20)) >> 1) + 1
143*3859Sml29623 #define	ESR_NEP_GLUE_CONTROL1_L_ADDR(chan)	((ESR_NEPTUNE_BASE +\
144*3859Sml29623 						SR_GLUE_CONTROL1_A +\
145*3859Sml29623 						(chan * 0x20)) >> 1)
146*3859Sml29623 #define	ESR_NEP_GLUE_CONTROL1_H_ADDR(chan)	((ESR_NEPTUNE_BASE +\
147*3859Sml29623 						SR_GLUE_CONTROL1_A +\
148*3859Sml29623 						(chan * 0x20)) >> 1) + 1
149*3859Sml29623 #define	ESR_NEP_RX_TX_TUNING_1_L_ADDR(chan)	((ESR_NEPTUNE_BASE +\
150*3859Sml29623 						SR_RX_TX_TUNING_1_A +\
151*3859Sml29623 						(chan * 0x20)) >> 1)
152*3859Sml29623 #define	ESR_NEP_RX_TX_TUNING_1_H_ADDR(chan)	((ESR_NEPTUNE_BASE +\
153*3859Sml29623 						SR_RX_TX_TUNING_1_A +\
154*3859Sml29623 						(chan * 0x20)) >> 1) + 1
155*3859Sml29623 #define	ESR_NEP_RX_TX_TUNING_2_L_ADDR(chan)	((ESR_NEPTUNE_BASE +\
156*3859Sml29623 						SR_RX_TX_TUNING_2_A +\
157*3859Sml29623 						(chan * 0x20)) >> 1)
158*3859Sml29623 #define	ESR_NEP_RX_TX_TUNING_2_H_ADDR(chan)	((ESR_NEPTUNE_BASE +\
159*3859Sml29623 						SR_RX_TX_TUNING_2_A +\
160*3859Sml29623 						(chan * 0x20)) >> 1) + 1
161*3859Sml29623 #define	ESR_NEP_RX_TX_TUNING_3_L_ADDR(chan)	((ESR_NEPTUNE_BASE +\
162*3859Sml29623 						SR_RX_TX_TUNING_3_A +\
163*3859Sml29623 						(chan * 0x20)) >> 1)
164*3859Sml29623 #define	ESR_NEP_RX_TX_TUNING_3_H_ADDR(chan)	((ESR_NEPTUNE_BASE +\
165*3859Sml29623 						SR_RX_TX_TUNING_3_A +\
166*3859Sml29623 						(chan * 0x20)) >> 1) + 1
167*3859Sml29623 
168*3859Sml29623 typedef	union _sr_rx_tx_common_ctrl_l {
169*3859Sml29623 	uint16_t value;
170*3859Sml29623 	struct {
171*3859Sml29623 #if defined(_BIT_FIELDS_HTOL)
172*3859Sml29623 		uint16_t res3		: 3;
173*3859Sml29623 		uint16_t refclkr_freq	: 5;
174*3859Sml29623 		uint16_t res4		: 8;
175*3859Sml29623 #elif defined(_BIT_FIELDS_LTOH)
176*3859Sml29623 		uint16_t res4		: 8;
177*3859Sml29623 		uint16_t refclkr_freq	: 5;
178*3859Sml29623 		uint16_t res3		: 3;
179*3859Sml29623 #else
180*3859Sml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
181*3859Sml29623 #endif
182*3859Sml29623 	} bits;
183*3859Sml29623 } sr_rx_tx_common_ctrl_l;
184*3859Sml29623 
185*3859Sml29623 typedef	union _sr_rx_tx_common_ctrl_h {
186*3859Sml29623 	uint16_t value;
187*3859Sml29623 	struct {
188*3859Sml29623 #if defined(_BIT_FIELDS_HTOL)
189*3859Sml29623 		uint16_t res1		: 5;
190*3859Sml29623 		uint16_t tdmaster	: 3;
191*3859Sml29623 		uint16_t tp		: 2;
192*3859Sml29623 		uint16_t tz		: 2;
193*3859Sml29623 		uint16_t res2		: 2;
194*3859Sml29623 		uint16_t revlbrefsel	: 2;
195*3859Sml29623 #elif defined(_BIT_FIELDS_LTOH)
196*3859Sml29623 		uint16_t revlbrefsel	: 2;
197*3859Sml29623 		uint16_t res2		: 2;
198*3859Sml29623 		uint16_t tz		: 2;
199*3859Sml29623 		uint16_t tp		: 2;
200*3859Sml29623 		uint16_t tdmaster	: 3;
201*3859Sml29623 		uint16_t res1		: 5;
202*3859Sml29623 #else
203*3859Sml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
204*3859Sml29623 #endif
205*3859Sml29623 	} bits;
206*3859Sml29623 } sr_rx_tx_common_ctrl_h;
207*3859Sml29623 
208*3859Sml29623 
209*3859Sml29623 /* RX TX Common Control Register field values */
210*3859Sml29623 
211*3859Sml29623 #define	TDMASTER_LANE_A		0
212*3859Sml29623 #define	TDMASTER_LANE_B		1
213*3859Sml29623 #define	TDMASTER_LANE_C		2
214*3859Sml29623 #define	TDMASTER_LANE_D		3
215*3859Sml29623 
216*3859Sml29623 #define	REVLBREFSEL_GBT_RBC_A_O		0
217*3859Sml29623 #define	REVLBREFSEL_GBT_RBC_B_O		1
218*3859Sml29623 #define	REVLBREFSEL_GBT_RBC_C_O		2
219*3859Sml29623 #define	REVLBREFSEL_GBT_RBC_D_O		3
220*3859Sml29623 
221*3859Sml29623 #define	REFCLKR_FREQ_SIM		0
222*3859Sml29623 #define	REFCLKR_FREQ_53_125		0x1
223*3859Sml29623 #define	REFCLKR_FREQ_62_5		0x3
224*3859Sml29623 #define	REFCLKR_FREQ_70_83		0x4
225*3859Sml29623 #define	REFCLKR_FREQ_75			0x5
226*3859Sml29623 #define	REFCLKR_FREQ_78_125		0x6
227*3859Sml29623 #define	REFCLKR_FREQ_79_6875		0x7
228*3859Sml29623 #define	REFCLKR_FREQ_83_33		0x8
229*3859Sml29623 #define	REFCLKR_FREQ_85			0x9
230*3859Sml29623 #define	REFCLKR_FREQ_100		0xA
231*3859Sml29623 #define	REFCLKR_FREQ_104_17		0xB
232*3859Sml29623 #define	REFCLKR_FREQ_106_25		0xC
233*3859Sml29623 #define	REFCLKR_FREQ_120		0xF
234*3859Sml29623 #define	REFCLKR_FREQ_125		0x10
235*3859Sml29623 #define	REFCLKR_FREQ_127_5		0x11
236*3859Sml29623 #define	REFCLKR_FREQ_141_67		0x13
237*3859Sml29623 #define	REFCLKR_FREQ_150		0x15
238*3859Sml29623 #define	REFCLKR_FREQ_156_25		0x16
239*3859Sml29623 #define	REFCLKR_FREQ_159_375		0x17
240*3859Sml29623 #define	REFCLKR_FREQ_170		0x19
241*3859Sml29623 #define	REFCLKR_FREQ_212_5		0x1E
242*3859Sml29623 
243*3859Sml29623 typedef	union _sr_rx_tx_reset_ctrl_l {
244*3859Sml29623 	uint16_t value;
245*3859Sml29623 	struct {
246*3859Sml29623 #if defined(_BIT_FIELDS_HTOL)
247*3859Sml29623 		uint16_t rxreset_0a	: 1;
248*3859Sml29623 		uint16_t rxreset_0b	: 1;
249*3859Sml29623 		uint16_t rxreset_0c	: 1;
250*3859Sml29623 		uint16_t rxreset_0d	: 1;
251*3859Sml29623 		uint16_t rxreset_1a	: 1;
252*3859Sml29623 		uint16_t rxreset_1b	: 1;
253*3859Sml29623 		uint16_t rxreset_1c	: 1;
254*3859Sml29623 		uint16_t rxreset_1d	: 1;
255*3859Sml29623 		uint16_t rxreset_2a	: 1;
256*3859Sml29623 		uint16_t rxreset_2b	: 1;
257*3859Sml29623 		uint16_t rxreset_2c	: 1;
258*3859Sml29623 		uint16_t rxreset_2d	: 1;
259*3859Sml29623 		uint16_t rxreset_3a	: 1;
260*3859Sml29623 		uint16_t rxreset_3b	: 1;
261*3859Sml29623 		uint16_t rxreset_3c	: 1;
262*3859Sml29623 		uint16_t rxreset_3d	: 1;
263*3859Sml29623 #elif defined(_BIT_FIELDS_LTOH)
264*3859Sml29623 		uint16_t rxreset_3d	: 1;
265*3859Sml29623 		uint16_t rxreset_3c	: 1;
266*3859Sml29623 		uint16_t rxreset_3b	: 1;
267*3859Sml29623 		uint16_t rxreset_3a	: 1;
268*3859Sml29623 		uint16_t rxreset_2d	: 1;
269*3859Sml29623 		uint16_t rxreset_2c	: 1;
270*3859Sml29623 		uint16_t rxreset_2b	: 1;
271*3859Sml29623 		uint16_t rxreset_2a	: 1;
272*3859Sml29623 		uint16_t rxreset_1d	: 1;
273*3859Sml29623 		uint16_t rxreset_1c	: 1;
274*3859Sml29623 		uint16_t rxreset_1b	: 1;
275*3859Sml29623 		uint16_t rxreset_1a	: 1;
276*3859Sml29623 		uint16_t rxreset_0d	: 1;
277*3859Sml29623 		uint16_t rxreset_0c	: 1;
278*3859Sml29623 		uint16_t rxreset_0b	: 1;
279*3859Sml29623 		uint16_t rxreset_0a	: 1;
280*3859Sml29623 #else
281*3859Sml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
282*3859Sml29623 #endif
283*3859Sml29623 	} bits;
284*3859Sml29623 } sr_rx_tx_reset_ctrl_l;
285*3859Sml29623 
286*3859Sml29623 
287*3859Sml29623 typedef	union _sr_rx_tx_reset_ctrl_h {
288*3859Sml29623 	uint16_t value;
289*3859Sml29623 	struct {
290*3859Sml29623 #if defined(_BIT_FIELDS_HTOL)
291*3859Sml29623 		uint16_t txreset_0a	: 1;
292*3859Sml29623 		uint16_t txreset_0b	: 1;
293*3859Sml29623 		uint16_t txreset_0c	: 1;
294*3859Sml29623 		uint16_t txreset_0d	: 1;
295*3859Sml29623 		uint16_t txreset_1a	: 1;
296*3859Sml29623 		uint16_t txreset_1b	: 1;
297*3859Sml29623 		uint16_t txreset_1c	: 1;
298*3859Sml29623 		uint16_t txreset_1d	: 1;
299*3859Sml29623 		uint16_t txreset_2a	: 1;
300*3859Sml29623 		uint16_t txreset_2b	: 1;
301*3859Sml29623 		uint16_t txreset_2c	: 1;
302*3859Sml29623 		uint16_t txreset_2d	: 1;
303*3859Sml29623 		uint16_t txreset_3a	: 1;
304*3859Sml29623 		uint16_t txreset_3b	: 1;
305*3859Sml29623 		uint16_t txreset_3c	: 1;
306*3859Sml29623 		uint16_t txreset_3d	: 1;
307*3859Sml29623 #elif defined(_BIT_FIELDS_LTOH)
308*3859Sml29623 		uint16_t txreset_3d	: 1;
309*3859Sml29623 		uint16_t txreset_3c	: 1;
310*3859Sml29623 		uint16_t txreset_3b	: 1;
311*3859Sml29623 		uint16_t txreset_3a	: 1;
312*3859Sml29623 		uint16_t txreset_2d	: 1;
313*3859Sml29623 		uint16_t txreset_2c	: 1;
314*3859Sml29623 		uint16_t txreset_2b	: 1;
315*3859Sml29623 		uint16_t txreset_2a	: 1;
316*3859Sml29623 		uint16_t txreset_1d	: 1;
317*3859Sml29623 		uint16_t txreset_1c	: 1;
318*3859Sml29623 		uint16_t txreset_1b	: 1;
319*3859Sml29623 		uint16_t txreset_1a	: 1;
320*3859Sml29623 		uint16_t txreset_0d	: 1;
321*3859Sml29623 		uint16_t txreset_0c	: 1;
322*3859Sml29623 		uint16_t txreset_0b	: 1;
323*3859Sml29623 		uint16_t txreset_0a	: 1;
324*3859Sml29623 #else
325*3859Sml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
326*3859Sml29623 #endif
327*3859Sml29623 	} bits;
328*3859Sml29623 } sr_rx_tx_reset_ctrl_h;
329*3859Sml29623 
330*3859Sml29623 typedef	union _sr_rx_power_ctrl_l {
331*3859Sml29623 	uint16_t value;
332*3859Sml29623 	struct {
333*3859Sml29623 #if defined(_BIT_FIELDS_HTOL)
334*3859Sml29623 		uint16_t pdrxlos_0a	: 1;
335*3859Sml29623 		uint16_t pdrxlos_0b	: 1;
336*3859Sml29623 		uint16_t pdrxlos_0c	: 1;
337*3859Sml29623 		uint16_t pdrxlos_0d	: 1;
338*3859Sml29623 		uint16_t pdrxlos_1a	: 1;
339*3859Sml29623 		uint16_t pdrxlos_1b	: 1;
340*3859Sml29623 		uint16_t pdrxlos_1c	: 1;
341*3859Sml29623 		uint16_t pdrxlos_1d	: 1;
342*3859Sml29623 		uint16_t pdrxlos_2a	: 1;
343*3859Sml29623 		uint16_t pdrxlos_2b	: 1;
344*3859Sml29623 		uint16_t pdrxlos_2c	: 1;
345*3859Sml29623 		uint16_t pdrxlos_2d	: 1;
346*3859Sml29623 		uint16_t pdrxlos_3a	: 1;
347*3859Sml29623 		uint16_t pdrxlos_3b	: 1;
348*3859Sml29623 		uint16_t pdrxlos_3c	: 1;
349*3859Sml29623 		uint16_t pdrxlos_3d	: 1;
350*3859Sml29623 #elif defined(_BIT_FIELDS_LTOH)
351*3859Sml29623 		uint16_t pdrxlos_3d	: 1;
352*3859Sml29623 		uint16_t pdrxlos_3c	: 1;
353*3859Sml29623 		uint16_t pdrxlos_3b	: 1;
354*3859Sml29623 		uint16_t pdrxlos_3a	: 1;
355*3859Sml29623 		uint16_t pdrxlos_2d	: 1;
356*3859Sml29623 		uint16_t pdrxlos_2c	: 1;
357*3859Sml29623 		uint16_t pdrxlos_2b	: 1;
358*3859Sml29623 		uint16_t pdrxlos_2a	: 1;
359*3859Sml29623 		uint16_t pdrxlos_1d	: 1;
360*3859Sml29623 		uint16_t pdrxlos_1c	: 1;
361*3859Sml29623 		uint16_t pdrxlos_1b	: 1;
362*3859Sml29623 		uint16_t pdrxlos_1a	: 1;
363*3859Sml29623 		uint16_t pdrxlos_0d	: 1;
364*3859Sml29623 		uint16_t pdrxlos_0c	: 1;
365*3859Sml29623 		uint16_t pdrxlos_0b	: 1;
366*3859Sml29623 		uint16_t pdrxlos_0a	: 1;
367*3859Sml29623 #else
368*3859Sml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
369*3859Sml29623 #endif
370*3859Sml29623 	} bits;
371*3859Sml29623 } sr_rx_power_ctrl_l_t;
372*3859Sml29623 
373*3859Sml29623 
374*3859Sml29623 typedef	union _sr_rx_power_ctrl_h {
375*3859Sml29623 	uint16_t value;
376*3859Sml29623 	struct {
377*3859Sml29623 #if defined(_BIT_FIELDS_HTOL)
378*3859Sml29623 		uint16_t pdownr_0a	: 1;
379*3859Sml29623 		uint16_t pdownr_0b	: 1;
380*3859Sml29623 		uint16_t pdownr_0c	: 1;
381*3859Sml29623 		uint16_t pdownr_0d	: 1;
382*3859Sml29623 		uint16_t pdownr_1a	: 1;
383*3859Sml29623 		uint16_t pdownr_1b	: 1;
384*3859Sml29623 		uint16_t pdownr_1c	: 1;
385*3859Sml29623 		uint16_t pdownr_1d	: 1;
386*3859Sml29623 		uint16_t pdownr_2a	: 1;
387*3859Sml29623 		uint16_t pdownr_2b	: 1;
388*3859Sml29623 		uint16_t pdownr_2c	: 1;
389*3859Sml29623 		uint16_t pdownr_2d	: 1;
390*3859Sml29623 		uint16_t pdownr_3a	: 1;
391*3859Sml29623 		uint16_t pdownr_3b	: 1;
392*3859Sml29623 		uint16_t pdownr_3c	: 1;
393*3859Sml29623 		uint16_t pdownr_3d	: 1;
394*3859Sml29623 #elif defined(_BIT_FIELDS_LTOH)
395*3859Sml29623 		uint16_t pdownr_3d	: 1;
396*3859Sml29623 		uint16_t pdownr_3c	: 1;
397*3859Sml29623 		uint16_t pdownr_3b	: 1;
398*3859Sml29623 		uint16_t pdownr_3a	: 1;
399*3859Sml29623 		uint16_t pdownr_2d	: 1;
400*3859Sml29623 		uint16_t pdownr_2c	: 1;
401*3859Sml29623 		uint16_t pdownr_2b	: 1;
402*3859Sml29623 		uint16_t pdownr_2a	: 1;
403*3859Sml29623 		uint16_t pdownr_1d	: 1;
404*3859Sml29623 		uint16_t pdownr_1c	: 1;
405*3859Sml29623 		uint16_t pdownr_1b	: 1;
406*3859Sml29623 		uint16_t pdownr_1a	: 1;
407*3859Sml29623 		uint16_t pdownr_0d	: 1;
408*3859Sml29623 		uint16_t pdownr_0c	: 1;
409*3859Sml29623 		uint16_t pdownr_0b	: 1;
410*3859Sml29623 		uint16_t pdownr_0a	: 1;
411*3859Sml29623 #else
412*3859Sml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
413*3859Sml29623 #endif
414*3859Sml29623 	} bits;
415*3859Sml29623 } sr_rx_power_ctrl_h_t;
416*3859Sml29623 
417*3859Sml29623 typedef	union _sr_tx_power_ctrl_l {
418*3859Sml29623 	uint16_t value;
419*3859Sml29623 	struct {
420*3859Sml29623 #if defined(_BIT_FIELDS_HTOL)
421*3859Sml29623 		uint16_t res1		: 8;
422*3859Sml29623 		uint16_t pdownppll0	: 1;
423*3859Sml29623 		uint16_t pdownppll1	: 1;
424*3859Sml29623 		uint16_t pdownppll2	: 1;
425*3859Sml29623 		uint16_t pdownppll3	: 1;
426*3859Sml29623 		uint16_t res2		: 4;
427*3859Sml29623 #elif defined(_BIT_FIELDS_LTOH)
428*3859Sml29623 		uint16_t res2		: 4;
429*3859Sml29623 		uint16_t pdownppll3	: 1;
430*3859Sml29623 		uint16_t pdownppll2	: 1;
431*3859Sml29623 		uint16_t pdownppll1	: 1;
432*3859Sml29623 		uint16_t pdownppll0	: 1;
433*3859Sml29623 		uint16_t res1		: 8;
434*3859Sml29623 #else
435*3859Sml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
436*3859Sml29623 #endif
437*3859Sml29623 	} bits;
438*3859Sml29623 } sr_tx_power_ctrl_l_t;
439*3859Sml29623 
440*3859Sml29623 typedef	union _sr_tx_power_ctrl_h {
441*3859Sml29623 	uint16_t value;
442*3859Sml29623 	struct {
443*3859Sml29623 #if defined(_BIT_FIELDS_HTOL)
444*3859Sml29623 		uint16_t pdownt_0a	: 1;
445*3859Sml29623 		uint16_t pdownt_0b	: 1;
446*3859Sml29623 		uint16_t pdownt_0c	: 1;
447*3859Sml29623 		uint16_t pdownt_0d	: 1;
448*3859Sml29623 		uint16_t pdownt_1a	: 1;
449*3859Sml29623 		uint16_t pdownt_1b	: 1;
450*3859Sml29623 		uint16_t pdownt_1c	: 1;
451*3859Sml29623 		uint16_t pdownt_1d	: 1;
452*3859Sml29623 		uint16_t pdownt_2a	: 1;
453*3859Sml29623 		uint16_t pdownt_2b	: 1;
454*3859Sml29623 		uint16_t pdownt_2c	: 1;
455*3859Sml29623 		uint16_t pdownt_2d	: 1;
456*3859Sml29623 		uint16_t pdownt_3a	: 1;
457*3859Sml29623 		uint16_t pdownt_3b	: 1;
458*3859Sml29623 		uint16_t pdownt_3c	: 1;
459*3859Sml29623 		uint16_t pdownt_3d	: 1;
460*3859Sml29623 #elif defined(_BIT_FIELDS_LTOH)
461*3859Sml29623 		uint16_t pdownt_3d	: 1;
462*3859Sml29623 		uint16_t pdownt_3c	: 1;
463*3859Sml29623 		uint16_t pdownt_3b	: 1;
464*3859Sml29623 		uint16_t pdownt_3a	: 1;
465*3859Sml29623 		uint16_t pdownt_2d	: 1;
466*3859Sml29623 		uint16_t pdownt_2c	: 1;
467*3859Sml29623 		uint16_t pdownt_2b	: 1;
468*3859Sml29623 		uint16_t pdownt_2a	: 1;
469*3859Sml29623 		uint16_t pdownt_1d	: 1;
470*3859Sml29623 		uint16_t pdownt_1c	: 1;
471*3859Sml29623 		uint16_t pdownt_1b	: 1;
472*3859Sml29623 		uint16_t pdownt_1a	: 1;
473*3859Sml29623 		uint16_t pdownt_0d	: 1;
474*3859Sml29623 		uint16_t pdownt_0c	: 1;
475*3859Sml29623 		uint16_t pdownt_0b	: 1;
476*3859Sml29623 		uint16_t pdownt_0a	: 1;
477*3859Sml29623 #else
478*3859Sml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
479*3859Sml29623 #endif
480*3859Sml29623 	} bits;
481*3859Sml29623 } sr_tx_power_ctrl_h_t;
482*3859Sml29623 
483*3859Sml29623 typedef	union _sr_misc_power_ctrl_l {
484*3859Sml29623 	uint16_t value;
485*3859Sml29623 	struct {
486*3859Sml29623 #if defined(_BIT_FIELDS_HTOL)
487*3859Sml29623 		uint16_t res1		: 3;
488*3859Sml29623 		uint16_t pdrtrim	: 1;
489*3859Sml29623 		uint16_t pdownpecl0	: 1;
490*3859Sml29623 		uint16_t pdownpecl1	: 1;
491*3859Sml29623 		uint16_t pdownpecl2	: 1;
492*3859Sml29623 		uint16_t pdownpecl3	: 1;
493*3859Sml29623 		uint16_t pdownppll0	: 1;
494*3859Sml29623 		uint16_t pdownppll1	: 1;
495*3859Sml29623 		uint16_t pdownppll2	: 1;
496*3859Sml29623 		uint16_t pdownppll3	: 1;
497*3859Sml29623 		uint16_t res2		: 4;
498*3859Sml29623 #elif defined(_BIT_FIELDS_LTOH)
499*3859Sml29623 		uint16_t res2		: 4;
500*3859Sml29623 		uint16_t pdownppll3	: 1;
501*3859Sml29623 		uint16_t pdownppll2	: 1;
502*3859Sml29623 		uint16_t pdownppll1	: 1;
503*3859Sml29623 		uint16_t pdownppll0	: 1;
504*3859Sml29623 		uint16_t pdownpecl3	: 1;
505*3859Sml29623 		uint16_t pdownpecl2	: 1;
506*3859Sml29623 		uint16_t pdownpecl1	: 1;
507*3859Sml29623 		uint16_t pdownpecl0	: 1;
508*3859Sml29623 		uint16_t pdrtrim	: 1;
509*3859Sml29623 		uint16_t res1		: 3;
510*3859Sml29623 #else
511*3859Sml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
512*3859Sml29623 #endif
513*3859Sml29623 	} bits;
514*3859Sml29623 } sr_misc_power_ctrl_l_t;
515*3859Sml29623 
516*3859Sml29623 typedef	union _misc_power_ctrl_h {
517*3859Sml29623 	uint16_t value;
518*3859Sml29623 	struct {
519*3859Sml29623 #if defined(_BIT_FIELDS_HTOL)
520*3859Sml29623 		uint16_t pdclkout0	: 1;
521*3859Sml29623 		uint16_t pdclkout1	: 1;
522*3859Sml29623 		uint16_t pdclkout2	: 1;
523*3859Sml29623 		uint16_t pdclkout3	: 1;
524*3859Sml29623 		uint16_t res1		: 12;
525*3859Sml29623 #elif defined(_BIT_FIELDS_LTOH)
526*3859Sml29623 		uint16_t res1		: 12;
527*3859Sml29623 		uint16_t pdclkout3	: 1;
528*3859Sml29623 		uint16_t pdclkout2	: 1;
529*3859Sml29623 		uint16_t pdclkout1	: 1;
530*3859Sml29623 		uint16_t pdclkout0	: 1;
531*3859Sml29623 #else
532*3859Sml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
533*3859Sml29623 #endif
534*3859Sml29623 	} bits;
535*3859Sml29623 } misc_power_ctrl_h_t;
536*3859Sml29623 
537*3859Sml29623 typedef	union _sr_rx_tx_ctrl_l {
538*3859Sml29623 	uint16_t value;
539*3859Sml29623 	struct {
540*3859Sml29623 #if defined(_BIT_FIELDS_HTOL)
541*3859Sml29623 		uint16_t res1		: 2;
542*3859Sml29623 		uint16_t rxpreswin	: 2;
543*3859Sml29623 		uint16_t res2		: 1;
544*3859Sml29623 		uint16_t risefall	: 3;
545*3859Sml29623 		uint16_t res3		: 7;
546*3859Sml29623 		uint16_t enstretch	: 1;
547*3859Sml29623 #elif defined(_BIT_FIELDS_LTOH)
548*3859Sml29623 		uint16_t enstretch	: 1;
549*3859Sml29623 		uint16_t res3		: 7;
550*3859Sml29623 		uint16_t risefall	: 3;
551*3859Sml29623 		uint16_t res2		: 1;
552*3859Sml29623 		uint16_t rxpreswin	: 2;
553*3859Sml29623 		uint16_t res1		: 2;
554*3859Sml29623 #else
555*3859Sml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
556*3859Sml29623 #endif
557*3859Sml29623 	} bits;
558*3859Sml29623 } sr_rx_tx_ctrl_l_t;
559*3859Sml29623 
560*3859Sml29623 typedef	union _sr_rx_tx_ctrl_h {
561*3859Sml29623 	uint16_t value;
562*3859Sml29623 	struct {
563*3859Sml29623 #if defined(_BIT_FIELDS_HTOL)
564*3859Sml29623 		uint16_t biascntl	: 1;
565*3859Sml29623 		uint16_t res1		: 5;
566*3859Sml29623 		uint16_t tdenfifo	: 1;
567*3859Sml29623 		uint16_t tdws20		: 1;
568*3859Sml29623 		uint16_t vmuxlo		: 2;
569*3859Sml29623 		uint16_t vpulselo	: 2;
570*3859Sml29623 		uint16_t res2		: 4;
571*3859Sml29623 #elif defined(_BIT_FIELDS_LTOH)
572*3859Sml29623 		uint16_t res2		: 4;
573*3859Sml29623 		uint16_t vpulselo	: 2;
574*3859Sml29623 		uint16_t vmuxlo		: 2;
575*3859Sml29623 		uint16_t tdws20		: 1;
576*3859Sml29623 		uint16_t tdenfifo	: 1;
577*3859Sml29623 		uint16_t res1		: 5;
578*3859Sml29623 		uint16_t biascntl	: 1;
579*3859Sml29623 #else
580*3859Sml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
581*3859Sml29623 #endif
582*3859Sml29623 	} bits;
583*3859Sml29623 } sr_rx_tx_ctrl_h_t;
584*3859Sml29623 
585*3859Sml29623 #define	RXPRESWIN_52US_300BITTIMES	0
586*3859Sml29623 #define	RXPRESWIN_53US_300BITTIMES	1
587*3859Sml29623 #define	RXPRESWIN_54US_300BITTIMES	2
588*3859Sml29623 #define	RXPRESWIN_55US_300BITTIMES	3
589*3859Sml29623 
590*3859Sml29623 typedef	union _sr_rx_tx_tuning_l {
591*3859Sml29623 	uint16_t value;
592*3859Sml29623 	struct {
593*3859Sml29623 #if defined(_BIT_FIELDS_HTOL)
594*3859Sml29623 		uint16_t rxeq		: 4;
595*3859Sml29623 		uint16_t res1		: 12;
596*3859Sml29623 #elif defined(_BIT_FIELDS_LTOH)
597*3859Sml29623 		uint16_t res1		: 12;
598*3859Sml29623 		uint16_t rxeq		: 4;
599*3859Sml29623 #else
600*3859Sml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
601*3859Sml29623 #endif
602*3859Sml29623 	} bits;
603*3859Sml29623 } sr_rx_tx_tuning_l_t;
604*3859Sml29623 
605*3859Sml29623 typedef	union _sr_rx_tx_tuning_h {
606*3859Sml29623 	uint16_t value;
607*3859Sml29623 	struct {
608*3859Sml29623 #if defined(_BIT_FIELDS_HTOL)
609*3859Sml29623 		uint16_t res1		: 8;
610*3859Sml29623 		uint16_t rp		: 2;
611*3859Sml29623 		uint16_t rz		: 2;
612*3859Sml29623 		uint16_t vtxlo		: 4;
613*3859Sml29623 #elif defined(_BIT_FIELDS_LTOH)
614*3859Sml29623 		uint16_t vtxlo		: 4;
615*3859Sml29623 		uint16_t rz		: 2;
616*3859Sml29623 		uint16_t rp		: 2;
617*3859Sml29623 		uint16_t res1		: 8;
618*3859Sml29623 #else
619*3859Sml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
620*3859Sml29623 #endif
621*3859Sml29623 	} bits;
622*3859Sml29623 } sr_rx_tx_tuning_h_t;
623*3859Sml29623 
624*3859Sml29623 typedef	union _sr_rx_syncchar_l {
625*3859Sml29623 	uint16_t value;
626*3859Sml29623 	struct {
627*3859Sml29623 #if defined(_BIT_FIELDS_HTOL)
628*3859Sml29623 		uint16_t syncchar_0_3	: 4;
629*3859Sml29623 		uint16_t res1		: 2;
630*3859Sml29623 		uint16_t syncmask	: 10;
631*3859Sml29623 #elif defined(_BIT_FIELDS_LTOH)
632*3859Sml29623 		uint16_t syncmask	: 10;
633*3859Sml29623 		uint16_t res1		: 2;
634*3859Sml29623 		uint16_t syncchar_0_3	: 4;
635*3859Sml29623 #else
636*3859Sml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
637*3859Sml29623 #endif
638*3859Sml29623 	} bits;
639*3859Sml29623 } sr_rx_syncchar_l_t;
640*3859Sml29623 
641*3859Sml29623 typedef	union _sr_rx_syncchar_h {
642*3859Sml29623 	uint16_t value;
643*3859Sml29623 	struct {
644*3859Sml29623 #if defined(_BIT_FIELDS_HTOL)
645*3859Sml29623 		uint16_t res1		: 1;
646*3859Sml29623 		uint16_t syncpol	: 1;
647*3859Sml29623 		uint16_t res2		: 8;
648*3859Sml29623 		uint16_t syncchar_4_10	: 6;
649*3859Sml29623 #elif defined(_BIT_FIELDS_LTOH)
650*3859Sml29623 		uint16_t syncchar_4_10	: 6;
651*3859Sml29623 		uint16_t res2		: 8;
652*3859Sml29623 		uint16_t syncpol	: 1;
653*3859Sml29623 		uint16_t res1		: 1;
654*3859Sml29623 #else
655*3859Sml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
656*3859Sml29623 #endif
657*3859Sml29623 	} bits;
658*3859Sml29623 } sr_rx_syncchar_h_t;
659*3859Sml29623 
660*3859Sml29623 typedef	union _sr_rx_tx_test_l {
661*3859Sml29623 	uint16_t value;
662*3859Sml29623 	struct {
663*3859Sml29623 #if defined(_BIT_FIELDS_HTOL)
664*3859Sml29623 		uint16_t res1		: 15;
665*3859Sml29623 		uint16_t ref50		: 1;
666*3859Sml29623 #elif defined(_BIT_FIELDS_LTOH)
667*3859Sml29623 		uint16_t ref50		: 1;
668*3859Sml29623 		uint16_t res1		: 15;
669*3859Sml29623 #else
670*3859Sml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
671*3859Sml29623 #endif
672*3859Sml29623 	} bits;
673*3859Sml29623 } sr_rx_tx_test_l_t;
674*3859Sml29623 
675*3859Sml29623 typedef	union _sr_rx_tx_test_h {
676*3859Sml29623 	uint16_t value;
677*3859Sml29623 	struct {
678*3859Sml29623 #if defined(_BIT_FIELDS_HTOL)
679*3859Sml29623 		uint16_t res1		: 5;
680*3859Sml29623 		uint16_t selftest	: 3;
681*3859Sml29623 		uint16_t res2		: 8;
682*3859Sml29623 #elif defined(_BIT_FIELDS_LTOH)
683*3859Sml29623 		uint16_t res2		: 8;
684*3859Sml29623 		uint16_t selftest	: 3;
685*3859Sml29623 		uint16_t res1		: 5;
686*3859Sml29623 #else
687*3859Sml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
688*3859Sml29623 #endif
689*3859Sml29623 	} bits;
690*3859Sml29623 } sr_rx_tx_test_h_t;
691*3859Sml29623 
692*3859Sml29623 typedef	union _sr_glue_ctrl0_l {
693*3859Sml29623 	uint16_t value;
694*3859Sml29623 	struct {
695*3859Sml29623 #if defined(_BIT_FIELDS_HTOL)
696*3859Sml29623 		uint16_t rxlos_test	: 1;
697*3859Sml29623 		uint16_t res1		: 1;
698*3859Sml29623 		uint16_t rxlosenable	: 1;
699*3859Sml29623 		uint16_t fastresync	: 1;
700*3859Sml29623 		uint16_t samplerate	: 4;
701*3859Sml29623 		uint16_t thresholdcount	: 8;
702*3859Sml29623 #elif defined(_BIT_FIELDS_LTOH)
703*3859Sml29623 		uint16_t thresholdcount	: 8;
704*3859Sml29623 		uint16_t samplerate	: 4;
705*3859Sml29623 		uint16_t fastresync	: 1;
706*3859Sml29623 		uint16_t rxlosenable	: 1;
707*3859Sml29623 		uint16_t res1		: 1;
708*3859Sml29623 		uint16_t rxlos_test	: 1;
709*3859Sml29623 #else
710*3859Sml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
711*3859Sml29623 #endif
712*3859Sml29623 	} bits;
713*3859Sml29623 } sr_glue_ctrl0_l_t;
714*3859Sml29623 
715*3859Sml29623 typedef	union _sr_glue_ctrl0_h {
716*3859Sml29623 	uint16_t value;
717*3859Sml29623 	struct {
718*3859Sml29623 #if defined(_BIT_FIELDS_HTOL)
719*3859Sml29623 		uint16_t res1		: 5;
720*3859Sml29623 		uint16_t bitlocktime	: 3;
721*3859Sml29623 		uint16_t res2		: 8;
722*3859Sml29623 #elif defined(_BIT_FIELDS_LTOH)
723*3859Sml29623 		uint16_t res2		: 8;
724*3859Sml29623 		uint16_t bitlocktime	: 3;
725*3859Sml29623 		uint16_t res1		: 5;
726*3859Sml29623 #else
727*3859Sml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
728*3859Sml29623 #endif
729*3859Sml29623 	} bits;
730*3859Sml29623 } sr_glue_ctrl0_h_t;
731*3859Sml29623 
732*3859Sml29623 #define	BITLOCKTIME_64_CYCLES		0
733*3859Sml29623 #define	BITLOCKTIME_128_CYCLES		1
734*3859Sml29623 #define	BITLOCKTIME_256_CYCLES		2
735*3859Sml29623 #define	BITLOCKTIME_300_CYCLES		3
736*3859Sml29623 #define	BITLOCKTIME_384_CYCLES		4
737*3859Sml29623 #define	BITLOCKTIME_512_CYCLES		5
738*3859Sml29623 #define	BITLOCKTIME_1024_CYCLES		6
739*3859Sml29623 #define	BITLOCKTIME_2048_CYCLES		7
740*3859Sml29623 
741*3859Sml29623 typedef	union _sr_glue_ctrl1_l {
742*3859Sml29623 	uint16_t value;
743*3859Sml29623 	struct {
744*3859Sml29623 #if defined(_BIT_FIELDS_HTOL)
745*3859Sml29623 		uint16_t res1		: 14;
746*3859Sml29623 		uint16_t inittime	: 2;
747*3859Sml29623 #elif defined(_BIT_FIELDS_LTOH)
748*3859Sml29623 		uint16_t inittime	: 2;
749*3859Sml29623 		uint16_t res1		: 14;
750*3859Sml29623 #else
751*3859Sml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
752*3859Sml29623 #endif
753*3859Sml29623 	} bits;
754*3859Sml29623 } sr_glue_ctrl1_l_t;
755*3859Sml29623 
756*3859Sml29623 typedef	union glue_ctrl1_h {
757*3859Sml29623 	uint16_t value;
758*3859Sml29623 	struct {
759*3859Sml29623 #if defined(_BIT_FIELDS_HTOL)
760*3859Sml29623 		uint16_t termr_cfg	: 2;
761*3859Sml29623 		uint16_t termt_cfg	: 2;
762*3859Sml29623 		uint16_t rtrimen	: 2;
763*3859Sml29623 		uint16_t res1		: 10;
764*3859Sml29623 #elif defined(_BIT_FIELDS_LTOH)
765*3859Sml29623 		uint16_t res1		: 10;
766*3859Sml29623 		uint16_t rtrimen	: 2;
767*3859Sml29623 		uint16_t termt_cfg	: 2;
768*3859Sml29623 		uint16_t termr_cfg	: 2;
769*3859Sml29623 #else
770*3859Sml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
771*3859Sml29623 #endif
772*3859Sml29623 	} bits;
773*3859Sml29623 } glue_ctrl1_h_t;
774*3859Sml29623 
775*3859Sml29623 #define	TERM_CFG_67OHM		0
776*3859Sml29623 #define	TERM_CFG_72OHM		1
777*3859Sml29623 #define	TERM_CFG_80OHM		2
778*3859Sml29623 #define	TERM_CFG_87OHM		3
779*3859Sml29623 #define	TERM_CFG_46OHM		4
780*3859Sml29623 #define	TERM_CFG_48OHM		5
781*3859Sml29623 #define	TERM_CFG_52OHM		6
782*3859Sml29623 #define	TERM_CFG_55OHM		7
783*3859Sml29623 
784*3859Sml29623 #define	INITTIME_60US		0
785*3859Sml29623 #define	INITTIME_120US		1
786*3859Sml29623 #define	INITTIME_240US		2
787*3859Sml29623 #define	INITTIME_480US		3
788*3859Sml29623 
789*3859Sml29623 #ifdef	__cplusplus
790*3859Sml29623 }
791*3859Sml29623 #endif
792*3859Sml29623 
793*3859Sml29623 #endif	/* _SYS_NXGE_NXGE_SR_HW_H */
794