xref: /aosp_15_r20/external/coreboot/src/vendorcode/cavium/include/bdk/libbdk-arch/bdk-csrs-gsern.h (revision b9411a12aaaa7e1e6a6fb7c5e057f44ee179a49c)
1 #ifndef __BDK_CSRS_GSERN_H__
2 #define __BDK_CSRS_GSERN_H__
3 /* This file is auto-generated. Do not edit */
4 
5 /***********************license start***************
6  * Copyright (c) 2003-2017  Cavium Inc. ([email protected]). All rights
7  * reserved.
8  *
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions are
12  * met:
13  *
14  *   * Redistributions of source code must retain the above copyright
15  *     notice, this list of conditions and the following disclaimer.
16  *
17  *   * Redistributions in binary form must reproduce the above
18  *     copyright notice, this list of conditions and the following
19  *     disclaimer in the documentation and/or other materials provided
20  *     with the distribution.
21 
22  *   * Neither the name of Cavium Inc. nor the names of
23  *     its contributors may be used to endorse or promote products
24  *     derived from this software without specific prior written
25  *     permission.
26 
27  * This Software, including technical data, may be subject to U.S. export  control
28  * laws, including the U.S. Export Administration Act and its  associated
29  * regulations, and may be subject to export or import  regulations in other
30  * countries.
31 
32  * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
33  * AND WITH ALL FAULTS AND CAVIUM  NETWORKS MAKES NO PROMISES, REPRESENTATIONS OR
34  * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO
35  * THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY REPRESENTATION OR
36  * DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT DEFECTS, AND CAVIUM
37  * SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES OF TITLE,
38  * MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF
39  * VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR
40  * CORRESPONDENCE TO DESCRIPTION. THE ENTIRE  RISK ARISING OUT OF USE OR
41  * PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
42  ***********************license end**************************************/
43 
44 
45 /**
46  * @file
47  *
48  * Configuration and status register (CSR) address and type definitions for
49  * Cavium GSERN.
50  *
51  * This file is auto generated. Do not edit.
52  *
53  */
54 
55 /**
56  * Enumeration gsern_bar_e
57  *
58  * GSER Base Address Register Enumeration
59  * Enumerates the base address registers.
60  */
61 #define BDK_GSERN_BAR_E_GSERNX_PF_BAR0(a) (0x87e090000000ll + 0x1000000ll * (a))
62 #define BDK_GSERN_BAR_E_GSERNX_PF_BAR0_SIZE 0x100000ull
63 
64 /**
65  * Enumeration gsern_psb_acc_e
66  *
67  * GSERN Power Serial Bus Accumulator Enumeration
68  * Enumerates the GSERN accumulators for LMC slaves, which correspond to index {b} of
69  * PSBS_SYS()_ACCUM().
70  */
71 #define BDK_GSERN_PSB_ACC_E_TBD0 (0)
72 #define BDK_GSERN_PSB_ACC_E_TBD1 (1)
73 #define BDK_GSERN_PSB_ACC_E_TBD2 (2)
74 #define BDK_GSERN_PSB_ACC_E_TBD3 (3)
75 
76 /**
77  * Enumeration gsern_psb_event_e
78  *
79  * GSERN Power Serial Bus Event Enumeration
80  * Enumerates the event numbers for GSERN slaves, which correspond to index {b} of
81  * PSBS_SYS()_EVENT()_CFG.
82  */
83 #define BDK_GSERN_PSB_EVENT_E_TBD0 (0)
84 
85 /**
86  * Register (RSL) gsern#_common_bias_bcfg
87  *
88  * GSER Common Bias Base Configuration Register
89  */
90 union bdk_gsernx_common_bias_bcfg
91 {
92     uint64_t u;
93     struct bdk_gsernx_common_bias_bcfg_s
94     {
95 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
96         uint64_t reserved_36_63        : 28;
97         uint64_t dac1                  : 4;  /**< [ 35: 32](R/W) Ir25 reference current trim. Default setting (0x8) selects 0% trim. Minimum and
98                                                                  Maximum settings allow for up to + or - 12.5% trim.  For debug use only. */
99         uint64_t reserved_28_31        : 4;
100         uint64_t dac0                  : 4;  /**< [ 27: 24](R/W) Ic25 reference current trim. Default setting (0x8) selects 0% trim. Minimum and
101                                                                  Maximum settings allow for up to + or - 12.5% trim.  For debug use only. */
102         uint64_t reserved_18_23        : 6;
103         uint64_t bias                  : 2;  /**< [ 17: 16](R/W) Opamp bias current setting.  For debug use only.
104                                                                    0x0 = 33 uA.
105                                                                    0x1 = 25 uA.
106                                                                    0x2 = 20 uA.
107                                                                    0x3 = 17 uA. */
108         uint64_t reserved_9_15         : 7;
109         uint64_t bypass                : 1;  /**< [  8:  8](R/W) Assert to bypass the bandgap reference and use a resistive divider from VDDA
110                                                                  instead.  For diagnostic use only. */
111         uint64_t reserved_1_7          : 7;
112         uint64_t bias_pwdn             : 1;  /**< [  0:  0](R/W) Bias current power down control. */
113 #else /* Word 0 - Little Endian */
114         uint64_t bias_pwdn             : 1;  /**< [  0:  0](R/W) Bias current power down control. */
115         uint64_t reserved_1_7          : 7;
116         uint64_t bypass                : 1;  /**< [  8:  8](R/W) Assert to bypass the bandgap reference and use a resistive divider from VDDA
117                                                                  instead.  For diagnostic use only. */
118         uint64_t reserved_9_15         : 7;
119         uint64_t bias                  : 2;  /**< [ 17: 16](R/W) Opamp bias current setting.  For debug use only.
120                                                                    0x0 = 33 uA.
121                                                                    0x1 = 25 uA.
122                                                                    0x2 = 20 uA.
123                                                                    0x3 = 17 uA. */
124         uint64_t reserved_18_23        : 6;
125         uint64_t dac0                  : 4;  /**< [ 27: 24](R/W) Ic25 reference current trim. Default setting (0x8) selects 0% trim. Minimum and
126                                                                  Maximum settings allow for up to + or - 12.5% trim.  For debug use only. */
127         uint64_t reserved_28_31        : 4;
128         uint64_t dac1                  : 4;  /**< [ 35: 32](R/W) Ir25 reference current trim. Default setting (0x8) selects 0% trim. Minimum and
129                                                                  Maximum settings allow for up to + or - 12.5% trim.  For debug use only. */
130         uint64_t reserved_36_63        : 28;
131 #endif /* Word 0 - End */
132     } s;
133     /* struct bdk_gsernx_common_bias_bcfg_s cn; */
134 };
135 typedef union bdk_gsernx_common_bias_bcfg bdk_gsernx_common_bias_bcfg_t;
136 
137 static inline uint64_t BDK_GSERNX_COMMON_BIAS_BCFG(unsigned long a) __attribute__ ((pure, always_inline));
BDK_GSERNX_COMMON_BIAS_BCFG(unsigned long a)138 static inline uint64_t BDK_GSERNX_COMMON_BIAS_BCFG(unsigned long a)
139 {
140     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && (a<=7))
141         return 0x87e0900f0330ll + 0x1000000ll * ((a) & 0x7);
142     __bdk_csr_fatal("GSERNX_COMMON_BIAS_BCFG", 1, a, 0, 0, 0);
143 }
144 
145 #define typedef_BDK_GSERNX_COMMON_BIAS_BCFG(a) bdk_gsernx_common_bias_bcfg_t
146 #define bustype_BDK_GSERNX_COMMON_BIAS_BCFG(a) BDK_CSR_TYPE_RSL
147 #define basename_BDK_GSERNX_COMMON_BIAS_BCFG(a) "GSERNX_COMMON_BIAS_BCFG"
148 #define device_bar_BDK_GSERNX_COMMON_BIAS_BCFG(a) 0x0 /* PF_BAR0 */
149 #define busnum_BDK_GSERNX_COMMON_BIAS_BCFG(a) (a)
150 #define arguments_BDK_GSERNX_COMMON_BIAS_BCFG(a) (a),-1,-1,-1
151 
152 /**
153  * Register (RSL) gsern#_common_const
154  *
155  * GSER Common Constants Register
156  */
157 union bdk_gsernx_common_const
158 {
159     uint64_t u;
160     struct bdk_gsernx_common_const_s
161     {
162 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
163         uint64_t reserved_0_63         : 64;
164 #else /* Word 0 - Little Endian */
165         uint64_t reserved_0_63         : 64;
166 #endif /* Word 0 - End */
167     } s;
168     /* struct bdk_gsernx_common_const_s cn; */
169 };
170 typedef union bdk_gsernx_common_const bdk_gsernx_common_const_t;
171 
172 static inline uint64_t BDK_GSERNX_COMMON_CONST(unsigned long a) __attribute__ ((pure, always_inline));
BDK_GSERNX_COMMON_CONST(unsigned long a)173 static inline uint64_t BDK_GSERNX_COMMON_CONST(unsigned long a)
174 {
175     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && (a<=7))
176         return 0x87e0900f0088ll + 0x1000000ll * ((a) & 0x7);
177     __bdk_csr_fatal("GSERNX_COMMON_CONST", 1, a, 0, 0, 0);
178 }
179 
180 #define typedef_BDK_GSERNX_COMMON_CONST(a) bdk_gsernx_common_const_t
181 #define bustype_BDK_GSERNX_COMMON_CONST(a) BDK_CSR_TYPE_RSL
182 #define basename_BDK_GSERNX_COMMON_CONST(a) "GSERNX_COMMON_CONST"
183 #define device_bar_BDK_GSERNX_COMMON_CONST(a) 0x0 /* PF_BAR0 */
184 #define busnum_BDK_GSERNX_COMMON_CONST(a) (a)
185 #define arguments_BDK_GSERNX_COMMON_CONST(a) (a),-1,-1,-1
186 
187 /**
188  * Register (RSL) gsern#_common_const1
189  *
190  * GSER Common Constants Register 1
191  */
192 union bdk_gsernx_common_const1
193 {
194     uint64_t u;
195     struct bdk_gsernx_common_const1_s
196     {
197 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
198         uint64_t reserved_4_63         : 60;
199         uint64_t number_lanes          : 4;  /**< [  3:  0](RO/H) The number of lanes in this module, e.g., 4 for a QLM or 2 for a DLM.
200                                                                  Internal:
201                                                                  FIXME reset value 4 (done). Add reset_matches_size (not done). Note: for dlm
202                                                                  tieoffs will set reset value to 2. */
203 #else /* Word 0 - Little Endian */
204         uint64_t number_lanes          : 4;  /**< [  3:  0](RO/H) The number of lanes in this module, e.g., 4 for a QLM or 2 for a DLM.
205                                                                  Internal:
206                                                                  FIXME reset value 4 (done). Add reset_matches_size (not done). Note: for dlm
207                                                                  tieoffs will set reset value to 2. */
208         uint64_t reserved_4_63         : 60;
209 #endif /* Word 0 - End */
210     } s;
211     /* struct bdk_gsernx_common_const1_s cn; */
212 };
213 typedef union bdk_gsernx_common_const1 bdk_gsernx_common_const1_t;
214 
215 static inline uint64_t BDK_GSERNX_COMMON_CONST1(unsigned long a) __attribute__ ((pure, always_inline));
BDK_GSERNX_COMMON_CONST1(unsigned long a)216 static inline uint64_t BDK_GSERNX_COMMON_CONST1(unsigned long a)
217 {
218     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && (a<=7))
219         return 0x87e0900f0110ll + 0x1000000ll * ((a) & 0x7);
220     __bdk_csr_fatal("GSERNX_COMMON_CONST1", 1, a, 0, 0, 0);
221 }
222 
223 #define typedef_BDK_GSERNX_COMMON_CONST1(a) bdk_gsernx_common_const1_t
224 #define bustype_BDK_GSERNX_COMMON_CONST1(a) BDK_CSR_TYPE_RSL
225 #define basename_BDK_GSERNX_COMMON_CONST1(a) "GSERNX_COMMON_CONST1"
226 #define device_bar_BDK_GSERNX_COMMON_CONST1(a) 0x0 /* PF_BAR0 */
227 #define busnum_BDK_GSERNX_COMMON_CONST1(a) (a)
228 #define arguments_BDK_GSERNX_COMMON_CONST1(a) (a),-1,-1,-1
229 
230 /**
231  * Register (RSL) gsern#_common_eco
232  *
233  * INTERNAL: GSER Common ECO Register
234  */
235 union bdk_gsernx_common_eco
236 {
237     uint64_t u;
238     struct bdk_gsernx_common_eco_s
239     {
240 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
241         uint64_t eco_rw                : 62; /**< [ 63:  2](R/W) Internal:
242                                                                  Reserved for ECO use. */
243         uint64_t eco_rw_pll            : 2;  /**< [  1:  0](R/W) Internal:
244                                                                  Pre-connected to the PLL. Reserved for ECO use. */
245 #else /* Word 0 - Little Endian */
246         uint64_t eco_rw_pll            : 2;  /**< [  1:  0](R/W) Internal:
247                                                                  Pre-connected to the PLL. Reserved for ECO use. */
248         uint64_t eco_rw                : 62; /**< [ 63:  2](R/W) Internal:
249                                                                  Reserved for ECO use. */
250 #endif /* Word 0 - End */
251     } s;
252     /* struct bdk_gsernx_common_eco_s cn; */
253 };
254 typedef union bdk_gsernx_common_eco bdk_gsernx_common_eco_t;
255 
256 static inline uint64_t BDK_GSERNX_COMMON_ECO(unsigned long a) __attribute__ ((pure, always_inline));
BDK_GSERNX_COMMON_ECO(unsigned long a)257 static inline uint64_t BDK_GSERNX_COMMON_ECO(unsigned long a)
258 {
259     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && (a<=7))
260         return 0x87e0900f0770ll + 0x1000000ll * ((a) & 0x7);
261     __bdk_csr_fatal("GSERNX_COMMON_ECO", 1, a, 0, 0, 0);
262 }
263 
264 #define typedef_BDK_GSERNX_COMMON_ECO(a) bdk_gsernx_common_eco_t
265 #define bustype_BDK_GSERNX_COMMON_ECO(a) BDK_CSR_TYPE_RSL
266 #define basename_BDK_GSERNX_COMMON_ECO(a) "GSERNX_COMMON_ECO"
267 #define device_bar_BDK_GSERNX_COMMON_ECO(a) 0x0 /* PF_BAR0 */
268 #define busnum_BDK_GSERNX_COMMON_ECO(a) (a)
269 #define arguments_BDK_GSERNX_COMMON_ECO(a) (a),-1,-1,-1
270 
271 /**
272  * Register (RSL) gsern#_common_init_bsts
273  *
274  * GSER Common Initialization Base-level Status Register
275  */
276 union bdk_gsernx_common_init_bsts
277 {
278     uint64_t u;
279     struct bdk_gsernx_common_init_bsts_s
280     {
281 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
282         uint64_t reserved_20_63        : 44;
283         uint64_t pll_cp_cal            : 4;  /**< [ 19: 16](RO/H) PLL calibration state machine's resulting charge pump setting. Only
284                                                                  valid if [CAL_READY] is set. */
285         uint64_t reserved_13_15        : 3;
286         uint64_t pll_band_cal          : 5;  /**< [ 12:  8](RO/H) PLL calibration state machine's resulting VCO band setting. Only valid
287                                                                  if [CAL_READY] is set. */
288         uint64_t reserved_7            : 1;
289         uint64_t deep_idle             : 1;  /**< [  6:  6](RO/H) PLL reset state machine state is deep idle. */
290         uint64_t rst_sm_complete       : 1;  /**< [  5:  5](RO/H) PLL reset state machine has completed. If
291                                                                  [RST_SM_COMPLETE] is set and [RST_SM_READY] is not, there may still
292                                                                  be CSR register settings preventing the PLL from being ready
293                                                                  for use, e.g., power-down or reset overrides. */
294         uint64_t rst_sm_ready          : 1;  /**< [  4:  4](RO/H) PLL reset state machine status indicating that the reset
295                                                                  sequence has completed and this PLL is ready for use. */
296         uint64_t lock                  : 1;  /**< [  3:  3](RO/H) PLL lock status; only valid if [LOCK_READY] is set. */
297         uint64_t lock_ready            : 1;  /**< [  2:  2](RO/H) PLL lock status check is complete following most recent PLL
298                                                                  reset or assertion of GSERN()_COMMON_RST_BCFG[LOCK_CHECK]. */
299         uint64_t cal_fail              : 1;  /**< [  1:  1](RO/H) PLL calibration failed; valid only if [CAL_READY] is set. */
300         uint64_t cal_ready             : 1;  /**< [  0:  0](RO/H) PLL calibration completed. */
301 #else /* Word 0 - Little Endian */
302         uint64_t cal_ready             : 1;  /**< [  0:  0](RO/H) PLL calibration completed. */
303         uint64_t cal_fail              : 1;  /**< [  1:  1](RO/H) PLL calibration failed; valid only if [CAL_READY] is set. */
304         uint64_t lock_ready            : 1;  /**< [  2:  2](RO/H) PLL lock status check is complete following most recent PLL
305                                                                  reset or assertion of GSERN()_COMMON_RST_BCFG[LOCK_CHECK]. */
306         uint64_t lock                  : 1;  /**< [  3:  3](RO/H) PLL lock status; only valid if [LOCK_READY] is set. */
307         uint64_t rst_sm_ready          : 1;  /**< [  4:  4](RO/H) PLL reset state machine status indicating that the reset
308                                                                  sequence has completed and this PLL is ready for use. */
309         uint64_t rst_sm_complete       : 1;  /**< [  5:  5](RO/H) PLL reset state machine has completed. If
310                                                                  [RST_SM_COMPLETE] is set and [RST_SM_READY] is not, there may still
311                                                                  be CSR register settings preventing the PLL from being ready
312                                                                  for use, e.g., power-down or reset overrides. */
313         uint64_t deep_idle             : 1;  /**< [  6:  6](RO/H) PLL reset state machine state is deep idle. */
314         uint64_t reserved_7            : 1;
315         uint64_t pll_band_cal          : 5;  /**< [ 12:  8](RO/H) PLL calibration state machine's resulting VCO band setting. Only valid
316                                                                  if [CAL_READY] is set. */
317         uint64_t reserved_13_15        : 3;
318         uint64_t pll_cp_cal            : 4;  /**< [ 19: 16](RO/H) PLL calibration state machine's resulting charge pump setting. Only
319                                                                  valid if [CAL_READY] is set. */
320         uint64_t reserved_20_63        : 44;
321 #endif /* Word 0 - End */
322     } s;
323     /* struct bdk_gsernx_common_init_bsts_s cn; */
324 };
325 typedef union bdk_gsernx_common_init_bsts bdk_gsernx_common_init_bsts_t;
326 
327 static inline uint64_t BDK_GSERNX_COMMON_INIT_BSTS(unsigned long a) __attribute__ ((pure, always_inline));
BDK_GSERNX_COMMON_INIT_BSTS(unsigned long a)328 static inline uint64_t BDK_GSERNX_COMMON_INIT_BSTS(unsigned long a)
329 {
330     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && (a<=7))
331         return 0x87e0900f05d8ll + 0x1000000ll * ((a) & 0x7);
332     __bdk_csr_fatal("GSERNX_COMMON_INIT_BSTS", 1, a, 0, 0, 0);
333 }
334 
335 #define typedef_BDK_GSERNX_COMMON_INIT_BSTS(a) bdk_gsernx_common_init_bsts_t
336 #define bustype_BDK_GSERNX_COMMON_INIT_BSTS(a) BDK_CSR_TYPE_RSL
337 #define basename_BDK_GSERNX_COMMON_INIT_BSTS(a) "GSERNX_COMMON_INIT_BSTS"
338 #define device_bar_BDK_GSERNX_COMMON_INIT_BSTS(a) 0x0 /* PF_BAR0 */
339 #define busnum_BDK_GSERNX_COMMON_INIT_BSTS(a) (a)
340 #define arguments_BDK_GSERNX_COMMON_INIT_BSTS(a) (a),-1,-1,-1
341 
342 /**
343  * Register (RSL) gsern#_common_pll_1_bcfg
344  *
345  * GSER Common PLL Base Configuration Register 1
346  */
347 union bdk_gsernx_common_pll_1_bcfg
348 {
349     uint64_t u;
350     struct bdk_gsernx_common_pll_1_bcfg_s
351     {
352 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
353         uint64_t reserved_62_63        : 2;
354         uint64_t cal_cp_mult           : 2;  /**< [ 61: 60](R/W) PLL cal charge pump mult control. */
355         uint64_t cp                    : 4;  /**< [ 59: 56](R/W) PLL charge pump configuration. */
356         uint64_t cp_overide            : 1;  /**< [ 55: 55](R/W) PLL charge pump override. */
357         uint64_t band_ppm              : 2;  /**< [ 54: 53](R/W) PLL band ppm setting. */
358         uint64_t band                  : 5;  /**< [ 52: 48](R/W/H) PLL manual PLL band inputs; only effective if [BAND_OVERIDE] set. */
359         uint64_t band_limits           : 3;  /**< [ 47: 45](R/W) Band limits for the PLL calibration procedure. */
360         uint64_t band_overide          : 1;  /**< [ 44: 44](R/W/H) Bypass PLL calibration and set PLL band with band field inputs. */
361         uint64_t bg_div16              : 1;  /**< [ 43: 43](R/W) Enable divide by 16 of reference clock to the band gap. */
362         uint64_t bg_clk_en             : 1;  /**< [ 42: 42](R/W) Enable chopping in the band gap circuit. */
363         uint64_t dither_en             : 1;  /**< [ 41: 41](R/W) Enable the dithering bit of sigma delta modulator. */
364         uint64_t cal_sel               : 1;  /**< [ 40: 40](R/W) PLL calibration method select. */
365         uint64_t vco_sel               : 1;  /**< [ 39: 39](R/W) PLL select one of the two VCOs in the PLL. */
366         uint64_t sdm_en                : 1;  /**< [ 38: 38](R/W) Enable PLL fractional-N operation. */
367         uint64_t reserved_36_37        : 2;
368         uint64_t post_div              : 9;  /**< [ 35: 27](R/W) Forward PLL divider. Used in conjunction with [DIV_N] to set the
369                                                                  PLL frequency given a reference clock frequency. The output frequency will
370                                                                  be the VCO frequency divided by [POST_DIV]. Divider range is
371                                                                  between 8 - 511. If a number less than 8 is selected it will be added to
372                                                                  the minimum value of 8. For example, if 2 is specified the value will be
373                                                                  interpreted to be 10. */
374         uint64_t div_n                 : 9;  /**< [ 26: 18](R/W) PLL feedback divider integer portion. */
375         uint64_t div_f                 : 18; /**< [ 17:  0](R/W) PLL feedback divider fractional portion (divide by 2^18 to find fraction, e.g., 2621 is
376                                                                  ~10,000 ppm). */
377 #else /* Word 0 - Little Endian */
378         uint64_t div_f                 : 18; /**< [ 17:  0](R/W) PLL feedback divider fractional portion (divide by 2^18 to find fraction, e.g., 2621 is
379                                                                  ~10,000 ppm). */
380         uint64_t div_n                 : 9;  /**< [ 26: 18](R/W) PLL feedback divider integer portion. */
381         uint64_t post_div              : 9;  /**< [ 35: 27](R/W) Forward PLL divider. Used in conjunction with [DIV_N] to set the
382                                                                  PLL frequency given a reference clock frequency. The output frequency will
383                                                                  be the VCO frequency divided by [POST_DIV]. Divider range is
384                                                                  between 8 - 511. If a number less than 8 is selected it will be added to
385                                                                  the minimum value of 8. For example, if 2 is specified the value will be
386                                                                  interpreted to be 10. */
387         uint64_t reserved_36_37        : 2;
388         uint64_t sdm_en                : 1;  /**< [ 38: 38](R/W) Enable PLL fractional-N operation. */
389         uint64_t vco_sel               : 1;  /**< [ 39: 39](R/W) PLL select one of the two VCOs in the PLL. */
390         uint64_t cal_sel               : 1;  /**< [ 40: 40](R/W) PLL calibration method select. */
391         uint64_t dither_en             : 1;  /**< [ 41: 41](R/W) Enable the dithering bit of sigma delta modulator. */
392         uint64_t bg_clk_en             : 1;  /**< [ 42: 42](R/W) Enable chopping in the band gap circuit. */
393         uint64_t bg_div16              : 1;  /**< [ 43: 43](R/W) Enable divide by 16 of reference clock to the band gap. */
394         uint64_t band_overide          : 1;  /**< [ 44: 44](R/W/H) Bypass PLL calibration and set PLL band with band field inputs. */
395         uint64_t band_limits           : 3;  /**< [ 47: 45](R/W) Band limits for the PLL calibration procedure. */
396         uint64_t band                  : 5;  /**< [ 52: 48](R/W/H) PLL manual PLL band inputs; only effective if [BAND_OVERIDE] set. */
397         uint64_t band_ppm              : 2;  /**< [ 54: 53](R/W) PLL band ppm setting. */
398         uint64_t cp_overide            : 1;  /**< [ 55: 55](R/W) PLL charge pump override. */
399         uint64_t cp                    : 4;  /**< [ 59: 56](R/W) PLL charge pump configuration. */
400         uint64_t cal_cp_mult           : 2;  /**< [ 61: 60](R/W) PLL cal charge pump mult control. */
401         uint64_t reserved_62_63        : 2;
402 #endif /* Word 0 - End */
403     } s;
404     /* struct bdk_gsernx_common_pll_1_bcfg_s cn; */
405 };
406 typedef union bdk_gsernx_common_pll_1_bcfg bdk_gsernx_common_pll_1_bcfg_t;
407 
408 static inline uint64_t BDK_GSERNX_COMMON_PLL_1_BCFG(unsigned long a) __attribute__ ((pure, always_inline));
BDK_GSERNX_COMMON_PLL_1_BCFG(unsigned long a)409 static inline uint64_t BDK_GSERNX_COMMON_PLL_1_BCFG(unsigned long a)
410 {
411     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && (a<=7))
412         return 0x87e0900f0220ll + 0x1000000ll * ((a) & 0x7);
413     __bdk_csr_fatal("GSERNX_COMMON_PLL_1_BCFG", 1, a, 0, 0, 0);
414 }
415 
416 #define typedef_BDK_GSERNX_COMMON_PLL_1_BCFG(a) bdk_gsernx_common_pll_1_bcfg_t
417 #define bustype_BDK_GSERNX_COMMON_PLL_1_BCFG(a) BDK_CSR_TYPE_RSL
418 #define basename_BDK_GSERNX_COMMON_PLL_1_BCFG(a) "GSERNX_COMMON_PLL_1_BCFG"
419 #define device_bar_BDK_GSERNX_COMMON_PLL_1_BCFG(a) 0x0 /* PF_BAR0 */
420 #define busnum_BDK_GSERNX_COMMON_PLL_1_BCFG(a) (a)
421 #define arguments_BDK_GSERNX_COMMON_PLL_1_BCFG(a) (a),-1,-1,-1
422 
423 /**
424  * Register (RSL) gsern#_common_pll_2_bcfg
425  *
426  * GSER Common PLL Base Configuration Register 2
427  */
428 union bdk_gsernx_common_pll_2_bcfg
429 {
430     uint64_t u;
431     struct bdk_gsernx_common_pll_2_bcfg_s
432     {
433 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
434         uint64_t reserved_57_63        : 7;
435         uint64_t mio_refclk_en         : 1;  /**< [ 56: 56](R/W) Reserved.
436                                                                  Internal:
437                                                                  Enable sending the common PLL reference clock to the counter in MIO. */
438         uint64_t lock_check_cnt_ovrd_en : 1; /**< [ 55: 55](R/W) Enable use of [LOCK_CHECK_CNT_OVRD]. */
439         uint64_t lock_check_cnt_ovrd   : 15; /**< [ 54: 40](R/W) Lock check counter override value. This counter is used to wait for PLL lock to
440                                                                  be valid. It counts every reference clock cycle and once its done asserts
441                                                                  GSERN()_COMMON_INIT_BSTS[LOCK_READY]. For common PLL, the reference clock is the
442                                                                  input from the pad. For lane PLLs, the reference clock is the output of the
443                                                                  common PLL. To use value assert GSERN()_LANE()_RST1_BCFG[LOCK_CHECK] or trigger
444                                                                  a PLL reset sequence. */
445         uint64_t reserved_34_39        : 6;
446         uint64_t vcm_sel               : 1;  /**< [ 33: 33](R/W) For diagnostic use only.
447                                                                  Internal:
448                                                                  See PLL designer for how to set these. */
449         uint64_t cp_boost              : 1;  /**< [ 32: 32](R/W) For diagnostic use only.
450                                                                  Internal:
451                                                                  See PLL designer for how to set these. */
452         uint64_t ssc_sata_mode         : 2;  /**< [ 31: 30](R/W) PLL SATA spread spectrum control.
453                                                                   0x0 = Down spreading. PPM triangle wave total peak-to-peak spread subtracted from
454                                                                  nominal frequency.
455                                                                   0x1 = Up spreading. PPM triangle wave total peak-to-peak spread added to nominal
456                                                                  frequency.
457                                                                   0x2 = Center spreading. PPM triangle wave total peak-to-peak spread centered at nominal
458                                                                  frequency.
459                                                                   0x3 = Square wave subtracted from nominal frequency. */
460         uint64_t ssc_ppm               : 2;  /**< [ 29: 28](R/W) Spread-spectrum clocking total peak-to-peak spread.
461                                                                  0x0 = 5000 PPM.
462                                                                  0x1 = 3000 PPM.
463                                                                  0x2 = 2500 PPM.
464                                                                  0x3 = 1000 PPM. */
465         uint64_t pnr_refclk_en         : 1;  /**< [ 27: 27](R/W) Enable PLL reference clock to internal logic. */
466         uint64_t ssc_en                : 1;  /**< [ 26: 26](R/W) Spread-spectrum clocking enable. */
467         uint64_t ref_clk_bypass        : 1;  /**< [ 25: 25](R/W) Bypass reference clock to the PLL output. */
468         uint64_t pfd_offset            : 1;  /**< [ 24: 24](R/W) PLL PFD offset enable. */
469         uint64_t opamp                 : 4;  /**< [ 23: 20](R/W) PLL loop filter op-amp configuration. */
470         uint64_t res                   : 4;  /**< [ 19: 16](R/W) PLL loop filter configuration. */
471         uint64_t reserved_15           : 1;
472         uint64_t vco_bias              : 3;  /**< [ 14: 12](R/W) VCO bias control. */
473         uint64_t cal_dac_low           : 4;  /**< [ 11:  8](R/W) PLL calibration DAC low control. */
474         uint64_t cal_dac_mid           : 4;  /**< [  7:  4](R/W) PLL calibration DAC middle control. */
475         uint64_t cal_dac_high          : 4;  /**< [  3:  0](R/W) PLL calibration DAC high control. */
476 #else /* Word 0 - Little Endian */
477         uint64_t cal_dac_high          : 4;  /**< [  3:  0](R/W) PLL calibration DAC high control. */
478         uint64_t cal_dac_mid           : 4;  /**< [  7:  4](R/W) PLL calibration DAC middle control. */
479         uint64_t cal_dac_low           : 4;  /**< [ 11:  8](R/W) PLL calibration DAC low control. */
480         uint64_t vco_bias              : 3;  /**< [ 14: 12](R/W) VCO bias control. */
481         uint64_t reserved_15           : 1;
482         uint64_t res                   : 4;  /**< [ 19: 16](R/W) PLL loop filter configuration. */
483         uint64_t opamp                 : 4;  /**< [ 23: 20](R/W) PLL loop filter op-amp configuration. */
484         uint64_t pfd_offset            : 1;  /**< [ 24: 24](R/W) PLL PFD offset enable. */
485         uint64_t ref_clk_bypass        : 1;  /**< [ 25: 25](R/W) Bypass reference clock to the PLL output. */
486         uint64_t ssc_en                : 1;  /**< [ 26: 26](R/W) Spread-spectrum clocking enable. */
487         uint64_t pnr_refclk_en         : 1;  /**< [ 27: 27](R/W) Enable PLL reference clock to internal logic. */
488         uint64_t ssc_ppm               : 2;  /**< [ 29: 28](R/W) Spread-spectrum clocking total peak-to-peak spread.
489                                                                  0x0 = 5000 PPM.
490                                                                  0x1 = 3000 PPM.
491                                                                  0x2 = 2500 PPM.
492                                                                  0x3 = 1000 PPM. */
493         uint64_t ssc_sata_mode         : 2;  /**< [ 31: 30](R/W) PLL SATA spread spectrum control.
494                                                                   0x0 = Down spreading. PPM triangle wave total peak-to-peak spread subtracted from
495                                                                  nominal frequency.
496                                                                   0x1 = Up spreading. PPM triangle wave total peak-to-peak spread added to nominal
497                                                                  frequency.
498                                                                   0x2 = Center spreading. PPM triangle wave total peak-to-peak spread centered at nominal
499                                                                  frequency.
500                                                                   0x3 = Square wave subtracted from nominal frequency. */
501         uint64_t cp_boost              : 1;  /**< [ 32: 32](R/W) For diagnostic use only.
502                                                                  Internal:
503                                                                  See PLL designer for how to set these. */
504         uint64_t vcm_sel               : 1;  /**< [ 33: 33](R/W) For diagnostic use only.
505                                                                  Internal:
506                                                                  See PLL designer for how to set these. */
507         uint64_t reserved_34_39        : 6;
508         uint64_t lock_check_cnt_ovrd   : 15; /**< [ 54: 40](R/W) Lock check counter override value. This counter is used to wait for PLL lock to
509                                                                  be valid. It counts every reference clock cycle and once its done asserts
510                                                                  GSERN()_COMMON_INIT_BSTS[LOCK_READY]. For common PLL, the reference clock is the
511                                                                  input from the pad. For lane PLLs, the reference clock is the output of the
512                                                                  common PLL. To use value assert GSERN()_LANE()_RST1_BCFG[LOCK_CHECK] or trigger
513                                                                  a PLL reset sequence. */
514         uint64_t lock_check_cnt_ovrd_en : 1; /**< [ 55: 55](R/W) Enable use of [LOCK_CHECK_CNT_OVRD]. */
515         uint64_t mio_refclk_en         : 1;  /**< [ 56: 56](R/W) Reserved.
516                                                                  Internal:
517                                                                  Enable sending the common PLL reference clock to the counter in MIO. */
518         uint64_t reserved_57_63        : 7;
519 #endif /* Word 0 - End */
520     } s;
521     /* struct bdk_gsernx_common_pll_2_bcfg_s cn; */
522 };
523 typedef union bdk_gsernx_common_pll_2_bcfg bdk_gsernx_common_pll_2_bcfg_t;
524 
525 static inline uint64_t BDK_GSERNX_COMMON_PLL_2_BCFG(unsigned long a) __attribute__ ((pure, always_inline));
BDK_GSERNX_COMMON_PLL_2_BCFG(unsigned long a)526 static inline uint64_t BDK_GSERNX_COMMON_PLL_2_BCFG(unsigned long a)
527 {
528     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && (a<=7))
529         return 0x87e0900f02a8ll + 0x1000000ll * ((a) & 0x7);
530     __bdk_csr_fatal("GSERNX_COMMON_PLL_2_BCFG", 1, a, 0, 0, 0);
531 }
532 
533 #define typedef_BDK_GSERNX_COMMON_PLL_2_BCFG(a) bdk_gsernx_common_pll_2_bcfg_t
534 #define bustype_BDK_GSERNX_COMMON_PLL_2_BCFG(a) BDK_CSR_TYPE_RSL
535 #define basename_BDK_GSERNX_COMMON_PLL_2_BCFG(a) "GSERNX_COMMON_PLL_2_BCFG"
536 #define device_bar_BDK_GSERNX_COMMON_PLL_2_BCFG(a) 0x0 /* PF_BAR0 */
537 #define busnum_BDK_GSERNX_COMMON_PLL_2_BCFG(a) (a)
538 #define arguments_BDK_GSERNX_COMMON_PLL_2_BCFG(a) (a),-1,-1,-1
539 
540 /**
541  * Register (RSL) gsern#_common_refclk_bcfg
542  *
543  * GSER Common PLL Base Configuration Register 1
544  */
545 union bdk_gsernx_common_refclk_bcfg
546 {
547     uint64_t u;
548     struct bdk_gsernx_common_refclk_bcfg_s
549     {
550 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
551         uint64_t reserved_5_63         : 59;
552         uint64_t hcsl                  : 1;  /**< [  4:  4](R/W) Enable [HCSL] and [OCT] to set HCSL on chip termination in the receiver of the
553                                                                  off-chip reference clock, e.g., for a PCIe reference clock. Leave [HCSL] low for
554                                                                  LVPECL on-chip termination. */
555         uint64_t oct                   : 1;  /**< [  3:  3](R/W) Enable on chip termination (OCT) in the receiver of the off-chip reference
556                                                                  clock. */
557         uint64_t pwdn                  : 1;  /**< [  2:  2](R/W) Power down.
558                                                                  0 = Power on. Set to 0 if any lanes in this module will be used.
559                                                                  1 = All paths through the common block reference clock receiver will be powered
560                                                                  off and no reference clock will reach the common PLL (or its bypass path). */
561         uint64_t cclksel               : 2;  /**< [  1:  0](R/W) Selection controls for the reference clock
562                                                                    0x0 = Choose on-chip common clock zero.
563                                                                    0x1 = Choose on-chip common clock one.
564                                                                    0x2 = Choose on-chip common clock two.
565                                                                    0x3 = Choose the off-chip reference clock (requires that [PWDN] be low). */
566 #else /* Word 0 - Little Endian */
567         uint64_t cclksel               : 2;  /**< [  1:  0](R/W) Selection controls for the reference clock
568                                                                    0x0 = Choose on-chip common clock zero.
569                                                                    0x1 = Choose on-chip common clock one.
570                                                                    0x2 = Choose on-chip common clock two.
571                                                                    0x3 = Choose the off-chip reference clock (requires that [PWDN] be low). */
572         uint64_t pwdn                  : 1;  /**< [  2:  2](R/W) Power down.
573                                                                  0 = Power on. Set to 0 if any lanes in this module will be used.
574                                                                  1 = All paths through the common block reference clock receiver will be powered
575                                                                  off and no reference clock will reach the common PLL (or its bypass path). */
576         uint64_t oct                   : 1;  /**< [  3:  3](R/W) Enable on chip termination (OCT) in the receiver of the off-chip reference
577                                                                  clock. */
578         uint64_t hcsl                  : 1;  /**< [  4:  4](R/W) Enable [HCSL] and [OCT] to set HCSL on chip termination in the receiver of the
579                                                                  off-chip reference clock, e.g., for a PCIe reference clock. Leave [HCSL] low for
580                                                                  LVPECL on-chip termination. */
581         uint64_t reserved_5_63         : 59;
582 #endif /* Word 0 - End */
583     } s;
584     /* struct bdk_gsernx_common_refclk_bcfg_s cn; */
585 };
586 typedef union bdk_gsernx_common_refclk_bcfg bdk_gsernx_common_refclk_bcfg_t;
587 
588 static inline uint64_t BDK_GSERNX_COMMON_REFCLK_BCFG(unsigned long a) __attribute__ ((pure, always_inline));
BDK_GSERNX_COMMON_REFCLK_BCFG(unsigned long a)589 static inline uint64_t BDK_GSERNX_COMMON_REFCLK_BCFG(unsigned long a)
590 {
591     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && (a<=7))
592         return 0x87e0900f0198ll + 0x1000000ll * ((a) & 0x7);
593     __bdk_csr_fatal("GSERNX_COMMON_REFCLK_BCFG", 1, a, 0, 0, 0);
594 }
595 
596 #define typedef_BDK_GSERNX_COMMON_REFCLK_BCFG(a) bdk_gsernx_common_refclk_bcfg_t
597 #define bustype_BDK_GSERNX_COMMON_REFCLK_BCFG(a) BDK_CSR_TYPE_RSL
598 #define basename_BDK_GSERNX_COMMON_REFCLK_BCFG(a) "GSERNX_COMMON_REFCLK_BCFG"
599 #define device_bar_BDK_GSERNX_COMMON_REFCLK_BCFG(a) 0x0 /* PF_BAR0 */
600 #define busnum_BDK_GSERNX_COMMON_REFCLK_BCFG(a) (a)
601 #define arguments_BDK_GSERNX_COMMON_REFCLK_BCFG(a) (a),-1,-1,-1
602 
603 /**
604  * Register (RSL) gsern#_common_refclk_ctr
605  *
606  * GSER Common Reference Clock Cycle Counter Register
607  * A free-running counter of common PLL reference clock cycles to enable rough
608  * confirmation of reference clock frequency via software. Read the counter; wait some
609  * time, e.g., 100ms; read the counter; calculate frequency based on the difference in
610  * values during the known wait time.
611  */
612 union bdk_gsernx_common_refclk_ctr
613 {
614     uint64_t u;
615     struct bdk_gsernx_common_refclk_ctr_s
616     {
617 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
618         uint64_t count                 : 64; /**< [ 63:  0](R/W/H) Running count of common PLL reference clock cycles. */
619 #else /* Word 0 - Little Endian */
620         uint64_t count                 : 64; /**< [ 63:  0](R/W/H) Running count of common PLL reference clock cycles. */
621 #endif /* Word 0 - End */
622     } s;
623     /* struct bdk_gsernx_common_refclk_ctr_s cn; */
624 };
625 typedef union bdk_gsernx_common_refclk_ctr bdk_gsernx_common_refclk_ctr_t;
626 
627 static inline uint64_t BDK_GSERNX_COMMON_REFCLK_CTR(unsigned long a) __attribute__ ((pure, always_inline));
BDK_GSERNX_COMMON_REFCLK_CTR(unsigned long a)628 static inline uint64_t BDK_GSERNX_COMMON_REFCLK_CTR(unsigned long a)
629 {
630     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && (a<=7))
631         return 0x87e0900f06e8ll + 0x1000000ll * ((a) & 0x7);
632     __bdk_csr_fatal("GSERNX_COMMON_REFCLK_CTR", 1, a, 0, 0, 0);
633 }
634 
635 #define typedef_BDK_GSERNX_COMMON_REFCLK_CTR(a) bdk_gsernx_common_refclk_ctr_t
636 #define bustype_BDK_GSERNX_COMMON_REFCLK_CTR(a) BDK_CSR_TYPE_RSL
637 #define basename_BDK_GSERNX_COMMON_REFCLK_CTR(a) "GSERNX_COMMON_REFCLK_CTR"
638 #define device_bar_BDK_GSERNX_COMMON_REFCLK_CTR(a) 0x0 /* PF_BAR0 */
639 #define busnum_BDK_GSERNX_COMMON_REFCLK_CTR(a) (a)
640 #define arguments_BDK_GSERNX_COMMON_REFCLK_CTR(a) (a),-1,-1,-1
641 
642 /**
643  * Register (RSL) gsern#_common_rev
644  *
645  * GSER Common Revision Register
646  * Revision number
647  */
648 union bdk_gsernx_common_rev
649 {
650     uint64_t u;
651     struct bdk_gsernx_common_rev_s
652     {
653 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
654         uint64_t reserved_8_63         : 56;
655         uint64_t rev                   : 8;  /**< [  7:  0](RO/H) Revision number for GSERN common subblock.
656                                                                  Internal:
657                                                                  Used primarily for E5. */
658 #else /* Word 0 - Little Endian */
659         uint64_t rev                   : 8;  /**< [  7:  0](RO/H) Revision number for GSERN common subblock.
660                                                                  Internal:
661                                                                  Used primarily for E5. */
662         uint64_t reserved_8_63         : 56;
663 #endif /* Word 0 - End */
664     } s;
665     /* struct bdk_gsernx_common_rev_s cn; */
666 };
667 typedef union bdk_gsernx_common_rev bdk_gsernx_common_rev_t;
668 
669 static inline uint64_t BDK_GSERNX_COMMON_REV(unsigned long a) __attribute__ ((pure, always_inline));
BDK_GSERNX_COMMON_REV(unsigned long a)670 static inline uint64_t BDK_GSERNX_COMMON_REV(unsigned long a)
671 {
672     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && (a<=7))
673         return 0x87e0900f0000ll + 0x1000000ll * ((a) & 0x7);
674     __bdk_csr_fatal("GSERNX_COMMON_REV", 1, a, 0, 0, 0);
675 }
676 
677 #define typedef_BDK_GSERNX_COMMON_REV(a) bdk_gsernx_common_rev_t
678 #define bustype_BDK_GSERNX_COMMON_REV(a) BDK_CSR_TYPE_RSL
679 #define basename_BDK_GSERNX_COMMON_REV(a) "GSERNX_COMMON_REV"
680 #define device_bar_BDK_GSERNX_COMMON_REV(a) 0x0 /* PF_BAR0 */
681 #define busnum_BDK_GSERNX_COMMON_REV(a) (a)
682 #define arguments_BDK_GSERNX_COMMON_REV(a) (a),-1,-1,-1
683 
684 /**
685  * Register (RSL) gsern#_common_rst_bcfg
686  *
687  * GSER Common Reset State Machine Controls and Overrides Register
688  */
689 union bdk_gsernx_common_rst_bcfg
690 {
691     uint64_t u;
692     struct bdk_gsernx_common_rst_bcfg_s
693     {
694 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
695         uint64_t reserved_56_63        : 8;
696         uint64_t domain_rst_en         : 1;  /**< [ 55: 55](R/W) Domain reset enable.
697                                                                  0 = Prevent reseting lane logic with domain reset.
698                                                                  1 = Enable reseting all lane logic with domain reset.
699 
700                                                                  For PCIe configurations, typically 1 for a root complex and 0 for an endpoint. */
701         uint64_t reserved_49_54        : 6;
702         uint64_t rst_pll_rst_sm        : 1;  /**< [ 48: 48](R/W) Set to reset the full PLL reset state machine;
703                                                                  deassert to run the complete reset initialization sequence
704                                                                  starting with common PLL initialization. */
705         uint64_t reserved_13_47        : 35;
706         uint64_t pll_go2deep_idle      : 1;  /**< [ 12: 12](R/W) Set to cycle the common PLL into deep idle. */
707         uint64_t lock_ppm              : 2;  /**< [ 11: 10](R/W) PLL lock PPM setting; after GSERN()_COMMON_RST_BCFG[LOCK_WAIT], compare
708                                                                  reference clock and divided VCO clock for this many cycles:
709                                                                    0x0 = Compare after   5000 reference clock cycles.
710                                                                    0x1 = Compare after  10000 reference clock cycles.
711                                                                    0x2 = Compare after  20000 reference clock cycles.
712                                                                    0x3 = Compare after   2500 reference clock cycles. */
713         uint64_t lock_wait             : 2;  /**< [  9:  8](R/W) Wait time for PLL lock check function to start:
714                                                                    0x0 = Wait  2500 reference clock cycles.
715                                                                    0x1 = Wait  5000 reference clock cycles.
716                                                                    0x2 = Wait 10000 reference clock cycles.
717                                                                    0x3 = Wait  1250 reference clock cycles. */
718         uint64_t lock_check            : 1;  /**< [  7:  7](R/W) Trigger a PLL lock status check; result returned in
719                                                                  GSERN()_COMMON_INIT_BSTS[LOCK] when GSERN()_COMMON_INIT_BSTS[LOCK_READY]
720                                                                  asserts. deassert and re-assert to repeat checking. */
721         uint64_t vco_cal_reset         : 1;  /**< [  6:  6](R/W) PLL VCO calibration state machine reset. */
722         uint64_t fracn_reset           : 1;  /**< [  5:  5](R/W) PLL fractional-N state machine reset. */
723         uint64_t ssc_reset             : 1;  /**< [  4:  4](R/W) PLL SSC state machine reset. */
724         uint64_t post_div_reset        : 1;  /**< [  3:  3](RO) Reserved.
725                                                                  Internal:
726                                                                  Was common PLL post divider reset.  No longer used. */
727         uint64_t reset                 : 1;  /**< [  2:  2](R/W) PLL primary reset; must assert [POST_DIV_RESET] if [RESET] is asserted. */
728         uint64_t cal_en                : 1;  /**< [  1:  1](R/W) Enable PLL calibration procedure. */
729         uint64_t pwdn                  : 1;  /**< [  0:  0](R/W) PLL power down control. */
730 #else /* Word 0 - Little Endian */
731         uint64_t pwdn                  : 1;  /**< [  0:  0](R/W) PLL power down control. */
732         uint64_t cal_en                : 1;  /**< [  1:  1](R/W) Enable PLL calibration procedure. */
733         uint64_t reset                 : 1;  /**< [  2:  2](R/W) PLL primary reset; must assert [POST_DIV_RESET] if [RESET] is asserted. */
734         uint64_t post_div_reset        : 1;  /**< [  3:  3](RO) Reserved.
735                                                                  Internal:
736                                                                  Was common PLL post divider reset.  No longer used. */
737         uint64_t ssc_reset             : 1;  /**< [  4:  4](R/W) PLL SSC state machine reset. */
738         uint64_t fracn_reset           : 1;  /**< [  5:  5](R/W) PLL fractional-N state machine reset. */
739         uint64_t vco_cal_reset         : 1;  /**< [  6:  6](R/W) PLL VCO calibration state machine reset. */
740         uint64_t lock_check            : 1;  /**< [  7:  7](R/W) Trigger a PLL lock status check; result returned in
741                                                                  GSERN()_COMMON_INIT_BSTS[LOCK] when GSERN()_COMMON_INIT_BSTS[LOCK_READY]
742                                                                  asserts. deassert and re-assert to repeat checking. */
743         uint64_t lock_wait             : 2;  /**< [  9:  8](R/W) Wait time for PLL lock check function to start:
744                                                                    0x0 = Wait  2500 reference clock cycles.
745                                                                    0x1 = Wait  5000 reference clock cycles.
746                                                                    0x2 = Wait 10000 reference clock cycles.
747                                                                    0x3 = Wait  1250 reference clock cycles. */
748         uint64_t lock_ppm              : 2;  /**< [ 11: 10](R/W) PLL lock PPM setting; after GSERN()_COMMON_RST_BCFG[LOCK_WAIT], compare
749                                                                  reference clock and divided VCO clock for this many cycles:
750                                                                    0x0 = Compare after   5000 reference clock cycles.
751                                                                    0x1 = Compare after  10000 reference clock cycles.
752                                                                    0x2 = Compare after  20000 reference clock cycles.
753                                                                    0x3 = Compare after   2500 reference clock cycles. */
754         uint64_t pll_go2deep_idle      : 1;  /**< [ 12: 12](R/W) Set to cycle the common PLL into deep idle. */
755         uint64_t reserved_13_47        : 35;
756         uint64_t rst_pll_rst_sm        : 1;  /**< [ 48: 48](R/W) Set to reset the full PLL reset state machine;
757                                                                  deassert to run the complete reset initialization sequence
758                                                                  starting with common PLL initialization. */
759         uint64_t reserved_49_54        : 6;
760         uint64_t domain_rst_en         : 1;  /**< [ 55: 55](R/W) Domain reset enable.
761                                                                  0 = Prevent reseting lane logic with domain reset.
762                                                                  1 = Enable reseting all lane logic with domain reset.
763 
764                                                                  For PCIe configurations, typically 1 for a root complex and 0 for an endpoint. */
765         uint64_t reserved_56_63        : 8;
766 #endif /* Word 0 - End */
767     } s;
768     /* struct bdk_gsernx_common_rst_bcfg_s cn; */
769 };
770 typedef union bdk_gsernx_common_rst_bcfg bdk_gsernx_common_rst_bcfg_t;
771 
772 static inline uint64_t BDK_GSERNX_COMMON_RST_BCFG(unsigned long a) __attribute__ ((pure, always_inline));
BDK_GSERNX_COMMON_RST_BCFG(unsigned long a)773 static inline uint64_t BDK_GSERNX_COMMON_RST_BCFG(unsigned long a)
774 {
775     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && (a<=7))
776         return 0x87e0900f03b8ll + 0x1000000ll * ((a) & 0x7);
777     __bdk_csr_fatal("GSERNX_COMMON_RST_BCFG", 1, a, 0, 0, 0);
778 }
779 
780 #define typedef_BDK_GSERNX_COMMON_RST_BCFG(a) bdk_gsernx_common_rst_bcfg_t
781 #define bustype_BDK_GSERNX_COMMON_RST_BCFG(a) BDK_CSR_TYPE_RSL
782 #define basename_BDK_GSERNX_COMMON_RST_BCFG(a) "GSERNX_COMMON_RST_BCFG"
783 #define device_bar_BDK_GSERNX_COMMON_RST_BCFG(a) 0x0 /* PF_BAR0 */
784 #define busnum_BDK_GSERNX_COMMON_RST_BCFG(a) (a)
785 #define arguments_BDK_GSERNX_COMMON_RST_BCFG(a) (a),-1,-1,-1
786 
787 /**
788  * Register (RSL) gsern#_common_rst_cnt0_bcfg
789  *
790  * GSER Common Reset State Machine Delay Count Register 0
791  * Wait counts for the common block reset state machines. All fields must be set
792  * before bringing the common block out of reset.
793  */
794 union bdk_gsernx_common_rst_cnt0_bcfg
795 {
796     uint64_t u;
797     struct bdk_gsernx_common_rst_cnt0_bcfg_s
798     {
799 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
800         uint64_t reserved_7_63         : 57;
801         uint64_t pre_bias_pwup_wait    : 7;  /**< [  6:  0](R/W) Wait count in service clock cycles after initial trigger before
802                                                                  deasserting powerdown to the bias generator. The actual delay will be
803                                                                  three cycles more than set here, so set this field to the minimum
804                                                                  specified delay, 0x40, minus three, or greater. */
805 #else /* Word 0 - Little Endian */
806         uint64_t pre_bias_pwup_wait    : 7;  /**< [  6:  0](R/W) Wait count in service clock cycles after initial trigger before
807                                                                  deasserting powerdown to the bias generator. The actual delay will be
808                                                                  three cycles more than set here, so set this field to the minimum
809                                                                  specified delay, 0x40, minus three, or greater. */
810         uint64_t reserved_7_63         : 57;
811 #endif /* Word 0 - End */
812     } s;
813     /* struct bdk_gsernx_common_rst_cnt0_bcfg_s cn; */
814 };
815 typedef union bdk_gsernx_common_rst_cnt0_bcfg bdk_gsernx_common_rst_cnt0_bcfg_t;
816 
817 static inline uint64_t BDK_GSERNX_COMMON_RST_CNT0_BCFG(unsigned long a) __attribute__ ((pure, always_inline));
BDK_GSERNX_COMMON_RST_CNT0_BCFG(unsigned long a)818 static inline uint64_t BDK_GSERNX_COMMON_RST_CNT0_BCFG(unsigned long a)
819 {
820     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && (a<=7))
821         return 0x87e0900f0440ll + 0x1000000ll * ((a) & 0x7);
822     __bdk_csr_fatal("GSERNX_COMMON_RST_CNT0_BCFG", 1, a, 0, 0, 0);
823 }
824 
825 #define typedef_BDK_GSERNX_COMMON_RST_CNT0_BCFG(a) bdk_gsernx_common_rst_cnt0_bcfg_t
826 #define bustype_BDK_GSERNX_COMMON_RST_CNT0_BCFG(a) BDK_CSR_TYPE_RSL
827 #define basename_BDK_GSERNX_COMMON_RST_CNT0_BCFG(a) "GSERNX_COMMON_RST_CNT0_BCFG"
828 #define device_bar_BDK_GSERNX_COMMON_RST_CNT0_BCFG(a) 0x0 /* PF_BAR0 */
829 #define busnum_BDK_GSERNX_COMMON_RST_CNT0_BCFG(a) (a)
830 #define arguments_BDK_GSERNX_COMMON_RST_CNT0_BCFG(a) (a),-1,-1,-1
831 
832 /**
833  * Register (RSL) gsern#_common_rst_cnt1_bcfg
834  *
835  * GSER Common Reset State Machine Delay Count Register 1
836  * Wait counts for the common block reset state machines. All fields must be set
837  * before bringing the lane out of reset.
838  */
839 union bdk_gsernx_common_rst_cnt1_bcfg
840 {
841     uint64_t u;
842     struct bdk_gsernx_common_rst_cnt1_bcfg_s
843     {
844 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
845         uint64_t reserved_50_63        : 14;
846         uint64_t cal_en_wait           : 18; /**< [ 49: 32](R/W) Wait count in service clock cycles after calibration enable before deasserting
847                                                                  calibration enable to the PLL. Set this field to one less than the desired
848                                                                  number of cycles of delay. */
849         uint64_t reserved_28_31        : 4;
850         uint64_t pre_cal_en_wait       : 12; /**< [ 27: 16](R/W) Wait count in service clock cycles after deasserting resets to the PLL fracn,
851                                                                  ssc, and cal_en state machines before asserting calibration enable to the
852                                                                  PLL. Set this to one less than the desired number of cycles of delay. */
853         uint64_t reserved_11_15        : 5;
854         uint64_t pre_pwup_wait         : 11; /**< [ 10:  0](R/W) Wait count in service clock cycles after powering up the bias
855                                                                  generator before deasserting pwdn to the PLL. The actual delay will
856                                                                  be one cycle more than set here, so set this field to the minimum
857                                                                  specified delay, 0x400, minus one, or greater. */
858 #else /* Word 0 - Little Endian */
859         uint64_t pre_pwup_wait         : 11; /**< [ 10:  0](R/W) Wait count in service clock cycles after powering up the bias
860                                                                  generator before deasserting pwdn to the PLL. The actual delay will
861                                                                  be one cycle more than set here, so set this field to the minimum
862                                                                  specified delay, 0x400, minus one, or greater. */
863         uint64_t reserved_11_15        : 5;
864         uint64_t pre_cal_en_wait       : 12; /**< [ 27: 16](R/W) Wait count in service clock cycles after deasserting resets to the PLL fracn,
865                                                                  ssc, and cal_en state machines before asserting calibration enable to the
866                                                                  PLL. Set this to one less than the desired number of cycles of delay. */
867         uint64_t reserved_28_31        : 4;
868         uint64_t cal_en_wait           : 18; /**< [ 49: 32](R/W) Wait count in service clock cycles after calibration enable before deasserting
869                                                                  calibration enable to the PLL. Set this field to one less than the desired
870                                                                  number of cycles of delay. */
871         uint64_t reserved_50_63        : 14;
872 #endif /* Word 0 - End */
873     } s;
874     /* struct bdk_gsernx_common_rst_cnt1_bcfg_s cn; */
875 };
876 typedef union bdk_gsernx_common_rst_cnt1_bcfg bdk_gsernx_common_rst_cnt1_bcfg_t;
877 
878 static inline uint64_t BDK_GSERNX_COMMON_RST_CNT1_BCFG(unsigned long a) __attribute__ ((pure, always_inline));
BDK_GSERNX_COMMON_RST_CNT1_BCFG(unsigned long a)879 static inline uint64_t BDK_GSERNX_COMMON_RST_CNT1_BCFG(unsigned long a)
880 {
881     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && (a<=7))
882         return 0x87e0900f04c8ll + 0x1000000ll * ((a) & 0x7);
883     __bdk_csr_fatal("GSERNX_COMMON_RST_CNT1_BCFG", 1, a, 0, 0, 0);
884 }
885 
886 #define typedef_BDK_GSERNX_COMMON_RST_CNT1_BCFG(a) bdk_gsernx_common_rst_cnt1_bcfg_t
887 #define bustype_BDK_GSERNX_COMMON_RST_CNT1_BCFG(a) BDK_CSR_TYPE_RSL
888 #define basename_BDK_GSERNX_COMMON_RST_CNT1_BCFG(a) "GSERNX_COMMON_RST_CNT1_BCFG"
889 #define device_bar_BDK_GSERNX_COMMON_RST_CNT1_BCFG(a) 0x0 /* PF_BAR0 */
890 #define busnum_BDK_GSERNX_COMMON_RST_CNT1_BCFG(a) (a)
891 #define arguments_BDK_GSERNX_COMMON_RST_CNT1_BCFG(a) (a),-1,-1,-1
892 
893 /**
894  * Register (RSL) gsern#_common_rst_cnt2_bcfg
895  *
896  * GSER Common Reset State Machine Delay Count Register 2
897  * Wait counts for the common block reset state machines. All fields must be set
898  * before bringing the lane out of reset.
899  */
900 union bdk_gsernx_common_rst_cnt2_bcfg
901 {
902     uint64_t u;
903     struct bdk_gsernx_common_rst_cnt2_bcfg_s
904     {
905 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
906         uint64_t reserved_62_63        : 2;
907         uint64_t pre_run_wait          : 14; /**< [ 61: 48](R/W) Wait count in service clock cycles after the PLL is running before deasserting
908                                                                  common lane reset to bring the lanes out of reset. */
909         uint64_t reserved_41_47        : 7;
910         uint64_t pre_pll_sm_reset_wait : 9;  /**< [ 40: 32](R/W) Wait count in service clock cycles after deasserting pwdn before
911                                                                  deasserting resets to the PLL fracn, ssc, and cal_en state
912                                                                  machines. Set this field to one less than the desired number of
913                                                                  cycles of delay. */
914         uint64_t reserved_29_31        : 3;
915         uint64_t pre_pdiv_reset_wait   : 13; /**< [ 28: 16](R/W) Reserved.
916                                                                  Internal:
917                                                                  The PLL no longer has a postdivider reset. */
918         uint64_t reserved_12_15        : 4;
919         uint64_t pre_pll_reset_wait    : 12; /**< [ 11:  0](R/W) Wait count in service clock cycles after calibration enable deasserts
920                                                                  before deasserting reset to the PLL. Set this field to one less
921                                                                  than the desired number of cycles of delay. */
922 #else /* Word 0 - Little Endian */
923         uint64_t pre_pll_reset_wait    : 12; /**< [ 11:  0](R/W) Wait count in service clock cycles after calibration enable deasserts
924                                                                  before deasserting reset to the PLL. Set this field to one less
925                                                                  than the desired number of cycles of delay. */
926         uint64_t reserved_12_15        : 4;
927         uint64_t pre_pdiv_reset_wait   : 13; /**< [ 28: 16](R/W) Reserved.
928                                                                  Internal:
929                                                                  The PLL no longer has a postdivider reset. */
930         uint64_t reserved_29_31        : 3;
931         uint64_t pre_pll_sm_reset_wait : 9;  /**< [ 40: 32](R/W) Wait count in service clock cycles after deasserting pwdn before
932                                                                  deasserting resets to the PLL fracn, ssc, and cal_en state
933                                                                  machines. Set this field to one less than the desired number of
934                                                                  cycles of delay. */
935         uint64_t reserved_41_47        : 7;
936         uint64_t pre_run_wait          : 14; /**< [ 61: 48](R/W) Wait count in service clock cycles after the PLL is running before deasserting
937                                                                  common lane reset to bring the lanes out of reset. */
938         uint64_t reserved_62_63        : 2;
939 #endif /* Word 0 - End */
940     } s;
941     /* struct bdk_gsernx_common_rst_cnt2_bcfg_s cn; */
942 };
943 typedef union bdk_gsernx_common_rst_cnt2_bcfg bdk_gsernx_common_rst_cnt2_bcfg_t;
944 
945 static inline uint64_t BDK_GSERNX_COMMON_RST_CNT2_BCFG(unsigned long a) __attribute__ ((pure, always_inline));
BDK_GSERNX_COMMON_RST_CNT2_BCFG(unsigned long a)946 static inline uint64_t BDK_GSERNX_COMMON_RST_CNT2_BCFG(unsigned long a)
947 {
948     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && (a<=7))
949         return 0x87e0900f0550ll + 0x1000000ll * ((a) & 0x7);
950     __bdk_csr_fatal("GSERNX_COMMON_RST_CNT2_BCFG", 1, a, 0, 0, 0);
951 }
952 
953 #define typedef_BDK_GSERNX_COMMON_RST_CNT2_BCFG(a) bdk_gsernx_common_rst_cnt2_bcfg_t
954 #define bustype_BDK_GSERNX_COMMON_RST_CNT2_BCFG(a) BDK_CSR_TYPE_RSL
955 #define basename_BDK_GSERNX_COMMON_RST_CNT2_BCFG(a) "GSERNX_COMMON_RST_CNT2_BCFG"
956 #define device_bar_BDK_GSERNX_COMMON_RST_CNT2_BCFG(a) 0x0 /* PF_BAR0 */
957 #define busnum_BDK_GSERNX_COMMON_RST_CNT2_BCFG(a) (a)
958 #define arguments_BDK_GSERNX_COMMON_RST_CNT2_BCFG(a) (a),-1,-1,-1
959 
960 /**
961  * Register (RSL) gsern#_common_rst_rdy_bcfg
962  *
963  * GSER Common Reset Ready Control Register
964  */
965 union bdk_gsernx_common_rst_rdy_bcfg
966 {
967     uint64_t u;
968     struct bdk_gsernx_common_rst_rdy_bcfg_s
969     {
970 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
971         uint64_t reserved_4_63         : 60;
972         uint64_t ln_en                 : 4;  /**< [  3:  0](R/W) Enables for lane reset ready inclusion in aggregated QLM reset ready output to
973                                                                  the reset controller.  Each bit enables contribution from the corresponding lane.
974                                                                  \<0\> = Include lane 0.
975                                                                  \<1\> = Include lane 1.
976                                                                  \<2\> = Include lane 2.
977                                                                  \<3\> = Include lane 3. */
978 #else /* Word 0 - Little Endian */
979         uint64_t ln_en                 : 4;  /**< [  3:  0](R/W) Enables for lane reset ready inclusion in aggregated QLM reset ready output to
980                                                                  the reset controller.  Each bit enables contribution from the corresponding lane.
981                                                                  \<0\> = Include lane 0.
982                                                                  \<1\> = Include lane 1.
983                                                                  \<2\> = Include lane 2.
984                                                                  \<3\> = Include lane 3. */
985         uint64_t reserved_4_63         : 60;
986 #endif /* Word 0 - End */
987     } s;
988     /* struct bdk_gsernx_common_rst_rdy_bcfg_s cn; */
989 };
990 typedef union bdk_gsernx_common_rst_rdy_bcfg bdk_gsernx_common_rst_rdy_bcfg_t;
991 
992 static inline uint64_t BDK_GSERNX_COMMON_RST_RDY_BCFG(unsigned long a) __attribute__ ((pure, always_inline));
BDK_GSERNX_COMMON_RST_RDY_BCFG(unsigned long a)993 static inline uint64_t BDK_GSERNX_COMMON_RST_RDY_BCFG(unsigned long a)
994 {
995     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && (a<=7))
996         return 0x87e0900f0660ll + 0x1000000ll * ((a) & 0x7);
997     __bdk_csr_fatal("GSERNX_COMMON_RST_RDY_BCFG", 1, a, 0, 0, 0);
998 }
999 
1000 #define typedef_BDK_GSERNX_COMMON_RST_RDY_BCFG(a) bdk_gsernx_common_rst_rdy_bcfg_t
1001 #define bustype_BDK_GSERNX_COMMON_RST_RDY_BCFG(a) BDK_CSR_TYPE_RSL
1002 #define basename_BDK_GSERNX_COMMON_RST_RDY_BCFG(a) "GSERNX_COMMON_RST_RDY_BCFG"
1003 #define device_bar_BDK_GSERNX_COMMON_RST_RDY_BCFG(a) 0x0 /* PF_BAR0 */
1004 #define busnum_BDK_GSERNX_COMMON_RST_RDY_BCFG(a) (a)
1005 #define arguments_BDK_GSERNX_COMMON_RST_RDY_BCFG(a) (a),-1,-1,-1
1006 
1007 /**
1008  * Register (RSL) gsern#_lane#_btsclk_cfg
1009  *
1010  * GSER Lane BTS Synchronous Ethernet Clock Control Register
1011  * Register controls settings for providing a clock output from the lane which is
1012  * synchronous to the clock recovered from the received data stream.
1013  */
1014 union bdk_gsernx_lanex_btsclk_cfg
1015 {
1016     uint64_t u;
1017     struct bdk_gsernx_lanex_btsclk_cfg_s
1018     {
1019 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1020         uint64_t reserved_9_63         : 55;
1021         uint64_t en                    : 1;  /**< [  8:  8](R/W) Enable driving the clock output from the lane. This bit should be set low before
1022                                                                  changing [DRATIO]; it may be written to 1 in the same cycle that [DRATIO] is
1023                                                                  written. */
1024         uint64_t reserved_2_7          : 6;
1025         uint64_t dratio                : 2;  /**< [  1:  0](R/W) Divider ratio for the clock output from the lane relative to the clock for the
1026                                                                  parallel receive data.
1027                                                                  0x0 = Divide by 1, i.e., no division.
1028                                                                  0x1 = Divide by 2.
1029                                                                  0x2 = Divide by 4.
1030                                                                  0x3 = Divide by 8. */
1031 #else /* Word 0 - Little Endian */
1032         uint64_t dratio                : 2;  /**< [  1:  0](R/W) Divider ratio for the clock output from the lane relative to the clock for the
1033                                                                  parallel receive data.
1034                                                                  0x0 = Divide by 1, i.e., no division.
1035                                                                  0x1 = Divide by 2.
1036                                                                  0x2 = Divide by 4.
1037                                                                  0x3 = Divide by 8. */
1038         uint64_t reserved_2_7          : 6;
1039         uint64_t en                    : 1;  /**< [  8:  8](R/W) Enable driving the clock output from the lane. This bit should be set low before
1040                                                                  changing [DRATIO]; it may be written to 1 in the same cycle that [DRATIO] is
1041                                                                  written. */
1042         uint64_t reserved_9_63         : 55;
1043 #endif /* Word 0 - End */
1044     } s;
1045     /* struct bdk_gsernx_lanex_btsclk_cfg_s cn; */
1046 };
1047 typedef union bdk_gsernx_lanex_btsclk_cfg bdk_gsernx_lanex_btsclk_cfg_t;
1048 
1049 static inline uint64_t BDK_GSERNX_LANEX_BTSCLK_CFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_BTSCLK_CFG(unsigned long a,unsigned long b)1050 static inline uint64_t BDK_GSERNX_LANEX_BTSCLK_CFG(unsigned long a, unsigned long b)
1051 {
1052     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
1053         return 0x87e090003870ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
1054     __bdk_csr_fatal("GSERNX_LANEX_BTSCLK_CFG", 2, a, b, 0, 0);
1055 }
1056 
1057 #define typedef_BDK_GSERNX_LANEX_BTSCLK_CFG(a,b) bdk_gsernx_lanex_btsclk_cfg_t
1058 #define bustype_BDK_GSERNX_LANEX_BTSCLK_CFG(a,b) BDK_CSR_TYPE_RSL
1059 #define basename_BDK_GSERNX_LANEX_BTSCLK_CFG(a,b) "GSERNX_LANEX_BTSCLK_CFG"
1060 #define device_bar_BDK_GSERNX_LANEX_BTSCLK_CFG(a,b) 0x0 /* PF_BAR0 */
1061 #define busnum_BDK_GSERNX_LANEX_BTSCLK_CFG(a,b) (a)
1062 #define arguments_BDK_GSERNX_LANEX_BTSCLK_CFG(a,b) (a),(b),-1,-1
1063 
1064 /**
1065  * Register (RSL) gsern#_lane#_cdrfsm_bcfg
1066  *
1067  * GSER Lane Receiver CDR FSM Base Configuration Register
1068  * Controls for the clock data recover PLL control finite state
1069  * machine. Set these controls prior to bringing the analog receiver out of
1070  * reset.
1071  */
1072 union bdk_gsernx_lanex_cdrfsm_bcfg
1073 {
1074     uint64_t u;
1075     struct bdk_gsernx_lanex_cdrfsm_bcfg_s
1076     {
1077 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1078         uint64_t reserved_34_63        : 30;
1079         uint64_t voter_sp_mask         : 1;  /**< [ 33: 33](R/W/H) Set to mask out "010" and "101" patterns in RX cdr voter. */
1080         uint64_t rst_n                 : 1;  /**< [ 32: 32](R/W/H) Clear to hold the receive CDR FSM in reset. */
1081         uint64_t clk_sel               : 2;  /**< [ 31: 30](R/W/H) 0x0 = Run off div5clk from TX.
1082                                                                  0x1 = Run off div3clk from TX.
1083                                                                  0x2 = Run off div5clk from RX.
1084                                                                  0x3 = Run off div3clk from RX.
1085 
1086                                                                  [CLK_SEL]\<0\> is also used in GSER TX to allow clocking the CDR FSM
1087                                                                  with a divided copy of the transmit clock.  This field should be set
1088                                                                  as desired before sequencing the transmitter and/or receiver reset
1089                                                                  state machine(s). */
1090         uint64_t trunc                 : 2;  /**< [ 29: 28](R/W/H) Reserved.
1091                                                                  Internal:
1092                                                                  state2[16:0] is CDR state machine 2nd order loop state variable.
1093 
1094                                                                  0x0 = state2[16:0] is truncated to 13 bits (plus sign bit).
1095                                                                  0x1 = state2[16:0] is truncated to 14 bits (plus sign bit).
1096                                                                  0x2 = state2[16:0] is truncated to 15 bits (plus sign bit).
1097                                                                  0x3 = state2[16:0] is truncated to 16 bits (plus sign bit, no truncation). */
1098         uint64_t limit                 : 2;  /**< [ 27: 26](R/W/H) 0x0 = Pass-through next state at boundaries.
1099                                                                  0x1 = Limit next state at boundaries.
1100                                                                  0x2-3 = Limit & pause next state at boundaries. */
1101         uint64_t eoffs                 : 7;  /**< [ 25: 19](R/W/H) E interp state offset. */
1102         uint64_t qoffs                 : 7;  /**< [ 18: 12](R/W/H) Q interp state offset. */
1103         uint64_t inc2                  : 6;  /**< [ 11:  6](R/W/H) 2nd order loop inc. */
1104         uint64_t inc1                  : 6;  /**< [  5:  0](R/W/H) 1st order loop inc. */
1105 #else /* Word 0 - Little Endian */
1106         uint64_t inc1                  : 6;  /**< [  5:  0](R/W/H) 1st order loop inc. */
1107         uint64_t inc2                  : 6;  /**< [ 11:  6](R/W/H) 2nd order loop inc. */
1108         uint64_t qoffs                 : 7;  /**< [ 18: 12](R/W/H) Q interp state offset. */
1109         uint64_t eoffs                 : 7;  /**< [ 25: 19](R/W/H) E interp state offset. */
1110         uint64_t limit                 : 2;  /**< [ 27: 26](R/W/H) 0x0 = Pass-through next state at boundaries.
1111                                                                  0x1 = Limit next state at boundaries.
1112                                                                  0x2-3 = Limit & pause next state at boundaries. */
1113         uint64_t trunc                 : 2;  /**< [ 29: 28](R/W/H) Reserved.
1114                                                                  Internal:
1115                                                                  state2[16:0] is CDR state machine 2nd order loop state variable.
1116 
1117                                                                  0x0 = state2[16:0] is truncated to 13 bits (plus sign bit).
1118                                                                  0x1 = state2[16:0] is truncated to 14 bits (plus sign bit).
1119                                                                  0x2 = state2[16:0] is truncated to 15 bits (plus sign bit).
1120                                                                  0x3 = state2[16:0] is truncated to 16 bits (plus sign bit, no truncation). */
1121         uint64_t clk_sel               : 2;  /**< [ 31: 30](R/W/H) 0x0 = Run off div5clk from TX.
1122                                                                  0x1 = Run off div3clk from TX.
1123                                                                  0x2 = Run off div5clk from RX.
1124                                                                  0x3 = Run off div3clk from RX.
1125 
1126                                                                  [CLK_SEL]\<0\> is also used in GSER TX to allow clocking the CDR FSM
1127                                                                  with a divided copy of the transmit clock.  This field should be set
1128                                                                  as desired before sequencing the transmitter and/or receiver reset
1129                                                                  state machine(s). */
1130         uint64_t rst_n                 : 1;  /**< [ 32: 32](R/W/H) Clear to hold the receive CDR FSM in reset. */
1131         uint64_t voter_sp_mask         : 1;  /**< [ 33: 33](R/W/H) Set to mask out "010" and "101" patterns in RX cdr voter. */
1132         uint64_t reserved_34_63        : 30;
1133 #endif /* Word 0 - End */
1134     } s;
1135     /* struct bdk_gsernx_lanex_cdrfsm_bcfg_s cn; */
1136 };
1137 typedef union bdk_gsernx_lanex_cdrfsm_bcfg bdk_gsernx_lanex_cdrfsm_bcfg_t;
1138 
1139 static inline uint64_t BDK_GSERNX_LANEX_CDRFSM_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_CDRFSM_BCFG(unsigned long a,unsigned long b)1140 static inline uint64_t BDK_GSERNX_LANEX_CDRFSM_BCFG(unsigned long a, unsigned long b)
1141 {
1142     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
1143         return 0x87e090001cf0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
1144     __bdk_csr_fatal("GSERNX_LANEX_CDRFSM_BCFG", 2, a, b, 0, 0);
1145 }
1146 
1147 #define typedef_BDK_GSERNX_LANEX_CDRFSM_BCFG(a,b) bdk_gsernx_lanex_cdrfsm_bcfg_t
1148 #define bustype_BDK_GSERNX_LANEX_CDRFSM_BCFG(a,b) BDK_CSR_TYPE_RSL
1149 #define basename_BDK_GSERNX_LANEX_CDRFSM_BCFG(a,b) "GSERNX_LANEX_CDRFSM_BCFG"
1150 #define device_bar_BDK_GSERNX_LANEX_CDRFSM_BCFG(a,b) 0x0 /* PF_BAR0 */
1151 #define busnum_BDK_GSERNX_LANEX_CDRFSM_BCFG(a,b) (a)
1152 #define arguments_BDK_GSERNX_LANEX_CDRFSM_BCFG(a,b) (a),(b),-1,-1
1153 
1154 /**
1155  * Register (RSL) gsern#_lane#_cgx_txeq_bcfg
1156  *
1157  * GSER Lane CGX Tx Equalizer Base Configuration Register
1158  * Register controls settings for the transmitter equalizer taps
1159  * when the GSER is configured for CGX mode and KR training is not enabled.
1160  * These fields will drive the associated control signal when
1161  * GSERN()_LANE()_SRCMX_BCFG[TX_CTRL_SEL] is set to 'CGX'.
1162  */
1163 union bdk_gsernx_lanex_cgx_txeq_bcfg
1164 {
1165     uint64_t u;
1166     struct bdk_gsernx_lanex_cgx_txeq_bcfg_s
1167     {
1168 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1169         uint64_t reserved_28_63        : 36;
1170         uint64_t tx_coeff_update       : 1;  /**< [ 27: 27](R/W/H) Transmitter coefficient update.
1171                                                                  An asserting edge will start the transmitter coefficient update
1172                                                                  sequencer. This field self-clears when the sequence has completed.
1173                                                                  To update the GSER transmitter euqalizer coefficients program
1174                                                                  * GSERN()_LANE()_CGX_TXEQ_BCFG[TX_CPOST].
1175                                                                  * GSERN()_LANE()_CGX_TXEQ_BCFG[TX_CMAIN].
1176                                                                  * GSERN()_LANE()_CGX_TXEQ_BCFG[TX_CPRE].
1177                                                                  * GSERN()_LANE()_CGX_TXEQ_BCFG[TX_BS].
1178                                                                  * GSERN()_LANE()_CGX_TXEQ_BCFG[TX_CSPD].
1179 
1180                                                                  then write [TX_COEFF_UPDATE] to 1. */
1181         uint64_t tx_enable             : 1;  /**< [ 26: 26](R/W) Transmitter enable.
1182                                                                  0 = Disable the serdes transmitter.
1183                                                                  1 = Enable the serdes transmitter.
1184 
1185                                                                  Internal:
1186                                                                  Drives the cgx_tx_enable input to the GSERN src_mux. */
1187         uint64_t tx_stuff              : 1;  /**< [ 25: 25](R/W) Reserved. For Diagnostic Use Only.
1188                                                                  Internal:
1189                                                                  Transmitter bit stuffing.
1190                                                                  Programs the transmitter PCS lite layer for bit stuffing.
1191                                                                  Not used for Ethernet connections.
1192                                                                  Leave programmed to 0x0.
1193                                                                  Drives the cgx_tx_stuff input to the GSERN src_mux. */
1194         uint64_t tx_oob                : 1;  /**< [ 24: 24](R/W) Reserved. For Diagnostic Use Only.
1195                                                                  Internal:
1196                                                                  Transmitter OOB signaling.
1197                                                                  Not typically used for Ethernet connnections.
1198                                                                  Leave programmed to 0x0.
1199                                                                  Drives the cgx_tx_oob input to the GSERN src_mux. */
1200         uint64_t tx_idle               : 1;  /**< [ 23: 23](R/W) Reserved. For Diagnostic Use Only.
1201                                                                  Internal:
1202                                                                  Transmitter electrical idle.
1203                                                                  Used to force the transmitter to electrical idle.
1204                                                                  Not typically used for Ethernet connections.
1205                                                                  Leave progreammed to 0x0.
1206                                                                  Drives the cgx_tx_idle input to the GSERN src_mux. */
1207         uint64_t tx_cspd               : 1;  /**< [ 22: 22](R/W) Power-down control for a second TX bias/swing leg with the same
1208                                                                  weight as TX_BS[3]. Normally this field is left deasserted to
1209                                                                  provide a minimum transmit amplitude. Asserting [TX_CSPD] will turn
1210                                                                  off all legs of the bias/swing generator for lower standby power. */
1211         uint64_t tx_bs                 : 6;  /**< [ 21: 16](R/W) TX bias/swing selection. This setting only takes effect if [TX_CSPD]
1212                                                                  is deasserted; with [TX_CSPD] asserted the
1213                                                                  bias/swing control setting seen in the analog bias generator is zero.
1214 
1215                                                                  Typical override values would be:
1216                                                                    42 = Nominal 1.0V p-p transmit amplitude.
1217                                                                    52 = Nominal 1.2V p-p transmit amplitude.
1218 
1219                                                                  The maximum usable value without transmitted waveform distortion depends
1220                                                                  primarily on voltage, secondarily on process corner and temperature, but is at
1221                                                                  least 52.  There is no minimum setting based on transmitter distortion, only
1222                                                                  that set by the receiver. */
1223         uint64_t tx_cpost              : 5;  /**< [ 15: 11](R/W) Transmitter Post (C+1) equalizer tap coefficient value.
1224                                                                  Programs the transmitter Post tap.
1225                                                                  Valid range is 0 to 0x10.
1226                                                                  See GSERN()_LANE()_CGX_TXEQ_BCFG[TX_CMAIN]. */
1227         uint64_t tx_cmain              : 6;  /**< [ 10:  5](R/W) Transmitter Main (C0) equalizer tap coefficient value.
1228                                                                  Programs the serdes transmitter Main tap.
1229                                                                  Valid range is 0x30 to 0x18.
1230                                                                  When programing the transmitter Pre, Main, and Post
1231                                                                  taps the following rules must be adhered to:
1232                                                                  _ ([TX_CMAIN] + [TX_CPRE] + [TX_CPOST]) \<= 0x30.
1233                                                                  _ ([TX_CMAIN] - [TX_CPRE] - [TX_CPOST]) \>= 0x6.
1234                                                                  _ 0x30 \<= [TX_CMAIN] \<= 0x18.
1235                                                                  _ 0x16 \>= [TX_CPRE] \>= 0x0.
1236                                                                  _ 0x16 \>= [TX_CPOST] \>= 0x0.
1237 
1238                                                                  [TX_CMAIN] should be adjusted when either [TX_CPRE] or [TX_CPOST] is adjusted to
1239                                                                  provide constant power transmitter amplitude adjustments.
1240 
1241                                                                  To update the GSER serdes transmitter Pre, Main, and Post
1242                                                                  equalizer taps from the [TX_CPOST], [TX_CMAIN], and [TX_CPRE]
1243                                                                  fields write GSERN()_LANE()_CGX_TXEQ_BCFG[TX_COEFF_UPDATE]
1244                                                                  to 1 and subsequently clear [TX_COEFF_UPDATE] to 0. This step
1245                                                                  transfers the [TX_CPOST], [TX_CMAIN], and [TX_CPRE] to the
1246                                                                  serdes transmitter equalizer.
1247 
1248                                                                  Related CSRs:
1249                                                                  * GSERN()_LANE()_CGX_TXEQ_BCFG[TX_COEFF_UPDATE].
1250                                                                  * GSERN()_LANE()_CGX_TXEQ_BCFG[TX_CPOST].
1251                                                                  * GSERN()_LANE()_CGX_TXEQ_BCFG[TX_CPRE].
1252                                                                  * GSERN()_LANE()_CGX_TXEQ_BCFG[TX_BS].
1253                                                                  * GSERN()_LANE()_CGX_TXEQ_BCFG[TX_CSPD]. */
1254         uint64_t tx_cpre               : 5;  /**< [  4:  0](R/W) Transmitter Pre (C-1) equalizer tap coefficient value.
1255                                                                  Programs the transmitter Pre tap.
1256                                                                  Valid range is 0 to 0x10.
1257                                                                  See GSERN()_LANE()_CGX_TXEQ_BCFG[TX_CMAIN]. */
1258 #else /* Word 0 - Little Endian */
1259         uint64_t tx_cpre               : 5;  /**< [  4:  0](R/W) Transmitter Pre (C-1) equalizer tap coefficient value.
1260                                                                  Programs the transmitter Pre tap.
1261                                                                  Valid range is 0 to 0x10.
1262                                                                  See GSERN()_LANE()_CGX_TXEQ_BCFG[TX_CMAIN]. */
1263         uint64_t tx_cmain              : 6;  /**< [ 10:  5](R/W) Transmitter Main (C0) equalizer tap coefficient value.
1264                                                                  Programs the serdes transmitter Main tap.
1265                                                                  Valid range is 0x30 to 0x18.
1266                                                                  When programing the transmitter Pre, Main, and Post
1267                                                                  taps the following rules must be adhered to:
1268                                                                  _ ([TX_CMAIN] + [TX_CPRE] + [TX_CPOST]) \<= 0x30.
1269                                                                  _ ([TX_CMAIN] - [TX_CPRE] - [TX_CPOST]) \>= 0x6.
1270                                                                  _ 0x30 \<= [TX_CMAIN] \<= 0x18.
1271                                                                  _ 0x16 \>= [TX_CPRE] \>= 0x0.
1272                                                                  _ 0x16 \>= [TX_CPOST] \>= 0x0.
1273 
1274                                                                  [TX_CMAIN] should be adjusted when either [TX_CPRE] or [TX_CPOST] is adjusted to
1275                                                                  provide constant power transmitter amplitude adjustments.
1276 
1277                                                                  To update the GSER serdes transmitter Pre, Main, and Post
1278                                                                  equalizer taps from the [TX_CPOST], [TX_CMAIN], and [TX_CPRE]
1279                                                                  fields write GSERN()_LANE()_CGX_TXEQ_BCFG[TX_COEFF_UPDATE]
1280                                                                  to 1 and subsequently clear [TX_COEFF_UPDATE] to 0. This step
1281                                                                  transfers the [TX_CPOST], [TX_CMAIN], and [TX_CPRE] to the
1282                                                                  serdes transmitter equalizer.
1283 
1284                                                                  Related CSRs:
1285                                                                  * GSERN()_LANE()_CGX_TXEQ_BCFG[TX_COEFF_UPDATE].
1286                                                                  * GSERN()_LANE()_CGX_TXEQ_BCFG[TX_CPOST].
1287                                                                  * GSERN()_LANE()_CGX_TXEQ_BCFG[TX_CPRE].
1288                                                                  * GSERN()_LANE()_CGX_TXEQ_BCFG[TX_BS].
1289                                                                  * GSERN()_LANE()_CGX_TXEQ_BCFG[TX_CSPD]. */
1290         uint64_t tx_cpost              : 5;  /**< [ 15: 11](R/W) Transmitter Post (C+1) equalizer tap coefficient value.
1291                                                                  Programs the transmitter Post tap.
1292                                                                  Valid range is 0 to 0x10.
1293                                                                  See GSERN()_LANE()_CGX_TXEQ_BCFG[TX_CMAIN]. */
1294         uint64_t tx_bs                 : 6;  /**< [ 21: 16](R/W) TX bias/swing selection. This setting only takes effect if [TX_CSPD]
1295                                                                  is deasserted; with [TX_CSPD] asserted the
1296                                                                  bias/swing control setting seen in the analog bias generator is zero.
1297 
1298                                                                  Typical override values would be:
1299                                                                    42 = Nominal 1.0V p-p transmit amplitude.
1300                                                                    52 = Nominal 1.2V p-p transmit amplitude.
1301 
1302                                                                  The maximum usable value without transmitted waveform distortion depends
1303                                                                  primarily on voltage, secondarily on process corner and temperature, but is at
1304                                                                  least 52.  There is no minimum setting based on transmitter distortion, only
1305                                                                  that set by the receiver. */
1306         uint64_t tx_cspd               : 1;  /**< [ 22: 22](R/W) Power-down control for a second TX bias/swing leg with the same
1307                                                                  weight as TX_BS[3]. Normally this field is left deasserted to
1308                                                                  provide a minimum transmit amplitude. Asserting [TX_CSPD] will turn
1309                                                                  off all legs of the bias/swing generator for lower standby power. */
1310         uint64_t tx_idle               : 1;  /**< [ 23: 23](R/W) Reserved. For Diagnostic Use Only.
1311                                                                  Internal:
1312                                                                  Transmitter electrical idle.
1313                                                                  Used to force the transmitter to electrical idle.
1314                                                                  Not typically used for Ethernet connections.
1315                                                                  Leave progreammed to 0x0.
1316                                                                  Drives the cgx_tx_idle input to the GSERN src_mux. */
1317         uint64_t tx_oob                : 1;  /**< [ 24: 24](R/W) Reserved. For Diagnostic Use Only.
1318                                                                  Internal:
1319                                                                  Transmitter OOB signaling.
1320                                                                  Not typically used for Ethernet connnections.
1321                                                                  Leave programmed to 0x0.
1322                                                                  Drives the cgx_tx_oob input to the GSERN src_mux. */
1323         uint64_t tx_stuff              : 1;  /**< [ 25: 25](R/W) Reserved. For Diagnostic Use Only.
1324                                                                  Internal:
1325                                                                  Transmitter bit stuffing.
1326                                                                  Programs the transmitter PCS lite layer for bit stuffing.
1327                                                                  Not used for Ethernet connections.
1328                                                                  Leave programmed to 0x0.
1329                                                                  Drives the cgx_tx_stuff input to the GSERN src_mux. */
1330         uint64_t tx_enable             : 1;  /**< [ 26: 26](R/W) Transmitter enable.
1331                                                                  0 = Disable the serdes transmitter.
1332                                                                  1 = Enable the serdes transmitter.
1333 
1334                                                                  Internal:
1335                                                                  Drives the cgx_tx_enable input to the GSERN src_mux. */
1336         uint64_t tx_coeff_update       : 1;  /**< [ 27: 27](R/W/H) Transmitter coefficient update.
1337                                                                  An asserting edge will start the transmitter coefficient update
1338                                                                  sequencer. This field self-clears when the sequence has completed.
1339                                                                  To update the GSER transmitter euqalizer coefficients program
1340                                                                  * GSERN()_LANE()_CGX_TXEQ_BCFG[TX_CPOST].
1341                                                                  * GSERN()_LANE()_CGX_TXEQ_BCFG[TX_CMAIN].
1342                                                                  * GSERN()_LANE()_CGX_TXEQ_BCFG[TX_CPRE].
1343                                                                  * GSERN()_LANE()_CGX_TXEQ_BCFG[TX_BS].
1344                                                                  * GSERN()_LANE()_CGX_TXEQ_BCFG[TX_CSPD].
1345 
1346                                                                  then write [TX_COEFF_UPDATE] to 1. */
1347         uint64_t reserved_28_63        : 36;
1348 #endif /* Word 0 - End */
1349     } s;
1350     /* struct bdk_gsernx_lanex_cgx_txeq_bcfg_s cn; */
1351 };
1352 typedef union bdk_gsernx_lanex_cgx_txeq_bcfg bdk_gsernx_lanex_cgx_txeq_bcfg_t;
1353 
1354 static inline uint64_t BDK_GSERNX_LANEX_CGX_TXEQ_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_CGX_TXEQ_BCFG(unsigned long a,unsigned long b)1355 static inline uint64_t BDK_GSERNX_LANEX_CGX_TXEQ_BCFG(unsigned long a, unsigned long b)
1356 {
1357     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
1358         return 0x87e090003450ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
1359     __bdk_csr_fatal("GSERNX_LANEX_CGX_TXEQ_BCFG", 2, a, b, 0, 0);
1360 }
1361 
1362 #define typedef_BDK_GSERNX_LANEX_CGX_TXEQ_BCFG(a,b) bdk_gsernx_lanex_cgx_txeq_bcfg_t
1363 #define bustype_BDK_GSERNX_LANEX_CGX_TXEQ_BCFG(a,b) BDK_CSR_TYPE_RSL
1364 #define basename_BDK_GSERNX_LANEX_CGX_TXEQ_BCFG(a,b) "GSERNX_LANEX_CGX_TXEQ_BCFG"
1365 #define device_bar_BDK_GSERNX_LANEX_CGX_TXEQ_BCFG(a,b) 0x0 /* PF_BAR0 */
1366 #define busnum_BDK_GSERNX_LANEX_CGX_TXEQ_BCFG(a,b) (a)
1367 #define arguments_BDK_GSERNX_LANEX_CGX_TXEQ_BCFG(a,b) (a),(b),-1,-1
1368 
1369 /**
1370  * Register (RSL) gsern#_lane#_const
1371  *
1372  * GSER Lane CONST Register
1373  * Lane number within the multilane macro.
1374  */
1375 union bdk_gsernx_lanex_const
1376 {
1377     uint64_t u;
1378     struct bdk_gsernx_lanex_const_s
1379     {
1380 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1381         uint64_t reserved_8_63         : 56;
1382         uint64_t lane_num              : 8;  /**< [  7:  0](RO/H) Lane number of this lane within the multilane module */
1383 #else /* Word 0 - Little Endian */
1384         uint64_t lane_num              : 8;  /**< [  7:  0](RO/H) Lane number of this lane within the multilane module */
1385         uint64_t reserved_8_63         : 56;
1386 #endif /* Word 0 - End */
1387     } s;
1388     /* struct bdk_gsernx_lanex_const_s cn; */
1389 };
1390 typedef union bdk_gsernx_lanex_const bdk_gsernx_lanex_const_t;
1391 
1392 static inline uint64_t BDK_GSERNX_LANEX_CONST(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_CONST(unsigned long a,unsigned long b)1393 static inline uint64_t BDK_GSERNX_LANEX_CONST(unsigned long a, unsigned long b)
1394 {
1395     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
1396         return 0x87e090000100ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
1397     __bdk_csr_fatal("GSERNX_LANEX_CONST", 2, a, b, 0, 0);
1398 }
1399 
1400 #define typedef_BDK_GSERNX_LANEX_CONST(a,b) bdk_gsernx_lanex_const_t
1401 #define bustype_BDK_GSERNX_LANEX_CONST(a,b) BDK_CSR_TYPE_RSL
1402 #define basename_BDK_GSERNX_LANEX_CONST(a,b) "GSERNX_LANEX_CONST"
1403 #define device_bar_BDK_GSERNX_LANEX_CONST(a,b) 0x0 /* PF_BAR0 */
1404 #define busnum_BDK_GSERNX_LANEX_CONST(a,b) (a)
1405 #define arguments_BDK_GSERNX_LANEX_CONST(a,b) (a),(b),-1,-1
1406 
1407 /**
1408  * Register (RSL) gsern#_lane#_eco
1409  *
1410  * INTERNAL: GSER Lane ECO Register
1411  */
1412 union bdk_gsernx_lanex_eco
1413 {
1414     uint64_t u;
1415     struct bdk_gsernx_lanex_eco_s
1416     {
1417 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1418         uint64_t eco_rw                : 50; /**< [ 63: 14](R/W) Internal:
1419                                                                  Reserved for ECO use. */
1420         uint64_t eco_rw_pll            : 2;  /**< [ 13: 12](R/W) Internal:
1421                                                                  Pre-connected to the PLL. Reserved for ECO use. */
1422         uint64_t eco_rw_tx             : 4;  /**< [ 11:  8](R/W) Internal:
1423                                                                  Pre-connected to Tx custom. Reserved for ECO use. */
1424         uint64_t eco_rw_rx_top         : 4;  /**< [  7:  4](R/W) Internal:
1425                                                                  Pre-connected to the north side of Rx custom. Reserved for ECO use. */
1426         uint64_t eco_rw_rx_bot         : 4;  /**< [  3:  0](R/W) Internal:
1427                                                                  Pre-connected to the south side of Rx custom. Reserved for ECO use. */
1428 #else /* Word 0 - Little Endian */
1429         uint64_t eco_rw_rx_bot         : 4;  /**< [  3:  0](R/W) Internal:
1430                                                                  Pre-connected to the south side of Rx custom. Reserved for ECO use. */
1431         uint64_t eco_rw_rx_top         : 4;  /**< [  7:  4](R/W) Internal:
1432                                                                  Pre-connected to the north side of Rx custom. Reserved for ECO use. */
1433         uint64_t eco_rw_tx             : 4;  /**< [ 11:  8](R/W) Internal:
1434                                                                  Pre-connected to Tx custom. Reserved for ECO use. */
1435         uint64_t eco_rw_pll            : 2;  /**< [ 13: 12](R/W) Internal:
1436                                                                  Pre-connected to the PLL. Reserved for ECO use. */
1437         uint64_t eco_rw                : 50; /**< [ 63: 14](R/W) Internal:
1438                                                                  Reserved for ECO use. */
1439 #endif /* Word 0 - End */
1440     } s;
1441     /* struct bdk_gsernx_lanex_eco_s cn; */
1442 };
1443 typedef union bdk_gsernx_lanex_eco bdk_gsernx_lanex_eco_t;
1444 
1445 static inline uint64_t BDK_GSERNX_LANEX_ECO(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_ECO(unsigned long a,unsigned long b)1446 static inline uint64_t BDK_GSERNX_LANEX_ECO(unsigned long a, unsigned long b)
1447 {
1448     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
1449         return 0x87e090003970ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
1450     __bdk_csr_fatal("GSERNX_LANEX_ECO", 2, a, b, 0, 0);
1451 }
1452 
1453 #define typedef_BDK_GSERNX_LANEX_ECO(a,b) bdk_gsernx_lanex_eco_t
1454 #define bustype_BDK_GSERNX_LANEX_ECO(a,b) BDK_CSR_TYPE_RSL
1455 #define basename_BDK_GSERNX_LANEX_ECO(a,b) "GSERNX_LANEX_ECO"
1456 #define device_bar_BDK_GSERNX_LANEX_ECO(a,b) 0x0 /* PF_BAR0 */
1457 #define busnum_BDK_GSERNX_LANEX_ECO(a,b) (a)
1458 #define arguments_BDK_GSERNX_LANEX_ECO(a,b) (a),(b),-1,-1
1459 
1460 /**
1461  * Register (RSL) gsern#_lane#_eee_bcfg
1462  *
1463  * INTERNAL: GSER Lane EEE Base Configuration Register
1464  *
1465  * Reserved.
1466  * Internal:
1467  * Register controls settings for GSER behavior when Energy Efficient Ethernet (EEE) is
1468  * in use on the link.
1469  */
1470 union bdk_gsernx_lanex_eee_bcfg
1471 {
1472     uint64_t u;
1473     struct bdk_gsernx_lanex_eee_bcfg_s
1474     {
1475 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1476         uint64_t reserved_58_63        : 6;
1477         uint64_t rx_qa_sqlch_cnt       : 12; /**< [ 57: 46](R/W) Reserved.
1478                                                                  Internal:
1479                                                                  Receiever QUIET to DATA squelch count.
1480                                                                  Used to implement a delay or filter function for the receive data to the
1481                                                                  CGX MAC when the receiver transitions from the EEE QUIET state to the
1482                                                                  EEE ACTIVE state.  [RX_QA_SQLCH_CNT] counter is in units of 10ns.
1483                                                                  Used in conjuncton with GSERN()_LANE()_EEE_BCFG[RX_QA_SQLCH_EN]. */
1484         uint64_t rx_qa_sqlch_en        : 1;  /**< [ 45: 45](R/W) Reserved.
1485                                                                  Internal:
1486                                                                  Receiever QUIET to DATA squelch enable.
1487                                                                  When [RX_QA_SQLCH_EN] is enabled the receive data to the CGX MAC will be
1488                                                                  suppressed following the transition from receiver EEE QUIET state to
1489                                                                  receiver EEE ACTIVE state for the time defined by the
1490                                                                  GSERN()_LANE()_EEE_BCFG[RX_QA_SQLCH_CNT] squelch count in units of 10ns.
1491                                                                  This is a optional filtering function to prevent garbage data to the CGX MAC
1492                                                                  as the receiver is transitioning from the EEE QUIET to EEE ACTIVE states. */
1493         uint64_t tx_quiet_drv_en       : 1;  /**< [ 44: 44](R/W) Reserved.
1494                                                                  Internal:
1495                                                                  Transmitter QUIET drive enable.
1496                                                                  When [TX_QUIET_DRV_EN] is set to one the transmitter Tx+/Tx- driver outputs
1497                                                                  will drive to electrical idle when either the CGX MAC moves the
1498                                                                  SerDes transmitter block from the EEE ACTIVE state to the EEE QUIET state or
1499                                                                  the GSERN()_LANE()_EEE_BCFG[EEE_TX_OVRRD] is set to one.  This ensures that
1500                                                                  the link partner receiver energy detector sees the local device transmitter
1501                                                                  transition from the EEE ACTIVE state to the EEE QUIET state.
1502                                                                  When [TX_QUIET_DRV_EN] is set to one the transmitter Tx+/Tx- driver outputs
1503                                                                  will drive to electrical idle even if the GSERN()_LANE()_EEE_BCFG[TX_PWRDN_EN]
1504                                                                  is cleared to zero to inhibit the transmitter from powering down during EEE
1505                                                                  deep sleep TX QUIET state. When [TX_QUIET_DRV_EN] is cleared to zero the
1506                                                                  Transmitter Tx+/Tx- outputs will only drive to electrical idle when the
1507                                                                  transmitter is powered down by CGX or GSERN()_LANE()_EEE_BCFG[EEE_TX_OVRRD]
1508                                                                  is set to one and GSERN()_LANE()_EEE_BCFG[TX_PWRDN_EN] is also
1509                                                                  set to one to enable transmitter power down. */
1510         uint64_t eee_edet              : 1;  /**< [ 43: 43](RO/H) Reserved.
1511                                                                  Internal:
1512                                                                  EEE energy detected.
1513                                                                  For diagnostic use only. Reflects the state of
1514                                                                  the EEE energy detector.  Used to test signals for the wake from
1515                                                                  EEE deep sleep power down modes of the SerDes. */
1516         uint64_t eee_ovrrd             : 1;  /**< [ 42: 42](R/W) Reserved.
1517                                                                  Internal:
1518                                                                  EEE override.
1519                                                                  For diagnostic use only. When [EEE_OVRRD] is set to one the SerDes EEE rx and
1520                                                                  tx modes are controlled by GSERN()_LANE()_EEE_BCFG[EEE_RX_OVRRD] and
1521                                                                  GSERN()_LANE()_EEE_BCFG[EEE_TX_OVRRD]. Used to test the EEE deep sleep
1522                                                                  power down modes of the SerDes. */
1523         uint64_t eee_tx_ovrrd          : 2;  /**< [ 41: 40](R/W) Reserved.
1524                                                                  Internal:
1525                                                                  EEE Tx override.
1526                                                                  For diagnostic use only. When GSERN()_LANE()_EEE_BCFG[EEE_OVRRD] is set to one
1527                                                                  the SerDes transmitter modes are controlled by [EEE_TX_OVRRD]. Used to
1528                                                                  test the EEE deep sleep power down modes of the SerDes transmitter.
1529                                                                    0x0 = ACTIVE/DATA mode
1530                                                                    0x1 = QUIET
1531                                                                    0x2 = ALERT
1532                                                                    0x3 = Reserved. */
1533         uint64_t eee_rx_ovrrd          : 1;  /**< [ 39: 39](R/W) Reserved.
1534                                                                  Internal:
1535                                                                  EEE Rx override.
1536                                                                  For diagnostic use only. When GSERN()_LANE()_EEE_BCFG[EEE_OVRRD] is set to one
1537                                                                  the SerDes receiver modes are controlled by [EEE_RX_OVRRD].  Used to
1538                                                                  test the EEE deep sleep power down modes of the SerDes receiver.
1539                                                                    0x0 = ACTIVE/DATA mode
1540                                                                    0x1 = QUIET */
1541         uint64_t bypass_edet           : 1;  /**< [ 38: 38](R/W) Reserved.
1542                                                                  Internal:
1543                                                                  EEE energy detect bypass.
1544                                                                  0 = The Energy Detect EDET signal to CGX will behave normally.  EDET will be set
1545                                                                  to one when energy is detected at the lane receiver and EDET will be cleared to zero
1546                                                                  when there is no energy detected at the lane receiver.
1547                                                                  1 = The Energy Detect EDET signal to CGX will always be set to 1 bypassing
1548                                                                  the energy detect function. */
1549         uint64_t pwrdn_mode            : 2;  /**< [ 37: 36](R/W) Reserved.
1550                                                                  Internal:
1551                                                                  Programs the PHY power mode down during EEE.
1552                                                                  Used to select the P1, P2, or Shutdown powe states when entering deep sleep mode.
1553                                                                  0x0 = Reserved.
1554                                                                  0x1 = The PHY will power down to the P1 power state and the power state cntrols
1555                                                                  will be configured from the GSERN()_LANE()_EEE_RSTP1_BCFG register.
1556                                                                  0x2 = The PHY will power down to the P2 power state and the power state controls
1557                                                                  will be configured from the GSERN()_LANE()_EEE_RSTP2_BCFG register.
1558                                                                  0x3 = The PHY will power down to the shutdown (SHDN) power state and the power
1559                                                                  state controls will be configured from the GSERN()_LANE()_EEE_RSTSHDN_BCFG register. */
1560         uint64_t eyemon_pwrdn_en       : 1;  /**< [ 35: 35](R/W) Reserved.
1561                                                                  Internal:
1562                                                                  Programs the behavior of the eye monitor power down during EEE.
1563                                                                  0 = The eye monitor will not power down during EEE quiet mode.
1564                                                                  1 = The eye monitor will power down during the EEE quiet mode. */
1565         uint64_t lpll_pwrdn_en         : 1;  /**< [ 34: 34](R/W) Reserved.
1566                                                                  Internal:
1567                                                                  Programs the behavior of the lane PLL power down during EEE.
1568                                                                  0 = The lane PLL will not power down during EEE quiet mode.
1569                                                                  1 = The lane PLL will power down during the EEE quiet mode. */
1570         uint64_t tx_pwrdn_en           : 1;  /**< [ 33: 33](R/W) Reserved.
1571                                                                  Internal:
1572                                                                  Programs the behavior of the transmitter power down during EEE.
1573                                                                  0 = The transmitter will not power down during EEE quiet mode.
1574                                                                  1 = The transmitter will power down during the EEE quiet mode. */
1575         uint64_t rx_pwrdn_en           : 1;  /**< [ 32: 32](R/W) Reserved.
1576                                                                  Internal:
1577                                                                  Programs the behavior of the receiver power down during EEE.
1578                                                                  0 = The receiver will not power down during EEE quiet mode.
1579                                                                  1 = The receiver will power down during the EEE Quiet mode. */
1580         uint64_t tx_dly_cnt            : 16; /**< [ 31: 16](R/W) Reserved.
1581                                                                  Internal:
1582                                                                  Programs the delay of the TX PCS layer when the Tx side is transitione from the EEE QUIET
1583                                                                  phase to the ALERT or ACTIVE phase.  This programmable delay adds delau to ensure that
1584                                                                  txdivclk is running and stable before Tx data resumes.
1585                                                                  The delay units are in units of service-clock cycles. For diagnostic use only. */
1586         uint64_t rx_dly_cnt            : 16; /**< [ 15:  0](R/W) Reserved.
1587                                                                  Internal:
1588                                                                  Programs the delay of the RX PCS layer when the receiver is transitioned froom the EEE
1589                                                                  QUIET to ACTIVE phase.  The programmable delay adds delay to ensure that the rxdivclk
1590                                                                  is running and stable before Rx data resumes.
1591                                                                  The delay units are in units of service-clock cycles. For diagnostic use only. */
1592 #else /* Word 0 - Little Endian */
1593         uint64_t rx_dly_cnt            : 16; /**< [ 15:  0](R/W) Reserved.
1594                                                                  Internal:
1595                                                                  Programs the delay of the RX PCS layer when the receiver is transitioned froom the EEE
1596                                                                  QUIET to ACTIVE phase.  The programmable delay adds delay to ensure that the rxdivclk
1597                                                                  is running and stable before Rx data resumes.
1598                                                                  The delay units are in units of service-clock cycles. For diagnostic use only. */
1599         uint64_t tx_dly_cnt            : 16; /**< [ 31: 16](R/W) Reserved.
1600                                                                  Internal:
1601                                                                  Programs the delay of the TX PCS layer when the Tx side is transitione from the EEE QUIET
1602                                                                  phase to the ALERT or ACTIVE phase.  This programmable delay adds delau to ensure that
1603                                                                  txdivclk is running and stable before Tx data resumes.
1604                                                                  The delay units are in units of service-clock cycles. For diagnostic use only. */
1605         uint64_t rx_pwrdn_en           : 1;  /**< [ 32: 32](R/W) Reserved.
1606                                                                  Internal:
1607                                                                  Programs the behavior of the receiver power down during EEE.
1608                                                                  0 = The receiver will not power down during EEE quiet mode.
1609                                                                  1 = The receiver will power down during the EEE Quiet mode. */
1610         uint64_t tx_pwrdn_en           : 1;  /**< [ 33: 33](R/W) Reserved.
1611                                                                  Internal:
1612                                                                  Programs the behavior of the transmitter power down during EEE.
1613                                                                  0 = The transmitter will not power down during EEE quiet mode.
1614                                                                  1 = The transmitter will power down during the EEE quiet mode. */
1615         uint64_t lpll_pwrdn_en         : 1;  /**< [ 34: 34](R/W) Reserved.
1616                                                                  Internal:
1617                                                                  Programs the behavior of the lane PLL power down during EEE.
1618                                                                  0 = The lane PLL will not power down during EEE quiet mode.
1619                                                                  1 = The lane PLL will power down during the EEE quiet mode. */
1620         uint64_t eyemon_pwrdn_en       : 1;  /**< [ 35: 35](R/W) Reserved.
1621                                                                  Internal:
1622                                                                  Programs the behavior of the eye monitor power down during EEE.
1623                                                                  0 = The eye monitor will not power down during EEE quiet mode.
1624                                                                  1 = The eye monitor will power down during the EEE quiet mode. */
1625         uint64_t pwrdn_mode            : 2;  /**< [ 37: 36](R/W) Reserved.
1626                                                                  Internal:
1627                                                                  Programs the PHY power mode down during EEE.
1628                                                                  Used to select the P1, P2, or Shutdown powe states when entering deep sleep mode.
1629                                                                  0x0 = Reserved.
1630                                                                  0x1 = The PHY will power down to the P1 power state and the power state cntrols
1631                                                                  will be configured from the GSERN()_LANE()_EEE_RSTP1_BCFG register.
1632                                                                  0x2 = The PHY will power down to the P2 power state and the power state controls
1633                                                                  will be configured from the GSERN()_LANE()_EEE_RSTP2_BCFG register.
1634                                                                  0x3 = The PHY will power down to the shutdown (SHDN) power state and the power
1635                                                                  state controls will be configured from the GSERN()_LANE()_EEE_RSTSHDN_BCFG register. */
1636         uint64_t bypass_edet           : 1;  /**< [ 38: 38](R/W) Reserved.
1637                                                                  Internal:
1638                                                                  EEE energy detect bypass.
1639                                                                  0 = The Energy Detect EDET signal to CGX will behave normally.  EDET will be set
1640                                                                  to one when energy is detected at the lane receiver and EDET will be cleared to zero
1641                                                                  when there is no energy detected at the lane receiver.
1642                                                                  1 = The Energy Detect EDET signal to CGX will always be set to 1 bypassing
1643                                                                  the energy detect function. */
1644         uint64_t eee_rx_ovrrd          : 1;  /**< [ 39: 39](R/W) Reserved.
1645                                                                  Internal:
1646                                                                  EEE Rx override.
1647                                                                  For diagnostic use only. When GSERN()_LANE()_EEE_BCFG[EEE_OVRRD] is set to one
1648                                                                  the SerDes receiver modes are controlled by [EEE_RX_OVRRD].  Used to
1649                                                                  test the EEE deep sleep power down modes of the SerDes receiver.
1650                                                                    0x0 = ACTIVE/DATA mode
1651                                                                    0x1 = QUIET */
1652         uint64_t eee_tx_ovrrd          : 2;  /**< [ 41: 40](R/W) Reserved.
1653                                                                  Internal:
1654                                                                  EEE Tx override.
1655                                                                  For diagnostic use only. When GSERN()_LANE()_EEE_BCFG[EEE_OVRRD] is set to one
1656                                                                  the SerDes transmitter modes are controlled by [EEE_TX_OVRRD]. Used to
1657                                                                  test the EEE deep sleep power down modes of the SerDes transmitter.
1658                                                                    0x0 = ACTIVE/DATA mode
1659                                                                    0x1 = QUIET
1660                                                                    0x2 = ALERT
1661                                                                    0x3 = Reserved. */
1662         uint64_t eee_ovrrd             : 1;  /**< [ 42: 42](R/W) Reserved.
1663                                                                  Internal:
1664                                                                  EEE override.
1665                                                                  For diagnostic use only. When [EEE_OVRRD] is set to one the SerDes EEE rx and
1666                                                                  tx modes are controlled by GSERN()_LANE()_EEE_BCFG[EEE_RX_OVRRD] and
1667                                                                  GSERN()_LANE()_EEE_BCFG[EEE_TX_OVRRD]. Used to test the EEE deep sleep
1668                                                                  power down modes of the SerDes. */
1669         uint64_t eee_edet              : 1;  /**< [ 43: 43](RO/H) Reserved.
1670                                                                  Internal:
1671                                                                  EEE energy detected.
1672                                                                  For diagnostic use only. Reflects the state of
1673                                                                  the EEE energy detector.  Used to test signals for the wake from
1674                                                                  EEE deep sleep power down modes of the SerDes. */
1675         uint64_t tx_quiet_drv_en       : 1;  /**< [ 44: 44](R/W) Reserved.
1676                                                                  Internal:
1677                                                                  Transmitter QUIET drive enable.
1678                                                                  When [TX_QUIET_DRV_EN] is set to one the transmitter Tx+/Tx- driver outputs
1679                                                                  will drive to electrical idle when either the CGX MAC moves the
1680                                                                  SerDes transmitter block from the EEE ACTIVE state to the EEE QUIET state or
1681                                                                  the GSERN()_LANE()_EEE_BCFG[EEE_TX_OVRRD] is set to one.  This ensures that
1682                                                                  the link partner receiver energy detector sees the local device transmitter
1683                                                                  transition from the EEE ACTIVE state to the EEE QUIET state.
1684                                                                  When [TX_QUIET_DRV_EN] is set to one the transmitter Tx+/Tx- driver outputs
1685                                                                  will drive to electrical idle even if the GSERN()_LANE()_EEE_BCFG[TX_PWRDN_EN]
1686                                                                  is cleared to zero to inhibit the transmitter from powering down during EEE
1687                                                                  deep sleep TX QUIET state. When [TX_QUIET_DRV_EN] is cleared to zero the
1688                                                                  Transmitter Tx+/Tx- outputs will only drive to electrical idle when the
1689                                                                  transmitter is powered down by CGX or GSERN()_LANE()_EEE_BCFG[EEE_TX_OVRRD]
1690                                                                  is set to one and GSERN()_LANE()_EEE_BCFG[TX_PWRDN_EN] is also
1691                                                                  set to one to enable transmitter power down. */
1692         uint64_t rx_qa_sqlch_en        : 1;  /**< [ 45: 45](R/W) Reserved.
1693                                                                  Internal:
1694                                                                  Receiever QUIET to DATA squelch enable.
1695                                                                  When [RX_QA_SQLCH_EN] is enabled the receive data to the CGX MAC will be
1696                                                                  suppressed following the transition from receiver EEE QUIET state to
1697                                                                  receiver EEE ACTIVE state for the time defined by the
1698                                                                  GSERN()_LANE()_EEE_BCFG[RX_QA_SQLCH_CNT] squelch count in units of 10ns.
1699                                                                  This is a optional filtering function to prevent garbage data to the CGX MAC
1700                                                                  as the receiver is transitioning from the EEE QUIET to EEE ACTIVE states. */
1701         uint64_t rx_qa_sqlch_cnt       : 12; /**< [ 57: 46](R/W) Reserved.
1702                                                                  Internal:
1703                                                                  Receiever QUIET to DATA squelch count.
1704                                                                  Used to implement a delay or filter function for the receive data to the
1705                                                                  CGX MAC when the receiver transitions from the EEE QUIET state to the
1706                                                                  EEE ACTIVE state.  [RX_QA_SQLCH_CNT] counter is in units of 10ns.
1707                                                                  Used in conjuncton with GSERN()_LANE()_EEE_BCFG[RX_QA_SQLCH_EN]. */
1708         uint64_t reserved_58_63        : 6;
1709 #endif /* Word 0 - End */
1710     } s;
1711     /* struct bdk_gsernx_lanex_eee_bcfg_s cn; */
1712 };
1713 typedef union bdk_gsernx_lanex_eee_bcfg bdk_gsernx_lanex_eee_bcfg_t;
1714 
1715 static inline uint64_t BDK_GSERNX_LANEX_EEE_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_EEE_BCFG(unsigned long a,unsigned long b)1716 static inline uint64_t BDK_GSERNX_LANEX_EEE_BCFG(unsigned long a, unsigned long b)
1717 {
1718     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
1719         return 0x87e090003650ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
1720     __bdk_csr_fatal("GSERNX_LANEX_EEE_BCFG", 2, a, b, 0, 0);
1721 }
1722 
1723 #define typedef_BDK_GSERNX_LANEX_EEE_BCFG(a,b) bdk_gsernx_lanex_eee_bcfg_t
1724 #define bustype_BDK_GSERNX_LANEX_EEE_BCFG(a,b) BDK_CSR_TYPE_RSL
1725 #define basename_BDK_GSERNX_LANEX_EEE_BCFG(a,b) "GSERNX_LANEX_EEE_BCFG"
1726 #define device_bar_BDK_GSERNX_LANEX_EEE_BCFG(a,b) 0x0 /* PF_BAR0 */
1727 #define busnum_BDK_GSERNX_LANEX_EEE_BCFG(a,b) (a)
1728 #define arguments_BDK_GSERNX_LANEX_EEE_BCFG(a,b) (a),(b),-1,-1
1729 
1730 /**
1731  * Register (RSL) gsern#_lane#_eee_rstp1_bcfg
1732  *
1733  * INTERNAL: GSER Lane EEE PowerDown P1 Reset States Control Register
1734  *
1735  * Reserved.
1736  * Internal:
1737  * Controls the power down and reset states of the serdes lane PLL, transmitter, receiver,
1738  * receiver adaptation, and eye monitor blocks during the EEE deep sleep power down P1 state.
1739  */
1740 union bdk_gsernx_lanex_eee_rstp1_bcfg
1741 {
1742     uint64_t u;
1743     struct bdk_gsernx_lanex_eee_rstp1_bcfg_s
1744     {
1745 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1746         uint64_t reserved_33_63        : 31;
1747         uint64_t adapt_rst             : 1;  /**< [ 32: 32](R/W) Reserved.
1748                                                                  Internal:
1749                                                                  Rx Adapt state Pause (0) or Hard Reset (1) during EEE deep sleep P1 PowerDown state. */
1750         uint64_t reserved_29_31        : 3;
1751         uint64_t eye_rst               : 5;  /**< [ 28: 24](R/W) Reserved.
1752                                                                  Internal:
1753                                                                  Eye monitor reset state during EEE deep sleep P1 PowerDown state. */
1754         uint64_t reserved_21_23        : 3;
1755         uint64_t rx_rst                : 5;  /**< [ 20: 16](R/W) Reserved.
1756                                                                  Internal:
1757                                                                  RX reset state during EEE deep sleep P1 PowerDown state. */
1758         uint64_t reserved_12_15        : 4;
1759         uint64_t tx_rst                : 4;  /**< [ 11:  8](R/W) Reserved.
1760                                                                  Internal:
1761                                                                  TX reset state during EEE deep sleep P1 PowerDown state. */
1762         uint64_t reserved_4_7          : 4;
1763         uint64_t lnpll_rst             : 4;  /**< [  3:  0](R/W) Reserved.
1764                                                                  Internal:
1765                                                                  LANE PLL reset state during EEE deep sleep P1 PowerDown state.
1766                                                                  Note: this value is never likely to be changed from the normal run state (0x8). */
1767 #else /* Word 0 - Little Endian */
1768         uint64_t lnpll_rst             : 4;  /**< [  3:  0](R/W) Reserved.
1769                                                                  Internal:
1770                                                                  LANE PLL reset state during EEE deep sleep P1 PowerDown state.
1771                                                                  Note: this value is never likely to be changed from the normal run state (0x8). */
1772         uint64_t reserved_4_7          : 4;
1773         uint64_t tx_rst                : 4;  /**< [ 11:  8](R/W) Reserved.
1774                                                                  Internal:
1775                                                                  TX reset state during EEE deep sleep P1 PowerDown state. */
1776         uint64_t reserved_12_15        : 4;
1777         uint64_t rx_rst                : 5;  /**< [ 20: 16](R/W) Reserved.
1778                                                                  Internal:
1779                                                                  RX reset state during EEE deep sleep P1 PowerDown state. */
1780         uint64_t reserved_21_23        : 3;
1781         uint64_t eye_rst               : 5;  /**< [ 28: 24](R/W) Reserved.
1782                                                                  Internal:
1783                                                                  Eye monitor reset state during EEE deep sleep P1 PowerDown state. */
1784         uint64_t reserved_29_31        : 3;
1785         uint64_t adapt_rst             : 1;  /**< [ 32: 32](R/W) Reserved.
1786                                                                  Internal:
1787                                                                  Rx Adapt state Pause (0) or Hard Reset (1) during EEE deep sleep P1 PowerDown state. */
1788         uint64_t reserved_33_63        : 31;
1789 #endif /* Word 0 - End */
1790     } s;
1791     /* struct bdk_gsernx_lanex_eee_rstp1_bcfg_s cn; */
1792 };
1793 typedef union bdk_gsernx_lanex_eee_rstp1_bcfg bdk_gsernx_lanex_eee_rstp1_bcfg_t;
1794 
1795 static inline uint64_t BDK_GSERNX_LANEX_EEE_RSTP1_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_EEE_RSTP1_BCFG(unsigned long a,unsigned long b)1796 static inline uint64_t BDK_GSERNX_LANEX_EEE_RSTP1_BCFG(unsigned long a, unsigned long b)
1797 {
1798     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
1799         return 0x87e090003750ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
1800     __bdk_csr_fatal("GSERNX_LANEX_EEE_RSTP1_BCFG", 2, a, b, 0, 0);
1801 }
1802 
1803 #define typedef_BDK_GSERNX_LANEX_EEE_RSTP1_BCFG(a,b) bdk_gsernx_lanex_eee_rstp1_bcfg_t
1804 #define bustype_BDK_GSERNX_LANEX_EEE_RSTP1_BCFG(a,b) BDK_CSR_TYPE_RSL
1805 #define basename_BDK_GSERNX_LANEX_EEE_RSTP1_BCFG(a,b) "GSERNX_LANEX_EEE_RSTP1_BCFG"
1806 #define device_bar_BDK_GSERNX_LANEX_EEE_RSTP1_BCFG(a,b) 0x0 /* PF_BAR0 */
1807 #define busnum_BDK_GSERNX_LANEX_EEE_RSTP1_BCFG(a,b) (a)
1808 #define arguments_BDK_GSERNX_LANEX_EEE_RSTP1_BCFG(a,b) (a),(b),-1,-1
1809 
1810 /**
1811  * Register (RSL) gsern#_lane#_eee_rstp2_bcfg
1812  *
1813  * INTERNAL: GSER Lane EEE PowerDown P2 Reset States Control Register
1814  *
1815  * Reserved.
1816  * Internal:
1817  * Controls the power down and reset states of the serdes lane PLL, transmitter, receiver,
1818  * receiver adaptation, and eye monitor blocks during the EEE deep sleep power down P2 state.
1819  */
1820 union bdk_gsernx_lanex_eee_rstp2_bcfg
1821 {
1822     uint64_t u;
1823     struct bdk_gsernx_lanex_eee_rstp2_bcfg_s
1824     {
1825 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1826         uint64_t reserved_33_63        : 31;
1827         uint64_t adapt_rst             : 1;  /**< [ 32: 32](R/W) Reserved.
1828                                                                  Internal:
1829                                                                  Rx Adapt state Pause (0) or Hard Reset (1) during EEE deep sleep P2 PowerDown state. */
1830         uint64_t reserved_29_31        : 3;
1831         uint64_t eye_rst               : 5;  /**< [ 28: 24](R/W) Reserved.
1832                                                                  Internal:
1833                                                                  Eye monitor reset state during EEE deep sleep P2 PowerDown state. */
1834         uint64_t reserved_21_23        : 3;
1835         uint64_t rx_rst                : 5;  /**< [ 20: 16](R/W) Reserved.
1836                                                                  Internal:
1837                                                                  RX reset state during EEE deep sleep P2 PowerDown state. */
1838         uint64_t reserved_12_15        : 4;
1839         uint64_t tx_rst                : 4;  /**< [ 11:  8](R/W) Reserved.
1840                                                                  Internal:
1841                                                                  TX reset state during EEE deep sleep P2 PowerDown state. */
1842         uint64_t reserved_4_7          : 4;
1843         uint64_t lnpll_rst             : 4;  /**< [  3:  0](R/W) Reserved.
1844                                                                  Internal:
1845                                                                  LANE PLL reset state during EEE deep sleep P2 PowerDown state. */
1846 #else /* Word 0 - Little Endian */
1847         uint64_t lnpll_rst             : 4;  /**< [  3:  0](R/W) Reserved.
1848                                                                  Internal:
1849                                                                  LANE PLL reset state during EEE deep sleep P2 PowerDown state. */
1850         uint64_t reserved_4_7          : 4;
1851         uint64_t tx_rst                : 4;  /**< [ 11:  8](R/W) Reserved.
1852                                                                  Internal:
1853                                                                  TX reset state during EEE deep sleep P2 PowerDown state. */
1854         uint64_t reserved_12_15        : 4;
1855         uint64_t rx_rst                : 5;  /**< [ 20: 16](R/W) Reserved.
1856                                                                  Internal:
1857                                                                  RX reset state during EEE deep sleep P2 PowerDown state. */
1858         uint64_t reserved_21_23        : 3;
1859         uint64_t eye_rst               : 5;  /**< [ 28: 24](R/W) Reserved.
1860                                                                  Internal:
1861                                                                  Eye monitor reset state during EEE deep sleep P2 PowerDown state. */
1862         uint64_t reserved_29_31        : 3;
1863         uint64_t adapt_rst             : 1;  /**< [ 32: 32](R/W) Reserved.
1864                                                                  Internal:
1865                                                                  Rx Adapt state Pause (0) or Hard Reset (1) during EEE deep sleep P2 PowerDown state. */
1866         uint64_t reserved_33_63        : 31;
1867 #endif /* Word 0 - End */
1868     } s;
1869     /* struct bdk_gsernx_lanex_eee_rstp2_bcfg_s cn; */
1870 };
1871 typedef union bdk_gsernx_lanex_eee_rstp2_bcfg bdk_gsernx_lanex_eee_rstp2_bcfg_t;
1872 
1873 static inline uint64_t BDK_GSERNX_LANEX_EEE_RSTP2_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_EEE_RSTP2_BCFG(unsigned long a,unsigned long b)1874 static inline uint64_t BDK_GSERNX_LANEX_EEE_RSTP2_BCFG(unsigned long a, unsigned long b)
1875 {
1876     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
1877         return 0x87e090003760ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
1878     __bdk_csr_fatal("GSERNX_LANEX_EEE_RSTP2_BCFG", 2, a, b, 0, 0);
1879 }
1880 
1881 #define typedef_BDK_GSERNX_LANEX_EEE_RSTP2_BCFG(a,b) bdk_gsernx_lanex_eee_rstp2_bcfg_t
1882 #define bustype_BDK_GSERNX_LANEX_EEE_RSTP2_BCFG(a,b) BDK_CSR_TYPE_RSL
1883 #define basename_BDK_GSERNX_LANEX_EEE_RSTP2_BCFG(a,b) "GSERNX_LANEX_EEE_RSTP2_BCFG"
1884 #define device_bar_BDK_GSERNX_LANEX_EEE_RSTP2_BCFG(a,b) 0x0 /* PF_BAR0 */
1885 #define busnum_BDK_GSERNX_LANEX_EEE_RSTP2_BCFG(a,b) (a)
1886 #define arguments_BDK_GSERNX_LANEX_EEE_RSTP2_BCFG(a,b) (a),(b),-1,-1
1887 
1888 /**
1889  * Register (RSL) gsern#_lane#_eee_rstshdn_bcfg
1890  *
1891  * INTERNAL: GSER Lane EEE PowerDown P2 Reset States Control Register
1892  *
1893  * Reserved.
1894  * Internal:
1895  * Controls the power down and reset states of the serdes lane PLL, transmitter, receiver,
1896  * receiver adaptation, and eye monitor blocks during the EEE deep sleep power shut down state.
1897  */
1898 union bdk_gsernx_lanex_eee_rstshdn_bcfg
1899 {
1900     uint64_t u;
1901     struct bdk_gsernx_lanex_eee_rstshdn_bcfg_s
1902     {
1903 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1904         uint64_t reserved_33_63        : 31;
1905         uint64_t adapt_rst             : 1;  /**< [ 32: 32](R/W) Reserved.
1906                                                                  Internal:
1907                                                                  Rx Adapt state Pause (0) or Hard Reset (1) during EEE deep sleep shutdown PowerDown state. */
1908         uint64_t reserved_29_31        : 3;
1909         uint64_t eye_rst               : 5;  /**< [ 28: 24](R/W) Reserved.
1910                                                                  Internal:
1911                                                                  Eye monitor reset state during EEE deep sleep shutdown PowerDown state. */
1912         uint64_t reserved_21_23        : 3;
1913         uint64_t rx_rst                : 5;  /**< [ 20: 16](R/W) Reserved.
1914                                                                  Internal:
1915                                                                  RX reset state during EEE deep sleep shutdown PowerDown state. */
1916         uint64_t reserved_12_15        : 4;
1917         uint64_t tx_rst                : 4;  /**< [ 11:  8](R/W) Reserved.
1918                                                                  Internal:
1919                                                                  TX reset state during EEE deep sleep shutdown PowerDown state. */
1920         uint64_t reserved_4_7          : 4;
1921         uint64_t lnpll_rst             : 4;  /**< [  3:  0](R/W) Reserved.
1922                                                                  Internal:
1923                                                                  LANE PLL reset state during EEE deep sleep shutdown PowerDown state. */
1924 #else /* Word 0 - Little Endian */
1925         uint64_t lnpll_rst             : 4;  /**< [  3:  0](R/W) Reserved.
1926                                                                  Internal:
1927                                                                  LANE PLL reset state during EEE deep sleep shutdown PowerDown state. */
1928         uint64_t reserved_4_7          : 4;
1929         uint64_t tx_rst                : 4;  /**< [ 11:  8](R/W) Reserved.
1930                                                                  Internal:
1931                                                                  TX reset state during EEE deep sleep shutdown PowerDown state. */
1932         uint64_t reserved_12_15        : 4;
1933         uint64_t rx_rst                : 5;  /**< [ 20: 16](R/W) Reserved.
1934                                                                  Internal:
1935                                                                  RX reset state during EEE deep sleep shutdown PowerDown state. */
1936         uint64_t reserved_21_23        : 3;
1937         uint64_t eye_rst               : 5;  /**< [ 28: 24](R/W) Reserved.
1938                                                                  Internal:
1939                                                                  Eye monitor reset state during EEE deep sleep shutdown PowerDown state. */
1940         uint64_t reserved_29_31        : 3;
1941         uint64_t adapt_rst             : 1;  /**< [ 32: 32](R/W) Reserved.
1942                                                                  Internal:
1943                                                                  Rx Adapt state Pause (0) or Hard Reset (1) during EEE deep sleep shutdown PowerDown state. */
1944         uint64_t reserved_33_63        : 31;
1945 #endif /* Word 0 - End */
1946     } s;
1947     /* struct bdk_gsernx_lanex_eee_rstshdn_bcfg_s cn; */
1948 };
1949 typedef union bdk_gsernx_lanex_eee_rstshdn_bcfg bdk_gsernx_lanex_eee_rstshdn_bcfg_t;
1950 
1951 static inline uint64_t BDK_GSERNX_LANEX_EEE_RSTSHDN_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_EEE_RSTSHDN_BCFG(unsigned long a,unsigned long b)1952 static inline uint64_t BDK_GSERNX_LANEX_EEE_RSTSHDN_BCFG(unsigned long a, unsigned long b)
1953 {
1954     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
1955         return 0x87e090003770ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
1956     __bdk_csr_fatal("GSERNX_LANEX_EEE_RSTSHDN_BCFG", 2, a, b, 0, 0);
1957 }
1958 
1959 #define typedef_BDK_GSERNX_LANEX_EEE_RSTSHDN_BCFG(a,b) bdk_gsernx_lanex_eee_rstshdn_bcfg_t
1960 #define bustype_BDK_GSERNX_LANEX_EEE_RSTSHDN_BCFG(a,b) BDK_CSR_TYPE_RSL
1961 #define basename_BDK_GSERNX_LANEX_EEE_RSTSHDN_BCFG(a,b) "GSERNX_LANEX_EEE_RSTSHDN_BCFG"
1962 #define device_bar_BDK_GSERNX_LANEX_EEE_RSTSHDN_BCFG(a,b) 0x0 /* PF_BAR0 */
1963 #define busnum_BDK_GSERNX_LANEX_EEE_RSTSHDN_BCFG(a,b) (a)
1964 #define arguments_BDK_GSERNX_LANEX_EEE_RSTSHDN_BCFG(a,b) (a),(b),-1,-1
1965 
1966 /**
1967  * Register (RSL) gsern#_lane#_eye_ctl
1968  *
1969  * GSER Lane PCS Lite Eye Data Gathering Control Register
1970  */
1971 union bdk_gsernx_lanex_eye_ctl
1972 {
1973     uint64_t u;
1974     struct bdk_gsernx_lanex_eye_ctl_s
1975     {
1976 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1977         uint64_t reserved_57_63        : 7;
1978         uint64_t rst_n                 : 1;  /**< [ 56: 56](R/W) Clear and then set to reset the cycle count timer, the
1979                                                                  done indicator, and the eye error counts. */
1980         uint64_t reserved_49_55        : 7;
1981         uint64_t eye_en                : 1;  /**< [ 48: 48](R/W) Enable eye error counting (with or without cycle count limits,
1982                                                                  depending on GSERN()_LANE()_EYE_CTL[CYCLE_CNT_EN]). If the cycle count
1983                                                                  limit feature is not used, counting will stop when
1984                                                                  GSERN()_LANE()_EYE_CTL[EYE_EN] deasserts. Set this bit prior to
1985                                                                  deasserting GSERN()_LANE()_EYE_CTL[RST_N] to use the eye data gathering
1986                                                                  feature. */
1987         uint64_t reserved_41_47        : 7;
1988         uint64_t cycle_cnt_en          : 1;  /**< [ 40: 40](R/W) Enable use of GSERN()_LANE()_EYE_CTL[CYCLE_CNT] to limit number of cycles
1989                                                                  of PCS RX clock over which the errors are accumulated. Set this bit
1990                                                                  prior to deasserting GSERN()_LANE()_EYE_CTL[RST_N] to use cycle count
1991                                                                  limiting in the eye data gathering feature. */
1992         uint64_t cycle_cnt             : 40; /**< [ 39:  0](R/W) When enabled, this contains the count of PCS receive-clock cycles
1993                                                                  over which error counts are accumulated. Set
1994                                                                  GSERN()_LANE()_EYE_CTL[CYCLE_CNT] prior to deasserting
1995                                                                  GSERN()_LANE()_EYE_CTL[RST_N] to use cycle count limiting in the eye data
1996                                                                  gathering feature. */
1997 #else /* Word 0 - Little Endian */
1998         uint64_t cycle_cnt             : 40; /**< [ 39:  0](R/W) When enabled, this contains the count of PCS receive-clock cycles
1999                                                                  over which error counts are accumulated. Set
2000                                                                  GSERN()_LANE()_EYE_CTL[CYCLE_CNT] prior to deasserting
2001                                                                  GSERN()_LANE()_EYE_CTL[RST_N] to use cycle count limiting in the eye data
2002                                                                  gathering feature. */
2003         uint64_t cycle_cnt_en          : 1;  /**< [ 40: 40](R/W) Enable use of GSERN()_LANE()_EYE_CTL[CYCLE_CNT] to limit number of cycles
2004                                                                  of PCS RX clock over which the errors are accumulated. Set this bit
2005                                                                  prior to deasserting GSERN()_LANE()_EYE_CTL[RST_N] to use cycle count
2006                                                                  limiting in the eye data gathering feature. */
2007         uint64_t reserved_41_47        : 7;
2008         uint64_t eye_en                : 1;  /**< [ 48: 48](R/W) Enable eye error counting (with or without cycle count limits,
2009                                                                  depending on GSERN()_LANE()_EYE_CTL[CYCLE_CNT_EN]). If the cycle count
2010                                                                  limit feature is not used, counting will stop when
2011                                                                  GSERN()_LANE()_EYE_CTL[EYE_EN] deasserts. Set this bit prior to
2012                                                                  deasserting GSERN()_LANE()_EYE_CTL[RST_N] to use the eye data gathering
2013                                                                  feature. */
2014         uint64_t reserved_49_55        : 7;
2015         uint64_t rst_n                 : 1;  /**< [ 56: 56](R/W) Clear and then set to reset the cycle count timer, the
2016                                                                  done indicator, and the eye error counts. */
2017         uint64_t reserved_57_63        : 7;
2018 #endif /* Word 0 - End */
2019     } s;
2020     /* struct bdk_gsernx_lanex_eye_ctl_s cn; */
2021 };
2022 typedef union bdk_gsernx_lanex_eye_ctl bdk_gsernx_lanex_eye_ctl_t;
2023 
2024 static inline uint64_t BDK_GSERNX_LANEX_EYE_CTL(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_EYE_CTL(unsigned long a,unsigned long b)2025 static inline uint64_t BDK_GSERNX_LANEX_EYE_CTL(unsigned long a, unsigned long b)
2026 {
2027     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
2028         return 0x87e0900007b0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
2029     __bdk_csr_fatal("GSERNX_LANEX_EYE_CTL", 2, a, b, 0, 0);
2030 }
2031 
2032 #define typedef_BDK_GSERNX_LANEX_EYE_CTL(a,b) bdk_gsernx_lanex_eye_ctl_t
2033 #define bustype_BDK_GSERNX_LANEX_EYE_CTL(a,b) BDK_CSR_TYPE_RSL
2034 #define basename_BDK_GSERNX_LANEX_EYE_CTL(a,b) "GSERNX_LANEX_EYE_CTL"
2035 #define device_bar_BDK_GSERNX_LANEX_EYE_CTL(a,b) 0x0 /* PF_BAR0 */
2036 #define busnum_BDK_GSERNX_LANEX_EYE_CTL(a,b) (a)
2037 #define arguments_BDK_GSERNX_LANEX_EYE_CTL(a,b) (a),(b),-1,-1
2038 
2039 /**
2040  * Register (RSL) gsern#_lane#_eye_ctl_2
2041  *
2042  * GSER Lane PCS Lite Eye Data Gathering Control Register 2
2043  * The low 4 bits in this register allow for shifting either the doutq or
2044  * doute_cal data by 1 or 2 UI to allow for an offset in the framing of the
2045  * deserialized data between these two data paths in the receiver. Software
2046  * will need to iterate eye or scope measurement with identical settings
2047  * for the quadurature and eye datapaths, adjusting the shift bits in this
2048  * register until no differences are accumulated. (Note that shifting both
2049  * doutq and doute_cal would typically not be useful, since the resulting
2050  * alignment would be the same as if neither were shifted.)
2051  *
2052  * The remaining bits control various aspects of the eye monitor error
2053  * counting logic.
2054  */
2055 union bdk_gsernx_lanex_eye_ctl_2
2056 {
2057     uint64_t u;
2058     struct bdk_gsernx_lanex_eye_ctl_2_s
2059     {
2060 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2061         uint64_t reserved_41_63        : 23;
2062         uint64_t capture_ones_en       : 1;  /**< [ 40: 40](R/W) Set to enable capture ones, so that a full eye
2063                                                                  diagram can be generated. deassert to capture half an eye. The
2064                                                                  default is to enable the full eye. */
2065         uint64_t capture_ones          : 1;  /**< [ 39: 39](R/W) Set to choose to capture eye data for ones bits in the serial
2066                                                                  order in the received data stream. Clear to choose to capture
2067                                                                  eye data for zero bits in serial order in the received data stream.
2068                                                                  Program as desired before enabling eye data capture. Unlike
2069                                                                  [CAPTURE_EDGEMODE], this signal sets the mode within the eye monitor
2070                                                                  only.
2071                                                                  For 00 bit sequence errors, use [CAPTURE_ONES]=0 and [CAPTURE_TRANS]=0.
2072                                                                  For 01 bit sequence errors, use [CAPTURE_ONES]=0 and [CAPTURE_TRANS]=1.
2073                                                                  For 10 bit sequence errors, use [CAPTURE_ONES]=1 and [CAPTURE_TRANS]=1.
2074                                                                  For 11 bit sequence errors, use [CAPTURE_ONES]=1 and [CAPTURE_TRANS]=0. */
2075         uint64_t reserved_33_38        : 6;
2076         uint64_t eye_adapt_en          : 1;  /**< [ 32: 32](R/W) Set to enable eye path in the RX calibration DFE (rxcaldfe).
2077                                                                  It can be asserted/deasserted with GSERN()_LANE()_EYE_CTL[EYE_EN]. It must be
2078                                                                  enabled for [CAPTURE_EDGEMODE] and GSERN()_LANE()_RX_OS_5_BCFG[C1_E_ADJUST] to
2079                                                                  be applied to the eye/E path. */
2080         uint64_t reserved_25_31        : 7;
2081         uint64_t capture_edgemode      : 1;  /**< [ 24: 24](R/W) Set to choose capture of eye data for bits that transitioned in
2082                                                                  serial order in the received data stream. Clear to choose capture
2083                                                                  of eye data for bits that did not transitioned in serial order in
2084                                                                  the received data stream. Program as desired before enabling eye data
2085                                                                  capture. Unlike [CAPTURE_TRANS] and GSERN()_LANE()_RX_8_BCFG[DFE_EDGEMODE_OVRD], this signal
2086                                                                  controls the calculation of the c1 bits for the eye/E path. */
2087         uint64_t reserved_17_23        : 7;
2088         uint64_t capture_trans         : 1;  /**< [ 16: 16](R/W) Set to choose capture of eye data for bits that transitioned in
2089                                                                  serial order in the received data stream. Clear to choose capture
2090                                                                  of eye data for bits that did not transitioned in serial order in
2091                                                                  the received data stream. Program as desired before enabling eye data
2092                                                                  capture. Unlike [CAPTURE_EDGEMODE], this signal sets the mode within
2093                                                                  the eye monitor only.
2094                                                                  For 00 bit sequence errors, use [CAPTURE_ONES]=0 and [CAPTURE_TRANS]=0.
2095                                                                  For 01 bit sequence errors, use [CAPTURE_ONES]=0 and [CAPTURE_TRANS]=1.
2096                                                                  For 10 bit sequence errors, use [CAPTURE_ONES]=1 and [CAPTURE_TRANS]=1.
2097                                                                  For 11 bit sequence errors, use [CAPTURE_ONES]=1 and [CAPTURE_TRANS]=0. */
2098         uint64_t reserved_10_15        : 6;
2099         uint64_t dbl_shift_doute       : 1;  /**< [  9:  9](R/W) Set to shift the doute_cal (receiver eye calibration path) data
2100                                                                  by 2 UI earlier to align with doutq for eye and scope comparison
2101                                                                  logic. Only data captured in the eye or scope logic is impacted by
2102                                                                  this setting. When asserted, the double shift control has priority
2103                                                                  over the (single) shift control. Program as desired before enabling eye
2104                                                                  data capture. */
2105         uint64_t shift_doute           : 1;  /**< [  8:  8](R/W) Set to shift the doute_cal (receiver eye path) data by 1 UI
2106                                                                  earlier to align with doutq for eye and scope comparison logic. Only
2107                                                                  data captured in the eye or scope logic is impacted by this
2108                                                                  setting. Program as desired before enabling eye data capture. */
2109         uint64_t reserved_2_7          : 6;
2110         uint64_t dbl_shift_doutq       : 1;  /**< [  1:  1](R/W) Set to shift the doutq (receiver normal quadrature path) data by
2111                                                                  2 UI earlier to align with doute_cal for eye and scope comparison
2112                                                                  logic. Only data captured in the eye or scope logic is impacted by
2113                                                                  this setting. When asserted, the double shift control has priority
2114                                                                  over the (single) shift control. Program as desired before enabling eye
2115                                                                  data capture. */
2116         uint64_t shift_doutq           : 1;  /**< [  0:  0](R/W) Set to shift the doutq (receiver normal quadrature path) data by
2117                                                                  1 UI earlier to align with doute_cal for eye and scope comparison
2118                                                                  logic. Only data captured in the eye or scope logic is impacted by
2119                                                                  this setting. Program as desired before enabling eye data capture. */
2120 #else /* Word 0 - Little Endian */
2121         uint64_t shift_doutq           : 1;  /**< [  0:  0](R/W) Set to shift the doutq (receiver normal quadrature path) data by
2122                                                                  1 UI earlier to align with doute_cal for eye and scope comparison
2123                                                                  logic. Only data captured in the eye or scope logic is impacted by
2124                                                                  this setting. Program as desired before enabling eye data capture. */
2125         uint64_t dbl_shift_doutq       : 1;  /**< [  1:  1](R/W) Set to shift the doutq (receiver normal quadrature path) data by
2126                                                                  2 UI earlier to align with doute_cal for eye and scope comparison
2127                                                                  logic. Only data captured in the eye or scope logic is impacted by
2128                                                                  this setting. When asserted, the double shift control has priority
2129                                                                  over the (single) shift control. Program as desired before enabling eye
2130                                                                  data capture. */
2131         uint64_t reserved_2_7          : 6;
2132         uint64_t shift_doute           : 1;  /**< [  8:  8](R/W) Set to shift the doute_cal (receiver eye path) data by 1 UI
2133                                                                  earlier to align with doutq for eye and scope comparison logic. Only
2134                                                                  data captured in the eye or scope logic is impacted by this
2135                                                                  setting. Program as desired before enabling eye data capture. */
2136         uint64_t dbl_shift_doute       : 1;  /**< [  9:  9](R/W) Set to shift the doute_cal (receiver eye calibration path) data
2137                                                                  by 2 UI earlier to align with doutq for eye and scope comparison
2138                                                                  logic. Only data captured in the eye or scope logic is impacted by
2139                                                                  this setting. When asserted, the double shift control has priority
2140                                                                  over the (single) shift control. Program as desired before enabling eye
2141                                                                  data capture. */
2142         uint64_t reserved_10_15        : 6;
2143         uint64_t capture_trans         : 1;  /**< [ 16: 16](R/W) Set to choose capture of eye data for bits that transitioned in
2144                                                                  serial order in the received data stream. Clear to choose capture
2145                                                                  of eye data for bits that did not transitioned in serial order in
2146                                                                  the received data stream. Program as desired before enabling eye data
2147                                                                  capture. Unlike [CAPTURE_EDGEMODE], this signal sets the mode within
2148                                                                  the eye monitor only.
2149                                                                  For 00 bit sequence errors, use [CAPTURE_ONES]=0 and [CAPTURE_TRANS]=0.
2150                                                                  For 01 bit sequence errors, use [CAPTURE_ONES]=0 and [CAPTURE_TRANS]=1.
2151                                                                  For 10 bit sequence errors, use [CAPTURE_ONES]=1 and [CAPTURE_TRANS]=1.
2152                                                                  For 11 bit sequence errors, use [CAPTURE_ONES]=1 and [CAPTURE_TRANS]=0. */
2153         uint64_t reserved_17_23        : 7;
2154         uint64_t capture_edgemode      : 1;  /**< [ 24: 24](R/W) Set to choose capture of eye data for bits that transitioned in
2155                                                                  serial order in the received data stream. Clear to choose capture
2156                                                                  of eye data for bits that did not transitioned in serial order in
2157                                                                  the received data stream. Program as desired before enabling eye data
2158                                                                  capture. Unlike [CAPTURE_TRANS] and GSERN()_LANE()_RX_8_BCFG[DFE_EDGEMODE_OVRD], this signal
2159                                                                  controls the calculation of the c1 bits for the eye/E path. */
2160         uint64_t reserved_25_31        : 7;
2161         uint64_t eye_adapt_en          : 1;  /**< [ 32: 32](R/W) Set to enable eye path in the RX calibration DFE (rxcaldfe).
2162                                                                  It can be asserted/deasserted with GSERN()_LANE()_EYE_CTL[EYE_EN]. It must be
2163                                                                  enabled for [CAPTURE_EDGEMODE] and GSERN()_LANE()_RX_OS_5_BCFG[C1_E_ADJUST] to
2164                                                                  be applied to the eye/E path. */
2165         uint64_t reserved_33_38        : 6;
2166         uint64_t capture_ones          : 1;  /**< [ 39: 39](R/W) Set to choose to capture eye data for ones bits in the serial
2167                                                                  order in the received data stream. Clear to choose to capture
2168                                                                  eye data for zero bits in serial order in the received data stream.
2169                                                                  Program as desired before enabling eye data capture. Unlike
2170                                                                  [CAPTURE_EDGEMODE], this signal sets the mode within the eye monitor
2171                                                                  only.
2172                                                                  For 00 bit sequence errors, use [CAPTURE_ONES]=0 and [CAPTURE_TRANS]=0.
2173                                                                  For 01 bit sequence errors, use [CAPTURE_ONES]=0 and [CAPTURE_TRANS]=1.
2174                                                                  For 10 bit sequence errors, use [CAPTURE_ONES]=1 and [CAPTURE_TRANS]=1.
2175                                                                  For 11 bit sequence errors, use [CAPTURE_ONES]=1 and [CAPTURE_TRANS]=0. */
2176         uint64_t capture_ones_en       : 1;  /**< [ 40: 40](R/W) Set to enable capture ones, so that a full eye
2177                                                                  diagram can be generated. deassert to capture half an eye. The
2178                                                                  default is to enable the full eye. */
2179         uint64_t reserved_41_63        : 23;
2180 #endif /* Word 0 - End */
2181     } s;
2182     /* struct bdk_gsernx_lanex_eye_ctl_2_s cn; */
2183 };
2184 typedef union bdk_gsernx_lanex_eye_ctl_2 bdk_gsernx_lanex_eye_ctl_2_t;
2185 
2186 static inline uint64_t BDK_GSERNX_LANEX_EYE_CTL_2(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_EYE_CTL_2(unsigned long a,unsigned long b)2187 static inline uint64_t BDK_GSERNX_LANEX_EYE_CTL_2(unsigned long a, unsigned long b)
2188 {
2189     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
2190         return 0x87e0900007c0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
2191     __bdk_csr_fatal("GSERNX_LANEX_EYE_CTL_2", 2, a, b, 0, 0);
2192 }
2193 
2194 #define typedef_BDK_GSERNX_LANEX_EYE_CTL_2(a,b) bdk_gsernx_lanex_eye_ctl_2_t
2195 #define bustype_BDK_GSERNX_LANEX_EYE_CTL_2(a,b) BDK_CSR_TYPE_RSL
2196 #define basename_BDK_GSERNX_LANEX_EYE_CTL_2(a,b) "GSERNX_LANEX_EYE_CTL_2"
2197 #define device_bar_BDK_GSERNX_LANEX_EYE_CTL_2(a,b) 0x0 /* PF_BAR0 */
2198 #define busnum_BDK_GSERNX_LANEX_EYE_CTL_2(a,b) (a)
2199 #define arguments_BDK_GSERNX_LANEX_EYE_CTL_2(a,b) (a),(b),-1,-1
2200 
2201 /**
2202  * Register (RSL) gsern#_lane#_eye_dat
2203  *
2204  * GSER Lane PCS Lite Eye Data Gathering Result Register
2205  */
2206 union bdk_gsernx_lanex_eye_dat
2207 {
2208     uint64_t u;
2209     struct bdk_gsernx_lanex_eye_dat_s
2210     {
2211 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2212         uint64_t reserved_50_63        : 14;
2213         uint64_t cycle_cnt_done        : 1;  /**< [ 49: 49](RO/H) Indicates the GSERN()_LANE()_EYE_CTL[CYCLE_CNT] has expired if
2214                                                                  GSERN()_LANE()_EYE_CTL[CYCLE_CNT_EN] is asserted. If
2215                                                                  GSERN()_LANE()_EYE_CTL[CYCLE_CNT_EN] is deasserted, this bit will always
2216                                                                  read as asserted. */
2217         uint64_t reserved_48           : 1;
2218         uint64_t err_cnt_ovf           : 1;  /**< [ 47: 47](RO/H) When set indicates GSERN()_LANE()_EYE_DAT[ERR_CNT] overflowed and is
2219                                                                  not accurate. */
2220         uint64_t reserved_45_46        : 2;
2221         uint64_t err_cnt               : 45; /**< [ 44:  0](RO/H) Count of bit errors seen in doute_cal relative to doutq. If
2222                                                                  GSERN()_LANE()_EYE_CTL[CYCLE_CNT_EN] and GSERN()_LANE()_EYE_DAT[CYCLE_CNT_DONE]
2223                                                                  are not both asserted, GSERN()_LANE()_EYE_DAT[ERR_CNT] may not be reliable
2224                                                                  unless GSERN()_LANE()_EYE_CTL[EYE_EN] is first cleared (to stop the
2225                                                                  error counter). */
2226 #else /* Word 0 - Little Endian */
2227         uint64_t err_cnt               : 45; /**< [ 44:  0](RO/H) Count of bit errors seen in doute_cal relative to doutq. If
2228                                                                  GSERN()_LANE()_EYE_CTL[CYCLE_CNT_EN] and GSERN()_LANE()_EYE_DAT[CYCLE_CNT_DONE]
2229                                                                  are not both asserted, GSERN()_LANE()_EYE_DAT[ERR_CNT] may not be reliable
2230                                                                  unless GSERN()_LANE()_EYE_CTL[EYE_EN] is first cleared (to stop the
2231                                                                  error counter). */
2232         uint64_t reserved_45_46        : 2;
2233         uint64_t err_cnt_ovf           : 1;  /**< [ 47: 47](RO/H) When set indicates GSERN()_LANE()_EYE_DAT[ERR_CNT] overflowed and is
2234                                                                  not accurate. */
2235         uint64_t reserved_48           : 1;
2236         uint64_t cycle_cnt_done        : 1;  /**< [ 49: 49](RO/H) Indicates the GSERN()_LANE()_EYE_CTL[CYCLE_CNT] has expired if
2237                                                                  GSERN()_LANE()_EYE_CTL[CYCLE_CNT_EN] is asserted. If
2238                                                                  GSERN()_LANE()_EYE_CTL[CYCLE_CNT_EN] is deasserted, this bit will always
2239                                                                  read as asserted. */
2240         uint64_t reserved_50_63        : 14;
2241 #endif /* Word 0 - End */
2242     } s;
2243     /* struct bdk_gsernx_lanex_eye_dat_s cn; */
2244 };
2245 typedef union bdk_gsernx_lanex_eye_dat bdk_gsernx_lanex_eye_dat_t;
2246 
2247 static inline uint64_t BDK_GSERNX_LANEX_EYE_DAT(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_EYE_DAT(unsigned long a,unsigned long b)2248 static inline uint64_t BDK_GSERNX_LANEX_EYE_DAT(unsigned long a, unsigned long b)
2249 {
2250     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
2251         return 0x87e0900007d0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
2252     __bdk_csr_fatal("GSERNX_LANEX_EYE_DAT", 2, a, b, 0, 0);
2253 }
2254 
2255 #define typedef_BDK_GSERNX_LANEX_EYE_DAT(a,b) bdk_gsernx_lanex_eye_dat_t
2256 #define bustype_BDK_GSERNX_LANEX_EYE_DAT(a,b) BDK_CSR_TYPE_RSL
2257 #define basename_BDK_GSERNX_LANEX_EYE_DAT(a,b) "GSERNX_LANEX_EYE_DAT"
2258 #define device_bar_BDK_GSERNX_LANEX_EYE_DAT(a,b) 0x0 /* PF_BAR0 */
2259 #define busnum_BDK_GSERNX_LANEX_EYE_DAT(a,b) (a)
2260 #define arguments_BDK_GSERNX_LANEX_EYE_DAT(a,b) (a),(b),-1,-1
2261 
2262 /**
2263  * Register (RSL) gsern#_lane#_idledet_hys
2264  *
2265  * GSER Lane Receiver Idle Detector Hysteresis Control Register
2266  * Parameters controlling hystersis in the custom receiver's idle detector. When
2267  * enabled, the hysteresis function adjusts the idle detector offset to bias the
2268  * detector in favor of the current idle state after the current state has been stable
2269  * for some time. The [HYS_CNT], [HYS_POS], and [HYS_NEG] control fields should be set
2270  * before or concurrently with writing [HYS_EN] to 1 when the hystersis function is to
2271  * be used.
2272  */
2273 union bdk_gsernx_lanex_idledet_hys
2274 {
2275     uint64_t u;
2276     struct bdk_gsernx_lanex_idledet_hys_s
2277     {
2278 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2279         uint64_t reserved_17_63        : 47;
2280         uint64_t hys_en                : 1;  /**< [ 16: 16](R/W) Enable the hysteresis function. */
2281         uint64_t reserved_14_15        : 2;
2282         uint64_t hys_cnt               : 6;  /**< [ 13:  8](R/W) Count of 10 ns cycles after a change in idle offset hysteresis direction before a new
2283                                                                  hysteresis direction will be applied. */
2284         uint64_t hys_pos               : 4;  /**< [  7:  4](R/W) Offset shift to bias the idle detector in favor of not idle after the the
2285                                                                  detector has reported not idle for [HYS_CNT] cycles. The offset shift is
2286                                                                  incremented approximately 5 mV per step. */
2287         uint64_t hys_neg               : 4;  /**< [  3:  0](R/W) Offset shift to bias the idle detector in favor of idle after the detector has
2288                                                                  reported idle for [HYS_CNT] cycles. The offset shift is incremented
2289                                                                  approximately 5 mV per step. */
2290 #else /* Word 0 - Little Endian */
2291         uint64_t hys_neg               : 4;  /**< [  3:  0](R/W) Offset shift to bias the idle detector in favor of idle after the detector has
2292                                                                  reported idle for [HYS_CNT] cycles. The offset shift is incremented
2293                                                                  approximately 5 mV per step. */
2294         uint64_t hys_pos               : 4;  /**< [  7:  4](R/W) Offset shift to bias the idle detector in favor of not idle after the the
2295                                                                  detector has reported not idle for [HYS_CNT] cycles. The offset shift is
2296                                                                  incremented approximately 5 mV per step. */
2297         uint64_t hys_cnt               : 6;  /**< [ 13:  8](R/W) Count of 10 ns cycles after a change in idle offset hysteresis direction before a new
2298                                                                  hysteresis direction will be applied. */
2299         uint64_t reserved_14_15        : 2;
2300         uint64_t hys_en                : 1;  /**< [ 16: 16](R/W) Enable the hysteresis function. */
2301         uint64_t reserved_17_63        : 47;
2302 #endif /* Word 0 - End */
2303     } s;
2304     /* struct bdk_gsernx_lanex_idledet_hys_s cn; */
2305 };
2306 typedef union bdk_gsernx_lanex_idledet_hys bdk_gsernx_lanex_idledet_hys_t;
2307 
2308 static inline uint64_t BDK_GSERNX_LANEX_IDLEDET_HYS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_IDLEDET_HYS(unsigned long a,unsigned long b)2309 static inline uint64_t BDK_GSERNX_LANEX_IDLEDET_HYS(unsigned long a, unsigned long b)
2310 {
2311     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
2312         return 0x87e0900010f0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
2313     __bdk_csr_fatal("GSERNX_LANEX_IDLEDET_HYS", 2, a, b, 0, 0);
2314 }
2315 
2316 #define typedef_BDK_GSERNX_LANEX_IDLEDET_HYS(a,b) bdk_gsernx_lanex_idledet_hys_t
2317 #define bustype_BDK_GSERNX_LANEX_IDLEDET_HYS(a,b) BDK_CSR_TYPE_RSL
2318 #define basename_BDK_GSERNX_LANEX_IDLEDET_HYS(a,b) "GSERNX_LANEX_IDLEDET_HYS"
2319 #define device_bar_BDK_GSERNX_LANEX_IDLEDET_HYS(a,b) 0x0 /* PF_BAR0 */
2320 #define busnum_BDK_GSERNX_LANEX_IDLEDET_HYS(a,b) (a)
2321 #define arguments_BDK_GSERNX_LANEX_IDLEDET_HYS(a,b) (a),(b),-1,-1
2322 
2323 /**
2324  * Register (RSL) gsern#_lane#_imapsel_bcfg
2325  *
2326  * GSER Lane Interpolator Map Selection Register
2327  * Selection control for the interpolator map. Set prior to bringing the analog
2328  * receiver out of reset.
2329  */
2330 union bdk_gsernx_lanex_imapsel_bcfg
2331 {
2332     uint64_t u;
2333     struct bdk_gsernx_lanex_imapsel_bcfg_s
2334     {
2335 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2336         uint64_t reserved_5_63         : 59;
2337         uint64_t map_case              : 5;  /**< [  4:  0](R/W) Interpolator map case selector.
2338                                                                    0x0 = data_500_erc_2_c_0_20_mean.
2339                                                                    0x1 = data_407_erc_2_c_0_20_mean.
2340                                                                    0x2 = data_333_erc_3_c_0_20_mean.
2341                                                                    0x3 = data_167_erc_5_c_0_20_mean.
2342                                                                    0x4 = data_80_erc_8_c_0_20_mean.
2343                                                                    0x5 = data_63_erc_10_c_0_20_mean.
2344                                                                    0x6 = data_50_erc_11_c_0_20_mean.
2345                                                                    0x7 = data_40_erc_13_c_0_20_mean.
2346                                                                    0x8 = data_39_erc_14_c_0_20_mean.
2347                                                                    0x9 = data_36_erc_15_c_0_20_mean.
2348                                                                    0xa = data_31_erc_15_c_0_20_mean.
2349                                                                    0xf = {GSERN()_LANE()_MAP1, GSERN()_LANE()_MAP0}.
2350                                                                    all others = 0. */
2351 #else /* Word 0 - Little Endian */
2352         uint64_t map_case              : 5;  /**< [  4:  0](R/W) Interpolator map case selector.
2353                                                                    0x0 = data_500_erc_2_c_0_20_mean.
2354                                                                    0x1 = data_407_erc_2_c_0_20_mean.
2355                                                                    0x2 = data_333_erc_3_c_0_20_mean.
2356                                                                    0x3 = data_167_erc_5_c_0_20_mean.
2357                                                                    0x4 = data_80_erc_8_c_0_20_mean.
2358                                                                    0x5 = data_63_erc_10_c_0_20_mean.
2359                                                                    0x6 = data_50_erc_11_c_0_20_mean.
2360                                                                    0x7 = data_40_erc_13_c_0_20_mean.
2361                                                                    0x8 = data_39_erc_14_c_0_20_mean.
2362                                                                    0x9 = data_36_erc_15_c_0_20_mean.
2363                                                                    0xa = data_31_erc_15_c_0_20_mean.
2364                                                                    0xf = {GSERN()_LANE()_MAP1, GSERN()_LANE()_MAP0}.
2365                                                                    all others = 0. */
2366         uint64_t reserved_5_63         : 59;
2367 #endif /* Word 0 - End */
2368     } s;
2369     /* struct bdk_gsernx_lanex_imapsel_bcfg_s cn; */
2370 };
2371 typedef union bdk_gsernx_lanex_imapsel_bcfg bdk_gsernx_lanex_imapsel_bcfg_t;
2372 
2373 static inline uint64_t BDK_GSERNX_LANEX_IMAPSEL_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_IMAPSEL_BCFG(unsigned long a,unsigned long b)2374 static inline uint64_t BDK_GSERNX_LANEX_IMAPSEL_BCFG(unsigned long a, unsigned long b)
2375 {
2376     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
2377         return 0x87e090001df0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
2378     __bdk_csr_fatal("GSERNX_LANEX_IMAPSEL_BCFG", 2, a, b, 0, 0);
2379 }
2380 
2381 #define typedef_BDK_GSERNX_LANEX_IMAPSEL_BCFG(a,b) bdk_gsernx_lanex_imapsel_bcfg_t
2382 #define bustype_BDK_GSERNX_LANEX_IMAPSEL_BCFG(a,b) BDK_CSR_TYPE_RSL
2383 #define basename_BDK_GSERNX_LANEX_IMAPSEL_BCFG(a,b) "GSERNX_LANEX_IMAPSEL_BCFG"
2384 #define device_bar_BDK_GSERNX_LANEX_IMAPSEL_BCFG(a,b) 0x0 /* PF_BAR0 */
2385 #define busnum_BDK_GSERNX_LANEX_IMAPSEL_BCFG(a,b) (a)
2386 #define arguments_BDK_GSERNX_LANEX_IMAPSEL_BCFG(a,b) (a),(b),-1,-1
2387 
2388 /**
2389  * Register (RSL) gsern#_lane#_init_bsts
2390  *
2391  * GSER Lane Initialization Base-level Status Register
2392  */
2393 union bdk_gsernx_lanex_init_bsts
2394 {
2395     uint64_t u;
2396     struct bdk_gsernx_lanex_init_bsts_s
2397     {
2398 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2399         uint64_t reserved_43_63        : 21;
2400         uint64_t eye_deep_idle         : 1;  /**< [ 42: 42](RO/H) Receiver eye path state is deep idle. */
2401         uint64_t eye_rst_sm_complete   : 1;  /**< [ 41: 41](RO/H) Indicates that the lane eye receive reset state machine has
2402                                                                  completed. If [EYE_RST_SM_COMPLETE] is set and [EYE_READY] is not,
2403                                                                  there may be CSR register setting which prevent the receiver eye data
2404                                                                  path from being ready for use, e.g., power-down or reset overrides. */
2405         uint64_t eye_ready             : 1;  /**< [ 40: 40](RO/H) Lane analog receiver eye data path reset state machine completion
2406                                                                  status indicating that the lane receiver eye path ready for use. */
2407         uint64_t tx_pcie_p2            : 1;  /**< [ 39: 39](RO/H) Transmitter state is PCIe power state P2. */
2408         uint64_t tx_pcie_p1s2          : 1;  /**< [ 38: 38](RO/H) Transmitter state is PCIe power state P1 substate 2. */
2409         uint64_t tx_pcie_p1s1          : 1;  /**< [ 37: 37](RO/H) Transmitter state is PCIe power state P1 substate 1. */
2410         uint64_t tx_pcie_p1cpm         : 1;  /**< [ 36: 36](RO/H) Transmitter state is PCIe power state P1.CPM (entry to P1 substates
2411                                                                  or clock disabled state for normal P1 with clock PM support). */
2412         uint64_t tx_pcie_p1            : 1;  /**< [ 35: 35](RO/H) Transmitter state is PCIe power state P1. */
2413         uint64_t tx_deep_idle          : 1;  /**< [ 34: 34](RO/H) Transmitter state is deep idle. */
2414         uint64_t tx_rst_sm_complete    : 1;  /**< [ 33: 33](RO/H) Indicates that the lane transmitter reset state machine has
2415                                                                  completed. If [TX_RST_SM_COMPLETE] is set and [TX_READY] is not,
2416                                                                  there may be CSR register setting which prevent the transmitter from
2417                                                                  being ready for use, e.g., power-down or reset overrides. */
2418         uint64_t tx_ready              : 1;  /**< [ 32: 32](RO/H) Lane analog transmitter reset state machine completion status
2419                                                                  indicating that the lane transmitter is in "idle" configuration and
2420                                                                  ready to start transmitting data after changing the transmitter drive
2421                                                                  settings to transmit data. */
2422         uint64_t rx_pcie_p2            : 1;  /**< [ 31: 31](RO/H) Receiver state is PCIe power state P2. */
2423         uint64_t rx_pcie_p1s2          : 1;  /**< [ 30: 30](RO/H) Receiver state is PCIe power state P1 substate 2. */
2424         uint64_t rx_pcie_p1s1          : 1;  /**< [ 29: 29](RO/H) Receiver state is PCIe power state P1 substate 1. */
2425         uint64_t rx_pcie_p1cpm         : 1;  /**< [ 28: 28](RO/H) Receiver state is PCIe power state P1.CPM (entry to P1 substates or
2426                                                                  clock disabled state for normal P1 with clock PM support). */
2427         uint64_t rx_pcie_p1            : 1;  /**< [ 27: 27](RO/H) Receiver state is PCIe power state P1. */
2428         uint64_t rx_deep_idle          : 1;  /**< [ 26: 26](RO/H) Receiver state is deep idle. */
2429         uint64_t rx_rst_sm_complete    : 1;  /**< [ 25: 25](RO/H) Indicates that the lane receiver reset state machine has
2430                                                                  completed. If [RX_RST_SM_COMPLETE] is set and [RX_READY] is not,
2431                                                                  there may be CSR register setting which prevent the receiver from
2432                                                                  being ready for use, e.g., power-down or reset overrides. */
2433         uint64_t rx_ready              : 1;  /**< [ 24: 24](RO/H) Lane analog receiver reset state machine completion status that the
2434                                                                  reset sequence has completed and the lane receiver is ready for afe
2435                                                                  and dfe adaptation. */
2436         uint64_t pll_cp_cal            : 4;  /**< [ 23: 20](RO/H) PLL calibration state machine's resulting charge pump setting. Only
2437                                                                  valid if [CAL_READY] is set. */
2438         uint64_t reserved_17_19        : 3;
2439         uint64_t pll_band_cal          : 5;  /**< [ 16: 12](RO/H) PLL calibration state machine's resulting VCO band setting. Only valid
2440                                                                  if [CAL_READY] is set. */
2441         uint64_t pll_pcie_p2           : 1;  /**< [ 11: 11](RO/H) Lane PLL state is PCIe power state P2. */
2442         uint64_t pll_pcie_p1s2         : 1;  /**< [ 10: 10](RO/H) Lane PLL state is PCIe power state P1 substate 2. */
2443         uint64_t pll_pcie_p1s1         : 1;  /**< [  9:  9](RO/H) Lane PLL state is PCIe power state P1 substate 1. */
2444         uint64_t pll_pcie_p1cpm        : 1;  /**< [  8:  8](RO/H) Lane PLL state is PCIe power state P1.CPM (entry to P1 substates or
2445                                                                  clock disabled state for normal P1 with clock PM support). */
2446         uint64_t pll_pcie_p1           : 1;  /**< [  7:  7](RO/H) Lane PLL state is PCIe power state P1. */
2447         uint64_t pll_deep_idle         : 1;  /**< [  6:  6](RO/H) Lane PLL state is deep idle. */
2448         uint64_t rst_sm_complete       : 1;  /**< [  5:  5](RO/H) PLL reset state machine has completed. If
2449                                                                  [RST_SM_COMPLETE] is set and [RST_SM_READY] is not, there may still
2450                                                                  be CSR register settings preventing the PLL from being ready
2451                                                                  for use, e.g., power-down or reset overrides. */
2452         uint64_t rst_sm_ready          : 1;  /**< [  4:  4](RO/H) PLL reset state machine status indicating that the reset
2453                                                                  sequence has completed and this PLL is ready for use. */
2454         uint64_t lock                  : 1;  /**< [  3:  3](RO/H) PLL lock status; only valid if [LOCK_READY] is set. */
2455         uint64_t lock_ready            : 1;  /**< [  2:  2](RO/H) PLL lock status check is complete following most recent PLL
2456                                                                  reset or assertion of GSERN()_LANE()_RST1_BCFG[LOCK_CHECK]. */
2457         uint64_t cal_fail              : 1;  /**< [  1:  1](RO/H) PLL calibration failed; valid only if [CAL_READY] is set. */
2458         uint64_t cal_ready             : 1;  /**< [  0:  0](RO/H) PLL calibration completed */
2459 #else /* Word 0 - Little Endian */
2460         uint64_t cal_ready             : 1;  /**< [  0:  0](RO/H) PLL calibration completed */
2461         uint64_t cal_fail              : 1;  /**< [  1:  1](RO/H) PLL calibration failed; valid only if [CAL_READY] is set. */
2462         uint64_t lock_ready            : 1;  /**< [  2:  2](RO/H) PLL lock status check is complete following most recent PLL
2463                                                                  reset or assertion of GSERN()_LANE()_RST1_BCFG[LOCK_CHECK]. */
2464         uint64_t lock                  : 1;  /**< [  3:  3](RO/H) PLL lock status; only valid if [LOCK_READY] is set. */
2465         uint64_t rst_sm_ready          : 1;  /**< [  4:  4](RO/H) PLL reset state machine status indicating that the reset
2466                                                                  sequence has completed and this PLL is ready for use. */
2467         uint64_t rst_sm_complete       : 1;  /**< [  5:  5](RO/H) PLL reset state machine has completed. If
2468                                                                  [RST_SM_COMPLETE] is set and [RST_SM_READY] is not, there may still
2469                                                                  be CSR register settings preventing the PLL from being ready
2470                                                                  for use, e.g., power-down or reset overrides. */
2471         uint64_t pll_deep_idle         : 1;  /**< [  6:  6](RO/H) Lane PLL state is deep idle. */
2472         uint64_t pll_pcie_p1           : 1;  /**< [  7:  7](RO/H) Lane PLL state is PCIe power state P1. */
2473         uint64_t pll_pcie_p1cpm        : 1;  /**< [  8:  8](RO/H) Lane PLL state is PCIe power state P1.CPM (entry to P1 substates or
2474                                                                  clock disabled state for normal P1 with clock PM support). */
2475         uint64_t pll_pcie_p1s1         : 1;  /**< [  9:  9](RO/H) Lane PLL state is PCIe power state P1 substate 1. */
2476         uint64_t pll_pcie_p1s2         : 1;  /**< [ 10: 10](RO/H) Lane PLL state is PCIe power state P1 substate 2. */
2477         uint64_t pll_pcie_p2           : 1;  /**< [ 11: 11](RO/H) Lane PLL state is PCIe power state P2. */
2478         uint64_t pll_band_cal          : 5;  /**< [ 16: 12](RO/H) PLL calibration state machine's resulting VCO band setting. Only valid
2479                                                                  if [CAL_READY] is set. */
2480         uint64_t reserved_17_19        : 3;
2481         uint64_t pll_cp_cal            : 4;  /**< [ 23: 20](RO/H) PLL calibration state machine's resulting charge pump setting. Only
2482                                                                  valid if [CAL_READY] is set. */
2483         uint64_t rx_ready              : 1;  /**< [ 24: 24](RO/H) Lane analog receiver reset state machine completion status that the
2484                                                                  reset sequence has completed and the lane receiver is ready for afe
2485                                                                  and dfe adaptation. */
2486         uint64_t rx_rst_sm_complete    : 1;  /**< [ 25: 25](RO/H) Indicates that the lane receiver reset state machine has
2487                                                                  completed. If [RX_RST_SM_COMPLETE] is set and [RX_READY] is not,
2488                                                                  there may be CSR register setting which prevent the receiver from
2489                                                                  being ready for use, e.g., power-down or reset overrides. */
2490         uint64_t rx_deep_idle          : 1;  /**< [ 26: 26](RO/H) Receiver state is deep idle. */
2491         uint64_t rx_pcie_p1            : 1;  /**< [ 27: 27](RO/H) Receiver state is PCIe power state P1. */
2492         uint64_t rx_pcie_p1cpm         : 1;  /**< [ 28: 28](RO/H) Receiver state is PCIe power state P1.CPM (entry to P1 substates or
2493                                                                  clock disabled state for normal P1 with clock PM support). */
2494         uint64_t rx_pcie_p1s1          : 1;  /**< [ 29: 29](RO/H) Receiver state is PCIe power state P1 substate 1. */
2495         uint64_t rx_pcie_p1s2          : 1;  /**< [ 30: 30](RO/H) Receiver state is PCIe power state P1 substate 2. */
2496         uint64_t rx_pcie_p2            : 1;  /**< [ 31: 31](RO/H) Receiver state is PCIe power state P2. */
2497         uint64_t tx_ready              : 1;  /**< [ 32: 32](RO/H) Lane analog transmitter reset state machine completion status
2498                                                                  indicating that the lane transmitter is in "idle" configuration and
2499                                                                  ready to start transmitting data after changing the transmitter drive
2500                                                                  settings to transmit data. */
2501         uint64_t tx_rst_sm_complete    : 1;  /**< [ 33: 33](RO/H) Indicates that the lane transmitter reset state machine has
2502                                                                  completed. If [TX_RST_SM_COMPLETE] is set and [TX_READY] is not,
2503                                                                  there may be CSR register setting which prevent the transmitter from
2504                                                                  being ready for use, e.g., power-down or reset overrides. */
2505         uint64_t tx_deep_idle          : 1;  /**< [ 34: 34](RO/H) Transmitter state is deep idle. */
2506         uint64_t tx_pcie_p1            : 1;  /**< [ 35: 35](RO/H) Transmitter state is PCIe power state P1. */
2507         uint64_t tx_pcie_p1cpm         : 1;  /**< [ 36: 36](RO/H) Transmitter state is PCIe power state P1.CPM (entry to P1 substates
2508                                                                  or clock disabled state for normal P1 with clock PM support). */
2509         uint64_t tx_pcie_p1s1          : 1;  /**< [ 37: 37](RO/H) Transmitter state is PCIe power state P1 substate 1. */
2510         uint64_t tx_pcie_p1s2          : 1;  /**< [ 38: 38](RO/H) Transmitter state is PCIe power state P1 substate 2. */
2511         uint64_t tx_pcie_p2            : 1;  /**< [ 39: 39](RO/H) Transmitter state is PCIe power state P2. */
2512         uint64_t eye_ready             : 1;  /**< [ 40: 40](RO/H) Lane analog receiver eye data path reset state machine completion
2513                                                                  status indicating that the lane receiver eye path ready for use. */
2514         uint64_t eye_rst_sm_complete   : 1;  /**< [ 41: 41](RO/H) Indicates that the lane eye receive reset state machine has
2515                                                                  completed. If [EYE_RST_SM_COMPLETE] is set and [EYE_READY] is not,
2516                                                                  there may be CSR register setting which prevent the receiver eye data
2517                                                                  path from being ready for use, e.g., power-down or reset overrides. */
2518         uint64_t eye_deep_idle         : 1;  /**< [ 42: 42](RO/H) Receiver eye path state is deep idle. */
2519         uint64_t reserved_43_63        : 21;
2520 #endif /* Word 0 - End */
2521     } s;
2522     /* struct bdk_gsernx_lanex_init_bsts_s cn; */
2523 };
2524 typedef union bdk_gsernx_lanex_init_bsts bdk_gsernx_lanex_init_bsts_t;
2525 
2526 static inline uint64_t BDK_GSERNX_LANEX_INIT_BSTS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_INIT_BSTS(unsigned long a,unsigned long b)2527 static inline uint64_t BDK_GSERNX_LANEX_INIT_BSTS(unsigned long a, unsigned long b)
2528 {
2529     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
2530         return 0x87e090000480ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
2531     __bdk_csr_fatal("GSERNX_LANEX_INIT_BSTS", 2, a, b, 0, 0);
2532 }
2533 
2534 #define typedef_BDK_GSERNX_LANEX_INIT_BSTS(a,b) bdk_gsernx_lanex_init_bsts_t
2535 #define bustype_BDK_GSERNX_LANEX_INIT_BSTS(a,b) BDK_CSR_TYPE_RSL
2536 #define basename_BDK_GSERNX_LANEX_INIT_BSTS(a,b) "GSERNX_LANEX_INIT_BSTS"
2537 #define device_bar_BDK_GSERNX_LANEX_INIT_BSTS(a,b) 0x0 /* PF_BAR0 */
2538 #define busnum_BDK_GSERNX_LANEX_INIT_BSTS(a,b) (a)
2539 #define arguments_BDK_GSERNX_LANEX_INIT_BSTS(a,b) (a),(b),-1,-1
2540 
2541 /**
2542  * Register (RSL) gsern#_lane#_lt_bcfg
2543  *
2544  * GSER Lane PCS Lite Configuration (Transmit, Receive, and Loopback) Register
2545  */
2546 union bdk_gsernx_lanex_lt_bcfg
2547 {
2548     uint64_t u;
2549     struct bdk_gsernx_lanex_lt_bcfg_s
2550     {
2551 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2552         uint64_t inj_err_cnt_rst_n     : 1;  /**< [ 63: 63](R/W/H) Set to zero to hold the error injection counter in reset. */
2553         uint64_t inj_err_cnt_en        : 1;  /**< [ 62: 62](R/W) PCS will inject a single bit error every other cycle in the transmit
2554                                                                  data stream at some time following an assertion of
2555                                                                  [INJ_ERR_CNT_EN]. The number of error cycles to insert is set by
2556                                                                  [INJ_ERR_CNT_LEN] and it increments the error bit index each
2557                                                                  cycle. Once all the errors have been transmitted GSER sets
2558                                                                  GSERN()_LANE()_LT_BSTS[INJ_ERR_CNT_DONE]. Injection of a second set of
2559                                                                  errors will require clearing the counter by holding [INJ_ERR_CNT_RST_N],
2560                                                                  asserting [INJ_ERR_CNT_EN], then releasing [INJ_ERR_CNT_RST_N]. This mode
2561                                                                  should be used separately from [INJ_ERR_BURST_EN] and only one of them
2562                                                                  can be asserted at any time. */
2563         uint64_t inj_err_cnt_len       : 6;  /**< [ 61: 56](R/W) Tells the PCS lite error injection logic the total number of bit errors
2564                                                                  to insert in a walking pattern. Every other cycle 1 bit error will be
2565                                                                  inserted in a walking index up to the count value specified. The max
2566                                                                  value is set by the valid data width transmitted. For example, if 8
2567                                                                  bits of valid data are transmitted each cycle only from 1-8 count
2568                                                                  values can be set. The same for 10, 16, 20, 32, and 40 bits. */
2569         uint64_t reserved_55           : 1;
2570         uint64_t inj_err_burst_en      : 1;  /**< [ 54: 54](R/W) PCS will inject a contiguous set of error bits in the transmit data
2571                                                                  stream at some time following an assertion of [INJ_ERR_BURST_EN]. The
2572                                                                  length of contiguous errors is set by [INJ_ERR_BURST_LEN]. Injection
2573                                                                  of a second set of errors will require deasserting and then
2574                                                                  asserting [INJ_ERR_BURST_EN] again. This mode should be used separately
2575                                                                  from [INJ_ERR_CNT_EN] and only one of them can be asserted at any time. */
2576         uint64_t inj_err_burst_len     : 6;  /**< [ 53: 48](R/W) Tells the PCS lite error injection logic what length the burst error
2577                                                                  mask should be. The max value is set by the valid data width
2578                                                                  transmitted. For example, if 8 bits of valid data are transmitted
2579                                                                  each cycle, only from 1-8 bits of contiguous errors can be set. The
2580                                                                  same for 10, 16, 20, 32, and 40 bits. */
2581         uint64_t reserved_44_47        : 4;
2582         uint64_t pat_dp_width          : 3;  /**< [ 43: 41](R/W/H) Tells the pattern memory generator/checker logic what width to use
2583                                                                  in the generator and checker data paths.
2584                                                                    0x0 = 8 (requires bit-stuffing/unstuffing or for debug).
2585                                                                    0x1 = 10 (requires bit-stuffing/unstuffing or for debug).
2586                                                                    0x2 = 16.
2587                                                                    0x3 = 20.
2588                                                                    0x4 = 32.
2589                                                                    0x5 = 40.
2590 
2591                                                                  Checking of received data
2592                                                                  works correctly only for clock divider ratios of 10, 20, and 40. The
2593                                                                  transmit data sequence is correct for all clock ratios. */
2594         uint64_t prbs_dp_width         : 3;  /**< [ 40: 38](R/W/H) Tells the PCS lite layer PRBS logic what width to use in the
2595                                                                  generator and checker data paths.
2596                                                                    0x0 = 8 (requires bit-stuffing/unstuffing or for debug).
2597                                                                    0x1 = 10 (requires bit-stuffing/unstuffing or for debug).
2598                                                                    0x2 = 16.
2599                                                                    0x3 = 20.
2600                                                                    0x4 = 32.
2601                                                                    0x5 = 40. */
2602         uint64_t rx_dp_width           : 3;  /**< [ 37: 35](R/W/H) Tells the PCS lite layer logic what width to use in the receive data
2603                                                                  path between the analog macro and downstream logic, hence what
2604                                                                  data bits of the doutq[39:0] bus are in use.
2605                                                                    0x0 = 8 (reserved; debug only).
2606                                                                    0x1 = 10 (reserved; debug only).
2607                                                                    0x2 = 16.
2608                                                                    0x3 = 20.
2609                                                                    0x4 = 32.
2610                                                                    0x5 = 40.
2611 
2612                                                                  This value must only be changed while lite layer is in reset. */
2613         uint64_t tx_dp_width           : 3;  /**< [ 34: 32](R/W/H) Tells the PCS lite layer logic what width to use in the transmit
2614                                                                  data path between the lite layer FIFO and the analog macro, hence
2615                                                                  what data bits of the tx_data[39:0] bus are in use. Values:
2616                                                                    0x0 = 8 (reserved; debug only).
2617                                                                    0x1 = 10 (reserved; debug only).
2618                                                                    0x2 = 16.
2619                                                                    0x3 = 20.
2620                                                                    0x4 = 32.
2621                                                                    0x5 = 40.
2622 
2623                                                                  This value must only be changed while lite layer is in reset. */
2624         uint64_t reserved_26_31        : 6;
2625         uint64_t core_loopback_mode    : 1;  /**< [ 25: 25](R/W/H) Enable the core-side loopback mode; controller transmit data are
2626                                                                  looped back to the controller as receive data in the PCS lite layer.
2627                                                                  This value must only be changed while lite layer is in reset. */
2628         uint64_t sloop_mode            : 1;  /**< [ 24: 24](R/W/H) Enable shallow loopback mode (SerDes receive data looped back to
2629                                                                  SerDes transmit in the PCS lite layer).
2630                                                                  This value must only be changed while lite layer is in reset. */
2631         uint64_t reserved_23           : 1;
2632         uint64_t bitstuff_rx_drop_even : 1;  /**< [ 22: 22](R/W/H) Tells the PCS lite receive datapath to drop even bits
2633                                                                  in the vector of received data from the PMA when [BITSTUFF_RX_EN] is
2634                                                                  set:
2635                                                                    0 = Drop bits 1, 3, 5, 7, ...
2636                                                                    1 = Drop bits 0, 2, 4, 6, ...
2637 
2638                                                                  This bit is also used in the eye monitor to mask out the dropped
2639                                                                  bits when counting mismatches.
2640                                                                  This value must only be changed while lite layer is in reset. */
2641         uint64_t bitstuff_rx_en        : 1;  /**< [ 21: 21](R/W/H) Set to expect duplicates on the PMA RX data and drop bits after
2642                                                                  alignment & ordering for PCS layer to consume. The drop ordering is
2643                                                                  determined by [BITSTUFF_RX_DROP_EVEN]. This value must only be changed
2644                                                                  while lite layer is in reset. */
2645         uint64_t inv_rx_polarity       : 1;  /**< [ 20: 20](R/W/H) Set to invert the polarity of the received data bits. Note that
2646                                                                  the PCS-lite PRBS checker will require [INV_RX_POLARITY] to be asserted
2647                                                                  when it is in use to check standard PRBS data from an external
2648                                                                  source. This value must only be changed while lite layer is in
2649                                                                  reset. */
2650         uint64_t reverse_rx_bit_order  : 1;  /**< [ 19: 19](R/W/H) While asserted, the normal receive order (lowest valid bit index
2651                                                                  received first, highest valid index last) is reversed so the highest
2652                                                                  valid bit index is received first and lowest valid index is received
2653                                                                  last. This control needs to be asserted for PRBS testing using the
2654                                                                  PRBS checker in the GSER macro and for PCIe Gen-1 and Gen-2. */
2655         uint64_t reserved_18           : 1;
2656         uint64_t use_bph_wrreq_psh     : 1;  /**< [ 17: 17](R/W) Reserved.
2657                                                                  Internal:
2658                                                                  Delay the transmit FIFO push request synchronization to the pop side by one
2659                                                                  txdivclk phase. This is a diagnostic / debug tool to help with transmit lane
2660                                                                  alignment issues. */
2661         uint64_t fifo_algn_qlm_mask    : 4;  /**< [ 16: 13](R/W) Selection control for which QLMs in this QLM's link group to align in timing the
2662                                                                  deassertion of reset to this lane's transmitter's clock alignment FIFO.
2663                                                                  \<0\> = Wait for QLM 0.
2664                                                                  \<1\> = Wait for QLM 1.
2665                                                                  \<2\> = Wait for QLM 2.
2666                                                                  \<3\> = Wait for QLM 3.
2667 
2668                                                                  If a link is made up of lanes in multiple QLMs, the mask in each lane must
2669                                                                  include all active QLMs (including the QLM containing the current lane). */
2670         uint64_t fifo_algn_lane_mask   : 4;  /**< [ 12:  9](R/W) Selection control for which lanes in the current QLM to align in timing the
2671                                                                  deassertion of reset to this lane's transmitter's clock alignment FIFO.
2672                                                                  \<0\> = Wait for Lane 0.
2673                                                                  \<1\> = Wait for Lane 1.
2674                                                                  \<2\> = Wait for Lane 2.
2675                                                                  \<3\> = Wait for Lane 3.
2676 
2677                                                                  The bit corresponding to the current Lane is ignored. */
2678         uint64_t fifo_bypass_en        : 1;  /**< [  8:  8](R/W) For diagnostic use only.
2679                                                                  Internal:
2680                                                                  This control is currently inactive and is left as a placeholder for
2681                                                                  possible re-inclusion in 7nm.
2682 
2683                                                                  Set to bypass the PCS lite layer transmit asynchronous FIFO
2684                                                                  with a single flop. This saves 1-2 cycles of latency in the transmit
2685                                                                  path, but imposes additional constraints on static timing
2686                                                                  closure. Note that shallow loopback data cannot bypass the FIFO. */
2687         uint64_t tx_fifo_pop_start_addr : 3; /**< [  7:  5](R/W) Reserved.
2688                                                                  Internal:
2689                                                                  Starting address for lite transmit FIFO pops
2690                                                                  (reads). Changing this allows shifting the latency through the FIFO in steps of
2691                                                                  1 txdivclk cycle (8, 10, 16, 20, 32, or 40 UI, depending on data path width
2692                                                                  setting). The function is similar to FIFO_UNLOAD_DLY, but provides a wider range
2693                                                                  of adjustment. For diagnostic use only. */
2694         uint64_t fifo_unload_dly       : 1;  /**< [  4:  4](R/W/H) Set to add one cycle delay to the PCS lite layer transmit
2695                                                                  asynchronous FIFO pop data. This value must only be changed before
2696                                                                  releasing [FIFO_RST_N]. */
2697         uint64_t fifo_rst_n            : 1;  /**< [  3:  3](R/W/H) Clear to hold the PCS lite layer transmit asynchronous FIFO in
2698                                                                  reset. */
2699         uint64_t bitstuff_tx_en        : 1;  /**< [  2:  2](R/W/H) Set to duplicate the first 20 bits of TX data before
2700                                                                  alignment & ordering for lower data rates. This could be PCS TX
2701                                                                  data, PRBS data, or shallow-loopback RX data depending on mode.
2702                                                                  This value must only be changed while lite layer is in reset. */
2703         uint64_t inv_tx_polarity       : 1;  /**< [  1:  1](R/W/H) Set to invert the polarity of the transmit data bits. Note
2704                                                                  that the PCS-lite PRBS generator will require [INV_TX_POLARITY] to be
2705                                                                  asserted when PRBS data are being transmitted to match the expected
2706                                                                  polarity of the standard PRBS patterns.
2707                                                                  This value must only be changed while lite layer is in reset. */
2708         uint64_t reverse_tx_bit_order  : 1;  /**< [  0:  0](R/W/H) Assertion causes the normal transmit order (lowest valid bit index
2709                                                                  transmitted first, highest valid index last) to be reversed so the
2710                                                                  highest valid bit index is transmitted first and lowest valid index
2711                                                                  is transmitted last. Note that the PCS-lite PRBS generator will
2712                                                                  require [REVERSE_TX_BIT_ORDER] to be asserted.
2713                                                                  This value must only be changed while lite layer is in reset. */
2714 #else /* Word 0 - Little Endian */
2715         uint64_t reverse_tx_bit_order  : 1;  /**< [  0:  0](R/W/H) Assertion causes the normal transmit order (lowest valid bit index
2716                                                                  transmitted first, highest valid index last) to be reversed so the
2717                                                                  highest valid bit index is transmitted first and lowest valid index
2718                                                                  is transmitted last. Note that the PCS-lite PRBS generator will
2719                                                                  require [REVERSE_TX_BIT_ORDER] to be asserted.
2720                                                                  This value must only be changed while lite layer is in reset. */
2721         uint64_t inv_tx_polarity       : 1;  /**< [  1:  1](R/W/H) Set to invert the polarity of the transmit data bits. Note
2722                                                                  that the PCS-lite PRBS generator will require [INV_TX_POLARITY] to be
2723                                                                  asserted when PRBS data are being transmitted to match the expected
2724                                                                  polarity of the standard PRBS patterns.
2725                                                                  This value must only be changed while lite layer is in reset. */
2726         uint64_t bitstuff_tx_en        : 1;  /**< [  2:  2](R/W/H) Set to duplicate the first 20 bits of TX data before
2727                                                                  alignment & ordering for lower data rates. This could be PCS TX
2728                                                                  data, PRBS data, or shallow-loopback RX data depending on mode.
2729                                                                  This value must only be changed while lite layer is in reset. */
2730         uint64_t fifo_rst_n            : 1;  /**< [  3:  3](R/W/H) Clear to hold the PCS lite layer transmit asynchronous FIFO in
2731                                                                  reset. */
2732         uint64_t fifo_unload_dly       : 1;  /**< [  4:  4](R/W/H) Set to add one cycle delay to the PCS lite layer transmit
2733                                                                  asynchronous FIFO pop data. This value must only be changed before
2734                                                                  releasing [FIFO_RST_N]. */
2735         uint64_t tx_fifo_pop_start_addr : 3; /**< [  7:  5](R/W) Reserved.
2736                                                                  Internal:
2737                                                                  Starting address for lite transmit FIFO pops
2738                                                                  (reads). Changing this allows shifting the latency through the FIFO in steps of
2739                                                                  1 txdivclk cycle (8, 10, 16, 20, 32, or 40 UI, depending on data path width
2740                                                                  setting). The function is similar to FIFO_UNLOAD_DLY, but provides a wider range
2741                                                                  of adjustment. For diagnostic use only. */
2742         uint64_t fifo_bypass_en        : 1;  /**< [  8:  8](R/W) For diagnostic use only.
2743                                                                  Internal:
2744                                                                  This control is currently inactive and is left as a placeholder for
2745                                                                  possible re-inclusion in 7nm.
2746 
2747                                                                  Set to bypass the PCS lite layer transmit asynchronous FIFO
2748                                                                  with a single flop. This saves 1-2 cycles of latency in the transmit
2749                                                                  path, but imposes additional constraints on static timing
2750                                                                  closure. Note that shallow loopback data cannot bypass the FIFO. */
2751         uint64_t fifo_algn_lane_mask   : 4;  /**< [ 12:  9](R/W) Selection control for which lanes in the current QLM to align in timing the
2752                                                                  deassertion of reset to this lane's transmitter's clock alignment FIFO.
2753                                                                  \<0\> = Wait for Lane 0.
2754                                                                  \<1\> = Wait for Lane 1.
2755                                                                  \<2\> = Wait for Lane 2.
2756                                                                  \<3\> = Wait for Lane 3.
2757 
2758                                                                  The bit corresponding to the current Lane is ignored. */
2759         uint64_t fifo_algn_qlm_mask    : 4;  /**< [ 16: 13](R/W) Selection control for which QLMs in this QLM's link group to align in timing the
2760                                                                  deassertion of reset to this lane's transmitter's clock alignment FIFO.
2761                                                                  \<0\> = Wait for QLM 0.
2762                                                                  \<1\> = Wait for QLM 1.
2763                                                                  \<2\> = Wait for QLM 2.
2764                                                                  \<3\> = Wait for QLM 3.
2765 
2766                                                                  If a link is made up of lanes in multiple QLMs, the mask in each lane must
2767                                                                  include all active QLMs (including the QLM containing the current lane). */
2768         uint64_t use_bph_wrreq_psh     : 1;  /**< [ 17: 17](R/W) Reserved.
2769                                                                  Internal:
2770                                                                  Delay the transmit FIFO push request synchronization to the pop side by one
2771                                                                  txdivclk phase. This is a diagnostic / debug tool to help with transmit lane
2772                                                                  alignment issues. */
2773         uint64_t reserved_18           : 1;
2774         uint64_t reverse_rx_bit_order  : 1;  /**< [ 19: 19](R/W/H) While asserted, the normal receive order (lowest valid bit index
2775                                                                  received first, highest valid index last) is reversed so the highest
2776                                                                  valid bit index is received first and lowest valid index is received
2777                                                                  last. This control needs to be asserted for PRBS testing using the
2778                                                                  PRBS checker in the GSER macro and for PCIe Gen-1 and Gen-2. */
2779         uint64_t inv_rx_polarity       : 1;  /**< [ 20: 20](R/W/H) Set to invert the polarity of the received data bits. Note that
2780                                                                  the PCS-lite PRBS checker will require [INV_RX_POLARITY] to be asserted
2781                                                                  when it is in use to check standard PRBS data from an external
2782                                                                  source. This value must only be changed while lite layer is in
2783                                                                  reset. */
2784         uint64_t bitstuff_rx_en        : 1;  /**< [ 21: 21](R/W/H) Set to expect duplicates on the PMA RX data and drop bits after
2785                                                                  alignment & ordering for PCS layer to consume. The drop ordering is
2786                                                                  determined by [BITSTUFF_RX_DROP_EVEN]. This value must only be changed
2787                                                                  while lite layer is in reset. */
2788         uint64_t bitstuff_rx_drop_even : 1;  /**< [ 22: 22](R/W/H) Tells the PCS lite receive datapath to drop even bits
2789                                                                  in the vector of received data from the PMA when [BITSTUFF_RX_EN] is
2790                                                                  set:
2791                                                                    0 = Drop bits 1, 3, 5, 7, ...
2792                                                                    1 = Drop bits 0, 2, 4, 6, ...
2793 
2794                                                                  This bit is also used in the eye monitor to mask out the dropped
2795                                                                  bits when counting mismatches.
2796                                                                  This value must only be changed while lite layer is in reset. */
2797         uint64_t reserved_23           : 1;
2798         uint64_t sloop_mode            : 1;  /**< [ 24: 24](R/W/H) Enable shallow loopback mode (SerDes receive data looped back to
2799                                                                  SerDes transmit in the PCS lite layer).
2800                                                                  This value must only be changed while lite layer is in reset. */
2801         uint64_t core_loopback_mode    : 1;  /**< [ 25: 25](R/W/H) Enable the core-side loopback mode; controller transmit data are
2802                                                                  looped back to the controller as receive data in the PCS lite layer.
2803                                                                  This value must only be changed while lite layer is in reset. */
2804         uint64_t reserved_26_31        : 6;
2805         uint64_t tx_dp_width           : 3;  /**< [ 34: 32](R/W/H) Tells the PCS lite layer logic what width to use in the transmit
2806                                                                  data path between the lite layer FIFO and the analog macro, hence
2807                                                                  what data bits of the tx_data[39:0] bus are in use. Values:
2808                                                                    0x0 = 8 (reserved; debug only).
2809                                                                    0x1 = 10 (reserved; debug only).
2810                                                                    0x2 = 16.
2811                                                                    0x3 = 20.
2812                                                                    0x4 = 32.
2813                                                                    0x5 = 40.
2814 
2815                                                                  This value must only be changed while lite layer is in reset. */
2816         uint64_t rx_dp_width           : 3;  /**< [ 37: 35](R/W/H) Tells the PCS lite layer logic what width to use in the receive data
2817                                                                  path between the analog macro and downstream logic, hence what
2818                                                                  data bits of the doutq[39:0] bus are in use.
2819                                                                    0x0 = 8 (reserved; debug only).
2820                                                                    0x1 = 10 (reserved; debug only).
2821                                                                    0x2 = 16.
2822                                                                    0x3 = 20.
2823                                                                    0x4 = 32.
2824                                                                    0x5 = 40.
2825 
2826                                                                  This value must only be changed while lite layer is in reset. */
2827         uint64_t prbs_dp_width         : 3;  /**< [ 40: 38](R/W/H) Tells the PCS lite layer PRBS logic what width to use in the
2828                                                                  generator and checker data paths.
2829                                                                    0x0 = 8 (requires bit-stuffing/unstuffing or for debug).
2830                                                                    0x1 = 10 (requires bit-stuffing/unstuffing or for debug).
2831                                                                    0x2 = 16.
2832                                                                    0x3 = 20.
2833                                                                    0x4 = 32.
2834                                                                    0x5 = 40. */
2835         uint64_t pat_dp_width          : 3;  /**< [ 43: 41](R/W/H) Tells the pattern memory generator/checker logic what width to use
2836                                                                  in the generator and checker data paths.
2837                                                                    0x0 = 8 (requires bit-stuffing/unstuffing or for debug).
2838                                                                    0x1 = 10 (requires bit-stuffing/unstuffing or for debug).
2839                                                                    0x2 = 16.
2840                                                                    0x3 = 20.
2841                                                                    0x4 = 32.
2842                                                                    0x5 = 40.
2843 
2844                                                                  Checking of received data
2845                                                                  works correctly only for clock divider ratios of 10, 20, and 40. The
2846                                                                  transmit data sequence is correct for all clock ratios. */
2847         uint64_t reserved_44_47        : 4;
2848         uint64_t inj_err_burst_len     : 6;  /**< [ 53: 48](R/W) Tells the PCS lite error injection logic what length the burst error
2849                                                                  mask should be. The max value is set by the valid data width
2850                                                                  transmitted. For example, if 8 bits of valid data are transmitted
2851                                                                  each cycle, only from 1-8 bits of contiguous errors can be set. The
2852                                                                  same for 10, 16, 20, 32, and 40 bits. */
2853         uint64_t inj_err_burst_en      : 1;  /**< [ 54: 54](R/W) PCS will inject a contiguous set of error bits in the transmit data
2854                                                                  stream at some time following an assertion of [INJ_ERR_BURST_EN]. The
2855                                                                  length of contiguous errors is set by [INJ_ERR_BURST_LEN]. Injection
2856                                                                  of a second set of errors will require deasserting and then
2857                                                                  asserting [INJ_ERR_BURST_EN] again. This mode should be used separately
2858                                                                  from [INJ_ERR_CNT_EN] and only one of them can be asserted at any time. */
2859         uint64_t reserved_55           : 1;
2860         uint64_t inj_err_cnt_len       : 6;  /**< [ 61: 56](R/W) Tells the PCS lite error injection logic the total number of bit errors
2861                                                                  to insert in a walking pattern. Every other cycle 1 bit error will be
2862                                                                  inserted in a walking index up to the count value specified. The max
2863                                                                  value is set by the valid data width transmitted. For example, if 8
2864                                                                  bits of valid data are transmitted each cycle only from 1-8 count
2865                                                                  values can be set. The same for 10, 16, 20, 32, and 40 bits. */
2866         uint64_t inj_err_cnt_en        : 1;  /**< [ 62: 62](R/W) PCS will inject a single bit error every other cycle in the transmit
2867                                                                  data stream at some time following an assertion of
2868                                                                  [INJ_ERR_CNT_EN]. The number of error cycles to insert is set by
2869                                                                  [INJ_ERR_CNT_LEN] and it increments the error bit index each
2870                                                                  cycle. Once all the errors have been transmitted GSER sets
2871                                                                  GSERN()_LANE()_LT_BSTS[INJ_ERR_CNT_DONE]. Injection of a second set of
2872                                                                  errors will require clearing the counter by holding [INJ_ERR_CNT_RST_N],
2873                                                                  asserting [INJ_ERR_CNT_EN], then releasing [INJ_ERR_CNT_RST_N]. This mode
2874                                                                  should be used separately from [INJ_ERR_BURST_EN] and only one of them
2875                                                                  can be asserted at any time. */
2876         uint64_t inj_err_cnt_rst_n     : 1;  /**< [ 63: 63](R/W/H) Set to zero to hold the error injection counter in reset. */
2877 #endif /* Word 0 - End */
2878     } s;
2879     /* struct bdk_gsernx_lanex_lt_bcfg_s cn; */
2880 };
2881 typedef union bdk_gsernx_lanex_lt_bcfg bdk_gsernx_lanex_lt_bcfg_t;
2882 
2883 static inline uint64_t BDK_GSERNX_LANEX_LT_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_LT_BCFG(unsigned long a,unsigned long b)2884 static inline uint64_t BDK_GSERNX_LANEX_LT_BCFG(unsigned long a, unsigned long b)
2885 {
2886     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
2887         return 0x87e090000580ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
2888     __bdk_csr_fatal("GSERNX_LANEX_LT_BCFG", 2, a, b, 0, 0);
2889 }
2890 
2891 #define typedef_BDK_GSERNX_LANEX_LT_BCFG(a,b) bdk_gsernx_lanex_lt_bcfg_t
2892 #define bustype_BDK_GSERNX_LANEX_LT_BCFG(a,b) BDK_CSR_TYPE_RSL
2893 #define basename_BDK_GSERNX_LANEX_LT_BCFG(a,b) "GSERNX_LANEX_LT_BCFG"
2894 #define device_bar_BDK_GSERNX_LANEX_LT_BCFG(a,b) 0x0 /* PF_BAR0 */
2895 #define busnum_BDK_GSERNX_LANEX_LT_BCFG(a,b) (a)
2896 #define arguments_BDK_GSERNX_LANEX_LT_BCFG(a,b) (a),(b),-1,-1
2897 
2898 /**
2899  * Register (RSL) gsern#_lane#_lt_bsts
2900  *
2901  * GSER Lane PCS Lite Status Register
2902  */
2903 union bdk_gsernx_lanex_lt_bsts
2904 {
2905     uint64_t u;
2906     struct bdk_gsernx_lanex_lt_bsts_s
2907     {
2908 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2909         uint64_t reserved_3_63         : 61;
2910         uint64_t inj_err_cnt_done      : 1;  /**< [  2:  2](RO/H) Indicates the PCS error injection counter is done. */
2911         uint64_t bitstuff_rx_algn_is_odd : 1;/**< [  1:  1](RO/H) Indicates the PCS receive data path has detected bit-stuffed
2912                                                                  receive data that is aligned with duplicate bits in pairs as (1,2),
2913                                                                  (3,4), (5.6), ... The indication is valid only if the receive data
2914                                                                  are bit-stuffed and error-free. */
2915         uint64_t bitstuff_rx_algn_is_even : 1;/**< [  0:  0](RO/H) Indicates the PCS receive data path has detected bit-stuffed
2916                                                                  receive data that is aligned with duplicate bits in pairs as (0,1),
2917                                                                  (2,3), (4,5), ... The indication is valid only if the receive data
2918                                                                  are bit-stuffed and error-free. */
2919 #else /* Word 0 - Little Endian */
2920         uint64_t bitstuff_rx_algn_is_even : 1;/**< [  0:  0](RO/H) Indicates the PCS receive data path has detected bit-stuffed
2921                                                                  receive data that is aligned with duplicate bits in pairs as (0,1),
2922                                                                  (2,3), (4,5), ... The indication is valid only if the receive data
2923                                                                  are bit-stuffed and error-free. */
2924         uint64_t bitstuff_rx_algn_is_odd : 1;/**< [  1:  1](RO/H) Indicates the PCS receive data path has detected bit-stuffed
2925                                                                  receive data that is aligned with duplicate bits in pairs as (1,2),
2926                                                                  (3,4), (5.6), ... The indication is valid only if the receive data
2927                                                                  are bit-stuffed and error-free. */
2928         uint64_t inj_err_cnt_done      : 1;  /**< [  2:  2](RO/H) Indicates the PCS error injection counter is done. */
2929         uint64_t reserved_3_63         : 61;
2930 #endif /* Word 0 - End */
2931     } s;
2932     /* struct bdk_gsernx_lanex_lt_bsts_s cn; */
2933 };
2934 typedef union bdk_gsernx_lanex_lt_bsts bdk_gsernx_lanex_lt_bsts_t;
2935 
2936 static inline uint64_t BDK_GSERNX_LANEX_LT_BSTS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_LT_BSTS(unsigned long a,unsigned long b)2937 static inline uint64_t BDK_GSERNX_LANEX_LT_BSTS(unsigned long a, unsigned long b)
2938 {
2939     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
2940         return 0x87e090000590ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
2941     __bdk_csr_fatal("GSERNX_LANEX_LT_BSTS", 2, a, b, 0, 0);
2942 }
2943 
2944 #define typedef_BDK_GSERNX_LANEX_LT_BSTS(a,b) bdk_gsernx_lanex_lt_bsts_t
2945 #define bustype_BDK_GSERNX_LANEX_LT_BSTS(a,b) BDK_CSR_TYPE_RSL
2946 #define basename_BDK_GSERNX_LANEX_LT_BSTS(a,b) "GSERNX_LANEX_LT_BSTS"
2947 #define device_bar_BDK_GSERNX_LANEX_LT_BSTS(a,b) 0x0 /* PF_BAR0 */
2948 #define busnum_BDK_GSERNX_LANEX_LT_BSTS(a,b) (a)
2949 #define arguments_BDK_GSERNX_LANEX_LT_BSTS(a,b) (a),(b),-1,-1
2950 
2951 /**
2952  * Register (RSL) gsern#_lane#_lt_prbs1_bcfg
2953  *
2954  * GSER Lane PCS Lite PRBS Checker Control Register 1
2955  */
2956 union bdk_gsernx_lanex_lt_prbs1_bcfg
2957 {
2958     uint64_t u;
2959     struct bdk_gsernx_lanex_lt_prbs1_bcfg_s
2960     {
2961 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2962         uint64_t reserved_60_63        : 4;
2963         uint64_t prbs_rx_rst_n         : 1;  /**< [ 59: 59](R/W/H) Clear to hold the receive PRBS pattern checker in reset. */
2964         uint64_t prbs_rx_mode          : 1;  /**< [ 58: 58](R/W/H) Enables PRBS checking in the PCS lite layer receive data path. If
2965                                                                  using PRBS checking, assert GSERN()_LANE()_LT_PRBS1_BCFG[PRBS_RX_MODE]
2966                                                                  prior to deasserting GSERN()_LANE()_LT_PRBS1_BCFG[PRBS_RX_RST_N]. Software
2967                                                                  can deassert this bit to stop accumulating error counts without
2968                                                                  resetting the counter. */
2969         uint64_t prbs_tx_rst_n         : 1;  /**< [ 57: 57](R/W/H) Clear to hold the transmit PRBS pattern generator in reset. */
2970         uint64_t prbs_tx_mode          : 1;  /**< [ 56: 56](R/W/H) Enables PRBS generation and sending PRBS transmit data to the SERDES
2971                                                                  macro. If using PRBS transmitting, set
2972                                                                  GSERN()_LANE()_LT_PRBS1_BCFG[PRBS_TX_MODE] prior to deasserting
2973                                                                  GSERN()_LANE()_LT_PRBS1_BCFG[PRBS_TX_RST_N]. Note that the PCS-lite PRBS
2974                                                                  generator will require GSERN()_LANE()_LT_BCFG[REVERSE_TX_BIT_ORDER] to be
2975                                                                  asserted. */
2976         uint64_t reserved_52_55        : 4;
2977         uint64_t prbs_mode             : 4;  /**< [ 51: 48](R/W/H) Selects the PRBS pattern mode for both transmit generation and
2978                                                                  receive checking:
2979                                                                    0 = Prbs07 (taps at 6 & 7; reset default).
2980                                                                    1 = Prbs7a (taps at 3 & 7).
2981                                                                    2 = Prbs09 (taps at 5 & 9).
2982                                                                    3 = Prbs11 (taps at 9 & 11).
2983                                                                    4 = Prbs15 (taps at 14 & 15).
2984                                                                    5 = Prbs20 (taps at 3 & 20).
2985                                                                    6 = Prbs23 (taps at 18 & 23).
2986                                                                    7 = Prbs29 (taps at 27 & 29).
2987                                                                    8 = Prbs31 (taps at 28 & 31).
2988                                                                  others reserved. */
2989         uint64_t reserved_41_47        : 7;
2990         uint64_t cycle_cnt_en          : 1;  /**< [ 40: 40](R/W/H) Enable use of GSERN()_LANE()_LT_PRBS1_BCFG[CYCLE_CNT] to limit number of
2991                                                                  cycles of PCS RX clock over which PRBS errors are accumulated. */
2992         uint64_t cycle_cnt             : 40; /**< [ 39:  0](R/W/H) When enabled, this contains the count of PCS receive-clock cycles
2993                                                                  over which PRBS error counts are accumulated. */
2994 #else /* Word 0 - Little Endian */
2995         uint64_t cycle_cnt             : 40; /**< [ 39:  0](R/W/H) When enabled, this contains the count of PCS receive-clock cycles
2996                                                                  over which PRBS error counts are accumulated. */
2997         uint64_t cycle_cnt_en          : 1;  /**< [ 40: 40](R/W/H) Enable use of GSERN()_LANE()_LT_PRBS1_BCFG[CYCLE_CNT] to limit number of
2998                                                                  cycles of PCS RX clock over which PRBS errors are accumulated. */
2999         uint64_t reserved_41_47        : 7;
3000         uint64_t prbs_mode             : 4;  /**< [ 51: 48](R/W/H) Selects the PRBS pattern mode for both transmit generation and
3001                                                                  receive checking:
3002                                                                    0 = Prbs07 (taps at 6 & 7; reset default).
3003                                                                    1 = Prbs7a (taps at 3 & 7).
3004                                                                    2 = Prbs09 (taps at 5 & 9).
3005                                                                    3 = Prbs11 (taps at 9 & 11).
3006                                                                    4 = Prbs15 (taps at 14 & 15).
3007                                                                    5 = Prbs20 (taps at 3 & 20).
3008                                                                    6 = Prbs23 (taps at 18 & 23).
3009                                                                    7 = Prbs29 (taps at 27 & 29).
3010                                                                    8 = Prbs31 (taps at 28 & 31).
3011                                                                  others reserved. */
3012         uint64_t reserved_52_55        : 4;
3013         uint64_t prbs_tx_mode          : 1;  /**< [ 56: 56](R/W/H) Enables PRBS generation and sending PRBS transmit data to the SERDES
3014                                                                  macro. If using PRBS transmitting, set
3015                                                                  GSERN()_LANE()_LT_PRBS1_BCFG[PRBS_TX_MODE] prior to deasserting
3016                                                                  GSERN()_LANE()_LT_PRBS1_BCFG[PRBS_TX_RST_N]. Note that the PCS-lite PRBS
3017                                                                  generator will require GSERN()_LANE()_LT_BCFG[REVERSE_TX_BIT_ORDER] to be
3018                                                                  asserted. */
3019         uint64_t prbs_tx_rst_n         : 1;  /**< [ 57: 57](R/W/H) Clear to hold the transmit PRBS pattern generator in reset. */
3020         uint64_t prbs_rx_mode          : 1;  /**< [ 58: 58](R/W/H) Enables PRBS checking in the PCS lite layer receive data path. If
3021                                                                  using PRBS checking, assert GSERN()_LANE()_LT_PRBS1_BCFG[PRBS_RX_MODE]
3022                                                                  prior to deasserting GSERN()_LANE()_LT_PRBS1_BCFG[PRBS_RX_RST_N]. Software
3023                                                                  can deassert this bit to stop accumulating error counts without
3024                                                                  resetting the counter. */
3025         uint64_t prbs_rx_rst_n         : 1;  /**< [ 59: 59](R/W/H) Clear to hold the receive PRBS pattern checker in reset. */
3026         uint64_t reserved_60_63        : 4;
3027 #endif /* Word 0 - End */
3028     } s;
3029     /* struct bdk_gsernx_lanex_lt_prbs1_bcfg_s cn; */
3030 };
3031 typedef union bdk_gsernx_lanex_lt_prbs1_bcfg bdk_gsernx_lanex_lt_prbs1_bcfg_t;
3032 
3033 static inline uint64_t BDK_GSERNX_LANEX_LT_PRBS1_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_LT_PRBS1_BCFG(unsigned long a,unsigned long b)3034 static inline uint64_t BDK_GSERNX_LANEX_LT_PRBS1_BCFG(unsigned long a, unsigned long b)
3035 {
3036     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
3037         return 0x87e090000690ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
3038     __bdk_csr_fatal("GSERNX_LANEX_LT_PRBS1_BCFG", 2, a, b, 0, 0);
3039 }
3040 
3041 #define typedef_BDK_GSERNX_LANEX_LT_PRBS1_BCFG(a,b) bdk_gsernx_lanex_lt_prbs1_bcfg_t
3042 #define bustype_BDK_GSERNX_LANEX_LT_PRBS1_BCFG(a,b) BDK_CSR_TYPE_RSL
3043 #define basename_BDK_GSERNX_LANEX_LT_PRBS1_BCFG(a,b) "GSERNX_LANEX_LT_PRBS1_BCFG"
3044 #define device_bar_BDK_GSERNX_LANEX_LT_PRBS1_BCFG(a,b) 0x0 /* PF_BAR0 */
3045 #define busnum_BDK_GSERNX_LANEX_LT_PRBS1_BCFG(a,b) (a)
3046 #define arguments_BDK_GSERNX_LANEX_LT_PRBS1_BCFG(a,b) (a),(b),-1,-1
3047 
3048 /**
3049  * Register (RSL) gsern#_lane#_lt_prbs2_bcfg
3050  *
3051  * GSER Lane PCS Lite PRBS Checker Control Register 2
3052  */
3053 union bdk_gsernx_lanex_lt_prbs2_bcfg
3054 {
3055     uint64_t u;
3056     struct bdk_gsernx_lanex_lt_prbs2_bcfg_s
3057     {
3058 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3059         uint64_t reserved_56_63        : 8;
3060         uint64_t lock_cnt              : 8;  /**< [ 55: 48](R/W/H) One less than the number of cycles of matching receive data the PRBS
3061                                                                  checker needs to see before starting to count errors. Default is 31,
3062                                                                  for 32 cycles of matching data before starting the PRBS error
3063                                                                  counter; the maximum setting is 255. Set
3064                                                                  GSERN()_LANE()_LT_PRBS2_BCFG[LOCK_CNT] as desired before deasserting
3065                                                                  GSERN()_LANE()_LT_PRBS1_BCFG[PRBS_RX_RST_N]. */
3066         uint64_t reserved_41_47        : 7;
3067         uint64_t tx_lfsr_use_preload   : 1;  /**< [ 40: 40](R/W/H) Enables use of the GSERN()_LANE()_LT_PRBS2_BCFG[TX_LFSR_PRELOAD_VALUE]
3068                                                                  instead of all zeros in the transmitter LFSR PRBS generator. Set
3069                                                                  GSERN()_LANE()_LT_PRBS2_BCFG[TX_LFSR_USE_PRELOAD] and
3070                                                                  GSERN()_LANE()_LT_PRBS2_BCFG[TX_LFSR_PRELOAD_VALUE] as desired before
3071                                                                  deasserting GSERN()_LANE()_LT_PRBS1_BCFG[PRBS_TX_RST_N]. */
3072         uint64_t tx_lfsr_preload_value : 40; /**< [ 39:  0](R/W/H) Initial state of the transmitter LFSR PRBS generator (if enabled by
3073                                                                  GSERN()_LANE()_LT_PRBS2_BCFG[TX_LFSR_USE_PRELOAD]). When enabled, this
3074                                                                  value will be loaded when GSERN()_LANE()_LT_PRBS1_BCFG[PRBS_TX_RST_N]
3075                                                                  asserts (low). Do not set to all ones, or the LFSR will lock up. Set
3076                                                                  GSERN()_LANE()_LT_PRBS2_BCFG[TX_LFSR_USE_PRELOAD] and
3077                                                                  GSERN()_LANE()_LT_PRBS2_BCFG[TX_LFSR_PRELOAD_VALUE] as desired before
3078                                                                  deasserting GSERN()_LANE()_LT_PRBS1_BCFG[PRBS_TX_RST_N]. */
3079 #else /* Word 0 - Little Endian */
3080         uint64_t tx_lfsr_preload_value : 40; /**< [ 39:  0](R/W/H) Initial state of the transmitter LFSR PRBS generator (if enabled by
3081                                                                  GSERN()_LANE()_LT_PRBS2_BCFG[TX_LFSR_USE_PRELOAD]). When enabled, this
3082                                                                  value will be loaded when GSERN()_LANE()_LT_PRBS1_BCFG[PRBS_TX_RST_N]
3083                                                                  asserts (low). Do not set to all ones, or the LFSR will lock up. Set
3084                                                                  GSERN()_LANE()_LT_PRBS2_BCFG[TX_LFSR_USE_PRELOAD] and
3085                                                                  GSERN()_LANE()_LT_PRBS2_BCFG[TX_LFSR_PRELOAD_VALUE] as desired before
3086                                                                  deasserting GSERN()_LANE()_LT_PRBS1_BCFG[PRBS_TX_RST_N]. */
3087         uint64_t tx_lfsr_use_preload   : 1;  /**< [ 40: 40](R/W/H) Enables use of the GSERN()_LANE()_LT_PRBS2_BCFG[TX_LFSR_PRELOAD_VALUE]
3088                                                                  instead of all zeros in the transmitter LFSR PRBS generator. Set
3089                                                                  GSERN()_LANE()_LT_PRBS2_BCFG[TX_LFSR_USE_PRELOAD] and
3090                                                                  GSERN()_LANE()_LT_PRBS2_BCFG[TX_LFSR_PRELOAD_VALUE] as desired before
3091                                                                  deasserting GSERN()_LANE()_LT_PRBS1_BCFG[PRBS_TX_RST_N]. */
3092         uint64_t reserved_41_47        : 7;
3093         uint64_t lock_cnt              : 8;  /**< [ 55: 48](R/W/H) One less than the number of cycles of matching receive data the PRBS
3094                                                                  checker needs to see before starting to count errors. Default is 31,
3095                                                                  for 32 cycles of matching data before starting the PRBS error
3096                                                                  counter; the maximum setting is 255. Set
3097                                                                  GSERN()_LANE()_LT_PRBS2_BCFG[LOCK_CNT] as desired before deasserting
3098                                                                  GSERN()_LANE()_LT_PRBS1_BCFG[PRBS_RX_RST_N]. */
3099         uint64_t reserved_56_63        : 8;
3100 #endif /* Word 0 - End */
3101     } s;
3102     /* struct bdk_gsernx_lanex_lt_prbs2_bcfg_s cn; */
3103 };
3104 typedef union bdk_gsernx_lanex_lt_prbs2_bcfg bdk_gsernx_lanex_lt_prbs2_bcfg_t;
3105 
3106 static inline uint64_t BDK_GSERNX_LANEX_LT_PRBS2_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_LT_PRBS2_BCFG(unsigned long a,unsigned long b)3107 static inline uint64_t BDK_GSERNX_LANEX_LT_PRBS2_BCFG(unsigned long a, unsigned long b)
3108 {
3109     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
3110         return 0x87e0900006a0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
3111     __bdk_csr_fatal("GSERNX_LANEX_LT_PRBS2_BCFG", 2, a, b, 0, 0);
3112 }
3113 
3114 #define typedef_BDK_GSERNX_LANEX_LT_PRBS2_BCFG(a,b) bdk_gsernx_lanex_lt_prbs2_bcfg_t
3115 #define bustype_BDK_GSERNX_LANEX_LT_PRBS2_BCFG(a,b) BDK_CSR_TYPE_RSL
3116 #define basename_BDK_GSERNX_LANEX_LT_PRBS2_BCFG(a,b) "GSERNX_LANEX_LT_PRBS2_BCFG"
3117 #define device_bar_BDK_GSERNX_LANEX_LT_PRBS2_BCFG(a,b) 0x0 /* PF_BAR0 */
3118 #define busnum_BDK_GSERNX_LANEX_LT_PRBS2_BCFG(a,b) (a)
3119 #define arguments_BDK_GSERNX_LANEX_LT_PRBS2_BCFG(a,b) (a),(b),-1,-1
3120 
3121 /**
3122  * Register (RSL) gsern#_lane#_lt_prbs_sts
3123  *
3124  * GSER Lane PCS Lite PRBS Checker Status Register
3125  */
3126 union bdk_gsernx_lanex_lt_prbs_sts
3127 {
3128     uint64_t u;
3129     struct bdk_gsernx_lanex_lt_prbs_sts_s
3130     {
3131 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3132         uint64_t reserved_50_63        : 14;
3133         uint64_t cycle_cnt_done        : 1;  /**< [ 49: 49](RO/H) Indicates the GSERN()_LANE()_LT_PRBS1_BCFG[CYCLE_CNT] has expired
3134                                                                  if GSERN()_LANE()_LT_PRBS1_BCFG[CYCLE_CNT_EN] is set. If
3135                                                                  GSERN()_LANE()_LT_PRBS1_BCFG[CYCLE_CNT_EN] is clear, this bit will
3136                                                                  always read as clear. */
3137         uint64_t lock                  : 1;  /**< [ 48: 48](RO/H) Indicates the PRBS checker logic has achieved lock prior to
3138                                                                  starting error counting. */
3139         uint64_t err_cnt_ovf           : 1;  /**< [ 47: 47](RO/H) When asserted indicates GSERN()_LANE()_LT_PRBS_STS[ERR_CNT] overflowed and
3140                                                                  is not accurate. */
3141         uint64_t reserved_45_46        : 2;
3142         uint64_t err_cnt               : 45; /**< [ 44:  0](RO/H) Count of PRBS bit errors seen. If GSERN()_LANE()_LT_PRBS1_BCFG[CYCLE_CNT_EN] and
3143                                                                  GSERN()_LANE()_LT_PRBS_STS[CYCLE_CNT_DONE] are not both asserted,
3144                                                                  GSERN()_LANE()_LT_PRBS_STS[ERR_CNT] may not be reliable unless
3145                                                                  GSERN()_LANE()_LT_PRBS1_BCFG[PRBS_RX_MODE] is first deasserted (to stop
3146                                                                  the error counter). */
3147 #else /* Word 0 - Little Endian */
3148         uint64_t err_cnt               : 45; /**< [ 44:  0](RO/H) Count of PRBS bit errors seen. If GSERN()_LANE()_LT_PRBS1_BCFG[CYCLE_CNT_EN] and
3149                                                                  GSERN()_LANE()_LT_PRBS_STS[CYCLE_CNT_DONE] are not both asserted,
3150                                                                  GSERN()_LANE()_LT_PRBS_STS[ERR_CNT] may not be reliable unless
3151                                                                  GSERN()_LANE()_LT_PRBS1_BCFG[PRBS_RX_MODE] is first deasserted (to stop
3152                                                                  the error counter). */
3153         uint64_t reserved_45_46        : 2;
3154         uint64_t err_cnt_ovf           : 1;  /**< [ 47: 47](RO/H) When asserted indicates GSERN()_LANE()_LT_PRBS_STS[ERR_CNT] overflowed and
3155                                                                  is not accurate. */
3156         uint64_t lock                  : 1;  /**< [ 48: 48](RO/H) Indicates the PRBS checker logic has achieved lock prior to
3157                                                                  starting error counting. */
3158         uint64_t cycle_cnt_done        : 1;  /**< [ 49: 49](RO/H) Indicates the GSERN()_LANE()_LT_PRBS1_BCFG[CYCLE_CNT] has expired
3159                                                                  if GSERN()_LANE()_LT_PRBS1_BCFG[CYCLE_CNT_EN] is set. If
3160                                                                  GSERN()_LANE()_LT_PRBS1_BCFG[CYCLE_CNT_EN] is clear, this bit will
3161                                                                  always read as clear. */
3162         uint64_t reserved_50_63        : 14;
3163 #endif /* Word 0 - End */
3164     } s;
3165     /* struct bdk_gsernx_lanex_lt_prbs_sts_s cn; */
3166 };
3167 typedef union bdk_gsernx_lanex_lt_prbs_sts bdk_gsernx_lanex_lt_prbs_sts_t;
3168 
3169 static inline uint64_t BDK_GSERNX_LANEX_LT_PRBS_STS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_LT_PRBS_STS(unsigned long a,unsigned long b)3170 static inline uint64_t BDK_GSERNX_LANEX_LT_PRBS_STS(unsigned long a, unsigned long b)
3171 {
3172     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
3173         return 0x87e0900006b0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
3174     __bdk_csr_fatal("GSERNX_LANEX_LT_PRBS_STS", 2, a, b, 0, 0);
3175 }
3176 
3177 #define typedef_BDK_GSERNX_LANEX_LT_PRBS_STS(a,b) bdk_gsernx_lanex_lt_prbs_sts_t
3178 #define bustype_BDK_GSERNX_LANEX_LT_PRBS_STS(a,b) BDK_CSR_TYPE_RSL
3179 #define basename_BDK_GSERNX_LANEX_LT_PRBS_STS(a,b) "GSERNX_LANEX_LT_PRBS_STS"
3180 #define device_bar_BDK_GSERNX_LANEX_LT_PRBS_STS(a,b) 0x0 /* PF_BAR0 */
3181 #define busnum_BDK_GSERNX_LANEX_LT_PRBS_STS(a,b) (a)
3182 #define arguments_BDK_GSERNX_LANEX_LT_PRBS_STS(a,b) (a),(b),-1,-1
3183 
3184 /**
3185  * Register (RSL) gsern#_lane#_map0
3186  *
3187  * GSER Lane Programmable Map Register 0
3188  * Manually settable option for the interpolator map. If using
3189  * GSERN()_LANE()_IMAPSEL_BCFG[MAP_CASE]=0xf, set these bits prior to bringing analog
3190  * receiver out of reset.
3191  */
3192 union bdk_gsernx_lanex_map0
3193 {
3194     uint64_t u;
3195     struct bdk_gsernx_lanex_map0_s
3196     {
3197 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3198         uint64_t dat                   : 64; /**< [ 63:  0](R/W) map register 0, 64 LSB of map 128b vector. */
3199 #else /* Word 0 - Little Endian */
3200         uint64_t dat                   : 64; /**< [ 63:  0](R/W) map register 0, 64 LSB of map 128b vector. */
3201 #endif /* Word 0 - End */
3202     } s;
3203     /* struct bdk_gsernx_lanex_map0_s cn; */
3204 };
3205 typedef union bdk_gsernx_lanex_map0 bdk_gsernx_lanex_map0_t;
3206 
3207 static inline uint64_t BDK_GSERNX_LANEX_MAP0(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_MAP0(unsigned long a,unsigned long b)3208 static inline uint64_t BDK_GSERNX_LANEX_MAP0(unsigned long a, unsigned long b)
3209 {
3210     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
3211         return 0x87e090001e00ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
3212     __bdk_csr_fatal("GSERNX_LANEX_MAP0", 2, a, b, 0, 0);
3213 }
3214 
3215 #define typedef_BDK_GSERNX_LANEX_MAP0(a,b) bdk_gsernx_lanex_map0_t
3216 #define bustype_BDK_GSERNX_LANEX_MAP0(a,b) BDK_CSR_TYPE_RSL
3217 #define basename_BDK_GSERNX_LANEX_MAP0(a,b) "GSERNX_LANEX_MAP0"
3218 #define device_bar_BDK_GSERNX_LANEX_MAP0(a,b) 0x0 /* PF_BAR0 */
3219 #define busnum_BDK_GSERNX_LANEX_MAP0(a,b) (a)
3220 #define arguments_BDK_GSERNX_LANEX_MAP0(a,b) (a),(b),-1,-1
3221 
3222 /**
3223  * Register (RSL) gsern#_lane#_map1
3224  *
3225  * GSER Lane Programmable Map Register 1
3226  * Manually settable option for the interpolator map. If using
3227  * (GSERN()_LANE()_IMAPSEL_BCFG[MAP_CASE]=0xf), set these bits prior to bringing
3228  * analog receiver out of reset.
3229  */
3230 union bdk_gsernx_lanex_map1
3231 {
3232     uint64_t u;
3233     struct bdk_gsernx_lanex_map1_s
3234     {
3235 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3236         uint64_t dat                   : 64; /**< [ 63:  0](R/W) Map register 1, 64 most significant bits of map 128-bit vector. */
3237 #else /* Word 0 - Little Endian */
3238         uint64_t dat                   : 64; /**< [ 63:  0](R/W) Map register 1, 64 most significant bits of map 128-bit vector. */
3239 #endif /* Word 0 - End */
3240     } s;
3241     /* struct bdk_gsernx_lanex_map1_s cn; */
3242 };
3243 typedef union bdk_gsernx_lanex_map1 bdk_gsernx_lanex_map1_t;
3244 
3245 static inline uint64_t BDK_GSERNX_LANEX_MAP1(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_MAP1(unsigned long a,unsigned long b)3246 static inline uint64_t BDK_GSERNX_LANEX_MAP1(unsigned long a, unsigned long b)
3247 {
3248     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
3249         return 0x87e090001e10ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
3250     __bdk_csr_fatal("GSERNX_LANEX_MAP1", 2, a, b, 0, 0);
3251 }
3252 
3253 #define typedef_BDK_GSERNX_LANEX_MAP1(a,b) bdk_gsernx_lanex_map1_t
3254 #define bustype_BDK_GSERNX_LANEX_MAP1(a,b) BDK_CSR_TYPE_RSL
3255 #define basename_BDK_GSERNX_LANEX_MAP1(a,b) "GSERNX_LANEX_MAP1"
3256 #define device_bar_BDK_GSERNX_LANEX_MAP1(a,b) 0x0 /* PF_BAR0 */
3257 #define busnum_BDK_GSERNX_LANEX_MAP1(a,b) (a)
3258 #define arguments_BDK_GSERNX_LANEX_MAP1(a,b) (a),(b),-1,-1
3259 
3260 /**
3261  * Register (RSL) gsern#_lane#_max_oob_add_count
3262  *
3263  * GSER Lane RX OOB Maximum ADDER Durations Counted Register
3264  * Observes the maximum number of times we had to delay the idle offset
3265  * recalibration because of a collision with an OOB event.
3266  */
3267 union bdk_gsernx_lanex_max_oob_add_count
3268 {
3269     uint64_t u;
3270     struct bdk_gsernx_lanex_max_oob_add_count_s
3271     {
3272 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3273         uint64_t reserved_8_63         : 56;
3274         uint64_t accumulated_oob_adders : 8; /**< [  7:  0](RO/H) Observed maximum number of OOB ADDERS applied to the idle offset
3275                                                                  recalibration FSM that delay the calibration.  This is in terms of
3276                                                                  how many GSERN()_LANE()_RX_IDLE_CAL_CFG[OOB_DELAY_ADDER_COUNT] ticks added to
3277                                                                  the duration between recalibration. */
3278 #else /* Word 0 - Little Endian */
3279         uint64_t accumulated_oob_adders : 8; /**< [  7:  0](RO/H) Observed maximum number of OOB ADDERS applied to the idle offset
3280                                                                  recalibration FSM that delay the calibration.  This is in terms of
3281                                                                  how many GSERN()_LANE()_RX_IDLE_CAL_CFG[OOB_DELAY_ADDER_COUNT] ticks added to
3282                                                                  the duration between recalibration. */
3283         uint64_t reserved_8_63         : 56;
3284 #endif /* Word 0 - End */
3285     } s;
3286     /* struct bdk_gsernx_lanex_max_oob_add_count_s cn; */
3287 };
3288 typedef union bdk_gsernx_lanex_max_oob_add_count bdk_gsernx_lanex_max_oob_add_count_t;
3289 
3290 static inline uint64_t BDK_GSERNX_LANEX_MAX_OOB_ADD_COUNT(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_MAX_OOB_ADD_COUNT(unsigned long a,unsigned long b)3291 static inline uint64_t BDK_GSERNX_LANEX_MAX_OOB_ADD_COUNT(unsigned long a, unsigned long b)
3292 {
3293     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
3294         return 0x87e090001550ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
3295     __bdk_csr_fatal("GSERNX_LANEX_MAX_OOB_ADD_COUNT", 2, a, b, 0, 0);
3296 }
3297 
3298 #define typedef_BDK_GSERNX_LANEX_MAX_OOB_ADD_COUNT(a,b) bdk_gsernx_lanex_max_oob_add_count_t
3299 #define bustype_BDK_GSERNX_LANEX_MAX_OOB_ADD_COUNT(a,b) BDK_CSR_TYPE_RSL
3300 #define basename_BDK_GSERNX_LANEX_MAX_OOB_ADD_COUNT(a,b) "GSERNX_LANEX_MAX_OOB_ADD_COUNT"
3301 #define device_bar_BDK_GSERNX_LANEX_MAX_OOB_ADD_COUNT(a,b) 0x0 /* PF_BAR0 */
3302 #define busnum_BDK_GSERNX_LANEX_MAX_OOB_ADD_COUNT(a,b) (a)
3303 #define arguments_BDK_GSERNX_LANEX_MAX_OOB_ADD_COUNT(a,b) (a),(b),-1,-1
3304 
3305 /**
3306  * Register (RSL) gsern#_lane#_ocx_txeq_bcfg
3307  *
3308  * GSER Lane OCX Tx Equalizer Base Configuration Register
3309  * Register controls settings for the transmitter equalizer taps
3310  * when the GSER is configured for OCX mode and KR training is not enabled.
3311  * These fields will drive the associated control signal when
3312  * GSERN()_LANE()_SRCMX_BCFG[TX_CTRL_SEL] is set to 'OCX'.
3313  */
3314 union bdk_gsernx_lanex_ocx_txeq_bcfg
3315 {
3316     uint64_t u;
3317     struct bdk_gsernx_lanex_ocx_txeq_bcfg_s
3318     {
3319 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3320         uint64_t reserved_28_63        : 36;
3321         uint64_t tx_coeff_update       : 1;  /**< [ 27: 27](R/W/H) Transmitter coefficient update.
3322                                                                  An asserting edge will start the transmitter coefficient update
3323                                                                  sequencer. This field self-clears when the sequence has completed.
3324                                                                  To update the GSER transmitter euqalizer coefficients program
3325                                                                  * GSERN()_LANE()_OCX_TXEQ_BCFG[TX_CPOST].
3326                                                                  * GSERN()_LANE()_OCX_TXEQ_BCFG[TX_CMAIN].
3327                                                                  * GSERN()_LANE()_OCX_TXEQ_BCFG[TX_CPRE].
3328                                                                  * GSERN()_LANE()_OCX_TXEQ_BCFG[TX_BS].
3329                                                                  * GSERN()_LANE()_OCX_TXEQ_BCFG[TX_CSPD].
3330 
3331                                                                  then write [TX_COEFF_UPDATE] to 1. */
3332         uint64_t tx_enable             : 1;  /**< [ 26: 26](R/W) Transmitter enable.
3333                                                                  0 = Disable the serdes transmitter.
3334                                                                  1 = Enable the serdes transmitter.
3335 
3336                                                                  Internal:
3337                                                                  Drives the ocx_tx_enable input to the GSERN src_mux. */
3338         uint64_t tx_stuff              : 1;  /**< [ 25: 25](R/W) Reserved. For Diagnostic Use Only.
3339                                                                  Internal:
3340                                                                  Transmitter bit stuffing.
3341                                                                  Programs the transmitter PCS lite layer for bit stuffing.
3342                                                                  Not used for OCX connections.
3343                                                                  Leave programmed to 0x0.
3344                                                                  Drives the ocx_tx_stuff input to the GSERN src_mux. */
3345         uint64_t tx_oob                : 1;  /**< [ 24: 24](R/W) Reserved. For Diagnostic Use Only.
3346                                                                  Internal:
3347                                                                  Transmitter OOB signaling.
3348                                                                  Not typically used for OCX connnections.
3349                                                                  Leave programmed to 0x0.
3350                                                                  Drives the ocx_tx_oob input to the GSERN src_mux. */
3351         uint64_t tx_idle               : 1;  /**< [ 23: 23](R/W) Reserved. For Diagnostic Use Only.
3352                                                                  Internal:
3353                                                                  Transmitter electrical idle.
3354                                                                  Used to force the transmitter to electrical idle.
3355                                                                  Not typically used for OCX connections.
3356                                                                  Leave progreammed to 0x0.
3357                                                                  Drives the ocx_tx_idle input to the GSERN src_mux. */
3358         uint64_t tx_cspd               : 1;  /**< [ 22: 22](R/W) Power-down control for a second TX bias/swing leg with the same
3359                                                                  weight as TX_BS[3]. Normally this field is left deasserted to
3360                                                                  provide a minimum transmit amplitude. Asserting [TX_CSPD] will turn
3361                                                                  off all legs of the bias/swing generator for lower standby power. */
3362         uint64_t tx_bs                 : 6;  /**< [ 21: 16](R/W) TX bias/swing selection. This setting only takes effect if [TX_CSPD] is
3363                                                                  deasserted; with [TX_CSPD] asserted the
3364                                                                  bias/swing control setting seen in the analog bias generator is zero.
3365 
3366                                                                  Typical override values would be:
3367                                                                    42 = Nominal 1.0V p-p transmit amplitude.
3368                                                                    52 = Nominal 1.2V p-p transmit amplitude.
3369 
3370                                                                  The maximum usable value without transmitted waveform distortion depends
3371                                                                  primarily on voltage, secondarily on process corner and temperature, but is at
3372                                                                  least 52.  There is no minimum setting based on transmitter distortion, only
3373                                                                  that set by the receiver. */
3374         uint64_t tx_cpost              : 5;  /**< [ 15: 11](R/W) Transmitter Post (C+1) equalizer tap coefficient value.
3375                                                                  Programs the transmitter Post tap.
3376                                                                  Valid range is 0 to 0x10.
3377                                                                  See GSERN()_LANE()_OCX_TXEQ_BCFG[TX_CMAIN]. */
3378         uint64_t tx_cmain              : 6;  /**< [ 10:  5](R/W) Transmitter Main (C0) equalizer tap coefficient value.
3379                                                                  Programs the serdes transmitter Main tap.
3380                                                                  Valid range is 0x30 to 0x18.
3381                                                                  When programing the transmitter Pre, Main, and Post
3382                                                                  taps the following rules must be adhered to:
3383                                                                  _ ([TX_CMAIN] + [TX_CPRE] + [TX_CPOST]) \<= 0x30.
3384                                                                  _ ([TX_CMAIN] - [TX_CPRE] - [TX_CPOST]) \>= 0x6.
3385                                                                  _ 0x30 \<= [TX_CMAIN] \<= 0x18.
3386                                                                  _ 0x16 \>= [TX_CPRE] \>= 0x0.
3387                                                                  _ 0x16 \>= [TX_CPOST] \>= 0x0.
3388 
3389                                                                  [TX_CMAIN] should be adjusted when either [TX_CPRE] or
3390                                                                  [TX_CPOST] is adjusted to provide constant power transmitter
3391                                                                  amplitude adjustments.
3392 
3393                                                                  To update the GSER serdes transmitter Pre, Main, and Post
3394                                                                  equalizer taps from the [TX_CPOST], [TX_CMAIN], and [TX_CPRE]
3395                                                                  fields write GSERN()_LANE()_OCX_TXEQ_BCFG[TX_COEFF_UPDATE]
3396                                                                  to 1 and subsequently clear [TX_COEFF_UPDATE] to 0. This step
3397                                                                  transfers the [TX_CPOST], [TX_CMAIN], and [TX_CPRE] to the
3398                                                                  serdes transmitter equalizer.
3399 
3400                                                                  Related CSRs:
3401                                                                  * GSERN()_LANE()_OCX_TXEQ_BCFG[TX_COEFF_UPDATE].
3402                                                                  * GSERN()_LANE()_OCX_TXEQ_BCFG[TX_CPOST].
3403                                                                  * GSERN()_LANE()_OCX_TXEQ_BCFG[TX_CPRE].
3404                                                                  * GSERN()_LANE()_OCX_TXEQ_BCFG[TX_BS].
3405                                                                  * GSERN()_LANE()_OCX_TXEQ_BCFG[TX_CSPD]. */
3406         uint64_t tx_cpre               : 5;  /**< [  4:  0](R/W) Transmitter Pre (C-1) equalizer tap coefficient value.
3407                                                                  Programs the transmitter Pre tap.
3408                                                                  Valid range is 0 to 0x10.
3409                                                                  See GSERN()_LANE()_OCX_TXEQ_BCFG[TX_CMAIN]. */
3410 #else /* Word 0 - Little Endian */
3411         uint64_t tx_cpre               : 5;  /**< [  4:  0](R/W) Transmitter Pre (C-1) equalizer tap coefficient value.
3412                                                                  Programs the transmitter Pre tap.
3413                                                                  Valid range is 0 to 0x10.
3414                                                                  See GSERN()_LANE()_OCX_TXEQ_BCFG[TX_CMAIN]. */
3415         uint64_t tx_cmain              : 6;  /**< [ 10:  5](R/W) Transmitter Main (C0) equalizer tap coefficient value.
3416                                                                  Programs the serdes transmitter Main tap.
3417                                                                  Valid range is 0x30 to 0x18.
3418                                                                  When programing the transmitter Pre, Main, and Post
3419                                                                  taps the following rules must be adhered to:
3420                                                                  _ ([TX_CMAIN] + [TX_CPRE] + [TX_CPOST]) \<= 0x30.
3421                                                                  _ ([TX_CMAIN] - [TX_CPRE] - [TX_CPOST]) \>= 0x6.
3422                                                                  _ 0x30 \<= [TX_CMAIN] \<= 0x18.
3423                                                                  _ 0x16 \>= [TX_CPRE] \>= 0x0.
3424                                                                  _ 0x16 \>= [TX_CPOST] \>= 0x0.
3425 
3426                                                                  [TX_CMAIN] should be adjusted when either [TX_CPRE] or
3427                                                                  [TX_CPOST] is adjusted to provide constant power transmitter
3428                                                                  amplitude adjustments.
3429 
3430                                                                  To update the GSER serdes transmitter Pre, Main, and Post
3431                                                                  equalizer taps from the [TX_CPOST], [TX_CMAIN], and [TX_CPRE]
3432                                                                  fields write GSERN()_LANE()_OCX_TXEQ_BCFG[TX_COEFF_UPDATE]
3433                                                                  to 1 and subsequently clear [TX_COEFF_UPDATE] to 0. This step
3434                                                                  transfers the [TX_CPOST], [TX_CMAIN], and [TX_CPRE] to the
3435                                                                  serdes transmitter equalizer.
3436 
3437                                                                  Related CSRs:
3438                                                                  * GSERN()_LANE()_OCX_TXEQ_BCFG[TX_COEFF_UPDATE].
3439                                                                  * GSERN()_LANE()_OCX_TXEQ_BCFG[TX_CPOST].
3440                                                                  * GSERN()_LANE()_OCX_TXEQ_BCFG[TX_CPRE].
3441                                                                  * GSERN()_LANE()_OCX_TXEQ_BCFG[TX_BS].
3442                                                                  * GSERN()_LANE()_OCX_TXEQ_BCFG[TX_CSPD]. */
3443         uint64_t tx_cpost              : 5;  /**< [ 15: 11](R/W) Transmitter Post (C+1) equalizer tap coefficient value.
3444                                                                  Programs the transmitter Post tap.
3445                                                                  Valid range is 0 to 0x10.
3446                                                                  See GSERN()_LANE()_OCX_TXEQ_BCFG[TX_CMAIN]. */
3447         uint64_t tx_bs                 : 6;  /**< [ 21: 16](R/W) TX bias/swing selection. This setting only takes effect if [TX_CSPD] is
3448                                                                  deasserted; with [TX_CSPD] asserted the
3449                                                                  bias/swing control setting seen in the analog bias generator is zero.
3450 
3451                                                                  Typical override values would be:
3452                                                                    42 = Nominal 1.0V p-p transmit amplitude.
3453                                                                    52 = Nominal 1.2V p-p transmit amplitude.
3454 
3455                                                                  The maximum usable value without transmitted waveform distortion depends
3456                                                                  primarily on voltage, secondarily on process corner and temperature, but is at
3457                                                                  least 52.  There is no minimum setting based on transmitter distortion, only
3458                                                                  that set by the receiver. */
3459         uint64_t tx_cspd               : 1;  /**< [ 22: 22](R/W) Power-down control for a second TX bias/swing leg with the same
3460                                                                  weight as TX_BS[3]. Normally this field is left deasserted to
3461                                                                  provide a minimum transmit amplitude. Asserting [TX_CSPD] will turn
3462                                                                  off all legs of the bias/swing generator for lower standby power. */
3463         uint64_t tx_idle               : 1;  /**< [ 23: 23](R/W) Reserved. For Diagnostic Use Only.
3464                                                                  Internal:
3465                                                                  Transmitter electrical idle.
3466                                                                  Used to force the transmitter to electrical idle.
3467                                                                  Not typically used for OCX connections.
3468                                                                  Leave progreammed to 0x0.
3469                                                                  Drives the ocx_tx_idle input to the GSERN src_mux. */
3470         uint64_t tx_oob                : 1;  /**< [ 24: 24](R/W) Reserved. For Diagnostic Use Only.
3471                                                                  Internal:
3472                                                                  Transmitter OOB signaling.
3473                                                                  Not typically used for OCX connnections.
3474                                                                  Leave programmed to 0x0.
3475                                                                  Drives the ocx_tx_oob input to the GSERN src_mux. */
3476         uint64_t tx_stuff              : 1;  /**< [ 25: 25](R/W) Reserved. For Diagnostic Use Only.
3477                                                                  Internal:
3478                                                                  Transmitter bit stuffing.
3479                                                                  Programs the transmitter PCS lite layer for bit stuffing.
3480                                                                  Not used for OCX connections.
3481                                                                  Leave programmed to 0x0.
3482                                                                  Drives the ocx_tx_stuff input to the GSERN src_mux. */
3483         uint64_t tx_enable             : 1;  /**< [ 26: 26](R/W) Transmitter enable.
3484                                                                  0 = Disable the serdes transmitter.
3485                                                                  1 = Enable the serdes transmitter.
3486 
3487                                                                  Internal:
3488                                                                  Drives the ocx_tx_enable input to the GSERN src_mux. */
3489         uint64_t tx_coeff_update       : 1;  /**< [ 27: 27](R/W/H) Transmitter coefficient update.
3490                                                                  An asserting edge will start the transmitter coefficient update
3491                                                                  sequencer. This field self-clears when the sequence has completed.
3492                                                                  To update the GSER transmitter euqalizer coefficients program
3493                                                                  * GSERN()_LANE()_OCX_TXEQ_BCFG[TX_CPOST].
3494                                                                  * GSERN()_LANE()_OCX_TXEQ_BCFG[TX_CMAIN].
3495                                                                  * GSERN()_LANE()_OCX_TXEQ_BCFG[TX_CPRE].
3496                                                                  * GSERN()_LANE()_OCX_TXEQ_BCFG[TX_BS].
3497                                                                  * GSERN()_LANE()_OCX_TXEQ_BCFG[TX_CSPD].
3498 
3499                                                                  then write [TX_COEFF_UPDATE] to 1. */
3500         uint64_t reserved_28_63        : 36;
3501 #endif /* Word 0 - End */
3502     } s;
3503     /* struct bdk_gsernx_lanex_ocx_txeq_bcfg_s cn; */
3504 };
3505 typedef union bdk_gsernx_lanex_ocx_txeq_bcfg bdk_gsernx_lanex_ocx_txeq_bcfg_t;
3506 
3507 static inline uint64_t BDK_GSERNX_LANEX_OCX_TXEQ_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_OCX_TXEQ_BCFG(unsigned long a,unsigned long b)3508 static inline uint64_t BDK_GSERNX_LANEX_OCX_TXEQ_BCFG(unsigned long a, unsigned long b)
3509 {
3510     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
3511         return 0x87e090003550ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
3512     __bdk_csr_fatal("GSERNX_LANEX_OCX_TXEQ_BCFG", 2, a, b, 0, 0);
3513 }
3514 
3515 #define typedef_BDK_GSERNX_LANEX_OCX_TXEQ_BCFG(a,b) bdk_gsernx_lanex_ocx_txeq_bcfg_t
3516 #define bustype_BDK_GSERNX_LANEX_OCX_TXEQ_BCFG(a,b) BDK_CSR_TYPE_RSL
3517 #define basename_BDK_GSERNX_LANEX_OCX_TXEQ_BCFG(a,b) "GSERNX_LANEX_OCX_TXEQ_BCFG"
3518 #define device_bar_BDK_GSERNX_LANEX_OCX_TXEQ_BCFG(a,b) 0x0 /* PF_BAR0 */
3519 #define busnum_BDK_GSERNX_LANEX_OCX_TXEQ_BCFG(a,b) (a)
3520 #define arguments_BDK_GSERNX_LANEX_OCX_TXEQ_BCFG(a,b) (a),(b),-1,-1
3521 
3522 /**
3523  * Register (RSL) gsern#_lane#_pat#
3524  *
3525  * GSER Lane Pattern Memory Register
3526  */
3527 union bdk_gsernx_lanex_patx
3528 {
3529     uint64_t u;
3530     struct bdk_gsernx_lanex_patx_s
3531     {
3532 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3533         uint64_t reserved_40_63        : 24;
3534         uint64_t dat                   : 40; /**< [ 39:  0](R/W) Pattern Memory Registers. All 40b of both registers are used under
3535                                                                  al clock ratios except 32:1. In 32b (32:1) mode bits [31:0] of each
3536                                                                  register are used. The total pattern length is 64b in 32b mode and
3537                                                                  80b in all other clock modes.
3538 
3539                                                                  The bit pattern in bits [N-1:0] of PAT[0], where N is the clock
3540                                                                  ratio, must be unique within the overall pattern to allow the
3541                                                                  pattern checker to correctly lock before checking for errors.
3542 
3543                                                                  Internal:
3544                                                                  If the pattern data in this register is written while pattern transmission
3545                                                                  testing is in progress, the transmitted data may be briefly unpredictable. */
3546 #else /* Word 0 - Little Endian */
3547         uint64_t dat                   : 40; /**< [ 39:  0](R/W) Pattern Memory Registers. All 40b of both registers are used under
3548                                                                  al clock ratios except 32:1. In 32b (32:1) mode bits [31:0] of each
3549                                                                  register are used. The total pattern length is 64b in 32b mode and
3550                                                                  80b in all other clock modes.
3551 
3552                                                                  The bit pattern in bits [N-1:0] of PAT[0], where N is the clock
3553                                                                  ratio, must be unique within the overall pattern to allow the
3554                                                                  pattern checker to correctly lock before checking for errors.
3555 
3556                                                                  Internal:
3557                                                                  If the pattern data in this register is written while pattern transmission
3558                                                                  testing is in progress, the transmitted data may be briefly unpredictable. */
3559         uint64_t reserved_40_63        : 24;
3560 #endif /* Word 0 - End */
3561     } s;
3562     /* struct bdk_gsernx_lanex_patx_s cn; */
3563 };
3564 typedef union bdk_gsernx_lanex_patx bdk_gsernx_lanex_patx_t;
3565 
3566 static inline uint64_t BDK_GSERNX_LANEX_PATX(unsigned long a, unsigned long b, unsigned long c) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PATX(unsigned long a,unsigned long b,unsigned long c)3567 static inline uint64_t BDK_GSERNX_LANEX_PATX(unsigned long a, unsigned long b, unsigned long c)
3568 {
3569     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4) && (c<=1)))
3570         return 0x87e090007ff0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7) + 8ll * ((c) & 0x1);
3571     __bdk_csr_fatal("GSERNX_LANEX_PATX", 3, a, b, c, 0);
3572 }
3573 
3574 #define typedef_BDK_GSERNX_LANEX_PATX(a,b,c) bdk_gsernx_lanex_patx_t
3575 #define bustype_BDK_GSERNX_LANEX_PATX(a,b,c) BDK_CSR_TYPE_RSL
3576 #define basename_BDK_GSERNX_LANEX_PATX(a,b,c) "GSERNX_LANEX_PATX"
3577 #define device_bar_BDK_GSERNX_LANEX_PATX(a,b,c) 0x0 /* PF_BAR0 */
3578 #define busnum_BDK_GSERNX_LANEX_PATX(a,b,c) (a)
3579 #define arguments_BDK_GSERNX_LANEX_PATX(a,b,c) (a),(b),(c),-1
3580 
3581 /**
3582  * Register (RSL) gsern#_lane#_pat_ctrl
3583  *
3584  * GSER Lane PCS Lite Pattern Memory Stress Control Register
3585  */
3586 union bdk_gsernx_lanex_pat_ctrl
3587 {
3588     uint64_t u;
3589     struct bdk_gsernx_lanex_pat_ctrl_s
3590     {
3591 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3592         uint64_t reserved_51_63        : 13;
3593         uint64_t tx_rst_n              : 1;  /**< [ 50: 50](R/W) Clear and then set to reset the pattern memory stress transmit
3594                                                                  data path, specifically the pattern memory index counter. */
3595         uint64_t rx_rst_n              : 1;  /**< [ 49: 49](R/W) Clear and then set to reset the pattern memory stress
3596                                                                  receive checking data path, including the lock indication and the
3597                                                                  error counts. */
3598         uint64_t en                    : 1;  /**< [ 48: 48](R/W) Enable (i.e., start, or stop if deasserted) pattern memory stress
3599                                                                  generation and checking. */
3600         uint64_t reserved_41_47        : 7;
3601         uint64_t cycle_cnt_en          : 1;  /**< [ 40: 40](R/W) Enable use of GSERN()_LANE()_PAT_CTRL[CYCLE_CNT] to limit number of cycles
3602                                                                  of PCS RX clock over which the pattern memory loopback errors are
3603                                                                  accumulated. */
3604         uint64_t cycle_cnt             : 40; /**< [ 39:  0](R/W) When enabled by GSERN()_LANE()_PAT_CTRL[CYCLE_CNT_EN], this contains the
3605                                                                  count of PCS receive-clock cycles over which pattern memory loopback
3606                                                                  error counts are accumulated. */
3607 #else /* Word 0 - Little Endian */
3608         uint64_t cycle_cnt             : 40; /**< [ 39:  0](R/W) When enabled by GSERN()_LANE()_PAT_CTRL[CYCLE_CNT_EN], this contains the
3609                                                                  count of PCS receive-clock cycles over which pattern memory loopback
3610                                                                  error counts are accumulated. */
3611         uint64_t cycle_cnt_en          : 1;  /**< [ 40: 40](R/W) Enable use of GSERN()_LANE()_PAT_CTRL[CYCLE_CNT] to limit number of cycles
3612                                                                  of PCS RX clock over which the pattern memory loopback errors are
3613                                                                  accumulated. */
3614         uint64_t reserved_41_47        : 7;
3615         uint64_t en                    : 1;  /**< [ 48: 48](R/W) Enable (i.e., start, or stop if deasserted) pattern memory stress
3616                                                                  generation and checking. */
3617         uint64_t rx_rst_n              : 1;  /**< [ 49: 49](R/W) Clear and then set to reset the pattern memory stress
3618                                                                  receive checking data path, including the lock indication and the
3619                                                                  error counts. */
3620         uint64_t tx_rst_n              : 1;  /**< [ 50: 50](R/W) Clear and then set to reset the pattern memory stress transmit
3621                                                                  data path, specifically the pattern memory index counter. */
3622         uint64_t reserved_51_63        : 13;
3623 #endif /* Word 0 - End */
3624     } s;
3625     /* struct bdk_gsernx_lanex_pat_ctrl_s cn; */
3626 };
3627 typedef union bdk_gsernx_lanex_pat_ctrl bdk_gsernx_lanex_pat_ctrl_t;
3628 
3629 static inline uint64_t BDK_GSERNX_LANEX_PAT_CTRL(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PAT_CTRL(unsigned long a,unsigned long b)3630 static inline uint64_t BDK_GSERNX_LANEX_PAT_CTRL(unsigned long a, unsigned long b)
3631 {
3632     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
3633         return 0x87e090007fd0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
3634     __bdk_csr_fatal("GSERNX_LANEX_PAT_CTRL", 2, a, b, 0, 0);
3635 }
3636 
3637 #define typedef_BDK_GSERNX_LANEX_PAT_CTRL(a,b) bdk_gsernx_lanex_pat_ctrl_t
3638 #define bustype_BDK_GSERNX_LANEX_PAT_CTRL(a,b) BDK_CSR_TYPE_RSL
3639 #define basename_BDK_GSERNX_LANEX_PAT_CTRL(a,b) "GSERNX_LANEX_PAT_CTRL"
3640 #define device_bar_BDK_GSERNX_LANEX_PAT_CTRL(a,b) 0x0 /* PF_BAR0 */
3641 #define busnum_BDK_GSERNX_LANEX_PAT_CTRL(a,b) (a)
3642 #define arguments_BDK_GSERNX_LANEX_PAT_CTRL(a,b) (a),(b),-1,-1
3643 
3644 /**
3645  * Register (RSL) gsern#_lane#_pat_dat
3646  *
3647  * GSER Lane PCS Lite Pattern Memory Stress Data Result Register
3648  */
3649 union bdk_gsernx_lanex_pat_dat
3650 {
3651     uint64_t u;
3652     struct bdk_gsernx_lanex_pat_dat_s
3653     {
3654 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3655         uint64_t framing_match         : 1;  /**< [ 63: 63](RO/H) Indicates that the pattern memory checker found a framing match. This field is
3656                                                                  valid only after enabling pattern memory generation and checking by setting
3657                                                                  GSERN()_LANE()_PAT_CTRL[EN]. */
3658         uint64_t reserved_62           : 1;
3659         uint64_t framing_offset        : 6;  /**< [ 61: 56](RO/H) The offset the pattern memory checker found of the low bits of the pattern data
3660                                                                  in the receive data frame. This field is valid only when [FRAMING_MATCH]
3661                                                                  reads as asserted after enabling pattern memory generation and checking by
3662                                                                  setting GSERN()_LANE()_PAT_CTRL[EN]. */
3663         uint64_t reserved_50_55        : 6;
3664         uint64_t cycle_cnt_done        : 1;  /**< [ 49: 49](RO/H) Indicates the GSERN()_LANE()_PAT_CTRL[CYCLE_CNT] has expired if
3665                                                                  GSERN()_LANE()_PAT_CTRL[CYCLE_CNT_EN] is asserted. If
3666                                                                  GSERN()_LANE()_PAT_CTRL[CYCLE_CNT_EN] is deasserted,
3667                                                                  GSERN()_LANE()_PAT_DAT[CYCLE_CNT_DONE] will always read as asserted. */
3668         uint64_t lock                  : 1;  /**< [ 48: 48](RO/H) Indicates the pattern memory checker has achieved lock. */
3669         uint64_t err_cnt_ovf           : 1;  /**< [ 47: 47](RO/H) When asserted indicates GSERN()_LANE()_PAT_DAT[ERR_CNT] overflowed and is
3670                                                                  not accurate. */
3671         uint64_t reserved_45_46        : 2;
3672         uint64_t err_cnt               : 45; /**< [ 44:  0](RO/H) Count of bit errors seen in pattern memory loopback testing. If
3673                                                                  GSERN()_LANE()_PAT_CTRL[CYCLE_CNT_EN] and GSERN()_LANE()_PAT_DAT[CYCLE_CNT_DONE]
3674                                                                  are not both asserted, GSERN()_LANE()_PAT_DAT[ERR_CNT] may not be reliable
3675                                                                  unless GSERN()_LANE()_PAT_CTRL[EN] is first deasserted (to stop the error
3676                                                                  counter). */
3677 #else /* Word 0 - Little Endian */
3678         uint64_t err_cnt               : 45; /**< [ 44:  0](RO/H) Count of bit errors seen in pattern memory loopback testing. If
3679                                                                  GSERN()_LANE()_PAT_CTRL[CYCLE_CNT_EN] and GSERN()_LANE()_PAT_DAT[CYCLE_CNT_DONE]
3680                                                                  are not both asserted, GSERN()_LANE()_PAT_DAT[ERR_CNT] may not be reliable
3681                                                                  unless GSERN()_LANE()_PAT_CTRL[EN] is first deasserted (to stop the error
3682                                                                  counter). */
3683         uint64_t reserved_45_46        : 2;
3684         uint64_t err_cnt_ovf           : 1;  /**< [ 47: 47](RO/H) When asserted indicates GSERN()_LANE()_PAT_DAT[ERR_CNT] overflowed and is
3685                                                                  not accurate. */
3686         uint64_t lock                  : 1;  /**< [ 48: 48](RO/H) Indicates the pattern memory checker has achieved lock. */
3687         uint64_t cycle_cnt_done        : 1;  /**< [ 49: 49](RO/H) Indicates the GSERN()_LANE()_PAT_CTRL[CYCLE_CNT] has expired if
3688                                                                  GSERN()_LANE()_PAT_CTRL[CYCLE_CNT_EN] is asserted. If
3689                                                                  GSERN()_LANE()_PAT_CTRL[CYCLE_CNT_EN] is deasserted,
3690                                                                  GSERN()_LANE()_PAT_DAT[CYCLE_CNT_DONE] will always read as asserted. */
3691         uint64_t reserved_50_55        : 6;
3692         uint64_t framing_offset        : 6;  /**< [ 61: 56](RO/H) The offset the pattern memory checker found of the low bits of the pattern data
3693                                                                  in the receive data frame. This field is valid only when [FRAMING_MATCH]
3694                                                                  reads as asserted after enabling pattern memory generation and checking by
3695                                                                  setting GSERN()_LANE()_PAT_CTRL[EN]. */
3696         uint64_t reserved_62           : 1;
3697         uint64_t framing_match         : 1;  /**< [ 63: 63](RO/H) Indicates that the pattern memory checker found a framing match. This field is
3698                                                                  valid only after enabling pattern memory generation and checking by setting
3699                                                                  GSERN()_LANE()_PAT_CTRL[EN]. */
3700 #endif /* Word 0 - End */
3701     } s;
3702     /* struct bdk_gsernx_lanex_pat_dat_s cn; */
3703 };
3704 typedef union bdk_gsernx_lanex_pat_dat bdk_gsernx_lanex_pat_dat_t;
3705 
3706 static inline uint64_t BDK_GSERNX_LANEX_PAT_DAT(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PAT_DAT(unsigned long a,unsigned long b)3707 static inline uint64_t BDK_GSERNX_LANEX_PAT_DAT(unsigned long a, unsigned long b)
3708 {
3709     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
3710         return 0x87e090007fe0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
3711     __bdk_csr_fatal("GSERNX_LANEX_PAT_DAT", 2, a, b, 0, 0);
3712 }
3713 
3714 #define typedef_BDK_GSERNX_LANEX_PAT_DAT(a,b) bdk_gsernx_lanex_pat_dat_t
3715 #define bustype_BDK_GSERNX_LANEX_PAT_DAT(a,b) BDK_CSR_TYPE_RSL
3716 #define basename_BDK_GSERNX_LANEX_PAT_DAT(a,b) "GSERNX_LANEX_PAT_DAT"
3717 #define device_bar_BDK_GSERNX_LANEX_PAT_DAT(a,b) 0x0 /* PF_BAR0 */
3718 #define busnum_BDK_GSERNX_LANEX_PAT_DAT(a,b) (a)
3719 #define arguments_BDK_GSERNX_LANEX_PAT_DAT(a,b) (a),(b),-1,-1
3720 
3721 /**
3722  * Register (RSL) gsern#_lane#_pcie_pcs2_bcfg
3723  *
3724  * GSER Lane PCIe PCS Control 2 Register
3725  * Control settings for PCIe PCS functionality.
3726  */
3727 union bdk_gsernx_lanex_pcie_pcs2_bcfg
3728 {
3729     uint64_t u;
3730     struct bdk_gsernx_lanex_pcie_pcs2_bcfg_s
3731     {
3732 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3733         uint64_t pause_adpt_rxstandby  : 4;  /**< [ 63: 60](R/W) Set to one to allow the PIPE RxStandby to pause all adaptation functions and
3734                                                                  hold the CDRFSM when the PCIe lane is operating at the corresponding rate.
3735                                                                  The individual bits are mapped as follows:
3736                                                                  \<0\> = PCIe gen1.
3737                                                                  \<1\> = PCIe gen2.
3738                                                                  \<2\> = PCIe gen3.
3739                                                                  \<3\> = PCIe gen4. */
3740         uint64_t frc_unalgn_rxstandby  : 4;  /**< [ 59: 56](R/W) Enables use of RxStandby to force the RX PCS into unalign state with
3741                                                                  an individual control bit per PCIe rate mapped as following:
3742                                                                  \<0\> = PCIe gen1.
3743                                                                  \<1\> = PCIe gen2.
3744                                                                  \<2\> = PCIe gen3.
3745                                                                  \<3\> = PCIe gen4. */
3746         uint64_t frc_unalgn_rxelecidle : 4;  /**< [ 55: 52](R/W) Enables use of detected RxElecIdle to force the RX PCS into unalign state
3747                                                                  with an individual control bit per PCIe rate mapped as following:
3748                                                                  \<0\> = PCIe gen1.
3749                                                                  \<1\> = PCIe gen2.
3750                                                                  \<2\> = PCIe gen3.
3751                                                                  \<3\> = PCIe gen4. */
3752         uint64_t frc_unalgn_blkalgnctl : 2;  /**< [ 51: 50](R/W) Enables use of BlockAlignControl assertion to force the RX PCS into unalign state
3753                                                                  with an individual control bit per PCIe rate mapped as following:
3754                                                                  \<0\> = PCIe gen3.
3755                                                                  \<1\> = PCIe gen4. */
3756         uint64_t pipe_tx_sel           : 2;  /**< [ 49: 48](R/W) Selects the source for the transmit PIPE controls:
3757                                                                  \<0\> = PCIe pipe 0 transmit.
3758                                                                  \<1\> = PCIe pipe 1 transmit.
3759                                                                  \<2\> = PCIe pipe 2 transmit.
3760                                                                  \<3\> = Reserved. */
3761         uint64_t reserved_46_47        : 2;
3762         uint64_t gen34_pll_div_f       : 18; /**< [ 45: 28](R/W) PLL feedback divider fractional portion. */
3763         uint64_t reserved_26_27        : 2;
3764         uint64_t gen12_pll_div_f       : 18; /**< [ 25:  8](R/W) PLL feedback divider fractional portion. */
3765         uint64_t pause_adpt_on_idle    : 4;  /**< [  7:  4](R/W) Set to one to allow the Rx Electrical Idle to pause all adaptation functions and
3766                                                                  hold the CDRFSM when the PCIe lane is operating at the corresponding rate.
3767                                                                  The individual bits are mapped as follows:
3768                                                                  \<0\> = PCIe gen1.
3769                                                                  \<1\> = PCIe gen2.
3770                                                                  \<2\> = PCIe gen3.
3771                                                                  \<3\> = PCIe gen4. */
3772         uint64_t do_prevga_gn_adpt     : 4;  /**< [  3:  0](R/W) Set to one to allow the adaptation reset state machine to trigger PREVGA_GN adaptation
3773                                                                  when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted and the PCIe lane is
3774                                                                  operating at the corresponding rate. The individual bits are mapped as follows:
3775                                                                  \<0\> = PCIe gen1.
3776                                                                  \<1\> = PCIe gen2.
3777                                                                  \<2\> = PCIe gen3.
3778                                                                  \<3\> = PCIe gen4. */
3779 #else /* Word 0 - Little Endian */
3780         uint64_t do_prevga_gn_adpt     : 4;  /**< [  3:  0](R/W) Set to one to allow the adaptation reset state machine to trigger PREVGA_GN adaptation
3781                                                                  when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted and the PCIe lane is
3782                                                                  operating at the corresponding rate. The individual bits are mapped as follows:
3783                                                                  \<0\> = PCIe gen1.
3784                                                                  \<1\> = PCIe gen2.
3785                                                                  \<2\> = PCIe gen3.
3786                                                                  \<3\> = PCIe gen4. */
3787         uint64_t pause_adpt_on_idle    : 4;  /**< [  7:  4](R/W) Set to one to allow the Rx Electrical Idle to pause all adaptation functions and
3788                                                                  hold the CDRFSM when the PCIe lane is operating at the corresponding rate.
3789                                                                  The individual bits are mapped as follows:
3790                                                                  \<0\> = PCIe gen1.
3791                                                                  \<1\> = PCIe gen2.
3792                                                                  \<2\> = PCIe gen3.
3793                                                                  \<3\> = PCIe gen4. */
3794         uint64_t gen12_pll_div_f       : 18; /**< [ 25:  8](R/W) PLL feedback divider fractional portion. */
3795         uint64_t reserved_26_27        : 2;
3796         uint64_t gen34_pll_div_f       : 18; /**< [ 45: 28](R/W) PLL feedback divider fractional portion. */
3797         uint64_t reserved_46_47        : 2;
3798         uint64_t pipe_tx_sel           : 2;  /**< [ 49: 48](R/W) Selects the source for the transmit PIPE controls:
3799                                                                  \<0\> = PCIe pipe 0 transmit.
3800                                                                  \<1\> = PCIe pipe 1 transmit.
3801                                                                  \<2\> = PCIe pipe 2 transmit.
3802                                                                  \<3\> = Reserved. */
3803         uint64_t frc_unalgn_blkalgnctl : 2;  /**< [ 51: 50](R/W) Enables use of BlockAlignControl assertion to force the RX PCS into unalign state
3804                                                                  with an individual control bit per PCIe rate mapped as following:
3805                                                                  \<0\> = PCIe gen3.
3806                                                                  \<1\> = PCIe gen4. */
3807         uint64_t frc_unalgn_rxelecidle : 4;  /**< [ 55: 52](R/W) Enables use of detected RxElecIdle to force the RX PCS into unalign state
3808                                                                  with an individual control bit per PCIe rate mapped as following:
3809                                                                  \<0\> = PCIe gen1.
3810                                                                  \<1\> = PCIe gen2.
3811                                                                  \<2\> = PCIe gen3.
3812                                                                  \<3\> = PCIe gen4. */
3813         uint64_t frc_unalgn_rxstandby  : 4;  /**< [ 59: 56](R/W) Enables use of RxStandby to force the RX PCS into unalign state with
3814                                                                  an individual control bit per PCIe rate mapped as following:
3815                                                                  \<0\> = PCIe gen1.
3816                                                                  \<1\> = PCIe gen2.
3817                                                                  \<2\> = PCIe gen3.
3818                                                                  \<3\> = PCIe gen4. */
3819         uint64_t pause_adpt_rxstandby  : 4;  /**< [ 63: 60](R/W) Set to one to allow the PIPE RxStandby to pause all adaptation functions and
3820                                                                  hold the CDRFSM when the PCIe lane is operating at the corresponding rate.
3821                                                                  The individual bits are mapped as follows:
3822                                                                  \<0\> = PCIe gen1.
3823                                                                  \<1\> = PCIe gen2.
3824                                                                  \<2\> = PCIe gen3.
3825                                                                  \<3\> = PCIe gen4. */
3826 #endif /* Word 0 - End */
3827     } s;
3828     /* struct bdk_gsernx_lanex_pcie_pcs2_bcfg_s cn; */
3829 };
3830 typedef union bdk_gsernx_lanex_pcie_pcs2_bcfg bdk_gsernx_lanex_pcie_pcs2_bcfg_t;
3831 
3832 static inline uint64_t BDK_GSERNX_LANEX_PCIE_PCS2_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_PCS2_BCFG(unsigned long a,unsigned long b)3833 static inline uint64_t BDK_GSERNX_LANEX_PCIE_PCS2_BCFG(unsigned long a, unsigned long b)
3834 {
3835     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
3836         return 0x87e090001f20ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
3837     __bdk_csr_fatal("GSERNX_LANEX_PCIE_PCS2_BCFG", 2, a, b, 0, 0);
3838 }
3839 
3840 #define typedef_BDK_GSERNX_LANEX_PCIE_PCS2_BCFG(a,b) bdk_gsernx_lanex_pcie_pcs2_bcfg_t
3841 #define bustype_BDK_GSERNX_LANEX_PCIE_PCS2_BCFG(a,b) BDK_CSR_TYPE_RSL
3842 #define basename_BDK_GSERNX_LANEX_PCIE_PCS2_BCFG(a,b) "GSERNX_LANEX_PCIE_PCS2_BCFG"
3843 #define device_bar_BDK_GSERNX_LANEX_PCIE_PCS2_BCFG(a,b) 0x0 /* PF_BAR0 */
3844 #define busnum_BDK_GSERNX_LANEX_PCIE_PCS2_BCFG(a,b) (a)
3845 #define arguments_BDK_GSERNX_LANEX_PCIE_PCS2_BCFG(a,b) (a),(b),-1,-1
3846 
3847 /**
3848  * Register (RSL) gsern#_lane#_pcie_pcs3_bcfg
3849  *
3850  * GSER Lane PCIe PCS Control 3 Register
3851  * Control settings for PCIe PCS functionality.
3852  */
3853 union bdk_gsernx_lanex_pcie_pcs3_bcfg
3854 {
3855     uint64_t u;
3856     struct bdk_gsernx_lanex_pcie_pcs3_bcfg_s
3857     {
3858 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3859         uint64_t reserved_36_63        : 28;
3860         uint64_t tx_enfast             : 4;  /**< [ 35: 32](R/W) Enables fast slew on the TX preamp output with an individual control bit
3861                                                                  per PCIe rate mapped as following:
3862                                                                  \<0\> = PCIe Gen1.
3863                                                                  \<1\> = PCIe Gen2.
3864                                                                  \<2\> = PCIe Gen3.
3865                                                                  \<3\> = PCIe Gen4. */
3866         uint64_t do_afeos_final        : 4;  /**< [ 31: 28](R/W) Set to one to allow AFEOS adaptation to keep running continuously during the final
3867                                                                  phase of adaptation when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted,
3868                                                                  GSERN()_LANE()_PCIE_PCS_BCFG[DO_AFEOS_ADPT] is set and the PCIe lane is operating
3869                                                                  at the corresponding rate. The individual bits are mapped as follows:
3870                                                                  \<0\> = PCIe Gen1.
3871                                                                  \<1\> = PCIe Gen2.
3872                                                                  \<2\> = PCIe Gen3.
3873                                                                  \<3\> = PCIe Gen4. */
3874         uint64_t do_ctlelte_final      : 4;  /**< [ 27: 24](R/W) Set to one to allow CTLELTE adaptation to keep running continuously during the final
3875                                                                  phase of adaptation when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted,
3876                                                                  GSERN()_LANE()_PCIE_PCS_BCFG[DO_CTLELTE_ADPT] is set and the PCIe lane is operating
3877                                                                  at the corresponding rate. The individual bits are mapped as follows:
3878                                                                  \<0\> = PCIe Gen1.
3879                                                                  \<1\> = PCIe Gen2.
3880                                                                  \<2\> = PCIe Gen3.
3881                                                                  \<3\> = PCIe Gen4. */
3882         uint64_t do_ctlez_final        : 4;  /**< [ 23: 20](R/W) Set to one to allow CTLEZ adaptation to keep running continuously during the final
3883                                                                  phase of adaptation when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted,
3884                                                                  GSERN()_LANE()_PCIE_PCS_BCFG[DO_CTLEZ_ADPT] is set and the PCIe lane is operating
3885                                                                  at the corresponding rate. The individual bits are mapped as follows:
3886                                                                  \<0\> = PCIe Gen1.
3887                                                                  \<1\> = PCIe Gen2.
3888                                                                  \<2\> = PCIe Gen3.
3889                                                                  \<3\> = PCIe Gen4. */
3890         uint64_t do_ctle_final         : 4;  /**< [ 19: 16](R/W) Set to one to allow CTLE adaptation to keep running continuously during the final
3891                                                                  phase of adaptation when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted,
3892                                                                  GSERN()_LANE()_PCIE_PCS_BCFG[DO_CTLE_ADPT] is set and the PCIe lane is operating
3893                                                                  at the corresponding rate. The individual bits are mapped as follows:
3894                                                                  \<0\> = PCIe Gen1.
3895                                                                  \<1\> = PCIe Gen2.
3896                                                                  \<2\> = PCIe Gen3.
3897                                                                  \<3\> = PCIe Gen4. */
3898         uint64_t do_dfe_final          : 4;  /**< [ 15: 12](R/W) Set to one to allow DFE adaptation to keep running continuously during the final
3899                                                                  phase of adaptation when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted,
3900                                                                  GSERN()_LANE()_PCIE_PCS_BCFG[DO_DFE_ADPT] is set and the PCIe lane is operating
3901                                                                  at the corresponding rate. The individual bits are mapped as follows:
3902                                                                  \<0\> = PCIe Gen1.
3903                                                                  \<1\> = PCIe Gen2.
3904                                                                  \<2\> = PCIe Gen3.
3905                                                                  \<3\> = PCIe Gen4. */
3906         uint64_t do_vga_final          : 4;  /**< [ 11:  8](R/W) Set to one to allow VGA adaptation to keep running continuously during the final
3907                                                                  phase of adaptation when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted,
3908                                                                  GSERN()_LANE()_PCIE_PCS_BCFG[DO_VGA_ADPT] is set and the PCIe lane is operating
3909                                                                  at the corresponding rate. The individual bits are mapped as follows:
3910                                                                  \<0\> = PCIe Gen1.
3911                                                                  \<1\> = PCIe Gen2.
3912                                                                  \<2\> = PCIe Gen3.
3913                                                                  \<3\> = PCIe Gen4. */
3914         uint64_t do_blwc_final         : 4;  /**< [  7:  4](R/W) Set to one to allow BLWC adaptation to keep running continuously during the final
3915                                                                  phase of adaptation when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted,
3916                                                                  GSERN()_LANE()_PCIE_PCS_BCFG[DO_BLWC_ADPT] is set and the PCIe lane is operating
3917                                                                  at the corresponding rate. The individual bits are mapped as follows:
3918                                                                  \<0\> = PCIe Gen1.
3919                                                                  \<1\> = PCIe Gen2.
3920                                                                  \<2\> = PCIe Gen3.
3921                                                                  \<3\> = PCIe Gen4. */
3922         uint64_t do_prevga_gn_final    : 4;  /**< [  3:  0](R/W) Set to one to allow PREVGA_GN adaptation to keep running continuously during the final
3923                                                                  phase of adaptation when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted,
3924                                                                  GSERN()_LANE()_PCIE_PCS2_BCFG[DO_PREVGA_GN_ADPT] is set and the PCIe lane is operating
3925                                                                  at the corresponding rate. The individual bits are mapped as follows:
3926                                                                  \<0\> = PCIe Gen1.
3927                                                                  \<1\> = PCIe Gen2.
3928                                                                  \<2\> = PCIe Gen3.
3929                                                                  \<3\> = PCIe Gen4. */
3930 #else /* Word 0 - Little Endian */
3931         uint64_t do_prevga_gn_final    : 4;  /**< [  3:  0](R/W) Set to one to allow PREVGA_GN adaptation to keep running continuously during the final
3932                                                                  phase of adaptation when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted,
3933                                                                  GSERN()_LANE()_PCIE_PCS2_BCFG[DO_PREVGA_GN_ADPT] is set and the PCIe lane is operating
3934                                                                  at the corresponding rate. The individual bits are mapped as follows:
3935                                                                  \<0\> = PCIe Gen1.
3936                                                                  \<1\> = PCIe Gen2.
3937                                                                  \<2\> = PCIe Gen3.
3938                                                                  \<3\> = PCIe Gen4. */
3939         uint64_t do_blwc_final         : 4;  /**< [  7:  4](R/W) Set to one to allow BLWC adaptation to keep running continuously during the final
3940                                                                  phase of adaptation when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted,
3941                                                                  GSERN()_LANE()_PCIE_PCS_BCFG[DO_BLWC_ADPT] is set and the PCIe lane is operating
3942                                                                  at the corresponding rate. The individual bits are mapped as follows:
3943                                                                  \<0\> = PCIe Gen1.
3944                                                                  \<1\> = PCIe Gen2.
3945                                                                  \<2\> = PCIe Gen3.
3946                                                                  \<3\> = PCIe Gen4. */
3947         uint64_t do_vga_final          : 4;  /**< [ 11:  8](R/W) Set to one to allow VGA adaptation to keep running continuously during the final
3948                                                                  phase of adaptation when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted,
3949                                                                  GSERN()_LANE()_PCIE_PCS_BCFG[DO_VGA_ADPT] is set and the PCIe lane is operating
3950                                                                  at the corresponding rate. The individual bits are mapped as follows:
3951                                                                  \<0\> = PCIe Gen1.
3952                                                                  \<1\> = PCIe Gen2.
3953                                                                  \<2\> = PCIe Gen3.
3954                                                                  \<3\> = PCIe Gen4. */
3955         uint64_t do_dfe_final          : 4;  /**< [ 15: 12](R/W) Set to one to allow DFE adaptation to keep running continuously during the final
3956                                                                  phase of adaptation when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted,
3957                                                                  GSERN()_LANE()_PCIE_PCS_BCFG[DO_DFE_ADPT] is set and the PCIe lane is operating
3958                                                                  at the corresponding rate. The individual bits are mapped as follows:
3959                                                                  \<0\> = PCIe Gen1.
3960                                                                  \<1\> = PCIe Gen2.
3961                                                                  \<2\> = PCIe Gen3.
3962                                                                  \<3\> = PCIe Gen4. */
3963         uint64_t do_ctle_final         : 4;  /**< [ 19: 16](R/W) Set to one to allow CTLE adaptation to keep running continuously during the final
3964                                                                  phase of adaptation when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted,
3965                                                                  GSERN()_LANE()_PCIE_PCS_BCFG[DO_CTLE_ADPT] is set and the PCIe lane is operating
3966                                                                  at the corresponding rate. The individual bits are mapped as follows:
3967                                                                  \<0\> = PCIe Gen1.
3968                                                                  \<1\> = PCIe Gen2.
3969                                                                  \<2\> = PCIe Gen3.
3970                                                                  \<3\> = PCIe Gen4. */
3971         uint64_t do_ctlez_final        : 4;  /**< [ 23: 20](R/W) Set to one to allow CTLEZ adaptation to keep running continuously during the final
3972                                                                  phase of adaptation when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted,
3973                                                                  GSERN()_LANE()_PCIE_PCS_BCFG[DO_CTLEZ_ADPT] is set and the PCIe lane is operating
3974                                                                  at the corresponding rate. The individual bits are mapped as follows:
3975                                                                  \<0\> = PCIe Gen1.
3976                                                                  \<1\> = PCIe Gen2.
3977                                                                  \<2\> = PCIe Gen3.
3978                                                                  \<3\> = PCIe Gen4. */
3979         uint64_t do_ctlelte_final      : 4;  /**< [ 27: 24](R/W) Set to one to allow CTLELTE adaptation to keep running continuously during the final
3980                                                                  phase of adaptation when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted,
3981                                                                  GSERN()_LANE()_PCIE_PCS_BCFG[DO_CTLELTE_ADPT] is set and the PCIe lane is operating
3982                                                                  at the corresponding rate. The individual bits are mapped as follows:
3983                                                                  \<0\> = PCIe Gen1.
3984                                                                  \<1\> = PCIe Gen2.
3985                                                                  \<2\> = PCIe Gen3.
3986                                                                  \<3\> = PCIe Gen4. */
3987         uint64_t do_afeos_final        : 4;  /**< [ 31: 28](R/W) Set to one to allow AFEOS adaptation to keep running continuously during the final
3988                                                                  phase of adaptation when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted,
3989                                                                  GSERN()_LANE()_PCIE_PCS_BCFG[DO_AFEOS_ADPT] is set and the PCIe lane is operating
3990                                                                  at the corresponding rate. The individual bits are mapped as follows:
3991                                                                  \<0\> = PCIe Gen1.
3992                                                                  \<1\> = PCIe Gen2.
3993                                                                  \<2\> = PCIe Gen3.
3994                                                                  \<3\> = PCIe Gen4. */
3995         uint64_t tx_enfast             : 4;  /**< [ 35: 32](R/W) Enables fast slew on the TX preamp output with an individual control bit
3996                                                                  per PCIe rate mapped as following:
3997                                                                  \<0\> = PCIe Gen1.
3998                                                                  \<1\> = PCIe Gen2.
3999                                                                  \<2\> = PCIe Gen3.
4000                                                                  \<3\> = PCIe Gen4. */
4001         uint64_t reserved_36_63        : 28;
4002 #endif /* Word 0 - End */
4003     } s;
4004     /* struct bdk_gsernx_lanex_pcie_pcs3_bcfg_s cn; */
4005 };
4006 typedef union bdk_gsernx_lanex_pcie_pcs3_bcfg bdk_gsernx_lanex_pcie_pcs3_bcfg_t;
4007 
4008 static inline uint64_t BDK_GSERNX_LANEX_PCIE_PCS3_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_PCS3_BCFG(unsigned long a,unsigned long b)4009 static inline uint64_t BDK_GSERNX_LANEX_PCIE_PCS3_BCFG(unsigned long a, unsigned long b)
4010 {
4011     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
4012         return 0x87e090001f30ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
4013     __bdk_csr_fatal("GSERNX_LANEX_PCIE_PCS3_BCFG", 2, a, b, 0, 0);
4014 }
4015 
4016 #define typedef_BDK_GSERNX_LANEX_PCIE_PCS3_BCFG(a,b) bdk_gsernx_lanex_pcie_pcs3_bcfg_t
4017 #define bustype_BDK_GSERNX_LANEX_PCIE_PCS3_BCFG(a,b) BDK_CSR_TYPE_RSL
4018 #define basename_BDK_GSERNX_LANEX_PCIE_PCS3_BCFG(a,b) "GSERNX_LANEX_PCIE_PCS3_BCFG"
4019 #define device_bar_BDK_GSERNX_LANEX_PCIE_PCS3_BCFG(a,b) 0x0 /* PF_BAR0 */
4020 #define busnum_BDK_GSERNX_LANEX_PCIE_PCS3_BCFG(a,b) (a)
4021 #define arguments_BDK_GSERNX_LANEX_PCIE_PCS3_BCFG(a,b) (a),(b),-1,-1
4022 
4023 /**
4024  * Register (RSL) gsern#_lane#_pcie_pcs_bcfg
4025  *
4026  * GSER Lane PCIe PCS Control Register
4027  * Control settings for PCIe PCS functionality.
4028  */
4029 union bdk_gsernx_lanex_pcie_pcs_bcfg
4030 {
4031     uint64_t u;
4032     struct bdk_gsernx_lanex_pcie_pcs_bcfg_s
4033     {
4034 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
4035         uint64_t do_afeos_adpt         : 4;  /**< [ 63: 60](R/W) Set to one to allow the adaptation reset state machine to trigger AFEOS adaptation
4036                                                                  when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted and the PCIe lane is
4037                                                                  operating at the corresponding rate. The individual bits are mapped as follows:
4038                                                                  \<0\> = PCIe gen1.
4039                                                                  \<1\> = PCIe gen2.
4040                                                                  \<2\> = PCIe gen3.
4041                                                                  \<3\> = PCIe gen4. */
4042         uint64_t do_ctlelte_adpt       : 4;  /**< [ 59: 56](R/W) Set to one to allow the adaptation reset state machine to trigger CTLELTE adaptation
4043                                                                  when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted and the PCIe lane is
4044                                                                  operating at the corresponding rate. The individual bits are mapped as follows:
4045                                                                  \<0\> = PCIe gen1.
4046                                                                  \<1\> = PCIe gen2.
4047                                                                  \<2\> = PCIe gen3.
4048                                                                  \<3\> = PCIe gen4. */
4049         uint64_t do_ctlez_adpt         : 4;  /**< [ 55: 52](R/W) Set to one to allow the adaptation reset state machine to trigger CTLEZ adaptation
4050                                                                  when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted and the PCIe lane is
4051                                                                  operating at the corresponding rate. The individual bits are mapped as follows:
4052                                                                  \<0\> = PCIe gen1.
4053                                                                  \<1\> = PCIe gen2.
4054                                                                  \<2\> = PCIe gen3.
4055                                                                  \<3\> = PCIe gen4. */
4056         uint64_t do_ctle_adpt          : 4;  /**< [ 51: 48](R/W) Set to one to allow the adaptation reset state machine to trigger CTLE adaptation
4057                                                                  when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted and the PCIe lane is
4058                                                                  operating at the corresponding rate. The individual bits are mapped as follows:
4059                                                                  \<0\> = PCIe gen1.
4060                                                                  \<1\> = PCIe gen2.
4061                                                                  \<2\> = PCIe gen3.
4062                                                                  \<3\> = PCIe gen4. */
4063         uint64_t do_dfe_adpt           : 4;  /**< [ 47: 44](R/W) Set to one to allow the adaptation reset state machine to trigger DFE adaptation
4064                                                                  when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted and the PCIe lane is
4065                                                                  operating at the corresponding rate. The individual bits are mapped as follows:
4066                                                                  \<0\> = PCIe gen1.
4067                                                                  \<1\> = PCIe gen2.
4068                                                                  \<2\> = PCIe gen3.
4069                                                                  \<3\> = PCIe gen4. */
4070         uint64_t do_vga_adpt           : 4;  /**< [ 43: 40](R/W) Set to one to allow the adaptation reset state machine to trigger VGA adaptation
4071                                                                  when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted and the PCIe lane is
4072                                                                  operating at the corresponding rate. The individual bits are mapped as follows:
4073                                                                  \<0\> = PCIe gen1.
4074                                                                  \<1\> = PCIe gen2.
4075                                                                  \<2\> = PCIe gen3.
4076                                                                  \<3\> = PCIe gen4. */
4077         uint64_t do_blwc_adpt          : 4;  /**< [ 39: 36](R/W) Set to one to allow the adaptation reset state machine to trigger BLWC adaptation
4078                                                                  when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted and the PCIe lane is
4079                                                                  operating at the corresponding rate. The individual bits are mapped as follows:
4080                                                                  \<0\> = PCIe gen1.
4081                                                                  \<1\> = PCIe gen2.
4082                                                                  \<2\> = PCIe gen3.
4083                                                                  \<3\> = PCIe gen4. */
4084         uint64_t gen34_pll_div_n       : 9;  /**< [ 35: 27](R/W) PLL feedback divider integer portion. */
4085         uint64_t reserved_25_26        : 2;
4086         uint64_t gen12_pll_div_n       : 9;  /**< [ 24: 16](R/W) PLL feedback divider integer portion. */
4087         uint64_t skp_add_thr           : 4;  /**< [ 15: 12](R/W) SKP addition threshold.
4088                                                                  The receive elastic store will add a SKP symbol (Gen1/2) or add four
4089                                                                  SKP symbols (Gen3/4) when the store fill level is less than or equal
4090                                                                  to this value. */
4091         uint64_t skp_del_thr           : 4;  /**< [ 11:  8](R/W) SKP deletion threshold.
4092                                                                  The receive elastic store will delete a SKP symbol (Gen1/2) or delete
4093                                                                  four SKP symbols (Gen3/4) when the store fill level is greater than or
4094                                                                  equal to this value plus 8. */
4095         uint64_t comma_thr             : 4;  /**< [  7:  4](R/W) COMMA detection threshold. The receive aligner must see this many
4096                                                                  COMMA characters at the same rotation before declaring symbol
4097                                                                  alignment (only used for Gen1/2). */
4098         uint64_t error_thr             : 4;  /**< [  3:  0](R/W) Error threshold. The receive aligner must see this many COMMA
4099                                                                  characters at a different rotation than currently in use before
4100                                                                  declaring loss of symbol alignment (Gen1/2). For Gen3/4 this is
4101                                                                  the number of invalid Sync Headers needed to cause the aligner
4102                                                                  to enter the Unaligned Phase and declare an alignment error. */
4103 #else /* Word 0 - Little Endian */
4104         uint64_t error_thr             : 4;  /**< [  3:  0](R/W) Error threshold. The receive aligner must see this many COMMA
4105                                                                  characters at a different rotation than currently in use before
4106                                                                  declaring loss of symbol alignment (Gen1/2). For Gen3/4 this is
4107                                                                  the number of invalid Sync Headers needed to cause the aligner
4108                                                                  to enter the Unaligned Phase and declare an alignment error. */
4109         uint64_t comma_thr             : 4;  /**< [  7:  4](R/W) COMMA detection threshold. The receive aligner must see this many
4110                                                                  COMMA characters at the same rotation before declaring symbol
4111                                                                  alignment (only used for Gen1/2). */
4112         uint64_t skp_del_thr           : 4;  /**< [ 11:  8](R/W) SKP deletion threshold.
4113                                                                  The receive elastic store will delete a SKP symbol (Gen1/2) or delete
4114                                                                  four SKP symbols (Gen3/4) when the store fill level is greater than or
4115                                                                  equal to this value plus 8. */
4116         uint64_t skp_add_thr           : 4;  /**< [ 15: 12](R/W) SKP addition threshold.
4117                                                                  The receive elastic store will add a SKP symbol (Gen1/2) or add four
4118                                                                  SKP symbols (Gen3/4) when the store fill level is less than or equal
4119                                                                  to this value. */
4120         uint64_t gen12_pll_div_n       : 9;  /**< [ 24: 16](R/W) PLL feedback divider integer portion. */
4121         uint64_t reserved_25_26        : 2;
4122         uint64_t gen34_pll_div_n       : 9;  /**< [ 35: 27](R/W) PLL feedback divider integer portion. */
4123         uint64_t do_blwc_adpt          : 4;  /**< [ 39: 36](R/W) Set to one to allow the adaptation reset state machine to trigger BLWC adaptation
4124                                                                  when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted and the PCIe lane is
4125                                                                  operating at the corresponding rate. The individual bits are mapped as follows:
4126                                                                  \<0\> = PCIe gen1.
4127                                                                  \<1\> = PCIe gen2.
4128                                                                  \<2\> = PCIe gen3.
4129                                                                  \<3\> = PCIe gen4. */
4130         uint64_t do_vga_adpt           : 4;  /**< [ 43: 40](R/W) Set to one to allow the adaptation reset state machine to trigger VGA adaptation
4131                                                                  when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted and the PCIe lane is
4132                                                                  operating at the corresponding rate. The individual bits are mapped as follows:
4133                                                                  \<0\> = PCIe gen1.
4134                                                                  \<1\> = PCIe gen2.
4135                                                                  \<2\> = PCIe gen3.
4136                                                                  \<3\> = PCIe gen4. */
4137         uint64_t do_dfe_adpt           : 4;  /**< [ 47: 44](R/W) Set to one to allow the adaptation reset state machine to trigger DFE adaptation
4138                                                                  when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted and the PCIe lane is
4139                                                                  operating at the corresponding rate. The individual bits are mapped as follows:
4140                                                                  \<0\> = PCIe gen1.
4141                                                                  \<1\> = PCIe gen2.
4142                                                                  \<2\> = PCIe gen3.
4143                                                                  \<3\> = PCIe gen4. */
4144         uint64_t do_ctle_adpt          : 4;  /**< [ 51: 48](R/W) Set to one to allow the adaptation reset state machine to trigger CTLE adaptation
4145                                                                  when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted and the PCIe lane is
4146                                                                  operating at the corresponding rate. The individual bits are mapped as follows:
4147                                                                  \<0\> = PCIe gen1.
4148                                                                  \<1\> = PCIe gen2.
4149                                                                  \<2\> = PCIe gen3.
4150                                                                  \<3\> = PCIe gen4. */
4151         uint64_t do_ctlez_adpt         : 4;  /**< [ 55: 52](R/W) Set to one to allow the adaptation reset state machine to trigger CTLEZ adaptation
4152                                                                  when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted and the PCIe lane is
4153                                                                  operating at the corresponding rate. The individual bits are mapped as follows:
4154                                                                  \<0\> = PCIe gen1.
4155                                                                  \<1\> = PCIe gen2.
4156                                                                  \<2\> = PCIe gen3.
4157                                                                  \<3\> = PCIe gen4. */
4158         uint64_t do_ctlelte_adpt       : 4;  /**< [ 59: 56](R/W) Set to one to allow the adaptation reset state machine to trigger CTLELTE adaptation
4159                                                                  when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted and the PCIe lane is
4160                                                                  operating at the corresponding rate. The individual bits are mapped as follows:
4161                                                                  \<0\> = PCIe gen1.
4162                                                                  \<1\> = PCIe gen2.
4163                                                                  \<2\> = PCIe gen3.
4164                                                                  \<3\> = PCIe gen4. */
4165         uint64_t do_afeos_adpt         : 4;  /**< [ 63: 60](R/W) Set to one to allow the adaptation reset state machine to trigger AFEOS adaptation
4166                                                                  when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted and the PCIe lane is
4167                                                                  operating at the corresponding rate. The individual bits are mapped as follows:
4168                                                                  \<0\> = PCIe gen1.
4169                                                                  \<1\> = PCIe gen2.
4170                                                                  \<2\> = PCIe gen3.
4171                                                                  \<3\> = PCIe gen4. */
4172 #endif /* Word 0 - End */
4173     } s;
4174     /* struct bdk_gsernx_lanex_pcie_pcs_bcfg_s cn; */
4175 };
4176 typedef union bdk_gsernx_lanex_pcie_pcs_bcfg bdk_gsernx_lanex_pcie_pcs_bcfg_t;
4177 
4178 static inline uint64_t BDK_GSERNX_LANEX_PCIE_PCS_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_PCS_BCFG(unsigned long a,unsigned long b)4179 static inline uint64_t BDK_GSERNX_LANEX_PCIE_PCS_BCFG(unsigned long a, unsigned long b)
4180 {
4181     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
4182         return 0x87e090001f10ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
4183     __bdk_csr_fatal("GSERNX_LANEX_PCIE_PCS_BCFG", 2, a, b, 0, 0);
4184 }
4185 
4186 #define typedef_BDK_GSERNX_LANEX_PCIE_PCS_BCFG(a,b) bdk_gsernx_lanex_pcie_pcs_bcfg_t
4187 #define bustype_BDK_GSERNX_LANEX_PCIE_PCS_BCFG(a,b) BDK_CSR_TYPE_RSL
4188 #define basename_BDK_GSERNX_LANEX_PCIE_PCS_BCFG(a,b) "GSERNX_LANEX_PCIE_PCS_BCFG"
4189 #define device_bar_BDK_GSERNX_LANEX_PCIE_PCS_BCFG(a,b) 0x0 /* PF_BAR0 */
4190 #define busnum_BDK_GSERNX_LANEX_PCIE_PCS_BCFG(a,b) (a)
4191 #define arguments_BDK_GSERNX_LANEX_PCIE_PCS_BCFG(a,b) (a),(b),-1,-1
4192 
4193 /**
4194  * Register (RSL) gsern#_lane#_pcie_pcs_bsts
4195  *
4196  * GSER Lane PCIe PCS Status Register
4197  * Error Status for PCIe PCS functionality.
4198  */
4199 union bdk_gsernx_lanex_pcie_pcs_bsts
4200 {
4201     uint64_t u;
4202     struct bdk_gsernx_lanex_pcie_pcs_bsts_s
4203     {
4204 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
4205         uint64_t reserved_28_63        : 36;
4206         uint64_t pcs_rx_eq_raw_fom     : 12; /**< [ 27: 16](RO/H) Raw 12-bit figure of merit for last receiver equalization evaluation. */
4207         uint64_t reserved_5_15         : 11;
4208         uint64_t pcs_8b10b_disp_error  : 1;  /**< [  4:  4](R/W1C/H) 8B10B disparity error (PCIe Gen1/2 only).
4209                                                                  A valid 8B10B code word was received with invalid disparity. */
4210         uint64_t pcs_decode_error      : 1;  /**< [  3:  3](R/W1C/H) 8B10B decode error (PCIe Gen1/2).
4211                                                                  An invalid 8B10B code word was detected. The invalid code word was
4212                                                                  replaced by an EDB symbol (0xFE).
4213 
4214                                                                  128B130B decode error (PCIe Gen3/4).
4215                                                                  An error was detected in the first 4N+1 symbols of a SKP ordered set. */
4216         uint64_t es_underflow          : 1;  /**< [  2:  2](R/W1C/H) Elastic store underflow.
4217                                                                  A read was attempted from the receive Elastic Store while it was empty.
4218                                                                  This would indicate a receive data rate slower than supported or a
4219                                                                  lack of SKP ordered sets to allow SKP symbol additions. */
4220         uint64_t es_overflow           : 1;  /**< [  1:  1](R/W1C/H) Elastic store overflow.
4221                                                                  A write was attempted to the receive Elastic Store while it was full.
4222                                                                  This would indicate a receive data rate faster than supported or a
4223                                                                  lack of SKP ordered sets to allow SKP symbol deletions. */
4224         uint64_t align_error           : 1;  /**< [  0:  0](R/W1C/H) Alignment error.
4225                                                                  The receive aligner has detected an error. For PCIe Gen1/2, an error is
4226                                                                  declared if GSERN()_LANE()_PCIE_PCS_BCFG[ERROR_THR]
4227                                                                  COMMA characters are detected at a 10 bit rotation that does not match
4228                                                                  the active rotation. The COMMAs do not have to all be at the same rotation.
4229                                                                  For PCIe Gen3/4, an error is declared if GSERN()_LANE()_PCIE_PCS_BCFG[ERROR_THR]
4230                                                                  invalid sync headers are detected at the current block alignment. */
4231 #else /* Word 0 - Little Endian */
4232         uint64_t align_error           : 1;  /**< [  0:  0](R/W1C/H) Alignment error.
4233                                                                  The receive aligner has detected an error. For PCIe Gen1/2, an error is
4234                                                                  declared if GSERN()_LANE()_PCIE_PCS_BCFG[ERROR_THR]
4235                                                                  COMMA characters are detected at a 10 bit rotation that does not match
4236                                                                  the active rotation. The COMMAs do not have to all be at the same rotation.
4237                                                                  For PCIe Gen3/4, an error is declared if GSERN()_LANE()_PCIE_PCS_BCFG[ERROR_THR]
4238                                                                  invalid sync headers are detected at the current block alignment. */
4239         uint64_t es_overflow           : 1;  /**< [  1:  1](R/W1C/H) Elastic store overflow.
4240                                                                  A write was attempted to the receive Elastic Store while it was full.
4241                                                                  This would indicate a receive data rate faster than supported or a
4242                                                                  lack of SKP ordered sets to allow SKP symbol deletions. */
4243         uint64_t es_underflow          : 1;  /**< [  2:  2](R/W1C/H) Elastic store underflow.
4244                                                                  A read was attempted from the receive Elastic Store while it was empty.
4245                                                                  This would indicate a receive data rate slower than supported or a
4246                                                                  lack of SKP ordered sets to allow SKP symbol additions. */
4247         uint64_t pcs_decode_error      : 1;  /**< [  3:  3](R/W1C/H) 8B10B decode error (PCIe Gen1/2).
4248                                                                  An invalid 8B10B code word was detected. The invalid code word was
4249                                                                  replaced by an EDB symbol (0xFE).
4250 
4251                                                                  128B130B decode error (PCIe Gen3/4).
4252                                                                  An error was detected in the first 4N+1 symbols of a SKP ordered set. */
4253         uint64_t pcs_8b10b_disp_error  : 1;  /**< [  4:  4](R/W1C/H) 8B10B disparity error (PCIe Gen1/2 only).
4254                                                                  A valid 8B10B code word was received with invalid disparity. */
4255         uint64_t reserved_5_15         : 11;
4256         uint64_t pcs_rx_eq_raw_fom     : 12; /**< [ 27: 16](RO/H) Raw 12-bit figure of merit for last receiver equalization evaluation. */
4257         uint64_t reserved_28_63        : 36;
4258 #endif /* Word 0 - End */
4259     } s;
4260     /* struct bdk_gsernx_lanex_pcie_pcs_bsts_s cn; */
4261 };
4262 typedef union bdk_gsernx_lanex_pcie_pcs_bsts bdk_gsernx_lanex_pcie_pcs_bsts_t;
4263 
4264 static inline uint64_t BDK_GSERNX_LANEX_PCIE_PCS_BSTS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_PCS_BSTS(unsigned long a,unsigned long b)4265 static inline uint64_t BDK_GSERNX_LANEX_PCIE_PCS_BSTS(unsigned long a, unsigned long b)
4266 {
4267     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
4268         return 0x87e090002a30ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
4269     __bdk_csr_fatal("GSERNX_LANEX_PCIE_PCS_BSTS", 2, a, b, 0, 0);
4270 }
4271 
4272 #define typedef_BDK_GSERNX_LANEX_PCIE_PCS_BSTS(a,b) bdk_gsernx_lanex_pcie_pcs_bsts_t
4273 #define bustype_BDK_GSERNX_LANEX_PCIE_PCS_BSTS(a,b) BDK_CSR_TYPE_RSL
4274 #define basename_BDK_GSERNX_LANEX_PCIE_PCS_BSTS(a,b) "GSERNX_LANEX_PCIE_PCS_BSTS"
4275 #define device_bar_BDK_GSERNX_LANEX_PCIE_PCS_BSTS(a,b) 0x0 /* PF_BAR0 */
4276 #define busnum_BDK_GSERNX_LANEX_PCIE_PCS_BSTS(a,b) (a)
4277 #define arguments_BDK_GSERNX_LANEX_PCIE_PCS_BSTS(a,b) (a),(b),-1,-1
4278 
4279 /**
4280  * Register (RSL) gsern#_lane#_pcie_rstp1_bcfg
4281  *
4282  * GSER Lane PCIe PowerDown P1 Reset States Control Register
4283  * Controls the Reset states (Lane PLL, Tx, Rx, Adapt and Eye Monitor) corresponding to
4284  * PCIe PowerDown state P1.
4285  */
4286 union bdk_gsernx_lanex_pcie_rstp1_bcfg
4287 {
4288     uint64_t u;
4289     struct bdk_gsernx_lanex_pcie_rstp1_bcfg_s
4290     {
4291 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
4292         uint64_t reserved_35_63        : 29;
4293         uint64_t txcmnmode_disable     : 1;  /**< [ 34: 34](R/W) Reserved.
4294                                                                  Internal:
4295                                                                  Set to disable Tx Common Mode voltage during P1 PowerDown state. */
4296         uint64_t rxidledet_disable     : 1;  /**< [ 33: 33](R/W) Reserved.
4297                                                                  Internal:
4298                                                                  Set to disable Rx Electric Idle detection during P1 PowerDown state. */
4299         uint64_t adapt_rst             : 1;  /**< [ 32: 32](R/W) Reserved.
4300                                                                  Internal:
4301                                                                  FIXME - add more details
4302                                                                  Rx Adapt state Pause (0) or Hard Reset (1) during P1 PowerDown state. */
4303         uint64_t reserved_29_31        : 3;
4304         uint64_t eye_rst               : 5;  /**< [ 28: 24](R/W) Reserved.
4305                                                                  Internal:
4306                                                                  FIXME - add more details
4307                                                                  Eye monitor reset state during P1 PowerDown state. */
4308         uint64_t reserved_21_23        : 3;
4309         uint64_t rx_rst                : 5;  /**< [ 20: 16](R/W) Reserved.
4310                                                                  Internal:
4311                                                                  FIXME - add more details
4312                                                                  RX reset state during P1 PowerDown state. */
4313         uint64_t reserved_12_15        : 4;
4314         uint64_t tx_rst                : 4;  /**< [ 11:  8](R/W) Reserved.
4315                                                                  Internal:
4316                                                                  FIXME - add more details
4317                                                                  TX reset state during P1 PowerDown state, but is only used when P1 is entered for
4318                                                                  lanes that were active in a link and that link has now returned to LTSSM.DETECT
4319                                                                  state and there are other lanes rejoining the link after having been turned off. */
4320         uint64_t reserved_4_7          : 4;
4321         uint64_t lnpll_rst             : 4;  /**< [  3:  0](R/W) Reserved.
4322                                                                  Internal:
4323                                                                  FIXME - add more details
4324                                                                  LANE PLL reset state during P1 PowerDown state, but is only used when P1 is entered
4325                                                                  for lanes that were active in a link and that link has now returned to LTSSM.DETECT
4326                                                                  state and there are other lanes rejoining the link after having been turned off.
4327                                                                  Note: this value is never likely to be changed from the normal run state (0x8). */
4328 #else /* Word 0 - Little Endian */
4329         uint64_t lnpll_rst             : 4;  /**< [  3:  0](R/W) Reserved.
4330                                                                  Internal:
4331                                                                  FIXME - add more details
4332                                                                  LANE PLL reset state during P1 PowerDown state, but is only used when P1 is entered
4333                                                                  for lanes that were active in a link and that link has now returned to LTSSM.DETECT
4334                                                                  state and there are other lanes rejoining the link after having been turned off.
4335                                                                  Note: this value is never likely to be changed from the normal run state (0x8). */
4336         uint64_t reserved_4_7          : 4;
4337         uint64_t tx_rst                : 4;  /**< [ 11:  8](R/W) Reserved.
4338                                                                  Internal:
4339                                                                  FIXME - add more details
4340                                                                  TX reset state during P1 PowerDown state, but is only used when P1 is entered for
4341                                                                  lanes that were active in a link and that link has now returned to LTSSM.DETECT
4342                                                                  state and there are other lanes rejoining the link after having been turned off. */
4343         uint64_t reserved_12_15        : 4;
4344         uint64_t rx_rst                : 5;  /**< [ 20: 16](R/W) Reserved.
4345                                                                  Internal:
4346                                                                  FIXME - add more details
4347                                                                  RX reset state during P1 PowerDown state. */
4348         uint64_t reserved_21_23        : 3;
4349         uint64_t eye_rst               : 5;  /**< [ 28: 24](R/W) Reserved.
4350                                                                  Internal:
4351                                                                  FIXME - add more details
4352                                                                  Eye monitor reset state during P1 PowerDown state. */
4353         uint64_t reserved_29_31        : 3;
4354         uint64_t adapt_rst             : 1;  /**< [ 32: 32](R/W) Reserved.
4355                                                                  Internal:
4356                                                                  FIXME - add more details
4357                                                                  Rx Adapt state Pause (0) or Hard Reset (1) during P1 PowerDown state. */
4358         uint64_t rxidledet_disable     : 1;  /**< [ 33: 33](R/W) Reserved.
4359                                                                  Internal:
4360                                                                  Set to disable Rx Electric Idle detection during P1 PowerDown state. */
4361         uint64_t txcmnmode_disable     : 1;  /**< [ 34: 34](R/W) Reserved.
4362                                                                  Internal:
4363                                                                  Set to disable Tx Common Mode voltage during P1 PowerDown state. */
4364         uint64_t reserved_35_63        : 29;
4365 #endif /* Word 0 - End */
4366     } s;
4367     /* struct bdk_gsernx_lanex_pcie_rstp1_bcfg_s cn; */
4368 };
4369 typedef union bdk_gsernx_lanex_pcie_rstp1_bcfg bdk_gsernx_lanex_pcie_rstp1_bcfg_t;
4370 
4371 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RSTP1_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_RSTP1_BCFG(unsigned long a,unsigned long b)4372 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RSTP1_BCFG(unsigned long a, unsigned long b)
4373 {
4374     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
4375         return 0x87e090002030ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
4376     __bdk_csr_fatal("GSERNX_LANEX_PCIE_RSTP1_BCFG", 2, a, b, 0, 0);
4377 }
4378 
4379 #define typedef_BDK_GSERNX_LANEX_PCIE_RSTP1_BCFG(a,b) bdk_gsernx_lanex_pcie_rstp1_bcfg_t
4380 #define bustype_BDK_GSERNX_LANEX_PCIE_RSTP1_BCFG(a,b) BDK_CSR_TYPE_RSL
4381 #define basename_BDK_GSERNX_LANEX_PCIE_RSTP1_BCFG(a,b) "GSERNX_LANEX_PCIE_RSTP1_BCFG"
4382 #define device_bar_BDK_GSERNX_LANEX_PCIE_RSTP1_BCFG(a,b) 0x0 /* PF_BAR0 */
4383 #define busnum_BDK_GSERNX_LANEX_PCIE_RSTP1_BCFG(a,b) (a)
4384 #define arguments_BDK_GSERNX_LANEX_PCIE_RSTP1_BCFG(a,b) (a),(b),-1,-1
4385 
4386 /**
4387  * Register (RSL) gsern#_lane#_pcie_rstp1s0_bcfg
4388  *
4389  * GSER Lane PCIe PowerDown P1 CPM Reset States Control Register
4390  * Controls the Reset states (Lane PLL, Tx, Rx, Adapt and Eye Monitor) corresponding to
4391  * PCIe PowerDown state P1 CPM (P1 substates entry).
4392  */
4393 union bdk_gsernx_lanex_pcie_rstp1s0_bcfg
4394 {
4395     uint64_t u;
4396     struct bdk_gsernx_lanex_pcie_rstp1s0_bcfg_s
4397     {
4398 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
4399         uint64_t reserved_35_63        : 29;
4400         uint64_t txcmnmode_disable     : 1;  /**< [ 34: 34](R/W) Reserved.
4401                                                                  Internal:
4402                                                                  Set to disable Tx Common Mode voltage during P1 CPM PowerDown state. */
4403         uint64_t rxidledet_disable     : 1;  /**< [ 33: 33](R/W) Reserved.
4404                                                                  Internal:
4405                                                                  Set to disable Rx Electric Idle detection during P1 CPM PowerDown state. */
4406         uint64_t adapt_rst             : 1;  /**< [ 32: 32](R/W) Reserved.
4407                                                                  Internal:
4408                                                                  FIXME - add more details
4409                                                                  Rx Adapt state Pause (0) or Hard Reset (1) during P1 CPM PowerDown state. */
4410         uint64_t reserved_29_31        : 3;
4411         uint64_t eye_rst               : 5;  /**< [ 28: 24](R/W) Reserved.
4412                                                                  Internal:
4413                                                                  FIXME - add more details
4414                                                                  Eye monitor reset state during P1 CPM PowerDown state. */
4415         uint64_t reserved_21_23        : 3;
4416         uint64_t rx_rst                : 5;  /**< [ 20: 16](R/W) Reserved.
4417                                                                  Internal:
4418                                                                  FIXME - add more details
4419                                                                  RX reset state during P1 CPM PowerDown state. */
4420         uint64_t reserved_12_15        : 4;
4421         uint64_t tx_rst                : 4;  /**< [ 11:  8](R/W) Reserved.
4422                                                                  Internal:
4423                                                                  FIXME - add more details
4424                                                                  TX reset state during P1 CPM PowerDown state. */
4425         uint64_t reserved_4_7          : 4;
4426         uint64_t lnpll_rst             : 4;  /**< [  3:  0](R/W) Reserved.
4427                                                                  Internal:
4428                                                                  FIXME - add more details
4429                                                                  LANE PLL reset state during P1 CPM PowerDown state. */
4430 #else /* Word 0 - Little Endian */
4431         uint64_t lnpll_rst             : 4;  /**< [  3:  0](R/W) Reserved.
4432                                                                  Internal:
4433                                                                  FIXME - add more details
4434                                                                  LANE PLL reset state during P1 CPM PowerDown state. */
4435         uint64_t reserved_4_7          : 4;
4436         uint64_t tx_rst                : 4;  /**< [ 11:  8](R/W) Reserved.
4437                                                                  Internal:
4438                                                                  FIXME - add more details
4439                                                                  TX reset state during P1 CPM PowerDown state. */
4440         uint64_t reserved_12_15        : 4;
4441         uint64_t rx_rst                : 5;  /**< [ 20: 16](R/W) Reserved.
4442                                                                  Internal:
4443                                                                  FIXME - add more details
4444                                                                  RX reset state during P1 CPM PowerDown state. */
4445         uint64_t reserved_21_23        : 3;
4446         uint64_t eye_rst               : 5;  /**< [ 28: 24](R/W) Reserved.
4447                                                                  Internal:
4448                                                                  FIXME - add more details
4449                                                                  Eye monitor reset state during P1 CPM PowerDown state. */
4450         uint64_t reserved_29_31        : 3;
4451         uint64_t adapt_rst             : 1;  /**< [ 32: 32](R/W) Reserved.
4452                                                                  Internal:
4453                                                                  FIXME - add more details
4454                                                                  Rx Adapt state Pause (0) or Hard Reset (1) during P1 CPM PowerDown state. */
4455         uint64_t rxidledet_disable     : 1;  /**< [ 33: 33](R/W) Reserved.
4456                                                                  Internal:
4457                                                                  Set to disable Rx Electric Idle detection during P1 CPM PowerDown state. */
4458         uint64_t txcmnmode_disable     : 1;  /**< [ 34: 34](R/W) Reserved.
4459                                                                  Internal:
4460                                                                  Set to disable Tx Common Mode voltage during P1 CPM PowerDown state. */
4461         uint64_t reserved_35_63        : 29;
4462 #endif /* Word 0 - End */
4463     } s;
4464     /* struct bdk_gsernx_lanex_pcie_rstp1s0_bcfg_s cn; */
4465 };
4466 typedef union bdk_gsernx_lanex_pcie_rstp1s0_bcfg bdk_gsernx_lanex_pcie_rstp1s0_bcfg_t;
4467 
4468 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RSTP1S0_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_RSTP1S0_BCFG(unsigned long a,unsigned long b)4469 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RSTP1S0_BCFG(unsigned long a, unsigned long b)
4470 {
4471     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
4472         return 0x87e090002040ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
4473     __bdk_csr_fatal("GSERNX_LANEX_PCIE_RSTP1S0_BCFG", 2, a, b, 0, 0);
4474 }
4475 
4476 #define typedef_BDK_GSERNX_LANEX_PCIE_RSTP1S0_BCFG(a,b) bdk_gsernx_lanex_pcie_rstp1s0_bcfg_t
4477 #define bustype_BDK_GSERNX_LANEX_PCIE_RSTP1S0_BCFG(a,b) BDK_CSR_TYPE_RSL
4478 #define basename_BDK_GSERNX_LANEX_PCIE_RSTP1S0_BCFG(a,b) "GSERNX_LANEX_PCIE_RSTP1S0_BCFG"
4479 #define device_bar_BDK_GSERNX_LANEX_PCIE_RSTP1S0_BCFG(a,b) 0x0 /* PF_BAR0 */
4480 #define busnum_BDK_GSERNX_LANEX_PCIE_RSTP1S0_BCFG(a,b) (a)
4481 #define arguments_BDK_GSERNX_LANEX_PCIE_RSTP1S0_BCFG(a,b) (a),(b),-1,-1
4482 
4483 /**
4484  * Register (RSL) gsern#_lane#_pcie_rstp1s1_bcfg
4485  *
4486  * GSER Lane PCIe PowerDown P1.1 Reset States Control Register
4487  * Controls the Reset states (Lane PLL, Tx, Rx, Adapt and Eye Monitor) corresponding to
4488  * PCIe PowerDown state P1.1 (P1 substate).
4489  */
4490 union bdk_gsernx_lanex_pcie_rstp1s1_bcfg
4491 {
4492     uint64_t u;
4493     struct bdk_gsernx_lanex_pcie_rstp1s1_bcfg_s
4494     {
4495 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
4496         uint64_t reserved_35_63        : 29;
4497         uint64_t txcmnmode_disable     : 1;  /**< [ 34: 34](R/W) Reserved.
4498                                                                  Internal:
4499                                                                  Set to disable Tx Common Mode voltage during P1.1 PowerDown state. */
4500         uint64_t rxidledet_disable     : 1;  /**< [ 33: 33](R/W) Reserved.
4501                                                                  Internal:
4502                                                                  Set to disable Rx Electric Idle detection during P1.1 PowerDown state. */
4503         uint64_t adapt_rst             : 1;  /**< [ 32: 32](R/W) Reserved.
4504                                                                  Internal:
4505                                                                  FIXME - add more details
4506                                                                  Rx Adapt state Pause (0) or Hard Reset (1) during P1.1 PowerDown state. */
4507         uint64_t reserved_29_31        : 3;
4508         uint64_t eye_rst               : 5;  /**< [ 28: 24](R/W) Reserved.
4509                                                                  Internal:
4510                                                                  FIXME - add more details
4511                                                                  Eye monitor reset state during P1.1 PowerDown state. */
4512         uint64_t reserved_21_23        : 3;
4513         uint64_t rx_rst                : 5;  /**< [ 20: 16](R/W) Reserved.
4514                                                                  Internal:
4515                                                                  FIXME - add more details
4516                                                                  RX reset state during P1.1 PowerDown state. */
4517         uint64_t reserved_12_15        : 4;
4518         uint64_t tx_rst                : 4;  /**< [ 11:  8](R/W) Reserved.
4519                                                                  Internal:
4520                                                                  FIXME - add more details
4521                                                                  TX reset state during P1.1 PowerDown state. */
4522         uint64_t reserved_4_7          : 4;
4523         uint64_t lnpll_rst             : 4;  /**< [  3:  0](R/W) Reserved.
4524                                                                  Internal:
4525                                                                  FIXME - add more details
4526                                                                  LANE PLL reset state during P1.1 PowerDown state. */
4527 #else /* Word 0 - Little Endian */
4528         uint64_t lnpll_rst             : 4;  /**< [  3:  0](R/W) Reserved.
4529                                                                  Internal:
4530                                                                  FIXME - add more details
4531                                                                  LANE PLL reset state during P1.1 PowerDown state. */
4532         uint64_t reserved_4_7          : 4;
4533         uint64_t tx_rst                : 4;  /**< [ 11:  8](R/W) Reserved.
4534                                                                  Internal:
4535                                                                  FIXME - add more details
4536                                                                  TX reset state during P1.1 PowerDown state. */
4537         uint64_t reserved_12_15        : 4;
4538         uint64_t rx_rst                : 5;  /**< [ 20: 16](R/W) Reserved.
4539                                                                  Internal:
4540                                                                  FIXME - add more details
4541                                                                  RX reset state during P1.1 PowerDown state. */
4542         uint64_t reserved_21_23        : 3;
4543         uint64_t eye_rst               : 5;  /**< [ 28: 24](R/W) Reserved.
4544                                                                  Internal:
4545                                                                  FIXME - add more details
4546                                                                  Eye monitor reset state during P1.1 PowerDown state. */
4547         uint64_t reserved_29_31        : 3;
4548         uint64_t adapt_rst             : 1;  /**< [ 32: 32](R/W) Reserved.
4549                                                                  Internal:
4550                                                                  FIXME - add more details
4551                                                                  Rx Adapt state Pause (0) or Hard Reset (1) during P1.1 PowerDown state. */
4552         uint64_t rxidledet_disable     : 1;  /**< [ 33: 33](R/W) Reserved.
4553                                                                  Internal:
4554                                                                  Set to disable Rx Electric Idle detection during P1.1 PowerDown state. */
4555         uint64_t txcmnmode_disable     : 1;  /**< [ 34: 34](R/W) Reserved.
4556                                                                  Internal:
4557                                                                  Set to disable Tx Common Mode voltage during P1.1 PowerDown state. */
4558         uint64_t reserved_35_63        : 29;
4559 #endif /* Word 0 - End */
4560     } s;
4561     /* struct bdk_gsernx_lanex_pcie_rstp1s1_bcfg_s cn; */
4562 };
4563 typedef union bdk_gsernx_lanex_pcie_rstp1s1_bcfg bdk_gsernx_lanex_pcie_rstp1s1_bcfg_t;
4564 
4565 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RSTP1S1_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_RSTP1S1_BCFG(unsigned long a,unsigned long b)4566 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RSTP1S1_BCFG(unsigned long a, unsigned long b)
4567 {
4568     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
4569         return 0x87e090002050ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
4570     __bdk_csr_fatal("GSERNX_LANEX_PCIE_RSTP1S1_BCFG", 2, a, b, 0, 0);
4571 }
4572 
4573 #define typedef_BDK_GSERNX_LANEX_PCIE_RSTP1S1_BCFG(a,b) bdk_gsernx_lanex_pcie_rstp1s1_bcfg_t
4574 #define bustype_BDK_GSERNX_LANEX_PCIE_RSTP1S1_BCFG(a,b) BDK_CSR_TYPE_RSL
4575 #define basename_BDK_GSERNX_LANEX_PCIE_RSTP1S1_BCFG(a,b) "GSERNX_LANEX_PCIE_RSTP1S1_BCFG"
4576 #define device_bar_BDK_GSERNX_LANEX_PCIE_RSTP1S1_BCFG(a,b) 0x0 /* PF_BAR0 */
4577 #define busnum_BDK_GSERNX_LANEX_PCIE_RSTP1S1_BCFG(a,b) (a)
4578 #define arguments_BDK_GSERNX_LANEX_PCIE_RSTP1S1_BCFG(a,b) (a),(b),-1,-1
4579 
4580 /**
4581  * Register (RSL) gsern#_lane#_pcie_rstp1s2_bcfg
4582  *
4583  * GSER Lane PCIe PowerDown P1.2 Reset States Control Register
4584  * Controls the Reset states (Lane PLL, Tx, Rx, Adapt and Eye Monitor) corresponding to
4585  * PCIe PowerDown state P1.2 (P1 substate).
4586  */
4587 union bdk_gsernx_lanex_pcie_rstp1s2_bcfg
4588 {
4589     uint64_t u;
4590     struct bdk_gsernx_lanex_pcie_rstp1s2_bcfg_s
4591     {
4592 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
4593         uint64_t reserved_35_63        : 29;
4594         uint64_t txcmnmode_disable     : 1;  /**< [ 34: 34](R/W) Reserved.
4595                                                                  Internal:
4596                                                                  Set to disable Tx Common Mode voltage during P1.2 PowerDown state. */
4597         uint64_t rxidledet_disable     : 1;  /**< [ 33: 33](R/W) Reserved.
4598                                                                  Internal:
4599                                                                  Set to disable Rx Electric Idle detection during P1.2 PowerDown state. */
4600         uint64_t adapt_rst             : 1;  /**< [ 32: 32](R/W) Reserved.
4601                                                                  Internal:
4602                                                                  FIXME - add more details
4603                                                                  Rx Adapt state Pause (0) or Hard Reset (1) during P1.2 PowerDown state. */
4604         uint64_t reserved_29_31        : 3;
4605         uint64_t eye_rst               : 5;  /**< [ 28: 24](R/W) Reserved.
4606                                                                  Internal:
4607                                                                  FIXME - add more details
4608                                                                  Eye monitor reset state during P1.2 PowerDown state. */
4609         uint64_t reserved_21_23        : 3;
4610         uint64_t rx_rst                : 5;  /**< [ 20: 16](R/W) Reserved.
4611                                                                  Internal:
4612                                                                  FIXME - add more details
4613                                                                  RX reset state during P1.2 PowerDown state. */
4614         uint64_t reserved_12_15        : 4;
4615         uint64_t tx_rst                : 4;  /**< [ 11:  8](R/W) Reserved.
4616                                                                  Internal:
4617                                                                  FIXME - add more details
4618                                                                  TX reset state during P1.2 PowerDown state. */
4619         uint64_t reserved_4_7          : 4;
4620         uint64_t lnpll_rst             : 4;  /**< [  3:  0](R/W) Reserved.
4621                                                                  Internal:
4622                                                                  FIXME - add more details
4623                                                                  LANE PLL reset state during P1.2 PowerDown state. */
4624 #else /* Word 0 - Little Endian */
4625         uint64_t lnpll_rst             : 4;  /**< [  3:  0](R/W) Reserved.
4626                                                                  Internal:
4627                                                                  FIXME - add more details
4628                                                                  LANE PLL reset state during P1.2 PowerDown state. */
4629         uint64_t reserved_4_7          : 4;
4630         uint64_t tx_rst                : 4;  /**< [ 11:  8](R/W) Reserved.
4631                                                                  Internal:
4632                                                                  FIXME - add more details
4633                                                                  TX reset state during P1.2 PowerDown state. */
4634         uint64_t reserved_12_15        : 4;
4635         uint64_t rx_rst                : 5;  /**< [ 20: 16](R/W) Reserved.
4636                                                                  Internal:
4637                                                                  FIXME - add more details
4638                                                                  RX reset state during P1.2 PowerDown state. */
4639         uint64_t reserved_21_23        : 3;
4640         uint64_t eye_rst               : 5;  /**< [ 28: 24](R/W) Reserved.
4641                                                                  Internal:
4642                                                                  FIXME - add more details
4643                                                                  Eye monitor reset state during P1.2 PowerDown state. */
4644         uint64_t reserved_29_31        : 3;
4645         uint64_t adapt_rst             : 1;  /**< [ 32: 32](R/W) Reserved.
4646                                                                  Internal:
4647                                                                  FIXME - add more details
4648                                                                  Rx Adapt state Pause (0) or Hard Reset (1) during P1.2 PowerDown state. */
4649         uint64_t rxidledet_disable     : 1;  /**< [ 33: 33](R/W) Reserved.
4650                                                                  Internal:
4651                                                                  Set to disable Rx Electric Idle detection during P1.2 PowerDown state. */
4652         uint64_t txcmnmode_disable     : 1;  /**< [ 34: 34](R/W) Reserved.
4653                                                                  Internal:
4654                                                                  Set to disable Tx Common Mode voltage during P1.2 PowerDown state. */
4655         uint64_t reserved_35_63        : 29;
4656 #endif /* Word 0 - End */
4657     } s;
4658     /* struct bdk_gsernx_lanex_pcie_rstp1s2_bcfg_s cn; */
4659 };
4660 typedef union bdk_gsernx_lanex_pcie_rstp1s2_bcfg bdk_gsernx_lanex_pcie_rstp1s2_bcfg_t;
4661 
4662 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RSTP1S2_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_RSTP1S2_BCFG(unsigned long a,unsigned long b)4663 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RSTP1S2_BCFG(unsigned long a, unsigned long b)
4664 {
4665     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
4666         return 0x87e090002060ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
4667     __bdk_csr_fatal("GSERNX_LANEX_PCIE_RSTP1S2_BCFG", 2, a, b, 0, 0);
4668 }
4669 
4670 #define typedef_BDK_GSERNX_LANEX_PCIE_RSTP1S2_BCFG(a,b) bdk_gsernx_lanex_pcie_rstp1s2_bcfg_t
4671 #define bustype_BDK_GSERNX_LANEX_PCIE_RSTP1S2_BCFG(a,b) BDK_CSR_TYPE_RSL
4672 #define basename_BDK_GSERNX_LANEX_PCIE_RSTP1S2_BCFG(a,b) "GSERNX_LANEX_PCIE_RSTP1S2_BCFG"
4673 #define device_bar_BDK_GSERNX_LANEX_PCIE_RSTP1S2_BCFG(a,b) 0x0 /* PF_BAR0 */
4674 #define busnum_BDK_GSERNX_LANEX_PCIE_RSTP1S2_BCFG(a,b) (a)
4675 #define arguments_BDK_GSERNX_LANEX_PCIE_RSTP1S2_BCFG(a,b) (a),(b),-1,-1
4676 
4677 /**
4678  * Register (RSL) gsern#_lane#_pcie_rstp2_bcfg
4679  *
4680  * GSER Lane PCIe PowerDown P2 Reset States Control Register
4681  * Controls the Reset states (Lane PLL, Tx, Rx, Adapt and Eye Monitor) corresponding to
4682  * PCIe PowerDown state P2.
4683  */
4684 union bdk_gsernx_lanex_pcie_rstp2_bcfg
4685 {
4686     uint64_t u;
4687     struct bdk_gsernx_lanex_pcie_rstp2_bcfg_s
4688     {
4689 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
4690         uint64_t reserved_35_63        : 29;
4691         uint64_t txcmnmode_disable     : 1;  /**< [ 34: 34](R/W) Reserved.
4692                                                                  Internal:
4693                                                                  Set to disable Tx Common Mode voltage during P2 PowerDown state. */
4694         uint64_t rxidledet_disable     : 1;  /**< [ 33: 33](R/W) Reserved.
4695                                                                  Internal:
4696                                                                  Set to disable Rx Electric Idle detection during P2 PowerDown state. */
4697         uint64_t adapt_rst             : 1;  /**< [ 32: 32](R/W) Reserved.
4698                                                                  Internal:
4699                                                                  FIXME - add more details
4700                                                                  Rx Adapt state Pause (0) or Hard Reset (1) during P2 PowerDown state. */
4701         uint64_t reserved_29_31        : 3;
4702         uint64_t eye_rst               : 5;  /**< [ 28: 24](R/W) Reserved.
4703                                                                  Internal:
4704                                                                  FIXME - add more details
4705                                                                  Eye monitor reset state during P2 PowerDown state. */
4706         uint64_t reserved_21_23        : 3;
4707         uint64_t rx_rst                : 5;  /**< [ 20: 16](R/W) Reserved.
4708                                                                  Internal:
4709                                                                  FIXME - add more details
4710                                                                  RX reset state during P2 PowerDown state. */
4711         uint64_t reserved_12_15        : 4;
4712         uint64_t tx_rst                : 4;  /**< [ 11:  8](R/W) Reserved.
4713                                                                  Internal:
4714                                                                  FIXME - add more details
4715                                                                  TX reset state during P2 PowerDown state. */
4716         uint64_t reserved_4_7          : 4;
4717         uint64_t lnpll_rst             : 4;  /**< [  3:  0](R/W) Reserved.
4718                                                                  Internal:
4719                                                                  FIXME - add more details
4720                                                                  LANE PLL reset state during P2 PowerDown state. */
4721 #else /* Word 0 - Little Endian */
4722         uint64_t lnpll_rst             : 4;  /**< [  3:  0](R/W) Reserved.
4723                                                                  Internal:
4724                                                                  FIXME - add more details
4725                                                                  LANE PLL reset state during P2 PowerDown state. */
4726         uint64_t reserved_4_7          : 4;
4727         uint64_t tx_rst                : 4;  /**< [ 11:  8](R/W) Reserved.
4728                                                                  Internal:
4729                                                                  FIXME - add more details
4730                                                                  TX reset state during P2 PowerDown state. */
4731         uint64_t reserved_12_15        : 4;
4732         uint64_t rx_rst                : 5;  /**< [ 20: 16](R/W) Reserved.
4733                                                                  Internal:
4734                                                                  FIXME - add more details
4735                                                                  RX reset state during P2 PowerDown state. */
4736         uint64_t reserved_21_23        : 3;
4737         uint64_t eye_rst               : 5;  /**< [ 28: 24](R/W) Reserved.
4738                                                                  Internal:
4739                                                                  FIXME - add more details
4740                                                                  Eye monitor reset state during P2 PowerDown state. */
4741         uint64_t reserved_29_31        : 3;
4742         uint64_t adapt_rst             : 1;  /**< [ 32: 32](R/W) Reserved.
4743                                                                  Internal:
4744                                                                  FIXME - add more details
4745                                                                  Rx Adapt state Pause (0) or Hard Reset (1) during P2 PowerDown state. */
4746         uint64_t rxidledet_disable     : 1;  /**< [ 33: 33](R/W) Reserved.
4747                                                                  Internal:
4748                                                                  Set to disable Rx Electric Idle detection during P2 PowerDown state. */
4749         uint64_t txcmnmode_disable     : 1;  /**< [ 34: 34](R/W) Reserved.
4750                                                                  Internal:
4751                                                                  Set to disable Tx Common Mode voltage during P2 PowerDown state. */
4752         uint64_t reserved_35_63        : 29;
4753 #endif /* Word 0 - End */
4754     } s;
4755     /* struct bdk_gsernx_lanex_pcie_rstp2_bcfg_s cn; */
4756 };
4757 typedef union bdk_gsernx_lanex_pcie_rstp2_bcfg bdk_gsernx_lanex_pcie_rstp2_bcfg_t;
4758 
4759 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RSTP2_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_RSTP2_BCFG(unsigned long a,unsigned long b)4760 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RSTP2_BCFG(unsigned long a, unsigned long b)
4761 {
4762     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
4763         return 0x87e090002070ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
4764     __bdk_csr_fatal("GSERNX_LANEX_PCIE_RSTP2_BCFG", 2, a, b, 0, 0);
4765 }
4766 
4767 #define typedef_BDK_GSERNX_LANEX_PCIE_RSTP2_BCFG(a,b) bdk_gsernx_lanex_pcie_rstp2_bcfg_t
4768 #define bustype_BDK_GSERNX_LANEX_PCIE_RSTP2_BCFG(a,b) BDK_CSR_TYPE_RSL
4769 #define basename_BDK_GSERNX_LANEX_PCIE_RSTP2_BCFG(a,b) "GSERNX_LANEX_PCIE_RSTP2_BCFG"
4770 #define device_bar_BDK_GSERNX_LANEX_PCIE_RSTP2_BCFG(a,b) 0x0 /* PF_BAR0 */
4771 #define busnum_BDK_GSERNX_LANEX_PCIE_RSTP2_BCFG(a,b) (a)
4772 #define arguments_BDK_GSERNX_LANEX_PCIE_RSTP2_BCFG(a,b) (a),(b),-1,-1
4773 
4774 /**
4775  * Register (RSL) gsern#_lane#_pcie_rstrate_bcfg
4776  *
4777  * GSER Lane PCIe Lane Rate Change Reset States Control Register
4778  * This register controls the reset states (Lane PLL, Tx, Rx, Adapt and Eye Monitor)
4779  * required for PCIe lane rate change.
4780  */
4781 union bdk_gsernx_lanex_pcie_rstrate_bcfg
4782 {
4783     uint64_t u;
4784     struct bdk_gsernx_lanex_pcie_rstrate_bcfg_s
4785     {
4786 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
4787         uint64_t reserved_35_63        : 29;
4788         uint64_t txcmnmode_disable     : 1;  /**< [ 34: 34](R/W) Reserved.
4789                                                                  Internal:
4790                                                                  Set to disable Tx Common Mode voltage during lane rate change. */
4791         uint64_t rxidledet_disable     : 1;  /**< [ 33: 33](R/W) Reserved.
4792                                                                  Internal:
4793                                                                  Set to disable Rx Electric Idle detection during lane rate change. */
4794         uint64_t adapt_rst             : 1;  /**< [ 32: 32](R/W) Reserved.
4795                                                                  Internal:
4796                                                                  FIXME - add more details
4797                                                                  Rx Adapt state Pause (0) or Hard Reset (1) during lane rate change. */
4798         uint64_t reserved_29_31        : 3;
4799         uint64_t eye_rst               : 5;  /**< [ 28: 24](R/W) Reserved.
4800                                                                  Internal:
4801                                                                  FIXME - add more details
4802                                                                  Eye monitor reset state during lane rate change. */
4803         uint64_t reserved_21_23        : 3;
4804         uint64_t rx_rst                : 5;  /**< [ 20: 16](R/W) Reserved.
4805                                                                  Internal:
4806                                                                  FIXME - add more details
4807                                                                  RX reset state during lane rate change. */
4808         uint64_t reserved_12_15        : 4;
4809         uint64_t tx_rst                : 4;  /**< [ 11:  8](R/W) Reserved.
4810                                                                  Internal:
4811                                                                  FIXME - add more details
4812                                                                  TX reset state during lane rate change. */
4813         uint64_t reserved_4_7          : 4;
4814         uint64_t lnpll_rst             : 4;  /**< [  3:  0](R/W) Reserved.
4815                                                                  Internal:
4816                                                                  FIXME - add more details
4817                                                                  LANE PLL reset state during lane rate change. */
4818 #else /* Word 0 - Little Endian */
4819         uint64_t lnpll_rst             : 4;  /**< [  3:  0](R/W) Reserved.
4820                                                                  Internal:
4821                                                                  FIXME - add more details
4822                                                                  LANE PLL reset state during lane rate change. */
4823         uint64_t reserved_4_7          : 4;
4824         uint64_t tx_rst                : 4;  /**< [ 11:  8](R/W) Reserved.
4825                                                                  Internal:
4826                                                                  FIXME - add more details
4827                                                                  TX reset state during lane rate change. */
4828         uint64_t reserved_12_15        : 4;
4829         uint64_t rx_rst                : 5;  /**< [ 20: 16](R/W) Reserved.
4830                                                                  Internal:
4831                                                                  FIXME - add more details
4832                                                                  RX reset state during lane rate change. */
4833         uint64_t reserved_21_23        : 3;
4834         uint64_t eye_rst               : 5;  /**< [ 28: 24](R/W) Reserved.
4835                                                                  Internal:
4836                                                                  FIXME - add more details
4837                                                                  Eye monitor reset state during lane rate change. */
4838         uint64_t reserved_29_31        : 3;
4839         uint64_t adapt_rst             : 1;  /**< [ 32: 32](R/W) Reserved.
4840                                                                  Internal:
4841                                                                  FIXME - add more details
4842                                                                  Rx Adapt state Pause (0) or Hard Reset (1) during lane rate change. */
4843         uint64_t rxidledet_disable     : 1;  /**< [ 33: 33](R/W) Reserved.
4844                                                                  Internal:
4845                                                                  Set to disable Rx Electric Idle detection during lane rate change. */
4846         uint64_t txcmnmode_disable     : 1;  /**< [ 34: 34](R/W) Reserved.
4847                                                                  Internal:
4848                                                                  Set to disable Tx Common Mode voltage during lane rate change. */
4849         uint64_t reserved_35_63        : 29;
4850 #endif /* Word 0 - End */
4851     } s;
4852     /* struct bdk_gsernx_lanex_pcie_rstrate_bcfg_s cn; */
4853 };
4854 typedef union bdk_gsernx_lanex_pcie_rstrate_bcfg bdk_gsernx_lanex_pcie_rstrate_bcfg_t;
4855 
4856 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RSTRATE_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_RSTRATE_BCFG(unsigned long a,unsigned long b)4857 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RSTRATE_BCFG(unsigned long a, unsigned long b)
4858 {
4859     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
4860         return 0x87e090002090ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
4861     __bdk_csr_fatal("GSERNX_LANEX_PCIE_RSTRATE_BCFG", 2, a, b, 0, 0);
4862 }
4863 
4864 #define typedef_BDK_GSERNX_LANEX_PCIE_RSTRATE_BCFG(a,b) bdk_gsernx_lanex_pcie_rstrate_bcfg_t
4865 #define bustype_BDK_GSERNX_LANEX_PCIE_RSTRATE_BCFG(a,b) BDK_CSR_TYPE_RSL
4866 #define basename_BDK_GSERNX_LANEX_PCIE_RSTRATE_BCFG(a,b) "GSERNX_LANEX_PCIE_RSTRATE_BCFG"
4867 #define device_bar_BDK_GSERNX_LANEX_PCIE_RSTRATE_BCFG(a,b) 0x0 /* PF_BAR0 */
4868 #define busnum_BDK_GSERNX_LANEX_PCIE_RSTRATE_BCFG(a,b) (a)
4869 #define arguments_BDK_GSERNX_LANEX_PCIE_RSTRATE_BCFG(a,b) (a),(b),-1,-1
4870 
4871 /**
4872  * Register (RSL) gsern#_lane#_pcie_rstshdn_bcfg
4873  *
4874  * GSER Lane PCIe Lane Shutdown Reset States Control Register
4875  * This register controls the reset states (Lane PLL, Tx, Rx, Adapt and Eye Monitor)
4876  * corresponding to PCIe Lane Shutdown state enabled by the assertion of TxCompliance &
4877  * TxElecIdle.
4878  */
4879 union bdk_gsernx_lanex_pcie_rstshdn_bcfg
4880 {
4881     uint64_t u;
4882     struct bdk_gsernx_lanex_pcie_rstshdn_bcfg_s
4883     {
4884 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
4885         uint64_t reserved_35_63        : 29;
4886         uint64_t txcmnmode_disable     : 1;  /**< [ 34: 34](R/W) Reserved.
4887                                                                  Internal:
4888                                                                  Set to disable TX common mode voltage during lane shutdown state. */
4889         uint64_t rxidledet_disable     : 1;  /**< [ 33: 33](R/W) Reserved.
4890                                                                  Internal:
4891                                                                  Set to disable Rx electric idle detection during lane shutdown state. */
4892         uint64_t adapt_rst             : 1;  /**< [ 32: 32](R/W) Reserved.
4893                                                                  Internal:
4894                                                                  FIXME - add more details
4895                                                                  Rx Adapt state Pause (0) or Hard Reset (1) during lane shutdown state. */
4896         uint64_t reserved_29_31        : 3;
4897         uint64_t eye_rst               : 5;  /**< [ 28: 24](R/W) Reserved.
4898                                                                  Internal:
4899                                                                  FIXME - add more details
4900                                                                  Eye monitor reset state during lane shutdown state. */
4901         uint64_t reserved_21_23        : 3;
4902         uint64_t rx_rst                : 5;  /**< [ 20: 16](R/W) Reserved.
4903                                                                  Internal:
4904                                                                  FIXME - add more details
4905                                                                  RX reset state during lane shutdown state. */
4906         uint64_t reserved_12_15        : 4;
4907         uint64_t tx_rst                : 4;  /**< [ 11:  8](R/W) Reserved.
4908                                                                  Internal:
4909                                                                  FIXME - add more details
4910                                                                  TX reset state during lane shutdown state. */
4911         uint64_t reserved_4_7          : 4;
4912         uint64_t lnpll_rst             : 4;  /**< [  3:  0](R/W) Reserved.
4913                                                                  Internal:
4914                                                                  FIXME - add more details
4915                                                                  LANE PLL reset state during lane shutdown state. */
4916 #else /* Word 0 - Little Endian */
4917         uint64_t lnpll_rst             : 4;  /**< [  3:  0](R/W) Reserved.
4918                                                                  Internal:
4919                                                                  FIXME - add more details
4920                                                                  LANE PLL reset state during lane shutdown state. */
4921         uint64_t reserved_4_7          : 4;
4922         uint64_t tx_rst                : 4;  /**< [ 11:  8](R/W) Reserved.
4923                                                                  Internal:
4924                                                                  FIXME - add more details
4925                                                                  TX reset state during lane shutdown state. */
4926         uint64_t reserved_12_15        : 4;
4927         uint64_t rx_rst                : 5;  /**< [ 20: 16](R/W) Reserved.
4928                                                                  Internal:
4929                                                                  FIXME - add more details
4930                                                                  RX reset state during lane shutdown state. */
4931         uint64_t reserved_21_23        : 3;
4932         uint64_t eye_rst               : 5;  /**< [ 28: 24](R/W) Reserved.
4933                                                                  Internal:
4934                                                                  FIXME - add more details
4935                                                                  Eye monitor reset state during lane shutdown state. */
4936         uint64_t reserved_29_31        : 3;
4937         uint64_t adapt_rst             : 1;  /**< [ 32: 32](R/W) Reserved.
4938                                                                  Internal:
4939                                                                  FIXME - add more details
4940                                                                  Rx Adapt state Pause (0) or Hard Reset (1) during lane shutdown state. */
4941         uint64_t rxidledet_disable     : 1;  /**< [ 33: 33](R/W) Reserved.
4942                                                                  Internal:
4943                                                                  Set to disable Rx electric idle detection during lane shutdown state. */
4944         uint64_t txcmnmode_disable     : 1;  /**< [ 34: 34](R/W) Reserved.
4945                                                                  Internal:
4946                                                                  Set to disable TX common mode voltage during lane shutdown state. */
4947         uint64_t reserved_35_63        : 29;
4948 #endif /* Word 0 - End */
4949     } s;
4950     /* struct bdk_gsernx_lanex_pcie_rstshdn_bcfg_s cn; */
4951 };
4952 typedef union bdk_gsernx_lanex_pcie_rstshdn_bcfg bdk_gsernx_lanex_pcie_rstshdn_bcfg_t;
4953 
4954 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RSTSHDN_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_RSTSHDN_BCFG(unsigned long a,unsigned long b)4955 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RSTSHDN_BCFG(unsigned long a, unsigned long b)
4956 {
4957     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
4958         return 0x87e090002080ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
4959     __bdk_csr_fatal("GSERNX_LANEX_PCIE_RSTSHDN_BCFG", 2, a, b, 0, 0);
4960 }
4961 
4962 #define typedef_BDK_GSERNX_LANEX_PCIE_RSTSHDN_BCFG(a,b) bdk_gsernx_lanex_pcie_rstshdn_bcfg_t
4963 #define bustype_BDK_GSERNX_LANEX_PCIE_RSTSHDN_BCFG(a,b) BDK_CSR_TYPE_RSL
4964 #define basename_BDK_GSERNX_LANEX_PCIE_RSTSHDN_BCFG(a,b) "GSERNX_LANEX_PCIE_RSTSHDN_BCFG"
4965 #define device_bar_BDK_GSERNX_LANEX_PCIE_RSTSHDN_BCFG(a,b) 0x0 /* PF_BAR0 */
4966 #define busnum_BDK_GSERNX_LANEX_PCIE_RSTSHDN_BCFG(a,b) (a)
4967 #define arguments_BDK_GSERNX_LANEX_PCIE_RSTSHDN_BCFG(a,b) (a),(b),-1,-1
4968 
4969 /**
4970  * Register (RSL) gsern#_lane#_pcie_rxeq1_1_bcfg
4971  *
4972  * GSER Lane PCIe Gen1 RX Equalizer Control Register 1
4973  * Parameters controlling the custom receiver equalization during PCIe Gen1 operation.
4974  * These fields will drive the associated control signal when
4975  * GSERN()_LANE()_SRCMX_BCFG[TX_CTRL_SEL]
4976  * is set to 'PCIe'.
4977  */
4978 union bdk_gsernx_lanex_pcie_rxeq1_1_bcfg
4979 {
4980     uint64_t u;
4981     struct bdk_gsernx_lanex_pcie_rxeq1_1_bcfg_s
4982     {
4983 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
4984         uint64_t reserved_43_63        : 21;
4985         uint64_t pcie_g1_blwc_deadband : 12; /**< [ 42: 31](R/W) BLWC adaptation deadband settings.
4986                                                                  12-bit field to match accumulator, but typically a value less than 0x0FF is used. */
4987         uint64_t pcie_g1_erc           : 4;  /**< [ 30: 27](R/W) Interpolator edge-rate control. This control is shared between all
4988                                                                  interpolators in the lane.  See GSERN()_LANE()_RX_ST_BCFG.ERC
4989                                                                  for detailed information. */
4990         uint64_t pcie_g1_c6_c15_limit_hi : 6;/**< [ 26: 21](R/W) C6 to C15 postcursor limit high. */
4991         uint64_t pcie_g1_c6_c15_limit_lo : 6;/**< [ 20: 15](R/W) C6 to C15 postcursor limit low. */
4992         uint64_t pcie_g1_ctle_lte_zero_ovrd_en : 1;/**< [ 14: 14](R/W) CTLE LTE zero frequency override enable.
4993                                                                  By default, the override should be enabled; otherwise, CTLE_LTE_ZERO
4994                                                                  will be set equal to CTLE_ZERO within the RX adaptation FSM. */
4995         uint64_t pcie_g1_ctle_lte_zero_ovrd : 4;/**< [ 13: 10](R/W) CTLE LTE zero frequency override value. */
4996         uint64_t pcie_g1_settle_wait   : 4;  /**< [  9:  6](R/W) Number of clock cycles for the DFE adaptation to wait after changing the
4997                                                                  adjusted C1 values before resuming accumulation. */
4998         uint64_t pcie_g1_voter_sp_mask : 1;  /**< [  5:  5](R/W) Set to mask out "010" and "101" patterns in RX cdr voter.
4999                                                                  GSERN()_LANE()_CDRFSM_BCFG[VOTER_SP_MASK] will be updated
5000                                                                  by the hardware even when this bit drives the control. */
5001         uint64_t pcie_g1_c1_q_adjust   : 5;  /**< [  4:  0](R/W) Adjust value magnitude for the error slice in the Q path. */
5002 #else /* Word 0 - Little Endian */
5003         uint64_t pcie_g1_c1_q_adjust   : 5;  /**< [  4:  0](R/W) Adjust value magnitude for the error slice in the Q path. */
5004         uint64_t pcie_g1_voter_sp_mask : 1;  /**< [  5:  5](R/W) Set to mask out "010" and "101" patterns in RX cdr voter.
5005                                                                  GSERN()_LANE()_CDRFSM_BCFG[VOTER_SP_MASK] will be updated
5006                                                                  by the hardware even when this bit drives the control. */
5007         uint64_t pcie_g1_settle_wait   : 4;  /**< [  9:  6](R/W) Number of clock cycles for the DFE adaptation to wait after changing the
5008                                                                  adjusted C1 values before resuming accumulation. */
5009         uint64_t pcie_g1_ctle_lte_zero_ovrd : 4;/**< [ 13: 10](R/W) CTLE LTE zero frequency override value. */
5010         uint64_t pcie_g1_ctle_lte_zero_ovrd_en : 1;/**< [ 14: 14](R/W) CTLE LTE zero frequency override enable.
5011                                                                  By default, the override should be enabled; otherwise, CTLE_LTE_ZERO
5012                                                                  will be set equal to CTLE_ZERO within the RX adaptation FSM. */
5013         uint64_t pcie_g1_c6_c15_limit_lo : 6;/**< [ 20: 15](R/W) C6 to C15 postcursor limit low. */
5014         uint64_t pcie_g1_c6_c15_limit_hi : 6;/**< [ 26: 21](R/W) C6 to C15 postcursor limit high. */
5015         uint64_t pcie_g1_erc           : 4;  /**< [ 30: 27](R/W) Interpolator edge-rate control. This control is shared between all
5016                                                                  interpolators in the lane.  See GSERN()_LANE()_RX_ST_BCFG.ERC
5017                                                                  for detailed information. */
5018         uint64_t pcie_g1_blwc_deadband : 12; /**< [ 42: 31](R/W) BLWC adaptation deadband settings.
5019                                                                  12-bit field to match accumulator, but typically a value less than 0x0FF is used. */
5020         uint64_t reserved_43_63        : 21;
5021 #endif /* Word 0 - End */
5022     } s;
5023     /* struct bdk_gsernx_lanex_pcie_rxeq1_1_bcfg_s cn; */
5024 };
5025 typedef union bdk_gsernx_lanex_pcie_rxeq1_1_bcfg bdk_gsernx_lanex_pcie_rxeq1_1_bcfg_t;
5026 
5027 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXEQ1_1_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_RXEQ1_1_BCFG(unsigned long a,unsigned long b)5028 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXEQ1_1_BCFG(unsigned long a, unsigned long b)
5029 {
5030     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
5031         return 0x87e090002300ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
5032     __bdk_csr_fatal("GSERNX_LANEX_PCIE_RXEQ1_1_BCFG", 2, a, b, 0, 0);
5033 }
5034 
5035 #define typedef_BDK_GSERNX_LANEX_PCIE_RXEQ1_1_BCFG(a,b) bdk_gsernx_lanex_pcie_rxeq1_1_bcfg_t
5036 #define bustype_BDK_GSERNX_LANEX_PCIE_RXEQ1_1_BCFG(a,b) BDK_CSR_TYPE_RSL
5037 #define basename_BDK_GSERNX_LANEX_PCIE_RXEQ1_1_BCFG(a,b) "GSERNX_LANEX_PCIE_RXEQ1_1_BCFG"
5038 #define device_bar_BDK_GSERNX_LANEX_PCIE_RXEQ1_1_BCFG(a,b) 0x0 /* PF_BAR0 */
5039 #define busnum_BDK_GSERNX_LANEX_PCIE_RXEQ1_1_BCFG(a,b) (a)
5040 #define arguments_BDK_GSERNX_LANEX_PCIE_RXEQ1_1_BCFG(a,b) (a),(b),-1,-1
5041 
5042 /**
5043  * Register (RSL) gsern#_lane#_pcie_rxeq1_2_bcfg
5044  *
5045  * GSER Lane PCIe Gen1 RX Equalizer Control Register 2
5046  * Parameters controlling the custom receiver equalization during PCIe Gen1 operation.
5047  * These fields will drive the associated control signal when
5048  * GSERN()_LANE()_SRCMX_BCFG[TX_CTRL_SEL]
5049  * is set to 'PCIe'.
5050  */
5051 union bdk_gsernx_lanex_pcie_rxeq1_2_bcfg
5052 {
5053     uint64_t u;
5054     struct bdk_gsernx_lanex_pcie_rxeq1_2_bcfg_s
5055     {
5056 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
5057         uint64_t pcie_g1_afeos_subrate_final : 16;/**< [ 63: 48](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
5058                                                                  if subrate gearshifting is enabled.
5059                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5060         uint64_t pcie_g1_afeos_subrate_init : 16;/**< [ 47: 32](R/W) Subrate counter initial value. Sets the starting value for the LMS update
5061                                                                  interval, if subrate gearshifting is enabled.
5062                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5063         uint64_t pcie_g1_subrate_final : 16; /**< [ 31: 16](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
5064                                                                  if subrate gearshifting is enabled.
5065                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5066         uint64_t pcie_g1_subrate_init  : 16; /**< [ 15:  0](R/W) Subrate counter initial value. Sets the starting value for the LMS update
5067                                                                  interval, if subrate gearshifting is enabled.
5068                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5069 #else /* Word 0 - Little Endian */
5070         uint64_t pcie_g1_subrate_init  : 16; /**< [ 15:  0](R/W) Subrate counter initial value. Sets the starting value for the LMS update
5071                                                                  interval, if subrate gearshifting is enabled.
5072                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5073         uint64_t pcie_g1_subrate_final : 16; /**< [ 31: 16](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
5074                                                                  if subrate gearshifting is enabled.
5075                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5076         uint64_t pcie_g1_afeos_subrate_init : 16;/**< [ 47: 32](R/W) Subrate counter initial value. Sets the starting value for the LMS update
5077                                                                  interval, if subrate gearshifting is enabled.
5078                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5079         uint64_t pcie_g1_afeos_subrate_final : 16;/**< [ 63: 48](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
5080                                                                  if subrate gearshifting is enabled.
5081                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5082 #endif /* Word 0 - End */
5083     } s;
5084     /* struct bdk_gsernx_lanex_pcie_rxeq1_2_bcfg_s cn; */
5085 };
5086 typedef union bdk_gsernx_lanex_pcie_rxeq1_2_bcfg bdk_gsernx_lanex_pcie_rxeq1_2_bcfg_t;
5087 
5088 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXEQ1_2_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_RXEQ1_2_BCFG(unsigned long a,unsigned long b)5089 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXEQ1_2_BCFG(unsigned long a, unsigned long b)
5090 {
5091     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
5092         return 0x87e090002310ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
5093     __bdk_csr_fatal("GSERNX_LANEX_PCIE_RXEQ1_2_BCFG", 2, a, b, 0, 0);
5094 }
5095 
5096 #define typedef_BDK_GSERNX_LANEX_PCIE_RXEQ1_2_BCFG(a,b) bdk_gsernx_lanex_pcie_rxeq1_2_bcfg_t
5097 #define bustype_BDK_GSERNX_LANEX_PCIE_RXEQ1_2_BCFG(a,b) BDK_CSR_TYPE_RSL
5098 #define basename_BDK_GSERNX_LANEX_PCIE_RXEQ1_2_BCFG(a,b) "GSERNX_LANEX_PCIE_RXEQ1_2_BCFG"
5099 #define device_bar_BDK_GSERNX_LANEX_PCIE_RXEQ1_2_BCFG(a,b) 0x0 /* PF_BAR0 */
5100 #define busnum_BDK_GSERNX_LANEX_PCIE_RXEQ1_2_BCFG(a,b) (a)
5101 #define arguments_BDK_GSERNX_LANEX_PCIE_RXEQ1_2_BCFG(a,b) (a),(b),-1,-1
5102 
5103 /**
5104  * Register (RSL) gsern#_lane#_pcie_rxeq1_3_bcfg
5105  *
5106  * GSER Lane PCIe Gen1 RX Equalizer Control Register 3
5107  * Parameters controlling the custom receiver equalization during PCIe Gen1 operation.
5108  * These fields will drive the associated control signal when
5109  * GSERN()_LANE()_SRCMX_BCFG[TX_CTRL_SEL]
5110  * is set to 'PCIe'.
5111  */
5112 union bdk_gsernx_lanex_pcie_rxeq1_3_bcfg
5113 {
5114     uint64_t u;
5115     struct bdk_gsernx_lanex_pcie_rxeq1_3_bcfg_s
5116     {
5117 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
5118         uint64_t reserved_62_63        : 2;
5119         uint64_t pcie_g1_c5_limit_hi   : 6;  /**< [ 61: 56](R/W) C5 postcursor limit high. */
5120         uint64_t pcie_g1_c4_limit_hi   : 6;  /**< [ 55: 50](R/W) C4 postcursor limit high. */
5121         uint64_t pcie_g1_c3_limit_hi   : 6;  /**< [ 49: 44](R/W) C3 postcursor limit high. */
5122         uint64_t pcie_g1_c2_limit_hi   : 6;  /**< [ 43: 38](R/W) C2 postcursor limit high. */
5123         uint64_t pcie_g1_c1_limit_hi   : 6;  /**< [ 37: 32](R/W) C1 postcursor limit high. */
5124         uint64_t reserved_30_31        : 2;
5125         uint64_t pcie_g1_c5_limit_lo   : 6;  /**< [ 29: 24](R/W) C5 postcursor limit low. */
5126         uint64_t pcie_g1_c4_limit_lo   : 6;  /**< [ 23: 18](R/W) C4 postcursor limit low. */
5127         uint64_t pcie_g1_c3_limit_lo   : 6;  /**< [ 17: 12](R/W) C3 postcursor limit low. */
5128         uint64_t pcie_g1_c2_limit_lo   : 6;  /**< [ 11:  6](R/W) C2 postcursor limit low. */
5129         uint64_t pcie_g1_c1_limit_lo   : 6;  /**< [  5:  0](R/W) C1 postcursor limit low. */
5130 #else /* Word 0 - Little Endian */
5131         uint64_t pcie_g1_c1_limit_lo   : 6;  /**< [  5:  0](R/W) C1 postcursor limit low. */
5132         uint64_t pcie_g1_c2_limit_lo   : 6;  /**< [ 11:  6](R/W) C2 postcursor limit low. */
5133         uint64_t pcie_g1_c3_limit_lo   : 6;  /**< [ 17: 12](R/W) C3 postcursor limit low. */
5134         uint64_t pcie_g1_c4_limit_lo   : 6;  /**< [ 23: 18](R/W) C4 postcursor limit low. */
5135         uint64_t pcie_g1_c5_limit_lo   : 6;  /**< [ 29: 24](R/W) C5 postcursor limit low. */
5136         uint64_t reserved_30_31        : 2;
5137         uint64_t pcie_g1_c1_limit_hi   : 6;  /**< [ 37: 32](R/W) C1 postcursor limit high. */
5138         uint64_t pcie_g1_c2_limit_hi   : 6;  /**< [ 43: 38](R/W) C2 postcursor limit high. */
5139         uint64_t pcie_g1_c3_limit_hi   : 6;  /**< [ 49: 44](R/W) C3 postcursor limit high. */
5140         uint64_t pcie_g1_c4_limit_hi   : 6;  /**< [ 55: 50](R/W) C4 postcursor limit high. */
5141         uint64_t pcie_g1_c5_limit_hi   : 6;  /**< [ 61: 56](R/W) C5 postcursor limit high. */
5142         uint64_t reserved_62_63        : 2;
5143 #endif /* Word 0 - End */
5144     } s;
5145     /* struct bdk_gsernx_lanex_pcie_rxeq1_3_bcfg_s cn; */
5146 };
5147 typedef union bdk_gsernx_lanex_pcie_rxeq1_3_bcfg bdk_gsernx_lanex_pcie_rxeq1_3_bcfg_t;
5148 
5149 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXEQ1_3_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_RXEQ1_3_BCFG(unsigned long a,unsigned long b)5150 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXEQ1_3_BCFG(unsigned long a, unsigned long b)
5151 {
5152     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
5153         return 0x87e090002320ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
5154     __bdk_csr_fatal("GSERNX_LANEX_PCIE_RXEQ1_3_BCFG", 2, a, b, 0, 0);
5155 }
5156 
5157 #define typedef_BDK_GSERNX_LANEX_PCIE_RXEQ1_3_BCFG(a,b) bdk_gsernx_lanex_pcie_rxeq1_3_bcfg_t
5158 #define bustype_BDK_GSERNX_LANEX_PCIE_RXEQ1_3_BCFG(a,b) BDK_CSR_TYPE_RSL
5159 #define basename_BDK_GSERNX_LANEX_PCIE_RXEQ1_3_BCFG(a,b) "GSERNX_LANEX_PCIE_RXEQ1_3_BCFG"
5160 #define device_bar_BDK_GSERNX_LANEX_PCIE_RXEQ1_3_BCFG(a,b) 0x0 /* PF_BAR0 */
5161 #define busnum_BDK_GSERNX_LANEX_PCIE_RXEQ1_3_BCFG(a,b) (a)
5162 #define arguments_BDK_GSERNX_LANEX_PCIE_RXEQ1_3_BCFG(a,b) (a),(b),-1,-1
5163 
5164 /**
5165  * Register (RSL) gsern#_lane#_pcie_rxeq1_4_bcfg
5166  *
5167  * GSER Lane PCIe Gen1 RX Equalizer Control Register 4
5168  * Parameters controlling the custom receiver equalization during PCIe Gen1 operation.
5169  * These fields will drive the associated control signal when
5170  * GSERN()_LANE()_SRCMX_BCFG[TX_CTRL_SEL]
5171  * is set to 'PCIe'.
5172  */
5173 union bdk_gsernx_lanex_pcie_rxeq1_4_bcfg
5174 {
5175     uint64_t u;
5176     struct bdk_gsernx_lanex_pcie_rxeq1_4_bcfg_s
5177     {
5178 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
5179         uint64_t pcie_g1_prevga_gn_subrate_fin : 16;/**< [ 63: 48](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
5180                                                                  if subrate gearshifting is enabled.
5181                                                                  Set SUBRATE_INIT = SUBRATE_FIN if subrate gearshifting is not enabled. */
5182         uint64_t pcie_g1_prevga_gn_subrate_init : 16;/**< [ 47: 32](R/W) Subrate counter initial value. Sets the starting value for the LMS update
5183                                                                  interval, if subrate gearshifting is enabled.
5184                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5185         uint64_t pcie_g1_blwc_subrate_final : 16;/**< [ 31: 16](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
5186                                                                  if subrate gearshifting is enabled.
5187                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5188         uint64_t pcie_g1_blwc_subrate_init : 16;/**< [ 15:  0](R/W) Subrate counter initial value. Sets the starting value for the LMS update
5189                                                                  interval, if subrate gearshifting is enabled.
5190                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5191 #else /* Word 0 - Little Endian */
5192         uint64_t pcie_g1_blwc_subrate_init : 16;/**< [ 15:  0](R/W) Subrate counter initial value. Sets the starting value for the LMS update
5193                                                                  interval, if subrate gearshifting is enabled.
5194                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5195         uint64_t pcie_g1_blwc_subrate_final : 16;/**< [ 31: 16](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
5196                                                                  if subrate gearshifting is enabled.
5197                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5198         uint64_t pcie_g1_prevga_gn_subrate_init : 16;/**< [ 47: 32](R/W) Subrate counter initial value. Sets the starting value for the LMS update
5199                                                                  interval, if subrate gearshifting is enabled.
5200                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5201         uint64_t pcie_g1_prevga_gn_subrate_fin : 16;/**< [ 63: 48](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
5202                                                                  if subrate gearshifting is enabled.
5203                                                                  Set SUBRATE_INIT = SUBRATE_FIN if subrate gearshifting is not enabled. */
5204 #endif /* Word 0 - End */
5205     } s;
5206     /* struct bdk_gsernx_lanex_pcie_rxeq1_4_bcfg_s cn; */
5207 };
5208 typedef union bdk_gsernx_lanex_pcie_rxeq1_4_bcfg bdk_gsernx_lanex_pcie_rxeq1_4_bcfg_t;
5209 
5210 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXEQ1_4_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_RXEQ1_4_BCFG(unsigned long a,unsigned long b)5211 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXEQ1_4_BCFG(unsigned long a, unsigned long b)
5212 {
5213     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
5214         return 0x87e090002330ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
5215     __bdk_csr_fatal("GSERNX_LANEX_PCIE_RXEQ1_4_BCFG", 2, a, b, 0, 0);
5216 }
5217 
5218 #define typedef_BDK_GSERNX_LANEX_PCIE_RXEQ1_4_BCFG(a,b) bdk_gsernx_lanex_pcie_rxeq1_4_bcfg_t
5219 #define bustype_BDK_GSERNX_LANEX_PCIE_RXEQ1_4_BCFG(a,b) BDK_CSR_TYPE_RSL
5220 #define basename_BDK_GSERNX_LANEX_PCIE_RXEQ1_4_BCFG(a,b) "GSERNX_LANEX_PCIE_RXEQ1_4_BCFG"
5221 #define device_bar_BDK_GSERNX_LANEX_PCIE_RXEQ1_4_BCFG(a,b) 0x0 /* PF_BAR0 */
5222 #define busnum_BDK_GSERNX_LANEX_PCIE_RXEQ1_4_BCFG(a,b) (a)
5223 #define arguments_BDK_GSERNX_LANEX_PCIE_RXEQ1_4_BCFG(a,b) (a),(b),-1,-1
5224 
5225 /**
5226  * Register (RSL) gsern#_lane#_pcie_rxeq2_1_bcfg
5227  *
5228  * GSER Lane PCIe Gen2 RX Equalizer Control Register 1
5229  * Parameters controlling the custom receiver equalization during PCIe Gen2 operation.
5230  * These fields will drive the associated control signal when
5231  * GSERN()_LANE()_SRCMX_BCFG[TX_CTRL_SEL]
5232  * is set to 'PCIe'.
5233  */
5234 union bdk_gsernx_lanex_pcie_rxeq2_1_bcfg
5235 {
5236     uint64_t u;
5237     struct bdk_gsernx_lanex_pcie_rxeq2_1_bcfg_s
5238     {
5239 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
5240         uint64_t reserved_43_63        : 21;
5241         uint64_t pcie_g2_blwc_deadband : 12; /**< [ 42: 31](R/W) BLWC adaptation deadband settings.
5242                                                                  12-bit field to match accumulator, but typically a value less than 0x0FF is used. */
5243         uint64_t pcie_g2_erc           : 4;  /**< [ 30: 27](R/W) Interpolator edge-rate control. This control is shared between all
5244                                                                  interpolators in the lane.  See GSERN()_LANE()_RX_ST_BCFG.ERC
5245                                                                  for detailed information. */
5246         uint64_t pcie_g2_c6_c15_limit_hi : 6;/**< [ 26: 21](R/W) C6 to C15 postcursor limit high. */
5247         uint64_t pcie_g2_c6_c15_limit_lo : 6;/**< [ 20: 15](R/W) C6 to C15 postcursor limit low. */
5248         uint64_t pcie_g2_ctle_lte_zero_ovrd_en : 1;/**< [ 14: 14](R/W) CTLE LTE zero frequency override enable.
5249                                                                  By default, the override should be enabled; otherwise, CTLE_LTE_ZERO
5250                                                                  will be set equal to CTLE_ZERO within the RX adaptation FSM. */
5251         uint64_t pcie_g2_ctle_lte_zero_ovrd : 4;/**< [ 13: 10](R/W) CTLE LTE zero frequency override value. */
5252         uint64_t pcie_g2_settle_wait   : 4;  /**< [  9:  6](R/W) Number of clock cycles for the DFE adaptation to wait after changing the
5253                                                                  adjusted C1 values before resuming accumulation. */
5254         uint64_t pcie_g2_voter_sp_mask : 1;  /**< [  5:  5](R/W) Set to mask out "010" and "101" patterns in RX cdr voter.
5255                                                                  GSERN()_LANE()_CDRFSM_BCFG[VOTER_SP_MASK] will be updated
5256                                                                  by the hardware even when this bit drives the control. */
5257         uint64_t pcie_g2_c1_q_adjust   : 5;  /**< [  4:  0](R/W) Adjust value magnitude for the error slice in the Q path. */
5258 #else /* Word 0 - Little Endian */
5259         uint64_t pcie_g2_c1_q_adjust   : 5;  /**< [  4:  0](R/W) Adjust value magnitude for the error slice in the Q path. */
5260         uint64_t pcie_g2_voter_sp_mask : 1;  /**< [  5:  5](R/W) Set to mask out "010" and "101" patterns in RX cdr voter.
5261                                                                  GSERN()_LANE()_CDRFSM_BCFG[VOTER_SP_MASK] will be updated
5262                                                                  by the hardware even when this bit drives the control. */
5263         uint64_t pcie_g2_settle_wait   : 4;  /**< [  9:  6](R/W) Number of clock cycles for the DFE adaptation to wait after changing the
5264                                                                  adjusted C1 values before resuming accumulation. */
5265         uint64_t pcie_g2_ctle_lte_zero_ovrd : 4;/**< [ 13: 10](R/W) CTLE LTE zero frequency override value. */
5266         uint64_t pcie_g2_ctle_lte_zero_ovrd_en : 1;/**< [ 14: 14](R/W) CTLE LTE zero frequency override enable.
5267                                                                  By default, the override should be enabled; otherwise, CTLE_LTE_ZERO
5268                                                                  will be set equal to CTLE_ZERO within the RX adaptation FSM. */
5269         uint64_t pcie_g2_c6_c15_limit_lo : 6;/**< [ 20: 15](R/W) C6 to C15 postcursor limit low. */
5270         uint64_t pcie_g2_c6_c15_limit_hi : 6;/**< [ 26: 21](R/W) C6 to C15 postcursor limit high. */
5271         uint64_t pcie_g2_erc           : 4;  /**< [ 30: 27](R/W) Interpolator edge-rate control. This control is shared between all
5272                                                                  interpolators in the lane.  See GSERN()_LANE()_RX_ST_BCFG.ERC
5273                                                                  for detailed information. */
5274         uint64_t pcie_g2_blwc_deadband : 12; /**< [ 42: 31](R/W) BLWC adaptation deadband settings.
5275                                                                  12-bit field to match accumulator, but typically a value less than 0x0FF is used. */
5276         uint64_t reserved_43_63        : 21;
5277 #endif /* Word 0 - End */
5278     } s;
5279     /* struct bdk_gsernx_lanex_pcie_rxeq2_1_bcfg_s cn; */
5280 };
5281 typedef union bdk_gsernx_lanex_pcie_rxeq2_1_bcfg bdk_gsernx_lanex_pcie_rxeq2_1_bcfg_t;
5282 
5283 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXEQ2_1_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_RXEQ2_1_BCFG(unsigned long a,unsigned long b)5284 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXEQ2_1_BCFG(unsigned long a, unsigned long b)
5285 {
5286     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
5287         return 0x87e090002340ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
5288     __bdk_csr_fatal("GSERNX_LANEX_PCIE_RXEQ2_1_BCFG", 2, a, b, 0, 0);
5289 }
5290 
5291 #define typedef_BDK_GSERNX_LANEX_PCIE_RXEQ2_1_BCFG(a,b) bdk_gsernx_lanex_pcie_rxeq2_1_bcfg_t
5292 #define bustype_BDK_GSERNX_LANEX_PCIE_RXEQ2_1_BCFG(a,b) BDK_CSR_TYPE_RSL
5293 #define basename_BDK_GSERNX_LANEX_PCIE_RXEQ2_1_BCFG(a,b) "GSERNX_LANEX_PCIE_RXEQ2_1_BCFG"
5294 #define device_bar_BDK_GSERNX_LANEX_PCIE_RXEQ2_1_BCFG(a,b) 0x0 /* PF_BAR0 */
5295 #define busnum_BDK_GSERNX_LANEX_PCIE_RXEQ2_1_BCFG(a,b) (a)
5296 #define arguments_BDK_GSERNX_LANEX_PCIE_RXEQ2_1_BCFG(a,b) (a),(b),-1,-1
5297 
5298 /**
5299  * Register (RSL) gsern#_lane#_pcie_rxeq2_2_bcfg
5300  *
5301  * GSER Lane PCIe Gen2 RX Equalizer Control Register 2
5302  * Parameters controlling the custom receiver equalization during PCIe Gen2 operation.
5303  * These fields will drive the associated control signal when
5304  * GSERN()_LANE()_SRCMX_BCFG[TX_CTRL_SEL]
5305  * is set to 'PCIe'.
5306  */
5307 union bdk_gsernx_lanex_pcie_rxeq2_2_bcfg
5308 {
5309     uint64_t u;
5310     struct bdk_gsernx_lanex_pcie_rxeq2_2_bcfg_s
5311     {
5312 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
5313         uint64_t pcie_g2_afeos_subrate_final : 16;/**< [ 63: 48](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
5314                                                                  if subrate gearshifting is enabled.
5315                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5316         uint64_t pcie_g2_afeos_subrate_init : 16;/**< [ 47: 32](R/W) Subrate counter initial value. Sets the starting value for the LMS update
5317                                                                  interval, if subrate gearshifting is enabled.
5318                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5319         uint64_t pcie_g2_subrate_final : 16; /**< [ 31: 16](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
5320                                                                  if subrate gearshifting is enabled.
5321                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5322         uint64_t pcie_g2_subrate_init  : 16; /**< [ 15:  0](R/W) Subrate counter initial value. Sets the starting value for the LMS update
5323                                                                  interval, if subrate gearshifting is enabled.
5324                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5325 #else /* Word 0 - Little Endian */
5326         uint64_t pcie_g2_subrate_init  : 16; /**< [ 15:  0](R/W) Subrate counter initial value. Sets the starting value for the LMS update
5327                                                                  interval, if subrate gearshifting is enabled.
5328                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5329         uint64_t pcie_g2_subrate_final : 16; /**< [ 31: 16](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
5330                                                                  if subrate gearshifting is enabled.
5331                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5332         uint64_t pcie_g2_afeos_subrate_init : 16;/**< [ 47: 32](R/W) Subrate counter initial value. Sets the starting value for the LMS update
5333                                                                  interval, if subrate gearshifting is enabled.
5334                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5335         uint64_t pcie_g2_afeos_subrate_final : 16;/**< [ 63: 48](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
5336                                                                  if subrate gearshifting is enabled.
5337                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5338 #endif /* Word 0 - End */
5339     } s;
5340     /* struct bdk_gsernx_lanex_pcie_rxeq2_2_bcfg_s cn; */
5341 };
5342 typedef union bdk_gsernx_lanex_pcie_rxeq2_2_bcfg bdk_gsernx_lanex_pcie_rxeq2_2_bcfg_t;
5343 
5344 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXEQ2_2_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_RXEQ2_2_BCFG(unsigned long a,unsigned long b)5345 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXEQ2_2_BCFG(unsigned long a, unsigned long b)
5346 {
5347     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
5348         return 0x87e090002350ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
5349     __bdk_csr_fatal("GSERNX_LANEX_PCIE_RXEQ2_2_BCFG", 2, a, b, 0, 0);
5350 }
5351 
5352 #define typedef_BDK_GSERNX_LANEX_PCIE_RXEQ2_2_BCFG(a,b) bdk_gsernx_lanex_pcie_rxeq2_2_bcfg_t
5353 #define bustype_BDK_GSERNX_LANEX_PCIE_RXEQ2_2_BCFG(a,b) BDK_CSR_TYPE_RSL
5354 #define basename_BDK_GSERNX_LANEX_PCIE_RXEQ2_2_BCFG(a,b) "GSERNX_LANEX_PCIE_RXEQ2_2_BCFG"
5355 #define device_bar_BDK_GSERNX_LANEX_PCIE_RXEQ2_2_BCFG(a,b) 0x0 /* PF_BAR0 */
5356 #define busnum_BDK_GSERNX_LANEX_PCIE_RXEQ2_2_BCFG(a,b) (a)
5357 #define arguments_BDK_GSERNX_LANEX_PCIE_RXEQ2_2_BCFG(a,b) (a),(b),-1,-1
5358 
5359 /**
5360  * Register (RSL) gsern#_lane#_pcie_rxeq2_3_bcfg
5361  *
5362  * GSER Lane PCIe Gen2 RX Equalizer Control Register 3
5363  * Parameters controlling the custom receiver equalization during PCIe Gen2 operation.
5364  * These fields will drive the associated control signal when
5365  * GSERN()_LANE()_SRCMX_BCFG[TX_CTRL_SEL]
5366  * is set to 'PCIe'.
5367  */
5368 union bdk_gsernx_lanex_pcie_rxeq2_3_bcfg
5369 {
5370     uint64_t u;
5371     struct bdk_gsernx_lanex_pcie_rxeq2_3_bcfg_s
5372     {
5373 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
5374         uint64_t reserved_62_63        : 2;
5375         uint64_t pcie_g2_c5_limit_hi   : 6;  /**< [ 61: 56](R/W) C5 postcursor limit high. */
5376         uint64_t pcie_g2_c4_limit_hi   : 6;  /**< [ 55: 50](R/W) C4 postcursor limit high. */
5377         uint64_t pcie_g2_c3_limit_hi   : 6;  /**< [ 49: 44](R/W) C3 postcursor limit high. */
5378         uint64_t pcie_g2_c2_limit_hi   : 6;  /**< [ 43: 38](R/W) C2 postcursor limit high. */
5379         uint64_t pcie_g2_c1_limit_hi   : 6;  /**< [ 37: 32](R/W) C1 postcursor limit high. */
5380         uint64_t reserved_30_31        : 2;
5381         uint64_t pcie_g2_c5_limit_lo   : 6;  /**< [ 29: 24](R/W) C5 postcursor limit low. */
5382         uint64_t pcie_g2_c4_limit_lo   : 6;  /**< [ 23: 18](R/W) C4 postcursor limit low. */
5383         uint64_t pcie_g2_c3_limit_lo   : 6;  /**< [ 17: 12](R/W) C3 postcursor limit low. */
5384         uint64_t pcie_g2_c2_limit_lo   : 6;  /**< [ 11:  6](R/W) C2 postcursor limit low. */
5385         uint64_t pcie_g2_c1_limit_lo   : 6;  /**< [  5:  0](R/W) C1 postcursor limit low. */
5386 #else /* Word 0 - Little Endian */
5387         uint64_t pcie_g2_c1_limit_lo   : 6;  /**< [  5:  0](R/W) C1 postcursor limit low. */
5388         uint64_t pcie_g2_c2_limit_lo   : 6;  /**< [ 11:  6](R/W) C2 postcursor limit low. */
5389         uint64_t pcie_g2_c3_limit_lo   : 6;  /**< [ 17: 12](R/W) C3 postcursor limit low. */
5390         uint64_t pcie_g2_c4_limit_lo   : 6;  /**< [ 23: 18](R/W) C4 postcursor limit low. */
5391         uint64_t pcie_g2_c5_limit_lo   : 6;  /**< [ 29: 24](R/W) C5 postcursor limit low. */
5392         uint64_t reserved_30_31        : 2;
5393         uint64_t pcie_g2_c1_limit_hi   : 6;  /**< [ 37: 32](R/W) C1 postcursor limit high. */
5394         uint64_t pcie_g2_c2_limit_hi   : 6;  /**< [ 43: 38](R/W) C2 postcursor limit high. */
5395         uint64_t pcie_g2_c3_limit_hi   : 6;  /**< [ 49: 44](R/W) C3 postcursor limit high. */
5396         uint64_t pcie_g2_c4_limit_hi   : 6;  /**< [ 55: 50](R/W) C4 postcursor limit high. */
5397         uint64_t pcie_g2_c5_limit_hi   : 6;  /**< [ 61: 56](R/W) C5 postcursor limit high. */
5398         uint64_t reserved_62_63        : 2;
5399 #endif /* Word 0 - End */
5400     } s;
5401     /* struct bdk_gsernx_lanex_pcie_rxeq2_3_bcfg_s cn; */
5402 };
5403 typedef union bdk_gsernx_lanex_pcie_rxeq2_3_bcfg bdk_gsernx_lanex_pcie_rxeq2_3_bcfg_t;
5404 
5405 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXEQ2_3_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_RXEQ2_3_BCFG(unsigned long a,unsigned long b)5406 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXEQ2_3_BCFG(unsigned long a, unsigned long b)
5407 {
5408     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
5409         return 0x87e090002360ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
5410     __bdk_csr_fatal("GSERNX_LANEX_PCIE_RXEQ2_3_BCFG", 2, a, b, 0, 0);
5411 }
5412 
5413 #define typedef_BDK_GSERNX_LANEX_PCIE_RXEQ2_3_BCFG(a,b) bdk_gsernx_lanex_pcie_rxeq2_3_bcfg_t
5414 #define bustype_BDK_GSERNX_LANEX_PCIE_RXEQ2_3_BCFG(a,b) BDK_CSR_TYPE_RSL
5415 #define basename_BDK_GSERNX_LANEX_PCIE_RXEQ2_3_BCFG(a,b) "GSERNX_LANEX_PCIE_RXEQ2_3_BCFG"
5416 #define device_bar_BDK_GSERNX_LANEX_PCIE_RXEQ2_3_BCFG(a,b) 0x0 /* PF_BAR0 */
5417 #define busnum_BDK_GSERNX_LANEX_PCIE_RXEQ2_3_BCFG(a,b) (a)
5418 #define arguments_BDK_GSERNX_LANEX_PCIE_RXEQ2_3_BCFG(a,b) (a),(b),-1,-1
5419 
5420 /**
5421  * Register (RSL) gsern#_lane#_pcie_rxeq2_4_bcfg
5422  *
5423  * GSER Lane PCIe Gen2 RX Equalizer Control Register 4
5424  * Parameters controlling the custom receiver equalization during PCIe Gen2 operation.
5425  * These fields will drive the associated control signal when
5426  * GSERN()_LANE()_SRCMX_BCFG[TX_CTRL_SEL]
5427  * is set to 'PCIe'.
5428  */
5429 union bdk_gsernx_lanex_pcie_rxeq2_4_bcfg
5430 {
5431     uint64_t u;
5432     struct bdk_gsernx_lanex_pcie_rxeq2_4_bcfg_s
5433     {
5434 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
5435         uint64_t pcie_g2_prevga_gn_subrate_fin : 16;/**< [ 63: 48](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
5436                                                                  if subrate gearshifting is enabled.
5437                                                                  Set SUBRATE_INIT = SUBRATE_FIN if subrate gearshifting is not enabled. */
5438         uint64_t pcie_g2_prevga_gn_subrate_init : 16;/**< [ 47: 32](R/W) Subrate counter initial value. Sets the starting value for the LMS update
5439                                                                  interval, if subrate gearshifting is enabled.
5440                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5441         uint64_t pcie_g2_blwc_subrate_final : 16;/**< [ 31: 16](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
5442                                                                  if subrate gearshifting is enabled.
5443                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5444         uint64_t pcie_g2_blwc_subrate_init : 16;/**< [ 15:  0](R/W) Subrate counter initial value. Sets the starting value for the LMS update
5445                                                                  interval, if subrate gearshifting is enabled.
5446                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5447 #else /* Word 0 - Little Endian */
5448         uint64_t pcie_g2_blwc_subrate_init : 16;/**< [ 15:  0](R/W) Subrate counter initial value. Sets the starting value for the LMS update
5449                                                                  interval, if subrate gearshifting is enabled.
5450                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5451         uint64_t pcie_g2_blwc_subrate_final : 16;/**< [ 31: 16](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
5452                                                                  if subrate gearshifting is enabled.
5453                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5454         uint64_t pcie_g2_prevga_gn_subrate_init : 16;/**< [ 47: 32](R/W) Subrate counter initial value. Sets the starting value for the LMS update
5455                                                                  interval, if subrate gearshifting is enabled.
5456                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5457         uint64_t pcie_g2_prevga_gn_subrate_fin : 16;/**< [ 63: 48](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
5458                                                                  if subrate gearshifting is enabled.
5459                                                                  Set SUBRATE_INIT = SUBRATE_FIN if subrate gearshifting is not enabled. */
5460 #endif /* Word 0 - End */
5461     } s;
5462     /* struct bdk_gsernx_lanex_pcie_rxeq2_4_bcfg_s cn; */
5463 };
5464 typedef union bdk_gsernx_lanex_pcie_rxeq2_4_bcfg bdk_gsernx_lanex_pcie_rxeq2_4_bcfg_t;
5465 
5466 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXEQ2_4_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_RXEQ2_4_BCFG(unsigned long a,unsigned long b)5467 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXEQ2_4_BCFG(unsigned long a, unsigned long b)
5468 {
5469     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
5470         return 0x87e090002370ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
5471     __bdk_csr_fatal("GSERNX_LANEX_PCIE_RXEQ2_4_BCFG", 2, a, b, 0, 0);
5472 }
5473 
5474 #define typedef_BDK_GSERNX_LANEX_PCIE_RXEQ2_4_BCFG(a,b) bdk_gsernx_lanex_pcie_rxeq2_4_bcfg_t
5475 #define bustype_BDK_GSERNX_LANEX_PCIE_RXEQ2_4_BCFG(a,b) BDK_CSR_TYPE_RSL
5476 #define basename_BDK_GSERNX_LANEX_PCIE_RXEQ2_4_BCFG(a,b) "GSERNX_LANEX_PCIE_RXEQ2_4_BCFG"
5477 #define device_bar_BDK_GSERNX_LANEX_PCIE_RXEQ2_4_BCFG(a,b) 0x0 /* PF_BAR0 */
5478 #define busnum_BDK_GSERNX_LANEX_PCIE_RXEQ2_4_BCFG(a,b) (a)
5479 #define arguments_BDK_GSERNX_LANEX_PCIE_RXEQ2_4_BCFG(a,b) (a),(b),-1,-1
5480 
5481 /**
5482  * Register (RSL) gsern#_lane#_pcie_rxeq3_1_bcfg
5483  *
5484  * GSER Lane PCIe Gen3 RX Equalizer Control Register 1
5485  * Parameters controlling the custom receiver equalization during PCIe Gen3 operation.
5486  * These fields will drive the associated control signal when
5487  * GSERN()_LANE()_SRCMX_BCFG[TX_CTRL_SEL]
5488  * is set to 'PCIe'.
5489  */
5490 union bdk_gsernx_lanex_pcie_rxeq3_1_bcfg
5491 {
5492     uint64_t u;
5493     struct bdk_gsernx_lanex_pcie_rxeq3_1_bcfg_s
5494     {
5495 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
5496         uint64_t reserved_43_63        : 21;
5497         uint64_t pcie_g3_blwc_deadband : 12; /**< [ 42: 31](R/W) BLWC adaptation deadband settings.
5498                                                                  12-bit field to match accumulator, but typically a value less than 0x0FF is used. */
5499         uint64_t pcie_g3_erc           : 4;  /**< [ 30: 27](R/W) Interpolator edge-rate control. This control is shared between all
5500                                                                  interpolators in the lane.  See GSERN()_LANE()_RX_ST_BCFG.ERC
5501                                                                  for detailed information. */
5502         uint64_t pcie_g3_c6_c15_limit_hi : 6;/**< [ 26: 21](R/W) C6 to C15 postcursor limit high. */
5503         uint64_t pcie_g3_c6_c15_limit_lo : 6;/**< [ 20: 15](R/W) C6 to C15 postcursor limit low. */
5504         uint64_t pcie_g3_ctle_lte_zero_ovrd_en : 1;/**< [ 14: 14](R/W) CTLE LTE zero frequency override enable.
5505                                                                  By default, the override should be enabled; otherwise, CTLE_LTE_ZERO
5506                                                                  will be set equal to CTLE_ZERO within the RX adaptation FSM. */
5507         uint64_t pcie_g3_ctle_lte_zero_ovrd : 4;/**< [ 13: 10](R/W) CTLE LTE zero frequency override value. */
5508         uint64_t pcie_g3_settle_wait   : 4;  /**< [  9:  6](R/W) Number of clock cycles for the DFE adaptation to wait after changing the
5509                                                                  adjusted C1 values before resuming accumulation. */
5510         uint64_t pcie_g3_voter_sp_mask : 1;  /**< [  5:  5](R/W) Set to mask out "010" and "101" patterns in RX cdr voter.
5511                                                                  GSERN()_LANE()_CDRFSM_BCFG[VOTER_SP_MASK] will be updated
5512                                                                  by the hardware even when this bit drives the control. */
5513         uint64_t pcie_g3_c1_q_adjust   : 5;  /**< [  4:  0](R/W) Adjust value magnitude for the error slice in the Q path. */
5514 #else /* Word 0 - Little Endian */
5515         uint64_t pcie_g3_c1_q_adjust   : 5;  /**< [  4:  0](R/W) Adjust value magnitude for the error slice in the Q path. */
5516         uint64_t pcie_g3_voter_sp_mask : 1;  /**< [  5:  5](R/W) Set to mask out "010" and "101" patterns in RX cdr voter.
5517                                                                  GSERN()_LANE()_CDRFSM_BCFG[VOTER_SP_MASK] will be updated
5518                                                                  by the hardware even when this bit drives the control. */
5519         uint64_t pcie_g3_settle_wait   : 4;  /**< [  9:  6](R/W) Number of clock cycles for the DFE adaptation to wait after changing the
5520                                                                  adjusted C1 values before resuming accumulation. */
5521         uint64_t pcie_g3_ctle_lte_zero_ovrd : 4;/**< [ 13: 10](R/W) CTLE LTE zero frequency override value. */
5522         uint64_t pcie_g3_ctle_lte_zero_ovrd_en : 1;/**< [ 14: 14](R/W) CTLE LTE zero frequency override enable.
5523                                                                  By default, the override should be enabled; otherwise, CTLE_LTE_ZERO
5524                                                                  will be set equal to CTLE_ZERO within the RX adaptation FSM. */
5525         uint64_t pcie_g3_c6_c15_limit_lo : 6;/**< [ 20: 15](R/W) C6 to C15 postcursor limit low. */
5526         uint64_t pcie_g3_c6_c15_limit_hi : 6;/**< [ 26: 21](R/W) C6 to C15 postcursor limit high. */
5527         uint64_t pcie_g3_erc           : 4;  /**< [ 30: 27](R/W) Interpolator edge-rate control. This control is shared between all
5528                                                                  interpolators in the lane.  See GSERN()_LANE()_RX_ST_BCFG.ERC
5529                                                                  for detailed information. */
5530         uint64_t pcie_g3_blwc_deadband : 12; /**< [ 42: 31](R/W) BLWC adaptation deadband settings.
5531                                                                  12-bit field to match accumulator, but typically a value less than 0x0FF is used. */
5532         uint64_t reserved_43_63        : 21;
5533 #endif /* Word 0 - End */
5534     } s;
5535     /* struct bdk_gsernx_lanex_pcie_rxeq3_1_bcfg_s cn; */
5536 };
5537 typedef union bdk_gsernx_lanex_pcie_rxeq3_1_bcfg bdk_gsernx_lanex_pcie_rxeq3_1_bcfg_t;
5538 
5539 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXEQ3_1_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_RXEQ3_1_BCFG(unsigned long a,unsigned long b)5540 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXEQ3_1_BCFG(unsigned long a, unsigned long b)
5541 {
5542     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
5543         return 0x87e090002380ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
5544     __bdk_csr_fatal("GSERNX_LANEX_PCIE_RXEQ3_1_BCFG", 2, a, b, 0, 0);
5545 }
5546 
5547 #define typedef_BDK_GSERNX_LANEX_PCIE_RXEQ3_1_BCFG(a,b) bdk_gsernx_lanex_pcie_rxeq3_1_bcfg_t
5548 #define bustype_BDK_GSERNX_LANEX_PCIE_RXEQ3_1_BCFG(a,b) BDK_CSR_TYPE_RSL
5549 #define basename_BDK_GSERNX_LANEX_PCIE_RXEQ3_1_BCFG(a,b) "GSERNX_LANEX_PCIE_RXEQ3_1_BCFG"
5550 #define device_bar_BDK_GSERNX_LANEX_PCIE_RXEQ3_1_BCFG(a,b) 0x0 /* PF_BAR0 */
5551 #define busnum_BDK_GSERNX_LANEX_PCIE_RXEQ3_1_BCFG(a,b) (a)
5552 #define arguments_BDK_GSERNX_LANEX_PCIE_RXEQ3_1_BCFG(a,b) (a),(b),-1,-1
5553 
5554 /**
5555  * Register (RSL) gsern#_lane#_pcie_rxeq3_2_bcfg
5556  *
5557  * GSER Lane PCIe Gen3 RX Equalizer Control Register 2
5558  * Parameters controlling the custom receiver equalization during PCIe Gen3 operation.
5559  * These fields will drive the associated control signal when
5560  * GSERN()_LANE()_SRCMX_BCFG[TX_CTRL_SEL]
5561  * is set to 'PCIe'.
5562  */
5563 union bdk_gsernx_lanex_pcie_rxeq3_2_bcfg
5564 {
5565     uint64_t u;
5566     struct bdk_gsernx_lanex_pcie_rxeq3_2_bcfg_s
5567     {
5568 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
5569         uint64_t pcie_g3_afeos_subrate_final : 16;/**< [ 63: 48](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
5570                                                                  if subrate gearshifting is enabled.
5571                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5572         uint64_t pcie_g3_afeos_subrate_init : 16;/**< [ 47: 32](R/W) Subrate counter initial value. Sets the starting value for the LMS update
5573                                                                  interval, if subrate gearshifting is enabled.
5574                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5575         uint64_t pcie_g3_subrate_final : 16; /**< [ 31: 16](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
5576                                                                  if subrate gearshifting is enabled.
5577                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5578         uint64_t pcie_g3_subrate_init  : 16; /**< [ 15:  0](R/W) Subrate counter initial value. Sets the starting value for the LMS update
5579                                                                  interval, if subrate gearshifting is enabled.
5580                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5581 #else /* Word 0 - Little Endian */
5582         uint64_t pcie_g3_subrate_init  : 16; /**< [ 15:  0](R/W) Subrate counter initial value. Sets the starting value for the LMS update
5583                                                                  interval, if subrate gearshifting is enabled.
5584                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5585         uint64_t pcie_g3_subrate_final : 16; /**< [ 31: 16](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
5586                                                                  if subrate gearshifting is enabled.
5587                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5588         uint64_t pcie_g3_afeos_subrate_init : 16;/**< [ 47: 32](R/W) Subrate counter initial value. Sets the starting value for the LMS update
5589                                                                  interval, if subrate gearshifting is enabled.
5590                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5591         uint64_t pcie_g3_afeos_subrate_final : 16;/**< [ 63: 48](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
5592                                                                  if subrate gearshifting is enabled.
5593                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5594 #endif /* Word 0 - End */
5595     } s;
5596     /* struct bdk_gsernx_lanex_pcie_rxeq3_2_bcfg_s cn; */
5597 };
5598 typedef union bdk_gsernx_lanex_pcie_rxeq3_2_bcfg bdk_gsernx_lanex_pcie_rxeq3_2_bcfg_t;
5599 
5600 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXEQ3_2_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_RXEQ3_2_BCFG(unsigned long a,unsigned long b)5601 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXEQ3_2_BCFG(unsigned long a, unsigned long b)
5602 {
5603     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
5604         return 0x87e090002390ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
5605     __bdk_csr_fatal("GSERNX_LANEX_PCIE_RXEQ3_2_BCFG", 2, a, b, 0, 0);
5606 }
5607 
5608 #define typedef_BDK_GSERNX_LANEX_PCIE_RXEQ3_2_BCFG(a,b) bdk_gsernx_lanex_pcie_rxeq3_2_bcfg_t
5609 #define bustype_BDK_GSERNX_LANEX_PCIE_RXEQ3_2_BCFG(a,b) BDK_CSR_TYPE_RSL
5610 #define basename_BDK_GSERNX_LANEX_PCIE_RXEQ3_2_BCFG(a,b) "GSERNX_LANEX_PCIE_RXEQ3_2_BCFG"
5611 #define device_bar_BDK_GSERNX_LANEX_PCIE_RXEQ3_2_BCFG(a,b) 0x0 /* PF_BAR0 */
5612 #define busnum_BDK_GSERNX_LANEX_PCIE_RXEQ3_2_BCFG(a,b) (a)
5613 #define arguments_BDK_GSERNX_LANEX_PCIE_RXEQ3_2_BCFG(a,b) (a),(b),-1,-1
5614 
5615 /**
5616  * Register (RSL) gsern#_lane#_pcie_rxeq3_3_bcfg
5617  *
5618  * GSER Lane PCIe Gen3 RX Equalizer Control Register 3
5619  * Parameters controlling the custom receiver equalization during PCIe Gen3 operation.
5620  * These fields will drive the associated control signal when
5621  * GSERN()_LANE()_SRCMX_BCFG[TX_CTRL_SEL]
5622  * is set to 'PCIe'.
5623  */
5624 union bdk_gsernx_lanex_pcie_rxeq3_3_bcfg
5625 {
5626     uint64_t u;
5627     struct bdk_gsernx_lanex_pcie_rxeq3_3_bcfg_s
5628     {
5629 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
5630         uint64_t reserved_62_63        : 2;
5631         uint64_t pcie_g3_c5_limit_hi   : 6;  /**< [ 61: 56](R/W) C5 postcursor limit high. */
5632         uint64_t pcie_g3_c4_limit_hi   : 6;  /**< [ 55: 50](R/W) C4 postcursor limit high. */
5633         uint64_t pcie_g3_c3_limit_hi   : 6;  /**< [ 49: 44](R/W) C3 postcursor limit high. */
5634         uint64_t pcie_g3_c2_limit_hi   : 6;  /**< [ 43: 38](R/W) C2 postcursor limit high. */
5635         uint64_t pcie_g3_c1_limit_hi   : 6;  /**< [ 37: 32](R/W) C1 postcursor limit high. */
5636         uint64_t reserved_30_31        : 2;
5637         uint64_t pcie_g3_c5_limit_lo   : 6;  /**< [ 29: 24](R/W) C5 postcursor limit low. */
5638         uint64_t pcie_g3_c4_limit_lo   : 6;  /**< [ 23: 18](R/W) C4 postcursor limit low. */
5639         uint64_t pcie_g3_c3_limit_lo   : 6;  /**< [ 17: 12](R/W) C3 postcursor limit low. */
5640         uint64_t pcie_g3_c2_limit_lo   : 6;  /**< [ 11:  6](R/W) C2 postcursor limit low. */
5641         uint64_t pcie_g3_c1_limit_lo   : 6;  /**< [  5:  0](R/W) C1 postcursor limit low. */
5642 #else /* Word 0 - Little Endian */
5643         uint64_t pcie_g3_c1_limit_lo   : 6;  /**< [  5:  0](R/W) C1 postcursor limit low. */
5644         uint64_t pcie_g3_c2_limit_lo   : 6;  /**< [ 11:  6](R/W) C2 postcursor limit low. */
5645         uint64_t pcie_g3_c3_limit_lo   : 6;  /**< [ 17: 12](R/W) C3 postcursor limit low. */
5646         uint64_t pcie_g3_c4_limit_lo   : 6;  /**< [ 23: 18](R/W) C4 postcursor limit low. */
5647         uint64_t pcie_g3_c5_limit_lo   : 6;  /**< [ 29: 24](R/W) C5 postcursor limit low. */
5648         uint64_t reserved_30_31        : 2;
5649         uint64_t pcie_g3_c1_limit_hi   : 6;  /**< [ 37: 32](R/W) C1 postcursor limit high. */
5650         uint64_t pcie_g3_c2_limit_hi   : 6;  /**< [ 43: 38](R/W) C2 postcursor limit high. */
5651         uint64_t pcie_g3_c3_limit_hi   : 6;  /**< [ 49: 44](R/W) C3 postcursor limit high. */
5652         uint64_t pcie_g3_c4_limit_hi   : 6;  /**< [ 55: 50](R/W) C4 postcursor limit high. */
5653         uint64_t pcie_g3_c5_limit_hi   : 6;  /**< [ 61: 56](R/W) C5 postcursor limit high. */
5654         uint64_t reserved_62_63        : 2;
5655 #endif /* Word 0 - End */
5656     } s;
5657     /* struct bdk_gsernx_lanex_pcie_rxeq3_3_bcfg_s cn; */
5658 };
5659 typedef union bdk_gsernx_lanex_pcie_rxeq3_3_bcfg bdk_gsernx_lanex_pcie_rxeq3_3_bcfg_t;
5660 
5661 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXEQ3_3_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_RXEQ3_3_BCFG(unsigned long a,unsigned long b)5662 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXEQ3_3_BCFG(unsigned long a, unsigned long b)
5663 {
5664     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
5665         return 0x87e0900023a0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
5666     __bdk_csr_fatal("GSERNX_LANEX_PCIE_RXEQ3_3_BCFG", 2, a, b, 0, 0);
5667 }
5668 
5669 #define typedef_BDK_GSERNX_LANEX_PCIE_RXEQ3_3_BCFG(a,b) bdk_gsernx_lanex_pcie_rxeq3_3_bcfg_t
5670 #define bustype_BDK_GSERNX_LANEX_PCIE_RXEQ3_3_BCFG(a,b) BDK_CSR_TYPE_RSL
5671 #define basename_BDK_GSERNX_LANEX_PCIE_RXEQ3_3_BCFG(a,b) "GSERNX_LANEX_PCIE_RXEQ3_3_BCFG"
5672 #define device_bar_BDK_GSERNX_LANEX_PCIE_RXEQ3_3_BCFG(a,b) 0x0 /* PF_BAR0 */
5673 #define busnum_BDK_GSERNX_LANEX_PCIE_RXEQ3_3_BCFG(a,b) (a)
5674 #define arguments_BDK_GSERNX_LANEX_PCIE_RXEQ3_3_BCFG(a,b) (a),(b),-1,-1
5675 
5676 /**
5677  * Register (RSL) gsern#_lane#_pcie_rxeq3_4_bcfg
5678  *
5679  * GSER Lane PCIe Gen3 RX Equalizer Control Register 4
5680  * Parameters controlling the custom receiver equalization during PCIe Gen3 operation.
5681  * These fields will drive the associated control signal when
5682  * GSERN()_LANE()_SRCMX_BCFG[TX_CTRL_SEL]
5683  * is set to 'PCIe'.
5684  */
5685 union bdk_gsernx_lanex_pcie_rxeq3_4_bcfg
5686 {
5687     uint64_t u;
5688     struct bdk_gsernx_lanex_pcie_rxeq3_4_bcfg_s
5689     {
5690 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
5691         uint64_t pcie_g3_prevga_gn_subrate_fin : 16;/**< [ 63: 48](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
5692                                                                  if subrate gearshifting is enabled.
5693                                                                  Set SUBRATE_INIT = SUBRATE_FIN if subrate gearshifting is not enabled. */
5694         uint64_t pcie_g3_prevga_gn_subrate_init : 16;/**< [ 47: 32](R/W) Subrate counter initial value. Sets the starting value for the LMS update
5695                                                                  interval, if subrate gearshifting is enabled.
5696                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5697         uint64_t pcie_g3_blwc_subrate_final : 16;/**< [ 31: 16](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
5698                                                                  if subrate gearshifting is enabled.
5699                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5700         uint64_t pcie_g3_blwc_subrate_init : 16;/**< [ 15:  0](R/W) Subrate counter initial value. Sets the starting value for the LMS update
5701                                                                  interval, if subrate gearshifting is enabled.
5702                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5703 #else /* Word 0 - Little Endian */
5704         uint64_t pcie_g3_blwc_subrate_init : 16;/**< [ 15:  0](R/W) Subrate counter initial value. Sets the starting value for the LMS update
5705                                                                  interval, if subrate gearshifting is enabled.
5706                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5707         uint64_t pcie_g3_blwc_subrate_final : 16;/**< [ 31: 16](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
5708                                                                  if subrate gearshifting is enabled.
5709                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5710         uint64_t pcie_g3_prevga_gn_subrate_init : 16;/**< [ 47: 32](R/W) Subrate counter initial value. Sets the starting value for the LMS update
5711                                                                  interval, if subrate gearshifting is enabled.
5712                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5713         uint64_t pcie_g3_prevga_gn_subrate_fin : 16;/**< [ 63: 48](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
5714                                                                  if subrate gearshifting is enabled.
5715                                                                  Set SUBRATE_INIT = SUBRATE_FIN if subrate gearshifting is not enabled. */
5716 #endif /* Word 0 - End */
5717     } s;
5718     /* struct bdk_gsernx_lanex_pcie_rxeq3_4_bcfg_s cn; */
5719 };
5720 typedef union bdk_gsernx_lanex_pcie_rxeq3_4_bcfg bdk_gsernx_lanex_pcie_rxeq3_4_bcfg_t;
5721 
5722 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXEQ3_4_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_RXEQ3_4_BCFG(unsigned long a,unsigned long b)5723 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXEQ3_4_BCFG(unsigned long a, unsigned long b)
5724 {
5725     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
5726         return 0x87e0900023b0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
5727     __bdk_csr_fatal("GSERNX_LANEX_PCIE_RXEQ3_4_BCFG", 2, a, b, 0, 0);
5728 }
5729 
5730 #define typedef_BDK_GSERNX_LANEX_PCIE_RXEQ3_4_BCFG(a,b) bdk_gsernx_lanex_pcie_rxeq3_4_bcfg_t
5731 #define bustype_BDK_GSERNX_LANEX_PCIE_RXEQ3_4_BCFG(a,b) BDK_CSR_TYPE_RSL
5732 #define basename_BDK_GSERNX_LANEX_PCIE_RXEQ3_4_BCFG(a,b) "GSERNX_LANEX_PCIE_RXEQ3_4_BCFG"
5733 #define device_bar_BDK_GSERNX_LANEX_PCIE_RXEQ3_4_BCFG(a,b) 0x0 /* PF_BAR0 */
5734 #define busnum_BDK_GSERNX_LANEX_PCIE_RXEQ3_4_BCFG(a,b) (a)
5735 #define arguments_BDK_GSERNX_LANEX_PCIE_RXEQ3_4_BCFG(a,b) (a),(b),-1,-1
5736 
5737 /**
5738  * Register (RSL) gsern#_lane#_pcie_rxeq4_1_bcfg
5739  *
5740  * GSER Lane PCIe Gen4 RX Equalizer Control Register 1
5741  * Parameters controlling the custom receiver equalization during PCIe Gen4 operation.
5742  * These fields will drive the associated control signal when
5743  * GSERN()_LANE()_SRCMX_BCFG[TX_CTRL_SEL]
5744  * is set to 'PCIe'.
5745  */
5746 union bdk_gsernx_lanex_pcie_rxeq4_1_bcfg
5747 {
5748     uint64_t u;
5749     struct bdk_gsernx_lanex_pcie_rxeq4_1_bcfg_s
5750     {
5751 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
5752         uint64_t reserved_43_63        : 21;
5753         uint64_t pcie_g4_blwc_deadband : 12; /**< [ 42: 31](R/W) BLWC adaptation deadband settings.
5754                                                                  12-bit field to match accumulator, but typically a value less than 0x0FF is used. */
5755         uint64_t pcie_g4_erc           : 4;  /**< [ 30: 27](R/W) Interpolator edge-rate control. This control is shared between all
5756                                                                  interpolators in the lane.  See GSERN()_LANE()_RX_ST_BCFG.ERC
5757                                                                  for detailed information. */
5758         uint64_t pcie_g4_c6_c15_limit_hi : 6;/**< [ 26: 21](R/W) C6 to C15 postcursor limit high. */
5759         uint64_t pcie_g4_c6_c15_limit_lo : 6;/**< [ 20: 15](R/W) C6 to C15 postcursor limit low. */
5760         uint64_t pcie_g4_ctle_lte_zero_ovrd_en : 1;/**< [ 14: 14](R/W) CTLE LTE zero frequency override enable.
5761                                                                  By default, the override should be enabled; otherwise, CTLE_LTE_ZERO
5762                                                                  will be set equal to CTLE_ZERO within the RX adaptation FSM. */
5763         uint64_t pcie_g4_ctle_lte_zero_ovrd : 4;/**< [ 13: 10](R/W) CTLE LTE zero frequency override value. */
5764         uint64_t pcie_g4_settle_wait   : 4;  /**< [  9:  6](R/W) Number of clock cycles for the DFE adaptation to wait after changing the
5765                                                                  adjusted C1 values before resuming accumulation. */
5766         uint64_t pcie_g4_voter_sp_mask : 1;  /**< [  5:  5](R/W) Set to mask out "010" and "101" patterns in RX cdr voter.
5767                                                                  GSERN()_LANE()_CDRFSM_BCFG[VOTER_SP_MASK] will be updated
5768                                                                  by the hardware even when this bit drives the control. */
5769         uint64_t pcie_g4_c1_q_adjust   : 5;  /**< [  4:  0](R/W) Adjust value magnitude for the error slice in the Q path. */
5770 #else /* Word 0 - Little Endian */
5771         uint64_t pcie_g4_c1_q_adjust   : 5;  /**< [  4:  0](R/W) Adjust value magnitude for the error slice in the Q path. */
5772         uint64_t pcie_g4_voter_sp_mask : 1;  /**< [  5:  5](R/W) Set to mask out "010" and "101" patterns in RX cdr voter.
5773                                                                  GSERN()_LANE()_CDRFSM_BCFG[VOTER_SP_MASK] will be updated
5774                                                                  by the hardware even when this bit drives the control. */
5775         uint64_t pcie_g4_settle_wait   : 4;  /**< [  9:  6](R/W) Number of clock cycles for the DFE adaptation to wait after changing the
5776                                                                  adjusted C1 values before resuming accumulation. */
5777         uint64_t pcie_g4_ctle_lte_zero_ovrd : 4;/**< [ 13: 10](R/W) CTLE LTE zero frequency override value. */
5778         uint64_t pcie_g4_ctle_lte_zero_ovrd_en : 1;/**< [ 14: 14](R/W) CTLE LTE zero frequency override enable.
5779                                                                  By default, the override should be enabled; otherwise, CTLE_LTE_ZERO
5780                                                                  will be set equal to CTLE_ZERO within the RX adaptation FSM. */
5781         uint64_t pcie_g4_c6_c15_limit_lo : 6;/**< [ 20: 15](R/W) C6 to C15 postcursor limit low. */
5782         uint64_t pcie_g4_c6_c15_limit_hi : 6;/**< [ 26: 21](R/W) C6 to C15 postcursor limit high. */
5783         uint64_t pcie_g4_erc           : 4;  /**< [ 30: 27](R/W) Interpolator edge-rate control. This control is shared between all
5784                                                                  interpolators in the lane.  See GSERN()_LANE()_RX_ST_BCFG.ERC
5785                                                                  for detailed information. */
5786         uint64_t pcie_g4_blwc_deadband : 12; /**< [ 42: 31](R/W) BLWC adaptation deadband settings.
5787                                                                  12-bit field to match accumulator, but typically a value less than 0x0FF is used. */
5788         uint64_t reserved_43_63        : 21;
5789 #endif /* Word 0 - End */
5790     } s;
5791     /* struct bdk_gsernx_lanex_pcie_rxeq4_1_bcfg_s cn; */
5792 };
5793 typedef union bdk_gsernx_lanex_pcie_rxeq4_1_bcfg bdk_gsernx_lanex_pcie_rxeq4_1_bcfg_t;
5794 
5795 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXEQ4_1_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_RXEQ4_1_BCFG(unsigned long a,unsigned long b)5796 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXEQ4_1_BCFG(unsigned long a, unsigned long b)
5797 {
5798     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
5799         return 0x87e0900023c0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
5800     __bdk_csr_fatal("GSERNX_LANEX_PCIE_RXEQ4_1_BCFG", 2, a, b, 0, 0);
5801 }
5802 
5803 #define typedef_BDK_GSERNX_LANEX_PCIE_RXEQ4_1_BCFG(a,b) bdk_gsernx_lanex_pcie_rxeq4_1_bcfg_t
5804 #define bustype_BDK_GSERNX_LANEX_PCIE_RXEQ4_1_BCFG(a,b) BDK_CSR_TYPE_RSL
5805 #define basename_BDK_GSERNX_LANEX_PCIE_RXEQ4_1_BCFG(a,b) "GSERNX_LANEX_PCIE_RXEQ4_1_BCFG"
5806 #define device_bar_BDK_GSERNX_LANEX_PCIE_RXEQ4_1_BCFG(a,b) 0x0 /* PF_BAR0 */
5807 #define busnum_BDK_GSERNX_LANEX_PCIE_RXEQ4_1_BCFG(a,b) (a)
5808 #define arguments_BDK_GSERNX_LANEX_PCIE_RXEQ4_1_BCFG(a,b) (a),(b),-1,-1
5809 
5810 /**
5811  * Register (RSL) gsern#_lane#_pcie_rxeq4_2_bcfg
5812  *
5813  * GSER Lane PCIe Gen4 RX Equalizer Control Register 2
5814  * Parameters controlling the custom receiver equalization during PCIe Gen4 operation.
5815  * These fields will drive the associated control signal when
5816  * GSERN()_LANE()_SRCMX_BCFG[TX_CTRL_SEL]
5817  * is set to 'PCIe'.
5818  */
5819 union bdk_gsernx_lanex_pcie_rxeq4_2_bcfg
5820 {
5821     uint64_t u;
5822     struct bdk_gsernx_lanex_pcie_rxeq4_2_bcfg_s
5823     {
5824 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
5825         uint64_t pcie_g4_afeos_subrate_final : 16;/**< [ 63: 48](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
5826                                                                  if subrate gearshifting is enabled.
5827                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5828         uint64_t pcie_g4_afeos_subrate_init : 16;/**< [ 47: 32](R/W) Subrate counter initial value. Sets the starting value for the LMS update
5829                                                                  interval, if subrate gearshifting is enabled.
5830                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5831         uint64_t pcie_g4_subrate_final : 16; /**< [ 31: 16](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
5832                                                                  if subrate gearshifting is enabled.
5833                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5834         uint64_t pcie_g4_subrate_init  : 16; /**< [ 15:  0](R/W) Subrate counter initial value. Sets the starting value for the LMS update
5835                                                                  interval, if subrate gearshifting is enabled.
5836                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5837 #else /* Word 0 - Little Endian */
5838         uint64_t pcie_g4_subrate_init  : 16; /**< [ 15:  0](R/W) Subrate counter initial value. Sets the starting value for the LMS update
5839                                                                  interval, if subrate gearshifting is enabled.
5840                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5841         uint64_t pcie_g4_subrate_final : 16; /**< [ 31: 16](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
5842                                                                  if subrate gearshifting is enabled.
5843                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5844         uint64_t pcie_g4_afeos_subrate_init : 16;/**< [ 47: 32](R/W) Subrate counter initial value. Sets the starting value for the LMS update
5845                                                                  interval, if subrate gearshifting is enabled.
5846                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5847         uint64_t pcie_g4_afeos_subrate_final : 16;/**< [ 63: 48](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
5848                                                                  if subrate gearshifting is enabled.
5849                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5850 #endif /* Word 0 - End */
5851     } s;
5852     /* struct bdk_gsernx_lanex_pcie_rxeq4_2_bcfg_s cn; */
5853 };
5854 typedef union bdk_gsernx_lanex_pcie_rxeq4_2_bcfg bdk_gsernx_lanex_pcie_rxeq4_2_bcfg_t;
5855 
5856 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXEQ4_2_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_RXEQ4_2_BCFG(unsigned long a,unsigned long b)5857 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXEQ4_2_BCFG(unsigned long a, unsigned long b)
5858 {
5859     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
5860         return 0x87e0900023d0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
5861     __bdk_csr_fatal("GSERNX_LANEX_PCIE_RXEQ4_2_BCFG", 2, a, b, 0, 0);
5862 }
5863 
5864 #define typedef_BDK_GSERNX_LANEX_PCIE_RXEQ4_2_BCFG(a,b) bdk_gsernx_lanex_pcie_rxeq4_2_bcfg_t
5865 #define bustype_BDK_GSERNX_LANEX_PCIE_RXEQ4_2_BCFG(a,b) BDK_CSR_TYPE_RSL
5866 #define basename_BDK_GSERNX_LANEX_PCIE_RXEQ4_2_BCFG(a,b) "GSERNX_LANEX_PCIE_RXEQ4_2_BCFG"
5867 #define device_bar_BDK_GSERNX_LANEX_PCIE_RXEQ4_2_BCFG(a,b) 0x0 /* PF_BAR0 */
5868 #define busnum_BDK_GSERNX_LANEX_PCIE_RXEQ4_2_BCFG(a,b) (a)
5869 #define arguments_BDK_GSERNX_LANEX_PCIE_RXEQ4_2_BCFG(a,b) (a),(b),-1,-1
5870 
5871 /**
5872  * Register (RSL) gsern#_lane#_pcie_rxeq4_3_bcfg
5873  *
5874  * GSER Lane PCIe Gen4 RX Equalizer Control Register 3
5875  * Parameters controlling the custom receiver equalization during PCIe Gen4 operation.
5876  * These fields will drive the associated control signal when
5877  * GSERN()_LANE()_SRCMX_BCFG[TX_CTRL_SEL]
5878  * is set to 'PCIe'.
5879  */
5880 union bdk_gsernx_lanex_pcie_rxeq4_3_bcfg
5881 {
5882     uint64_t u;
5883     struct bdk_gsernx_lanex_pcie_rxeq4_3_bcfg_s
5884     {
5885 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
5886         uint64_t reserved_62_63        : 2;
5887         uint64_t pcie_g4_c5_limit_hi   : 6;  /**< [ 61: 56](R/W) C5 postcursor limit high. */
5888         uint64_t pcie_g4_c4_limit_hi   : 6;  /**< [ 55: 50](R/W) C4 postcursor limit high. */
5889         uint64_t pcie_g4_c3_limit_hi   : 6;  /**< [ 49: 44](R/W) C3 postcursor limit high. */
5890         uint64_t pcie_g4_c2_limit_hi   : 6;  /**< [ 43: 38](R/W) C2 postcursor limit high. */
5891         uint64_t pcie_g4_c1_limit_hi   : 6;  /**< [ 37: 32](R/W) C1 postcursor limit high. */
5892         uint64_t reserved_30_31        : 2;
5893         uint64_t pcie_g4_c5_limit_lo   : 6;  /**< [ 29: 24](R/W) C5 postcursor limit low. */
5894         uint64_t pcie_g4_c4_limit_lo   : 6;  /**< [ 23: 18](R/W) C4 postcursor limit low. */
5895         uint64_t pcie_g4_c3_limit_lo   : 6;  /**< [ 17: 12](R/W) C3 postcursor limit low. */
5896         uint64_t pcie_g4_c2_limit_lo   : 6;  /**< [ 11:  6](R/W) C2 postcursor limit low. */
5897         uint64_t pcie_g4_c1_limit_lo   : 6;  /**< [  5:  0](R/W) C1 postcursor limit low. */
5898 #else /* Word 0 - Little Endian */
5899         uint64_t pcie_g4_c1_limit_lo   : 6;  /**< [  5:  0](R/W) C1 postcursor limit low. */
5900         uint64_t pcie_g4_c2_limit_lo   : 6;  /**< [ 11:  6](R/W) C2 postcursor limit low. */
5901         uint64_t pcie_g4_c3_limit_lo   : 6;  /**< [ 17: 12](R/W) C3 postcursor limit low. */
5902         uint64_t pcie_g4_c4_limit_lo   : 6;  /**< [ 23: 18](R/W) C4 postcursor limit low. */
5903         uint64_t pcie_g4_c5_limit_lo   : 6;  /**< [ 29: 24](R/W) C5 postcursor limit low. */
5904         uint64_t reserved_30_31        : 2;
5905         uint64_t pcie_g4_c1_limit_hi   : 6;  /**< [ 37: 32](R/W) C1 postcursor limit high. */
5906         uint64_t pcie_g4_c2_limit_hi   : 6;  /**< [ 43: 38](R/W) C2 postcursor limit high. */
5907         uint64_t pcie_g4_c3_limit_hi   : 6;  /**< [ 49: 44](R/W) C3 postcursor limit high. */
5908         uint64_t pcie_g4_c4_limit_hi   : 6;  /**< [ 55: 50](R/W) C4 postcursor limit high. */
5909         uint64_t pcie_g4_c5_limit_hi   : 6;  /**< [ 61: 56](R/W) C5 postcursor limit high. */
5910         uint64_t reserved_62_63        : 2;
5911 #endif /* Word 0 - End */
5912     } s;
5913     /* struct bdk_gsernx_lanex_pcie_rxeq4_3_bcfg_s cn; */
5914 };
5915 typedef union bdk_gsernx_lanex_pcie_rxeq4_3_bcfg bdk_gsernx_lanex_pcie_rxeq4_3_bcfg_t;
5916 
5917 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXEQ4_3_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_RXEQ4_3_BCFG(unsigned long a,unsigned long b)5918 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXEQ4_3_BCFG(unsigned long a, unsigned long b)
5919 {
5920     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
5921         return 0x87e0900023e0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
5922     __bdk_csr_fatal("GSERNX_LANEX_PCIE_RXEQ4_3_BCFG", 2, a, b, 0, 0);
5923 }
5924 
5925 #define typedef_BDK_GSERNX_LANEX_PCIE_RXEQ4_3_BCFG(a,b) bdk_gsernx_lanex_pcie_rxeq4_3_bcfg_t
5926 #define bustype_BDK_GSERNX_LANEX_PCIE_RXEQ4_3_BCFG(a,b) BDK_CSR_TYPE_RSL
5927 #define basename_BDK_GSERNX_LANEX_PCIE_RXEQ4_3_BCFG(a,b) "GSERNX_LANEX_PCIE_RXEQ4_3_BCFG"
5928 #define device_bar_BDK_GSERNX_LANEX_PCIE_RXEQ4_3_BCFG(a,b) 0x0 /* PF_BAR0 */
5929 #define busnum_BDK_GSERNX_LANEX_PCIE_RXEQ4_3_BCFG(a,b) (a)
5930 #define arguments_BDK_GSERNX_LANEX_PCIE_RXEQ4_3_BCFG(a,b) (a),(b),-1,-1
5931 
5932 /**
5933  * Register (RSL) gsern#_lane#_pcie_rxeq4_4_bcfg
5934  *
5935  * GSER Lane PCIe Gen4 RX Equalizer Control Register 4
5936  * Parameters controlling the custom receiver equalization during PCIe Gen4 operation.
5937  * These fields will drive the associated control signal when
5938  * GSERN()_LANE()_SRCMX_BCFG[TX_CTRL_SEL]
5939  * is set to 'PCIe'.
5940  */
5941 union bdk_gsernx_lanex_pcie_rxeq4_4_bcfg
5942 {
5943     uint64_t u;
5944     struct bdk_gsernx_lanex_pcie_rxeq4_4_bcfg_s
5945     {
5946 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
5947         uint64_t pcie_g4_prevga_gn_subrate_fin : 16;/**< [ 63: 48](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
5948                                                                  if subrate gearshifting is enabled.
5949                                                                  Set SUBRATE_INIT = SUBRATE_FIN if subrate gearshifting is not enabled. */
5950         uint64_t pcie_g4_prevga_gn_subrate_init : 16;/**< [ 47: 32](R/W) Subrate counter initial value. Sets the starting value for the LMS update
5951                                                                  interval, if subrate gearshifting is enabled.
5952                                                                  Set SUBRATE_INIT = SUBRATE_FIN if subrate gearshifting is not enabled. */
5953         uint64_t pcie_g4_blwc_subrate_final : 16;/**< [ 31: 16](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
5954                                                                  if subrate gearshifting is enabled.
5955                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5956         uint64_t pcie_g4_blwc_subrate_init : 16;/**< [ 15:  0](R/W) Subrate counter initial value. Sets the starting value for the LMS update
5957                                                                  interval, if subrate gearshifting is enabled.
5958                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5959 #else /* Word 0 - Little Endian */
5960         uint64_t pcie_g4_blwc_subrate_init : 16;/**< [ 15:  0](R/W) Subrate counter initial value. Sets the starting value for the LMS update
5961                                                                  interval, if subrate gearshifting is enabled.
5962                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5963         uint64_t pcie_g4_blwc_subrate_final : 16;/**< [ 31: 16](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
5964                                                                  if subrate gearshifting is enabled.
5965                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
5966         uint64_t pcie_g4_prevga_gn_subrate_init : 16;/**< [ 47: 32](R/W) Subrate counter initial value. Sets the starting value for the LMS update
5967                                                                  interval, if subrate gearshifting is enabled.
5968                                                                  Set SUBRATE_INIT = SUBRATE_FIN if subrate gearshifting is not enabled. */
5969         uint64_t pcie_g4_prevga_gn_subrate_fin : 16;/**< [ 63: 48](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
5970                                                                  if subrate gearshifting is enabled.
5971                                                                  Set SUBRATE_INIT = SUBRATE_FIN if subrate gearshifting is not enabled. */
5972 #endif /* Word 0 - End */
5973     } s;
5974     /* struct bdk_gsernx_lanex_pcie_rxeq4_4_bcfg_s cn; */
5975 };
5976 typedef union bdk_gsernx_lanex_pcie_rxeq4_4_bcfg bdk_gsernx_lanex_pcie_rxeq4_4_bcfg_t;
5977 
5978 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXEQ4_4_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_RXEQ4_4_BCFG(unsigned long a,unsigned long b)5979 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXEQ4_4_BCFG(unsigned long a, unsigned long b)
5980 {
5981     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
5982         return 0x87e0900023f0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
5983     __bdk_csr_fatal("GSERNX_LANEX_PCIE_RXEQ4_4_BCFG", 2, a, b, 0, 0);
5984 }
5985 
5986 #define typedef_BDK_GSERNX_LANEX_PCIE_RXEQ4_4_BCFG(a,b) bdk_gsernx_lanex_pcie_rxeq4_4_bcfg_t
5987 #define bustype_BDK_GSERNX_LANEX_PCIE_RXEQ4_4_BCFG(a,b) BDK_CSR_TYPE_RSL
5988 #define basename_BDK_GSERNX_LANEX_PCIE_RXEQ4_4_BCFG(a,b) "GSERNX_LANEX_PCIE_RXEQ4_4_BCFG"
5989 #define device_bar_BDK_GSERNX_LANEX_PCIE_RXEQ4_4_BCFG(a,b) 0x0 /* PF_BAR0 */
5990 #define busnum_BDK_GSERNX_LANEX_PCIE_RXEQ4_4_BCFG(a,b) (a)
5991 #define arguments_BDK_GSERNX_LANEX_PCIE_RXEQ4_4_BCFG(a,b) (a),(b),-1,-1
5992 
5993 /**
5994  * Register (RSL) gsern#_lane#_pcie_rxidl1a_bcfg
5995  *
5996  * GSER Lane PCIe Gen1 RX Idle Detection Filter Control Register 2
5997  * Parameters controlling the analog detection and digital filtering of the receiver's
5998  * idle detection logic for PCIe Gen 1. For the digital filtering, setting all fields to 1,
5999  * i.e., N0=N1=I0=I1=L0=L1=1, results in no filtering.
6000  */
6001 union bdk_gsernx_lanex_pcie_rxidl1a_bcfg
6002 {
6003     uint64_t u;
6004     struct bdk_gsernx_lanex_pcie_rxidl1a_bcfg_s
6005     {
6006 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
6007         uint64_t rx_idle_lowf          : 2;  /**< [ 63: 62](R/W) Control for the receiver's idle detector analog filter
6008                                                                  bandwidth. The two bits apply at different times.
6009                                                                  \<0\> = Set to 1 for low bandwidth during normal operation.
6010                                                                  \<1\> = Set to 1 for low bandwidth during idle offset calibration.
6011                                                                  The default is 1 during normal operation for large filter capacitance and low
6012                                                                  bandwidth, and 0 during idle offset calibration to provide faster response. */
6013         uint64_t reserved_61           : 1;
6014         uint64_t refset                : 5;  /**< [ 60: 56](R/W) Sets the reference voltage swing for idle detection. A voltage swing
6015                                                                  at the input of the RX less than this amount is defined as idle.
6016                                                                  (See GSERN()_LANE()_RX_ST_BCFG[REFSET] for bit mapping.) */
6017         uint64_t reserved_54_55        : 2;
6018         uint64_t l1                    : 27; /**< [ 53: 27](R/W) Ones count leak parameter. When a zero in the raw idle signal from the custom
6019                                                                  macro is encountered, the ones count is decremented by this amount, saturating
6020                                                                  to a minimum count of zero. (Set L1=N1 and I1=1 for a simple run-of-N1 ones to
6021                                                                  assert the filter output.) The minimum setting for this field is 1. */
6022         uint64_t l0                    : 27; /**< [ 26:  0](R/W) Zeros count leak parameter. When a one in the raw idle signal from the custom
6023                                                                  macro is encountered, the zeros count is decremented by this amount, saturating
6024                                                                  to a minimum count of zero. (Set L0=N0 and I0=1 for a simple run-of-N0 zeros to
6025                                                                  deassert the filter output.) The minimum setting for this field is 1. */
6026 #else /* Word 0 - Little Endian */
6027         uint64_t l0                    : 27; /**< [ 26:  0](R/W) Zeros count leak parameter. When a one in the raw idle signal from the custom
6028                                                                  macro is encountered, the zeros count is decremented by this amount, saturating
6029                                                                  to a minimum count of zero. (Set L0=N0 and I0=1 for a simple run-of-N0 zeros to
6030                                                                  deassert the filter output.) The minimum setting for this field is 1. */
6031         uint64_t l1                    : 27; /**< [ 53: 27](R/W) Ones count leak parameter. When a zero in the raw idle signal from the custom
6032                                                                  macro is encountered, the ones count is decremented by this amount, saturating
6033                                                                  to a minimum count of zero. (Set L1=N1 and I1=1 for a simple run-of-N1 ones to
6034                                                                  assert the filter output.) The minimum setting for this field is 1. */
6035         uint64_t reserved_54_55        : 2;
6036         uint64_t refset                : 5;  /**< [ 60: 56](R/W) Sets the reference voltage swing for idle detection. A voltage swing
6037                                                                  at the input of the RX less than this amount is defined as idle.
6038                                                                  (See GSERN()_LANE()_RX_ST_BCFG[REFSET] for bit mapping.) */
6039         uint64_t reserved_61           : 1;
6040         uint64_t rx_idle_lowf          : 2;  /**< [ 63: 62](R/W) Control for the receiver's idle detector analog filter
6041                                                                  bandwidth. The two bits apply at different times.
6042                                                                  \<0\> = Set to 1 for low bandwidth during normal operation.
6043                                                                  \<1\> = Set to 1 for low bandwidth during idle offset calibration.
6044                                                                  The default is 1 during normal operation for large filter capacitance and low
6045                                                                  bandwidth, and 0 during idle offset calibration to provide faster response. */
6046 #endif /* Word 0 - End */
6047     } s;
6048     /* struct bdk_gsernx_lanex_pcie_rxidl1a_bcfg_s cn; */
6049 };
6050 typedef union bdk_gsernx_lanex_pcie_rxidl1a_bcfg bdk_gsernx_lanex_pcie_rxidl1a_bcfg_t;
6051 
6052 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXIDL1A_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_RXIDL1A_BCFG(unsigned long a,unsigned long b)6053 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXIDL1A_BCFG(unsigned long a, unsigned long b)
6054 {
6055     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
6056         return 0x87e0900021a0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
6057     __bdk_csr_fatal("GSERNX_LANEX_PCIE_RXIDL1A_BCFG", 2, a, b, 0, 0);
6058 }
6059 
6060 #define typedef_BDK_GSERNX_LANEX_PCIE_RXIDL1A_BCFG(a,b) bdk_gsernx_lanex_pcie_rxidl1a_bcfg_t
6061 #define bustype_BDK_GSERNX_LANEX_PCIE_RXIDL1A_BCFG(a,b) BDK_CSR_TYPE_RSL
6062 #define basename_BDK_GSERNX_LANEX_PCIE_RXIDL1A_BCFG(a,b) "GSERNX_LANEX_PCIE_RXIDL1A_BCFG"
6063 #define device_bar_BDK_GSERNX_LANEX_PCIE_RXIDL1A_BCFG(a,b) 0x0 /* PF_BAR0 */
6064 #define busnum_BDK_GSERNX_LANEX_PCIE_RXIDL1A_BCFG(a,b) (a)
6065 #define arguments_BDK_GSERNX_LANEX_PCIE_RXIDL1A_BCFG(a,b) (a),(b),-1,-1
6066 
6067 /**
6068  * Register (RSL) gsern#_lane#_pcie_rxidl2a_bcfg
6069  *
6070  * GSER Lane PCIe Gen2 RX Idle Detection Filter Control Register 2
6071  * Parameters controlling the analog detection and digital filtering of the receiver's
6072  * idle detection logic for PCIe Gen 2. For the digital filtering, setting all fields to 1,
6073  * i.e., N0=N1=I0=I1=L0=L1=1, results in no filtering.
6074  */
6075 union bdk_gsernx_lanex_pcie_rxidl2a_bcfg
6076 {
6077     uint64_t u;
6078     struct bdk_gsernx_lanex_pcie_rxidl2a_bcfg_s
6079     {
6080 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
6081         uint64_t rx_idle_lowf          : 2;  /**< [ 63: 62](R/W) Control for the receiver's idle detector analog filter
6082                                                                  bandwidth. The two bits apply at different times.
6083                                                                  \<0\> = Set to 1 for low bandwidth during normal operation.
6084                                                                  \<1\> = Set to 1 for low bandwidth during idle offset calibration.
6085                                                                  The default is 1 during normal operation for large filter capacitance and low
6086                                                                  bandwidth, and 0 during idle offset calibration to provide faster response. */
6087         uint64_t reserved_61           : 1;
6088         uint64_t refset                : 5;  /**< [ 60: 56](R/W) Sets the reference voltage swing for idle detection. A voltage swing
6089                                                                  at the input of the RX less than this amount is defined as idle.
6090                                                                  (See GSERN()_LANE()_RX_ST_BCFG[REFSET] for bit mapping.) */
6091         uint64_t reserved_54_55        : 2;
6092         uint64_t l1                    : 27; /**< [ 53: 27](R/W) Ones count leak parameter. When a zero in the raw idle signal from the custom
6093                                                                  macro is encountered, the ones count is decremented by this amount, saturating
6094                                                                  to a minimum count of zero. (Set L1=N1 and I1=1 for a simple run-of-N1 ones to
6095                                                                  assert the filter output.) The minimum setting for this field is 1. */
6096         uint64_t l0                    : 27; /**< [ 26:  0](R/W) Zeros count leak parameter. When a one in the raw idle signal from the custom
6097                                                                  macro is encountered, the zeros count is decremented by this amount, saturating
6098                                                                  to a minimum count of zero. (Set L0=N0 and I0=1 for a simple run-of-N0 zeros to
6099                                                                  deassert the filter output.) The minimum setting for this field is 1. */
6100 #else /* Word 0 - Little Endian */
6101         uint64_t l0                    : 27; /**< [ 26:  0](R/W) Zeros count leak parameter. When a one in the raw idle signal from the custom
6102                                                                  macro is encountered, the zeros count is decremented by this amount, saturating
6103                                                                  to a minimum count of zero. (Set L0=N0 and I0=1 for a simple run-of-N0 zeros to
6104                                                                  deassert the filter output.) The minimum setting for this field is 1. */
6105         uint64_t l1                    : 27; /**< [ 53: 27](R/W) Ones count leak parameter. When a zero in the raw idle signal from the custom
6106                                                                  macro is encountered, the ones count is decremented by this amount, saturating
6107                                                                  to a minimum count of zero. (Set L1=N1 and I1=1 for a simple run-of-N1 ones to
6108                                                                  assert the filter output.) The minimum setting for this field is 1. */
6109         uint64_t reserved_54_55        : 2;
6110         uint64_t refset                : 5;  /**< [ 60: 56](R/W) Sets the reference voltage swing for idle detection. A voltage swing
6111                                                                  at the input of the RX less than this amount is defined as idle.
6112                                                                  (See GSERN()_LANE()_RX_ST_BCFG[REFSET] for bit mapping.) */
6113         uint64_t reserved_61           : 1;
6114         uint64_t rx_idle_lowf          : 2;  /**< [ 63: 62](R/W) Control for the receiver's idle detector analog filter
6115                                                                  bandwidth. The two bits apply at different times.
6116                                                                  \<0\> = Set to 1 for low bandwidth during normal operation.
6117                                                                  \<1\> = Set to 1 for low bandwidth during idle offset calibration.
6118                                                                  The default is 1 during normal operation for large filter capacitance and low
6119                                                                  bandwidth, and 0 during idle offset calibration to provide faster response. */
6120 #endif /* Word 0 - End */
6121     } s;
6122     /* struct bdk_gsernx_lanex_pcie_rxidl2a_bcfg_s cn; */
6123 };
6124 typedef union bdk_gsernx_lanex_pcie_rxidl2a_bcfg bdk_gsernx_lanex_pcie_rxidl2a_bcfg_t;
6125 
6126 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXIDL2A_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_RXIDL2A_BCFG(unsigned long a,unsigned long b)6127 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXIDL2A_BCFG(unsigned long a, unsigned long b)
6128 {
6129     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
6130         return 0x87e0900021c0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
6131     __bdk_csr_fatal("GSERNX_LANEX_PCIE_RXIDL2A_BCFG", 2, a, b, 0, 0);
6132 }
6133 
6134 #define typedef_BDK_GSERNX_LANEX_PCIE_RXIDL2A_BCFG(a,b) bdk_gsernx_lanex_pcie_rxidl2a_bcfg_t
6135 #define bustype_BDK_GSERNX_LANEX_PCIE_RXIDL2A_BCFG(a,b) BDK_CSR_TYPE_RSL
6136 #define basename_BDK_GSERNX_LANEX_PCIE_RXIDL2A_BCFG(a,b) "GSERNX_LANEX_PCIE_RXIDL2A_BCFG"
6137 #define device_bar_BDK_GSERNX_LANEX_PCIE_RXIDL2A_BCFG(a,b) 0x0 /* PF_BAR0 */
6138 #define busnum_BDK_GSERNX_LANEX_PCIE_RXIDL2A_BCFG(a,b) (a)
6139 #define arguments_BDK_GSERNX_LANEX_PCIE_RXIDL2A_BCFG(a,b) (a),(b),-1,-1
6140 
6141 /**
6142  * Register (RSL) gsern#_lane#_pcie_rxidl3a_bcfg
6143  *
6144  * GSER Lane PCIe Gen3 RX Idle Detection Filter Control Register 2
6145  * Parameters controlling the analog detection and digital filtering of the receiver's
6146  * idle detection logic for PCIe Gen 3. For the digital filtering, setting all fields to 1,
6147  * i.e., N0=N1=I0=I1=L0=L1=1, results in no filtering.
6148  */
6149 union bdk_gsernx_lanex_pcie_rxidl3a_bcfg
6150 {
6151     uint64_t u;
6152     struct bdk_gsernx_lanex_pcie_rxidl3a_bcfg_s
6153     {
6154 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
6155         uint64_t rx_idle_lowf          : 2;  /**< [ 63: 62](R/W) Control for the receiver's idle detector analog filter
6156                                                                  bandwidth. The two bits apply at different times.
6157                                                                  \<0\> = Set to 1 for low bandwidth during normal operation.
6158                                                                  \<1\> = Set to 1 for low bandwidth during idle offset calibration.
6159                                                                  The default is 1 during normal operation for large filter capacitance and low
6160                                                                  bandwidth, and 0 during idle offset calibration to provide faster response. */
6161         uint64_t reserved_61           : 1;
6162         uint64_t refset                : 5;  /**< [ 60: 56](R/W) Sets the reference voltage swing for idle detection. A voltage swing
6163                                                                  at the input of the RX less than this amount is defined as idle.
6164                                                                  (See GSERN()_LANE()_RX_ST_BCFG[REFSET] for bit mapping.) */
6165         uint64_t reserved_54_55        : 2;
6166         uint64_t l1                    : 27; /**< [ 53: 27](R/W) Ones count leak parameter. When a zero in the raw idle signal from the custom
6167                                                                  macro is encountered, the ones count is decremented by this amount, saturating
6168                                                                  to a minimum count of zero. (Set L1=N1 and I1=1 for a simple run-of-N1 ones to
6169                                                                  assert the filter output.) The minimum setting for this field is 1. */
6170         uint64_t l0                    : 27; /**< [ 26:  0](R/W) Zeros count leak parameter. When a one in the raw idle signal from the custom
6171                                                                  macro is encountered, the zeros count is decremented by this amount, saturating
6172                                                                  to a minimum count of zero. (Set L0=N0 and I0=1 for a simple run-of-N0 zeros to
6173                                                                  deassert the filter output.) The minimum setting for this field is 1. */
6174 #else /* Word 0 - Little Endian */
6175         uint64_t l0                    : 27; /**< [ 26:  0](R/W) Zeros count leak parameter. When a one in the raw idle signal from the custom
6176                                                                  macro is encountered, the zeros count is decremented by this amount, saturating
6177                                                                  to a minimum count of zero. (Set L0=N0 and I0=1 for a simple run-of-N0 zeros to
6178                                                                  deassert the filter output.) The minimum setting for this field is 1. */
6179         uint64_t l1                    : 27; /**< [ 53: 27](R/W) Ones count leak parameter. When a zero in the raw idle signal from the custom
6180                                                                  macro is encountered, the ones count is decremented by this amount, saturating
6181                                                                  to a minimum count of zero. (Set L1=N1 and I1=1 for a simple run-of-N1 ones to
6182                                                                  assert the filter output.) The minimum setting for this field is 1. */
6183         uint64_t reserved_54_55        : 2;
6184         uint64_t refset                : 5;  /**< [ 60: 56](R/W) Sets the reference voltage swing for idle detection. A voltage swing
6185                                                                  at the input of the RX less than this amount is defined as idle.
6186                                                                  (See GSERN()_LANE()_RX_ST_BCFG[REFSET] for bit mapping.) */
6187         uint64_t reserved_61           : 1;
6188         uint64_t rx_idle_lowf          : 2;  /**< [ 63: 62](R/W) Control for the receiver's idle detector analog filter
6189                                                                  bandwidth. The two bits apply at different times.
6190                                                                  \<0\> = Set to 1 for low bandwidth during normal operation.
6191                                                                  \<1\> = Set to 1 for low bandwidth during idle offset calibration.
6192                                                                  The default is 1 during normal operation for large filter capacitance and low
6193                                                                  bandwidth, and 0 during idle offset calibration to provide faster response. */
6194 #endif /* Word 0 - End */
6195     } s;
6196     /* struct bdk_gsernx_lanex_pcie_rxidl3a_bcfg_s cn; */
6197 };
6198 typedef union bdk_gsernx_lanex_pcie_rxidl3a_bcfg bdk_gsernx_lanex_pcie_rxidl3a_bcfg_t;
6199 
6200 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXIDL3A_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_RXIDL3A_BCFG(unsigned long a,unsigned long b)6201 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXIDL3A_BCFG(unsigned long a, unsigned long b)
6202 {
6203     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
6204         return 0x87e0900021e0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
6205     __bdk_csr_fatal("GSERNX_LANEX_PCIE_RXIDL3A_BCFG", 2, a, b, 0, 0);
6206 }
6207 
6208 #define typedef_BDK_GSERNX_LANEX_PCIE_RXIDL3A_BCFG(a,b) bdk_gsernx_lanex_pcie_rxidl3a_bcfg_t
6209 #define bustype_BDK_GSERNX_LANEX_PCIE_RXIDL3A_BCFG(a,b) BDK_CSR_TYPE_RSL
6210 #define basename_BDK_GSERNX_LANEX_PCIE_RXIDL3A_BCFG(a,b) "GSERNX_LANEX_PCIE_RXIDL3A_BCFG"
6211 #define device_bar_BDK_GSERNX_LANEX_PCIE_RXIDL3A_BCFG(a,b) 0x0 /* PF_BAR0 */
6212 #define busnum_BDK_GSERNX_LANEX_PCIE_RXIDL3A_BCFG(a,b) (a)
6213 #define arguments_BDK_GSERNX_LANEX_PCIE_RXIDL3A_BCFG(a,b) (a),(b),-1,-1
6214 
6215 /**
6216  * Register (RSL) gsern#_lane#_pcie_rxidl4a_bcfg
6217  *
6218  * GSER Lane PCIe Gen4 RX Idle Detection Filter Control Register 2
6219  * Parameters controlling the analog detection and digital filtering of the receiver's
6220  * idle detection logic for PCIe Gen 4. For the digital filtering, setting all fields to 1,
6221  * i.e., N0=N1=I0=I1=L0=L1=1, results in no filtering.
6222  */
6223 union bdk_gsernx_lanex_pcie_rxidl4a_bcfg
6224 {
6225     uint64_t u;
6226     struct bdk_gsernx_lanex_pcie_rxidl4a_bcfg_s
6227     {
6228 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
6229         uint64_t rx_idle_lowf          : 2;  /**< [ 63: 62](R/W) Control for the receiver's idle detector analog filter
6230                                                                  bandwidth. The two bits apply at different times.
6231                                                                  \<0\> = Set to 1 for low bandwidth during normal operation.
6232                                                                  \<1\> = Set to 1 for low bandwidth during idle offset calibration.
6233                                                                  The default is 1 during normal operation for large filter capacitance and low
6234                                                                  bandwidth, and 0 during idle offset calibration to provide faster response. */
6235         uint64_t reserved_61           : 1;
6236         uint64_t refset                : 5;  /**< [ 60: 56](R/W) Sets the reference voltage swing for idle detection. A voltage swing
6237                                                                  at the input of the RX less than this amount is defined as idle.
6238                                                                  (See GSERN()_LANE()_RX_ST_BCFG[REFSET] for bit mapping.) */
6239         uint64_t reserved_54_55        : 2;
6240         uint64_t l1                    : 27; /**< [ 53: 27](R/W) Ones count leak parameter. When a zero in the raw idle signal from the custom
6241                                                                  macro is encountered, the ones count is decremented by this amount, saturating
6242                                                                  to a minimum count of zero. (Set L1=N1 and I1=1 for a simple run-of-N1 ones to
6243                                                                  assert the filter output.) The minimum setting for this field is 1. */
6244         uint64_t l0                    : 27; /**< [ 26:  0](R/W) Zeros count leak parameter. When a one in the raw idle signal from the custom
6245                                                                  macro is encountered, the zeros count is decremented by this amount, saturating
6246                                                                  to a minimum count of zero. (Set L0=N0 and I0=1 for a simple run-of-N0 zeros to
6247                                                                  deassert the filter output.) The minimum setting for this field is 1. */
6248 #else /* Word 0 - Little Endian */
6249         uint64_t l0                    : 27; /**< [ 26:  0](R/W) Zeros count leak parameter. When a one in the raw idle signal from the custom
6250                                                                  macro is encountered, the zeros count is decremented by this amount, saturating
6251                                                                  to a minimum count of zero. (Set L0=N0 and I0=1 for a simple run-of-N0 zeros to
6252                                                                  deassert the filter output.) The minimum setting for this field is 1. */
6253         uint64_t l1                    : 27; /**< [ 53: 27](R/W) Ones count leak parameter. When a zero in the raw idle signal from the custom
6254                                                                  macro is encountered, the ones count is decremented by this amount, saturating
6255                                                                  to a minimum count of zero. (Set L1=N1 and I1=1 for a simple run-of-N1 ones to
6256                                                                  assert the filter output.) The minimum setting for this field is 1. */
6257         uint64_t reserved_54_55        : 2;
6258         uint64_t refset                : 5;  /**< [ 60: 56](R/W) Sets the reference voltage swing for idle detection. A voltage swing
6259                                                                  at the input of the RX less than this amount is defined as idle.
6260                                                                  (See GSERN()_LANE()_RX_ST_BCFG[REFSET] for bit mapping.) */
6261         uint64_t reserved_61           : 1;
6262         uint64_t rx_idle_lowf          : 2;  /**< [ 63: 62](R/W) Control for the receiver's idle detector analog filter
6263                                                                  bandwidth. The two bits apply at different times.
6264                                                                  \<0\> = Set to 1 for low bandwidth during normal operation.
6265                                                                  \<1\> = Set to 1 for low bandwidth during idle offset calibration.
6266                                                                  The default is 1 during normal operation for large filter capacitance and low
6267                                                                  bandwidth, and 0 during idle offset calibration to provide faster response. */
6268 #endif /* Word 0 - End */
6269     } s;
6270     /* struct bdk_gsernx_lanex_pcie_rxidl4a_bcfg_s cn; */
6271 };
6272 typedef union bdk_gsernx_lanex_pcie_rxidl4a_bcfg bdk_gsernx_lanex_pcie_rxidl4a_bcfg_t;
6273 
6274 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXIDL4A_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_RXIDL4A_BCFG(unsigned long a,unsigned long b)6275 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXIDL4A_BCFG(unsigned long a, unsigned long b)
6276 {
6277     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
6278         return 0x87e090002200ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
6279     __bdk_csr_fatal("GSERNX_LANEX_PCIE_RXIDL4A_BCFG", 2, a, b, 0, 0);
6280 }
6281 
6282 #define typedef_BDK_GSERNX_LANEX_PCIE_RXIDL4A_BCFG(a,b) bdk_gsernx_lanex_pcie_rxidl4a_bcfg_t
6283 #define bustype_BDK_GSERNX_LANEX_PCIE_RXIDL4A_BCFG(a,b) BDK_CSR_TYPE_RSL
6284 #define basename_BDK_GSERNX_LANEX_PCIE_RXIDL4A_BCFG(a,b) "GSERNX_LANEX_PCIE_RXIDL4A_BCFG"
6285 #define device_bar_BDK_GSERNX_LANEX_PCIE_RXIDL4A_BCFG(a,b) 0x0 /* PF_BAR0 */
6286 #define busnum_BDK_GSERNX_LANEX_PCIE_RXIDL4A_BCFG(a,b) (a)
6287 #define arguments_BDK_GSERNX_LANEX_PCIE_RXIDL4A_BCFG(a,b) (a),(b),-1,-1
6288 
6289 /**
6290  * Register (RSL) gsern#_lane#_pcie_rxidle1_bcfg
6291  *
6292  * GSER Lane PCIe Gen1 RX Idle Detection Filter Control Register
6293  * Parameters controlling the analog detection and digital filtering of the receiver's
6294  * idle detection logic for PCIe Gen 1. For the digital filtering, setting all fields to 1,
6295  * i.e., N0=N1=I0=I1=L0=L1=1, results in no filtering.
6296  */
6297 union bdk_gsernx_lanex_pcie_rxidle1_bcfg
6298 {
6299     uint64_t u;
6300     struct bdk_gsernx_lanex_pcie_rxidle1_bcfg_s
6301     {
6302 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
6303         uint64_t reserved_63           : 1;
6304         uint64_t i1                    : 4;  /**< [ 62: 59](R/W) Ones count increment parameter. When a one in the raw idle signal from the custom
6305                                                                  macro is encountered, the ones count is incremented by this amount, saturating
6306                                                                  to a maximum of [N1]. */
6307         uint64_t i0                    : 4;  /**< [ 58: 55](R/W) Zeros count increment parameter. When a zero in the raw idle signal from the
6308                                                                  custom macro is encountered, the zeros count is incremented by this amount,
6309                                                                  saturating to a maximum count of [N0]. */
6310         uint64_t reserved_54           : 1;
6311         uint64_t n1                    : 27; /**< [ 53: 27](R/W) Threshold for the count of ones in the raw idle signal from the custom macro
6312                                                                  required to assert the idle filter output. */
6313         uint64_t n0                    : 27; /**< [ 26:  0](R/W) Threshold for the count of zeros in the raw idle signal from the custom macro
6314                                                                  required to deassert the idle filter output. */
6315 #else /* Word 0 - Little Endian */
6316         uint64_t n0                    : 27; /**< [ 26:  0](R/W) Threshold for the count of zeros in the raw idle signal from the custom macro
6317                                                                  required to deassert the idle filter output. */
6318         uint64_t n1                    : 27; /**< [ 53: 27](R/W) Threshold for the count of ones in the raw idle signal from the custom macro
6319                                                                  required to assert the idle filter output. */
6320         uint64_t reserved_54           : 1;
6321         uint64_t i0                    : 4;  /**< [ 58: 55](R/W) Zeros count increment parameter. When a zero in the raw idle signal from the
6322                                                                  custom macro is encountered, the zeros count is incremented by this amount,
6323                                                                  saturating to a maximum count of [N0]. */
6324         uint64_t i1                    : 4;  /**< [ 62: 59](R/W) Ones count increment parameter. When a one in the raw idle signal from the custom
6325                                                                  macro is encountered, the ones count is incremented by this amount, saturating
6326                                                                  to a maximum of [N1]. */
6327         uint64_t reserved_63           : 1;
6328 #endif /* Word 0 - End */
6329     } s;
6330     /* struct bdk_gsernx_lanex_pcie_rxidle1_bcfg_s cn; */
6331 };
6332 typedef union bdk_gsernx_lanex_pcie_rxidle1_bcfg bdk_gsernx_lanex_pcie_rxidle1_bcfg_t;
6333 
6334 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXIDLE1_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_RXIDLE1_BCFG(unsigned long a,unsigned long b)6335 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXIDLE1_BCFG(unsigned long a, unsigned long b)
6336 {
6337     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
6338         return 0x87e090002190ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
6339     __bdk_csr_fatal("GSERNX_LANEX_PCIE_RXIDLE1_BCFG", 2, a, b, 0, 0);
6340 }
6341 
6342 #define typedef_BDK_GSERNX_LANEX_PCIE_RXIDLE1_BCFG(a,b) bdk_gsernx_lanex_pcie_rxidle1_bcfg_t
6343 #define bustype_BDK_GSERNX_LANEX_PCIE_RXIDLE1_BCFG(a,b) BDK_CSR_TYPE_RSL
6344 #define basename_BDK_GSERNX_LANEX_PCIE_RXIDLE1_BCFG(a,b) "GSERNX_LANEX_PCIE_RXIDLE1_BCFG"
6345 #define device_bar_BDK_GSERNX_LANEX_PCIE_RXIDLE1_BCFG(a,b) 0x0 /* PF_BAR0 */
6346 #define busnum_BDK_GSERNX_LANEX_PCIE_RXIDLE1_BCFG(a,b) (a)
6347 #define arguments_BDK_GSERNX_LANEX_PCIE_RXIDLE1_BCFG(a,b) (a),(b),-1,-1
6348 
6349 /**
6350  * Register (RSL) gsern#_lane#_pcie_rxidle2_bcfg
6351  *
6352  * GSER Lane PCIe Gen2 RX Idle Detection Filter Control Register
6353  * Parameters controlling the analog detection and digital filtering of the receiver's
6354  * idle detection logic for PCIe Gen 2. For the digital filtering, setting all fields to 1,
6355  * i.e., N0=N1=I0=I1=L0=L1=1, results in no filtering.
6356  */
6357 union bdk_gsernx_lanex_pcie_rxidle2_bcfg
6358 {
6359     uint64_t u;
6360     struct bdk_gsernx_lanex_pcie_rxidle2_bcfg_s
6361     {
6362 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
6363         uint64_t reserved_63           : 1;
6364         uint64_t i1                    : 4;  /**< [ 62: 59](R/W) Ones count increment parameter. When a one in the raw idle signal from the custom
6365                                                                  macro is encountered, the ones count is incremented by this amount, saturating
6366                                                                  to a maximum of [N1]. */
6367         uint64_t i0                    : 4;  /**< [ 58: 55](R/W) Zeros count increment parameter. When a zero in the raw idle signal from the
6368                                                                  custom macro is encountered, the zeros count is incremented by this amount,
6369                                                                  saturating to a maximum count of [N0]. */
6370         uint64_t reserved_54           : 1;
6371         uint64_t n1                    : 27; /**< [ 53: 27](R/W) Threshold for the count of ones in the raw idle signal from the custom macro
6372                                                                  required to assert the idle filter output. */
6373         uint64_t n0                    : 27; /**< [ 26:  0](R/W) Threshold for the count of zeros in the raw idle signal from the custom macro
6374                                                                  required to deassert the idle filter output. */
6375 #else /* Word 0 - Little Endian */
6376         uint64_t n0                    : 27; /**< [ 26:  0](R/W) Threshold for the count of zeros in the raw idle signal from the custom macro
6377                                                                  required to deassert the idle filter output. */
6378         uint64_t n1                    : 27; /**< [ 53: 27](R/W) Threshold for the count of ones in the raw idle signal from the custom macro
6379                                                                  required to assert the idle filter output. */
6380         uint64_t reserved_54           : 1;
6381         uint64_t i0                    : 4;  /**< [ 58: 55](R/W) Zeros count increment parameter. When a zero in the raw idle signal from the
6382                                                                  custom macro is encountered, the zeros count is incremented by this amount,
6383                                                                  saturating to a maximum count of [N0]. */
6384         uint64_t i1                    : 4;  /**< [ 62: 59](R/W) Ones count increment parameter. When a one in the raw idle signal from the custom
6385                                                                  macro is encountered, the ones count is incremented by this amount, saturating
6386                                                                  to a maximum of [N1]. */
6387         uint64_t reserved_63           : 1;
6388 #endif /* Word 0 - End */
6389     } s;
6390     /* struct bdk_gsernx_lanex_pcie_rxidle2_bcfg_s cn; */
6391 };
6392 typedef union bdk_gsernx_lanex_pcie_rxidle2_bcfg bdk_gsernx_lanex_pcie_rxidle2_bcfg_t;
6393 
6394 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXIDLE2_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_RXIDLE2_BCFG(unsigned long a,unsigned long b)6395 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXIDLE2_BCFG(unsigned long a, unsigned long b)
6396 {
6397     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
6398         return 0x87e0900021b0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
6399     __bdk_csr_fatal("GSERNX_LANEX_PCIE_RXIDLE2_BCFG", 2, a, b, 0, 0);
6400 }
6401 
6402 #define typedef_BDK_GSERNX_LANEX_PCIE_RXIDLE2_BCFG(a,b) bdk_gsernx_lanex_pcie_rxidle2_bcfg_t
6403 #define bustype_BDK_GSERNX_LANEX_PCIE_RXIDLE2_BCFG(a,b) BDK_CSR_TYPE_RSL
6404 #define basename_BDK_GSERNX_LANEX_PCIE_RXIDLE2_BCFG(a,b) "GSERNX_LANEX_PCIE_RXIDLE2_BCFG"
6405 #define device_bar_BDK_GSERNX_LANEX_PCIE_RXIDLE2_BCFG(a,b) 0x0 /* PF_BAR0 */
6406 #define busnum_BDK_GSERNX_LANEX_PCIE_RXIDLE2_BCFG(a,b) (a)
6407 #define arguments_BDK_GSERNX_LANEX_PCIE_RXIDLE2_BCFG(a,b) (a),(b),-1,-1
6408 
6409 /**
6410  * Register (RSL) gsern#_lane#_pcie_rxidle3_bcfg
6411  *
6412  * GSER Lane PCIe Gen3 RX Idle Detection Filter Control Register
6413  * Parameters controlling the analog detection and digital filtering of the receiver's
6414  * idle detection logic for PCIe Gen 3. For the digital filtering, setting all fields to 1,
6415  * i.e., N0=N1=I0=I1=L0=L1=1, results in no filtering.
6416  */
6417 union bdk_gsernx_lanex_pcie_rxidle3_bcfg
6418 {
6419     uint64_t u;
6420     struct bdk_gsernx_lanex_pcie_rxidle3_bcfg_s
6421     {
6422 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
6423         uint64_t reserved_63           : 1;
6424         uint64_t i1                    : 4;  /**< [ 62: 59](R/W) Ones count increment parameter. When a one in the raw idle signal from the custom
6425                                                                  macro is encountered, the ones count is incremented by this amount, saturating
6426                                                                  to a maximum of [N1]. */
6427         uint64_t i0                    : 4;  /**< [ 58: 55](R/W) Zeros count increment parameter. When a zero in the raw idle signal from the
6428                                                                  custom macro is encountered, the zeros count is incremented by this amount,
6429                                                                  saturating to a maximum count of [N0]. */
6430         uint64_t reserved_54           : 1;
6431         uint64_t n1                    : 27; /**< [ 53: 27](R/W) Threshold for the count of ones in the raw idle signal from the custom macro
6432                                                                  required to assert the idle filter output. */
6433         uint64_t n0                    : 27; /**< [ 26:  0](R/W) Threshold for the count of zeros in the raw idle signal from the custom macro
6434                                                                  required to deassert the idle filter output. */
6435 #else /* Word 0 - Little Endian */
6436         uint64_t n0                    : 27; /**< [ 26:  0](R/W) Threshold for the count of zeros in the raw idle signal from the custom macro
6437                                                                  required to deassert the idle filter output. */
6438         uint64_t n1                    : 27; /**< [ 53: 27](R/W) Threshold for the count of ones in the raw idle signal from the custom macro
6439                                                                  required to assert the idle filter output. */
6440         uint64_t reserved_54           : 1;
6441         uint64_t i0                    : 4;  /**< [ 58: 55](R/W) Zeros count increment parameter. When a zero in the raw idle signal from the
6442                                                                  custom macro is encountered, the zeros count is incremented by this amount,
6443                                                                  saturating to a maximum count of [N0]. */
6444         uint64_t i1                    : 4;  /**< [ 62: 59](R/W) Ones count increment parameter. When a one in the raw idle signal from the custom
6445                                                                  macro is encountered, the ones count is incremented by this amount, saturating
6446                                                                  to a maximum of [N1]. */
6447         uint64_t reserved_63           : 1;
6448 #endif /* Word 0 - End */
6449     } s;
6450     /* struct bdk_gsernx_lanex_pcie_rxidle3_bcfg_s cn; */
6451 };
6452 typedef union bdk_gsernx_lanex_pcie_rxidle3_bcfg bdk_gsernx_lanex_pcie_rxidle3_bcfg_t;
6453 
6454 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXIDLE3_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_RXIDLE3_BCFG(unsigned long a,unsigned long b)6455 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXIDLE3_BCFG(unsigned long a, unsigned long b)
6456 {
6457     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
6458         return 0x87e0900021d0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
6459     __bdk_csr_fatal("GSERNX_LANEX_PCIE_RXIDLE3_BCFG", 2, a, b, 0, 0);
6460 }
6461 
6462 #define typedef_BDK_GSERNX_LANEX_PCIE_RXIDLE3_BCFG(a,b) bdk_gsernx_lanex_pcie_rxidle3_bcfg_t
6463 #define bustype_BDK_GSERNX_LANEX_PCIE_RXIDLE3_BCFG(a,b) BDK_CSR_TYPE_RSL
6464 #define basename_BDK_GSERNX_LANEX_PCIE_RXIDLE3_BCFG(a,b) "GSERNX_LANEX_PCIE_RXIDLE3_BCFG"
6465 #define device_bar_BDK_GSERNX_LANEX_PCIE_RXIDLE3_BCFG(a,b) 0x0 /* PF_BAR0 */
6466 #define busnum_BDK_GSERNX_LANEX_PCIE_RXIDLE3_BCFG(a,b) (a)
6467 #define arguments_BDK_GSERNX_LANEX_PCIE_RXIDLE3_BCFG(a,b) (a),(b),-1,-1
6468 
6469 /**
6470  * Register (RSL) gsern#_lane#_pcie_rxidle4_bcfg
6471  *
6472  * GSER Lane PCIe Gen4 RX Idle Detection Filter Control Register
6473  * Parameters controlling the analog detection and digital filtering of the receiver's
6474  * idle detection logic for PCIe Gen 4. For the digital filtering, setting all fields to 1,
6475  * i.e., N0=N1=I0=I1=L0=L1=1, results in no filtering.
6476  */
6477 union bdk_gsernx_lanex_pcie_rxidle4_bcfg
6478 {
6479     uint64_t u;
6480     struct bdk_gsernx_lanex_pcie_rxidle4_bcfg_s
6481     {
6482 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
6483         uint64_t reserved_63           : 1;
6484         uint64_t i1                    : 4;  /**< [ 62: 59](R/W) Ones count increment parameter. When a one in the raw idle signal from the custom
6485                                                                  macro is encountered, the ones count is incremented by this amount, saturating
6486                                                                  to a maximum of [N1]. */
6487         uint64_t i0                    : 4;  /**< [ 58: 55](R/W) Zeros count increment parameter. When a zero in the raw idle signal from the
6488                                                                  custom macro is encountered, the zeros count is incremented by this amount,
6489                                                                  saturating to a maximum count of [N0]. */
6490         uint64_t reserved_54           : 1;
6491         uint64_t n1                    : 27; /**< [ 53: 27](R/W) Threshold for the count of ones in the raw idle signal from the custom macro
6492                                                                  required to assert the idle filter output. */
6493         uint64_t n0                    : 27; /**< [ 26:  0](R/W) Threshold for the count of zeros in the raw idle signal from the custom macro
6494                                                                  required to deassert the idle filter output. */
6495 #else /* Word 0 - Little Endian */
6496         uint64_t n0                    : 27; /**< [ 26:  0](R/W) Threshold for the count of zeros in the raw idle signal from the custom macro
6497                                                                  required to deassert the idle filter output. */
6498         uint64_t n1                    : 27; /**< [ 53: 27](R/W) Threshold for the count of ones in the raw idle signal from the custom macro
6499                                                                  required to assert the idle filter output. */
6500         uint64_t reserved_54           : 1;
6501         uint64_t i0                    : 4;  /**< [ 58: 55](R/W) Zeros count increment parameter. When a zero in the raw idle signal from the
6502                                                                  custom macro is encountered, the zeros count is incremented by this amount,
6503                                                                  saturating to a maximum count of [N0]. */
6504         uint64_t i1                    : 4;  /**< [ 62: 59](R/W) Ones count increment parameter. When a one in the raw idle signal from the custom
6505                                                                  macro is encountered, the ones count is incremented by this amount, saturating
6506                                                                  to a maximum of [N1]. */
6507         uint64_t reserved_63           : 1;
6508 #endif /* Word 0 - End */
6509     } s;
6510     /* struct bdk_gsernx_lanex_pcie_rxidle4_bcfg_s cn; */
6511 };
6512 typedef union bdk_gsernx_lanex_pcie_rxidle4_bcfg bdk_gsernx_lanex_pcie_rxidle4_bcfg_t;
6513 
6514 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXIDLE4_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_RXIDLE4_BCFG(unsigned long a,unsigned long b)6515 static inline uint64_t BDK_GSERNX_LANEX_PCIE_RXIDLE4_BCFG(unsigned long a, unsigned long b)
6516 {
6517     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
6518         return 0x87e0900021f0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
6519     __bdk_csr_fatal("GSERNX_LANEX_PCIE_RXIDLE4_BCFG", 2, a, b, 0, 0);
6520 }
6521 
6522 #define typedef_BDK_GSERNX_LANEX_PCIE_RXIDLE4_BCFG(a,b) bdk_gsernx_lanex_pcie_rxidle4_bcfg_t
6523 #define bustype_BDK_GSERNX_LANEX_PCIE_RXIDLE4_BCFG(a,b) BDK_CSR_TYPE_RSL
6524 #define basename_BDK_GSERNX_LANEX_PCIE_RXIDLE4_BCFG(a,b) "GSERNX_LANEX_PCIE_RXIDLE4_BCFG"
6525 #define device_bar_BDK_GSERNX_LANEX_PCIE_RXIDLE4_BCFG(a,b) 0x0 /* PF_BAR0 */
6526 #define busnum_BDK_GSERNX_LANEX_PCIE_RXIDLE4_BCFG(a,b) (a)
6527 #define arguments_BDK_GSERNX_LANEX_PCIE_RXIDLE4_BCFG(a,b) (a),(b),-1,-1
6528 
6529 /**
6530  * Register (RSL) gsern#_lane#_pcie_txbias_bcfg
6531  *
6532  * GSER Lane PCIe TX Margin BIAS Control Register
6533  * TX BIAS values corresponding to Full Scale, Half Scale and Margin levels for both.
6534  */
6535 union bdk_gsernx_lanex_pcie_txbias_bcfg
6536 {
6537     uint64_t u;
6538     struct bdk_gsernx_lanex_pcie_txbias_bcfg_s
6539     {
6540 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
6541         uint64_t reserved_60_63        : 4;
6542         uint64_t tx_margin_h4          : 6;  /**< [ 59: 54](R/W) TX BIAS setting for half scale, Margin 4 output drive. */
6543         uint64_t tx_margin_h3          : 6;  /**< [ 53: 48](R/W) TX BIAS setting for half scale, Margin 3 output drive. */
6544         uint64_t tx_margin_h2          : 6;  /**< [ 47: 42](R/W) TX BIAS setting for half scale, Margin 2 output drive. */
6545         uint64_t tx_margin_h1          : 6;  /**< [ 41: 36](R/W) TX BIAS setting for half scale, Margin 1 output drive. */
6546         uint64_t tx_bias_half          : 6;  /**< [ 35: 30](R/W) TX BIAS setting for half scale output drive. */
6547         uint64_t tx_margin_f4          : 6;  /**< [ 29: 24](R/W) TX BIAS setting for full scale, Margin 4 output drive. */
6548         uint64_t tx_margin_f3          : 6;  /**< [ 23: 18](R/W) TX BIAS setting for full scale, Margin 3 output drive. */
6549         uint64_t tx_margin_f2          : 6;  /**< [ 17: 12](R/W) TX BIAS setting for full scale, Margin 2 output drive. */
6550         uint64_t tx_margin_f1          : 6;  /**< [ 11:  6](R/W) TX BIAS setting for full scale, Margin 1 output drive. */
6551         uint64_t tx_bias_full          : 6;  /**< [  5:  0](R/W) TX BIAS setting for full scale output drive. */
6552 #else /* Word 0 - Little Endian */
6553         uint64_t tx_bias_full          : 6;  /**< [  5:  0](R/W) TX BIAS setting for full scale output drive. */
6554         uint64_t tx_margin_f1          : 6;  /**< [ 11:  6](R/W) TX BIAS setting for full scale, Margin 1 output drive. */
6555         uint64_t tx_margin_f2          : 6;  /**< [ 17: 12](R/W) TX BIAS setting for full scale, Margin 2 output drive. */
6556         uint64_t tx_margin_f3          : 6;  /**< [ 23: 18](R/W) TX BIAS setting for full scale, Margin 3 output drive. */
6557         uint64_t tx_margin_f4          : 6;  /**< [ 29: 24](R/W) TX BIAS setting for full scale, Margin 4 output drive. */
6558         uint64_t tx_bias_half          : 6;  /**< [ 35: 30](R/W) TX BIAS setting for half scale output drive. */
6559         uint64_t tx_margin_h1          : 6;  /**< [ 41: 36](R/W) TX BIAS setting for half scale, Margin 1 output drive. */
6560         uint64_t tx_margin_h2          : 6;  /**< [ 47: 42](R/W) TX BIAS setting for half scale, Margin 2 output drive. */
6561         uint64_t tx_margin_h3          : 6;  /**< [ 53: 48](R/W) TX BIAS setting for half scale, Margin 3 output drive. */
6562         uint64_t tx_margin_h4          : 6;  /**< [ 59: 54](R/W) TX BIAS setting for half scale, Margin 4 output drive. */
6563         uint64_t reserved_60_63        : 4;
6564 #endif /* Word 0 - End */
6565     } s;
6566     /* struct bdk_gsernx_lanex_pcie_txbias_bcfg_s cn; */
6567 };
6568 typedef union bdk_gsernx_lanex_pcie_txbias_bcfg bdk_gsernx_lanex_pcie_txbias_bcfg_t;
6569 
6570 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXBIAS_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_TXBIAS_BCFG(unsigned long a,unsigned long b)6571 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXBIAS_BCFG(unsigned long a, unsigned long b)
6572 {
6573     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
6574         return 0x87e090002930ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
6575     __bdk_csr_fatal("GSERNX_LANEX_PCIE_TXBIAS_BCFG", 2, a, b, 0, 0);
6576 }
6577 
6578 #define typedef_BDK_GSERNX_LANEX_PCIE_TXBIAS_BCFG(a,b) bdk_gsernx_lanex_pcie_txbias_bcfg_t
6579 #define bustype_BDK_GSERNX_LANEX_PCIE_TXBIAS_BCFG(a,b) BDK_CSR_TYPE_RSL
6580 #define basename_BDK_GSERNX_LANEX_PCIE_TXBIAS_BCFG(a,b) "GSERNX_LANEX_PCIE_TXBIAS_BCFG"
6581 #define device_bar_BDK_GSERNX_LANEX_PCIE_TXBIAS_BCFG(a,b) 0x0 /* PF_BAR0 */
6582 #define busnum_BDK_GSERNX_LANEX_PCIE_TXBIAS_BCFG(a,b) (a)
6583 #define arguments_BDK_GSERNX_LANEX_PCIE_TXBIAS_BCFG(a,b) (a),(b),-1,-1
6584 
6585 /**
6586  * Register (RSL) gsern#_lane#_pcie_txdrv_bcfg
6587  *
6588  * GSER Lane PCIe TX Drive Reserved Presets, FS & LF Control Register
6589  * TX drive Cpre, Cpost and Cmain Coefficient values for the Reserved Presets
6590  * for Gen3 and Gen4 (the default coefficient values correspond to preset P4).
6591  * Cpre and Cpost are only 4 and 5 bits in length, respectively, as the full
6592  * 6 bits defined in the PCIe specification are not needed.
6593  * This register also contains the control registers for the Local FS and LF.
6594  */
6595 union bdk_gsernx_lanex_pcie_txdrv_bcfg
6596 {
6597     uint64_t u;
6598     struct bdk_gsernx_lanex_pcie_txdrv_bcfg_s
6599     {
6600 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
6601         uint64_t reserved_61_63        : 3;
6602         uint64_t g4_rsv_cpost          : 5;  /**< [ 60: 56](R/W) Gen4 Cpost value for all reserved presets. */
6603         uint64_t reserved_54_55        : 2;
6604         uint64_t g4_rsv_cmain          : 6;  /**< [ 53: 48](R/W) Gen4 Cmain value for all reserved presets. */
6605         uint64_t reserved_44_47        : 4;
6606         uint64_t g4_rsv_cpre           : 4;  /**< [ 43: 40](R/W) Gen4 Cpost value for all reserved presets. */
6607         uint64_t reserved_38_39        : 2;
6608         uint64_t local_lf              : 6;  /**< [ 37: 32](R/W) Local LF value advertised to the MAC. */
6609         uint64_t reserved_30_31        : 2;
6610         uint64_t local_fs              : 6;  /**< [ 29: 24](R/W) Local FS value advertised to the MAC. */
6611         uint64_t reserved_21_23        : 3;
6612         uint64_t g3_rsv_cpost          : 5;  /**< [ 20: 16](R/W) Gen3 Cpost value for all reserved presets. */
6613         uint64_t reserved_14_15        : 2;
6614         uint64_t g3_rsv_cmain          : 6;  /**< [ 13:  8](R/W) Gen3 Cmain value for all reserved presets. */
6615         uint64_t reserved_4_7          : 4;
6616         uint64_t g3_rsv_cpre           : 4;  /**< [  3:  0](R/W) Gen3 Cpost value for all reserved presets. */
6617 #else /* Word 0 - Little Endian */
6618         uint64_t g3_rsv_cpre           : 4;  /**< [  3:  0](R/W) Gen3 Cpost value for all reserved presets. */
6619         uint64_t reserved_4_7          : 4;
6620         uint64_t g3_rsv_cmain          : 6;  /**< [ 13:  8](R/W) Gen3 Cmain value for all reserved presets. */
6621         uint64_t reserved_14_15        : 2;
6622         uint64_t g3_rsv_cpost          : 5;  /**< [ 20: 16](R/W) Gen3 Cpost value for all reserved presets. */
6623         uint64_t reserved_21_23        : 3;
6624         uint64_t local_fs              : 6;  /**< [ 29: 24](R/W) Local FS value advertised to the MAC. */
6625         uint64_t reserved_30_31        : 2;
6626         uint64_t local_lf              : 6;  /**< [ 37: 32](R/W) Local LF value advertised to the MAC. */
6627         uint64_t reserved_38_39        : 2;
6628         uint64_t g4_rsv_cpre           : 4;  /**< [ 43: 40](R/W) Gen4 Cpost value for all reserved presets. */
6629         uint64_t reserved_44_47        : 4;
6630         uint64_t g4_rsv_cmain          : 6;  /**< [ 53: 48](R/W) Gen4 Cmain value for all reserved presets. */
6631         uint64_t reserved_54_55        : 2;
6632         uint64_t g4_rsv_cpost          : 5;  /**< [ 60: 56](R/W) Gen4 Cpost value for all reserved presets. */
6633         uint64_t reserved_61_63        : 3;
6634 #endif /* Word 0 - End */
6635     } s;
6636     /* struct bdk_gsernx_lanex_pcie_txdrv_bcfg_s cn; */
6637 };
6638 typedef union bdk_gsernx_lanex_pcie_txdrv_bcfg bdk_gsernx_lanex_pcie_txdrv_bcfg_t;
6639 
6640 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXDRV_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_TXDRV_BCFG(unsigned long a,unsigned long b)6641 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXDRV_BCFG(unsigned long a, unsigned long b)
6642 {
6643     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
6644         return 0x87e090002830ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
6645     __bdk_csr_fatal("GSERNX_LANEX_PCIE_TXDRV_BCFG", 2, a, b, 0, 0);
6646 }
6647 
6648 #define typedef_BDK_GSERNX_LANEX_PCIE_TXDRV_BCFG(a,b) bdk_gsernx_lanex_pcie_txdrv_bcfg_t
6649 #define bustype_BDK_GSERNX_LANEX_PCIE_TXDRV_BCFG(a,b) BDK_CSR_TYPE_RSL
6650 #define basename_BDK_GSERNX_LANEX_PCIE_TXDRV_BCFG(a,b) "GSERNX_LANEX_PCIE_TXDRV_BCFG"
6651 #define device_bar_BDK_GSERNX_LANEX_PCIE_TXDRV_BCFG(a,b) 0x0 /* PF_BAR0 */
6652 #define busnum_BDK_GSERNX_LANEX_PCIE_TXDRV_BCFG(a,b) (a)
6653 #define arguments_BDK_GSERNX_LANEX_PCIE_TXDRV_BCFG(a,b) (a),(b),-1,-1
6654 
6655 /**
6656  * Register (RSL) gsern#_lane#_pcie_txpst0_bcfg
6657  *
6658  * GSER Lane PCIe TX Drive Preset Coefficients Control Register
6659  * TX drive Cpre, Cpost and Cmain Coefficient values for Gen3 preset P0.
6660  * Cpre and Cpost are only 4 and 5 bits in length, respectively, as the
6661  * full 6 bits defined in the PCIe specification are not needed.
6662  */
6663 union bdk_gsernx_lanex_pcie_txpst0_bcfg
6664 {
6665     uint64_t u;
6666     struct bdk_gsernx_lanex_pcie_txpst0_bcfg_s
6667     {
6668 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
6669         uint64_t reserved_21_63        : 43;
6670         uint64_t g3_p0_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen3 preset P0. */
6671         uint64_t reserved_14_15        : 2;
6672         uint64_t g3_p0_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen3 preset P0. */
6673         uint64_t reserved_4_7          : 4;
6674         uint64_t g3_p0_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen3 preset P0. */
6675 #else /* Word 0 - Little Endian */
6676         uint64_t g3_p0_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen3 preset P0. */
6677         uint64_t reserved_4_7          : 4;
6678         uint64_t g3_p0_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen3 preset P0. */
6679         uint64_t reserved_14_15        : 2;
6680         uint64_t g3_p0_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen3 preset P0. */
6681         uint64_t reserved_21_63        : 43;
6682 #endif /* Word 0 - End */
6683     } s;
6684     /* struct bdk_gsernx_lanex_pcie_txpst0_bcfg_s cn; */
6685 };
6686 typedef union bdk_gsernx_lanex_pcie_txpst0_bcfg bdk_gsernx_lanex_pcie_txpst0_bcfg_t;
6687 
6688 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST0_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_TXPST0_BCFG(unsigned long a,unsigned long b)6689 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST0_BCFG(unsigned long a, unsigned long b)
6690 {
6691     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
6692         return 0x87e0900024f0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
6693     __bdk_csr_fatal("GSERNX_LANEX_PCIE_TXPST0_BCFG", 2, a, b, 0, 0);
6694 }
6695 
6696 #define typedef_BDK_GSERNX_LANEX_PCIE_TXPST0_BCFG(a,b) bdk_gsernx_lanex_pcie_txpst0_bcfg_t
6697 #define bustype_BDK_GSERNX_LANEX_PCIE_TXPST0_BCFG(a,b) BDK_CSR_TYPE_RSL
6698 #define basename_BDK_GSERNX_LANEX_PCIE_TXPST0_BCFG(a,b) "GSERNX_LANEX_PCIE_TXPST0_BCFG"
6699 #define device_bar_BDK_GSERNX_LANEX_PCIE_TXPST0_BCFG(a,b) 0x0 /* PF_BAR0 */
6700 #define busnum_BDK_GSERNX_LANEX_PCIE_TXPST0_BCFG(a,b) (a)
6701 #define arguments_BDK_GSERNX_LANEX_PCIE_TXPST0_BCFG(a,b) (a),(b),-1,-1
6702 
6703 /**
6704  * Register (RSL) gsern#_lane#_pcie_txpst10_bcfg
6705  *
6706  * GSER Lane PCIe TX Drive Preset Coefficients Control Register
6707  * TX drive Cpre, Cpost and Cmain Coefficient values for Gen3 preset P10.
6708  * Cpre and Cpost are only 4 and 5 bits in length, respectively, as the
6709  * full 6 bits defined in the PCIe specification are not needed.
6710  */
6711 union bdk_gsernx_lanex_pcie_txpst10_bcfg
6712 {
6713     uint64_t u;
6714     struct bdk_gsernx_lanex_pcie_txpst10_bcfg_s
6715     {
6716 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
6717         uint64_t reserved_21_63        : 43;
6718         uint64_t g3_p10_cpost          : 5;  /**< [ 20: 16](R/W) Cpost value for Gen3 preset P10. */
6719         uint64_t reserved_14_15        : 2;
6720         uint64_t g3_p10_cmain          : 6;  /**< [ 13:  8](R/W) Cmain value for Gen3 preset P10. */
6721         uint64_t reserved_4_7          : 4;
6722         uint64_t g3_p10_cpre           : 4;  /**< [  3:  0](R/W) Cpost value for Gen3 preset P10. */
6723 #else /* Word 0 - Little Endian */
6724         uint64_t g3_p10_cpre           : 4;  /**< [  3:  0](R/W) Cpost value for Gen3 preset P10. */
6725         uint64_t reserved_4_7          : 4;
6726         uint64_t g3_p10_cmain          : 6;  /**< [ 13:  8](R/W) Cmain value for Gen3 preset P10. */
6727         uint64_t reserved_14_15        : 2;
6728         uint64_t g3_p10_cpost          : 5;  /**< [ 20: 16](R/W) Cpost value for Gen3 preset P10. */
6729         uint64_t reserved_21_63        : 43;
6730 #endif /* Word 0 - End */
6731     } s;
6732     /* struct bdk_gsernx_lanex_pcie_txpst10_bcfg_s cn; */
6733 };
6734 typedef union bdk_gsernx_lanex_pcie_txpst10_bcfg bdk_gsernx_lanex_pcie_txpst10_bcfg_t;
6735 
6736 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST10_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_TXPST10_BCFG(unsigned long a,unsigned long b)6737 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST10_BCFG(unsigned long a, unsigned long b)
6738 {
6739     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
6740         return 0x87e090002590ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
6741     __bdk_csr_fatal("GSERNX_LANEX_PCIE_TXPST10_BCFG", 2, a, b, 0, 0);
6742 }
6743 
6744 #define typedef_BDK_GSERNX_LANEX_PCIE_TXPST10_BCFG(a,b) bdk_gsernx_lanex_pcie_txpst10_bcfg_t
6745 #define bustype_BDK_GSERNX_LANEX_PCIE_TXPST10_BCFG(a,b) BDK_CSR_TYPE_RSL
6746 #define basename_BDK_GSERNX_LANEX_PCIE_TXPST10_BCFG(a,b) "GSERNX_LANEX_PCIE_TXPST10_BCFG"
6747 #define device_bar_BDK_GSERNX_LANEX_PCIE_TXPST10_BCFG(a,b) 0x0 /* PF_BAR0 */
6748 #define busnum_BDK_GSERNX_LANEX_PCIE_TXPST10_BCFG(a,b) (a)
6749 #define arguments_BDK_GSERNX_LANEX_PCIE_TXPST10_BCFG(a,b) (a),(b),-1,-1
6750 
6751 /**
6752  * Register (RSL) gsern#_lane#_pcie_txpst11_bcfg
6753  *
6754  * GSER Lane PCIe TX Drive Preset Coefficients Control Register
6755  * TX drive Cpre, Cpost and Cmain Coefficient values for Gen4 preset P0.
6756  * Cpre and Cpost are only 4 and 5 bits in length, respectively, as the
6757  * full 6 bits defined in the PCIe specification are not needed.
6758  */
6759 union bdk_gsernx_lanex_pcie_txpst11_bcfg
6760 {
6761     uint64_t u;
6762     struct bdk_gsernx_lanex_pcie_txpst11_bcfg_s
6763     {
6764 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
6765         uint64_t reserved_21_63        : 43;
6766         uint64_t g4_p0_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen4 preset P0. */
6767         uint64_t reserved_14_15        : 2;
6768         uint64_t g4_p0_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen4 preset P0. */
6769         uint64_t reserved_4_7          : 4;
6770         uint64_t g4_p0_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen4 preset P0. */
6771 #else /* Word 0 - Little Endian */
6772         uint64_t g4_p0_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen4 preset P0. */
6773         uint64_t reserved_4_7          : 4;
6774         uint64_t g4_p0_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen4 preset P0. */
6775         uint64_t reserved_14_15        : 2;
6776         uint64_t g4_p0_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen4 preset P0. */
6777         uint64_t reserved_21_63        : 43;
6778 #endif /* Word 0 - End */
6779     } s;
6780     /* struct bdk_gsernx_lanex_pcie_txpst11_bcfg_s cn; */
6781 };
6782 typedef union bdk_gsernx_lanex_pcie_txpst11_bcfg bdk_gsernx_lanex_pcie_txpst11_bcfg_t;
6783 
6784 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST11_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_TXPST11_BCFG(unsigned long a,unsigned long b)6785 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST11_BCFG(unsigned long a, unsigned long b)
6786 {
6787     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
6788         return 0x87e090002690ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
6789     __bdk_csr_fatal("GSERNX_LANEX_PCIE_TXPST11_BCFG", 2, a, b, 0, 0);
6790 }
6791 
6792 #define typedef_BDK_GSERNX_LANEX_PCIE_TXPST11_BCFG(a,b) bdk_gsernx_lanex_pcie_txpst11_bcfg_t
6793 #define bustype_BDK_GSERNX_LANEX_PCIE_TXPST11_BCFG(a,b) BDK_CSR_TYPE_RSL
6794 #define basename_BDK_GSERNX_LANEX_PCIE_TXPST11_BCFG(a,b) "GSERNX_LANEX_PCIE_TXPST11_BCFG"
6795 #define device_bar_BDK_GSERNX_LANEX_PCIE_TXPST11_BCFG(a,b) 0x0 /* PF_BAR0 */
6796 #define busnum_BDK_GSERNX_LANEX_PCIE_TXPST11_BCFG(a,b) (a)
6797 #define arguments_BDK_GSERNX_LANEX_PCIE_TXPST11_BCFG(a,b) (a),(b),-1,-1
6798 
6799 /**
6800  * Register (RSL) gsern#_lane#_pcie_txpst12_bcfg
6801  *
6802  * GSER Lane PCIe TX Drive Preset Coefficients Control Register
6803  * TX drive Cpre, Cpost and Cmain Coefficient values for Gen4 preset P1.
6804  * Cpre and Cpost are only 4 and 5 bits in length, respectively, as the
6805  * full 6 bits defined in the PCIe specification are not needed.
6806  */
6807 union bdk_gsernx_lanex_pcie_txpst12_bcfg
6808 {
6809     uint64_t u;
6810     struct bdk_gsernx_lanex_pcie_txpst12_bcfg_s
6811     {
6812 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
6813         uint64_t reserved_21_63        : 43;
6814         uint64_t g4_p1_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen4 preset P1. */
6815         uint64_t reserved_14_15        : 2;
6816         uint64_t g4_p1_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen4 preset P1. */
6817         uint64_t reserved_4_7          : 4;
6818         uint64_t g4_p1_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen4 preset P1. */
6819 #else /* Word 0 - Little Endian */
6820         uint64_t g4_p1_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen4 preset P1. */
6821         uint64_t reserved_4_7          : 4;
6822         uint64_t g4_p1_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen4 preset P1. */
6823         uint64_t reserved_14_15        : 2;
6824         uint64_t g4_p1_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen4 preset P1. */
6825         uint64_t reserved_21_63        : 43;
6826 #endif /* Word 0 - End */
6827     } s;
6828     /* struct bdk_gsernx_lanex_pcie_txpst12_bcfg_s cn; */
6829 };
6830 typedef union bdk_gsernx_lanex_pcie_txpst12_bcfg bdk_gsernx_lanex_pcie_txpst12_bcfg_t;
6831 
6832 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST12_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_TXPST12_BCFG(unsigned long a,unsigned long b)6833 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST12_BCFG(unsigned long a, unsigned long b)
6834 {
6835     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
6836         return 0x87e0900026a0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
6837     __bdk_csr_fatal("GSERNX_LANEX_PCIE_TXPST12_BCFG", 2, a, b, 0, 0);
6838 }
6839 
6840 #define typedef_BDK_GSERNX_LANEX_PCIE_TXPST12_BCFG(a,b) bdk_gsernx_lanex_pcie_txpst12_bcfg_t
6841 #define bustype_BDK_GSERNX_LANEX_PCIE_TXPST12_BCFG(a,b) BDK_CSR_TYPE_RSL
6842 #define basename_BDK_GSERNX_LANEX_PCIE_TXPST12_BCFG(a,b) "GSERNX_LANEX_PCIE_TXPST12_BCFG"
6843 #define device_bar_BDK_GSERNX_LANEX_PCIE_TXPST12_BCFG(a,b) 0x0 /* PF_BAR0 */
6844 #define busnum_BDK_GSERNX_LANEX_PCIE_TXPST12_BCFG(a,b) (a)
6845 #define arguments_BDK_GSERNX_LANEX_PCIE_TXPST12_BCFG(a,b) (a),(b),-1,-1
6846 
6847 /**
6848  * Register (RSL) gsern#_lane#_pcie_txpst13_bcfg
6849  *
6850  * GSER Lane PCIe TX Drive Preset Coefficients Control Register
6851  * TX drive Cpre, Cpost and Cmain Coefficient values for Gen4 preset P2.
6852  * Cpre and Cpost are only 4 and 5 bits in length, respectively, as the
6853  * full 6 bits defined in the PCIe specification are not needed.
6854  */
6855 union bdk_gsernx_lanex_pcie_txpst13_bcfg
6856 {
6857     uint64_t u;
6858     struct bdk_gsernx_lanex_pcie_txpst13_bcfg_s
6859     {
6860 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
6861         uint64_t reserved_21_63        : 43;
6862         uint64_t g4_p2_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen4 preset P2. */
6863         uint64_t reserved_14_15        : 2;
6864         uint64_t g4_p2_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen4 preset P2. */
6865         uint64_t reserved_4_7          : 4;
6866         uint64_t g4_p2_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen4 preset P2. */
6867 #else /* Word 0 - Little Endian */
6868         uint64_t g4_p2_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen4 preset P2. */
6869         uint64_t reserved_4_7          : 4;
6870         uint64_t g4_p2_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen4 preset P2. */
6871         uint64_t reserved_14_15        : 2;
6872         uint64_t g4_p2_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen4 preset P2. */
6873         uint64_t reserved_21_63        : 43;
6874 #endif /* Word 0 - End */
6875     } s;
6876     /* struct bdk_gsernx_lanex_pcie_txpst13_bcfg_s cn; */
6877 };
6878 typedef union bdk_gsernx_lanex_pcie_txpst13_bcfg bdk_gsernx_lanex_pcie_txpst13_bcfg_t;
6879 
6880 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST13_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_TXPST13_BCFG(unsigned long a,unsigned long b)6881 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST13_BCFG(unsigned long a, unsigned long b)
6882 {
6883     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
6884         return 0x87e0900026b0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
6885     __bdk_csr_fatal("GSERNX_LANEX_PCIE_TXPST13_BCFG", 2, a, b, 0, 0);
6886 }
6887 
6888 #define typedef_BDK_GSERNX_LANEX_PCIE_TXPST13_BCFG(a,b) bdk_gsernx_lanex_pcie_txpst13_bcfg_t
6889 #define bustype_BDK_GSERNX_LANEX_PCIE_TXPST13_BCFG(a,b) BDK_CSR_TYPE_RSL
6890 #define basename_BDK_GSERNX_LANEX_PCIE_TXPST13_BCFG(a,b) "GSERNX_LANEX_PCIE_TXPST13_BCFG"
6891 #define device_bar_BDK_GSERNX_LANEX_PCIE_TXPST13_BCFG(a,b) 0x0 /* PF_BAR0 */
6892 #define busnum_BDK_GSERNX_LANEX_PCIE_TXPST13_BCFG(a,b) (a)
6893 #define arguments_BDK_GSERNX_LANEX_PCIE_TXPST13_BCFG(a,b) (a),(b),-1,-1
6894 
6895 /**
6896  * Register (RSL) gsern#_lane#_pcie_txpst14_bcfg
6897  *
6898  * GSER Lane PCIe TX Drive Preset Coefficients Control Register
6899  * TX drive Cpre, Cpost and Cmain Coefficient values for Gen4 preset P3.
6900  * Cpre and Cpost are only 4 and 5 bits in length, respectively, as the
6901  * full 6 bits defined in the PCIe specification are not needed.
6902  */
6903 union bdk_gsernx_lanex_pcie_txpst14_bcfg
6904 {
6905     uint64_t u;
6906     struct bdk_gsernx_lanex_pcie_txpst14_bcfg_s
6907     {
6908 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
6909         uint64_t reserved_21_63        : 43;
6910         uint64_t g4_p3_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen4 preset P3. */
6911         uint64_t reserved_14_15        : 2;
6912         uint64_t g4_p3_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen4 preset P3. */
6913         uint64_t reserved_4_7          : 4;
6914         uint64_t g4_p3_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen4 preset P3. */
6915 #else /* Word 0 - Little Endian */
6916         uint64_t g4_p3_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen4 preset P3. */
6917         uint64_t reserved_4_7          : 4;
6918         uint64_t g4_p3_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen4 preset P3. */
6919         uint64_t reserved_14_15        : 2;
6920         uint64_t g4_p3_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen4 preset P3. */
6921         uint64_t reserved_21_63        : 43;
6922 #endif /* Word 0 - End */
6923     } s;
6924     /* struct bdk_gsernx_lanex_pcie_txpst14_bcfg_s cn; */
6925 };
6926 typedef union bdk_gsernx_lanex_pcie_txpst14_bcfg bdk_gsernx_lanex_pcie_txpst14_bcfg_t;
6927 
6928 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST14_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_TXPST14_BCFG(unsigned long a,unsigned long b)6929 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST14_BCFG(unsigned long a, unsigned long b)
6930 {
6931     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
6932         return 0x87e0900026c0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
6933     __bdk_csr_fatal("GSERNX_LANEX_PCIE_TXPST14_BCFG", 2, a, b, 0, 0);
6934 }
6935 
6936 #define typedef_BDK_GSERNX_LANEX_PCIE_TXPST14_BCFG(a,b) bdk_gsernx_lanex_pcie_txpst14_bcfg_t
6937 #define bustype_BDK_GSERNX_LANEX_PCIE_TXPST14_BCFG(a,b) BDK_CSR_TYPE_RSL
6938 #define basename_BDK_GSERNX_LANEX_PCIE_TXPST14_BCFG(a,b) "GSERNX_LANEX_PCIE_TXPST14_BCFG"
6939 #define device_bar_BDK_GSERNX_LANEX_PCIE_TXPST14_BCFG(a,b) 0x0 /* PF_BAR0 */
6940 #define busnum_BDK_GSERNX_LANEX_PCIE_TXPST14_BCFG(a,b) (a)
6941 #define arguments_BDK_GSERNX_LANEX_PCIE_TXPST14_BCFG(a,b) (a),(b),-1,-1
6942 
6943 /**
6944  * Register (RSL) gsern#_lane#_pcie_txpst15_bcfg
6945  *
6946  * GSER Lane PCIe TX Drive Preset Coefficients Control Register
6947  * TX drive Cpre, Cpost and Cmain Coefficient values for Gen4 preset P4.
6948  * Cpre and Cpost are only 4 and 5 bits in length, respectively, as the
6949  * full 6 bits defined in the PCIe specification are not needed.
6950  */
6951 union bdk_gsernx_lanex_pcie_txpst15_bcfg
6952 {
6953     uint64_t u;
6954     struct bdk_gsernx_lanex_pcie_txpst15_bcfg_s
6955     {
6956 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
6957         uint64_t reserved_21_63        : 43;
6958         uint64_t g4_p4_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen4 preset P4. */
6959         uint64_t reserved_14_15        : 2;
6960         uint64_t g4_p4_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen4 preset P4. */
6961         uint64_t reserved_4_7          : 4;
6962         uint64_t g4_p4_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen4 preset P4. */
6963 #else /* Word 0 - Little Endian */
6964         uint64_t g4_p4_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen4 preset P4. */
6965         uint64_t reserved_4_7          : 4;
6966         uint64_t g4_p4_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen4 preset P4. */
6967         uint64_t reserved_14_15        : 2;
6968         uint64_t g4_p4_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen4 preset P4. */
6969         uint64_t reserved_21_63        : 43;
6970 #endif /* Word 0 - End */
6971     } s;
6972     /* struct bdk_gsernx_lanex_pcie_txpst15_bcfg_s cn; */
6973 };
6974 typedef union bdk_gsernx_lanex_pcie_txpst15_bcfg bdk_gsernx_lanex_pcie_txpst15_bcfg_t;
6975 
6976 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST15_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_TXPST15_BCFG(unsigned long a,unsigned long b)6977 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST15_BCFG(unsigned long a, unsigned long b)
6978 {
6979     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
6980         return 0x87e0900026d0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
6981     __bdk_csr_fatal("GSERNX_LANEX_PCIE_TXPST15_BCFG", 2, a, b, 0, 0);
6982 }
6983 
6984 #define typedef_BDK_GSERNX_LANEX_PCIE_TXPST15_BCFG(a,b) bdk_gsernx_lanex_pcie_txpst15_bcfg_t
6985 #define bustype_BDK_GSERNX_LANEX_PCIE_TXPST15_BCFG(a,b) BDK_CSR_TYPE_RSL
6986 #define basename_BDK_GSERNX_LANEX_PCIE_TXPST15_BCFG(a,b) "GSERNX_LANEX_PCIE_TXPST15_BCFG"
6987 #define device_bar_BDK_GSERNX_LANEX_PCIE_TXPST15_BCFG(a,b) 0x0 /* PF_BAR0 */
6988 #define busnum_BDK_GSERNX_LANEX_PCIE_TXPST15_BCFG(a,b) (a)
6989 #define arguments_BDK_GSERNX_LANEX_PCIE_TXPST15_BCFG(a,b) (a),(b),-1,-1
6990 
6991 /**
6992  * Register (RSL) gsern#_lane#_pcie_txpst16_bcfg
6993  *
6994  * GSER Lane PCIe TX Drive Preset Coefficients Control Register
6995  * TX drive Cpre, Cpost and Cmain Coefficient values for Gen4 preset P5.
6996  * Cpre and Cpost are only 4 and 5 bits in length, respectively, as the
6997  * full 6 bits defined in the PCIe specification are not needed.
6998  */
6999 union bdk_gsernx_lanex_pcie_txpst16_bcfg
7000 {
7001     uint64_t u;
7002     struct bdk_gsernx_lanex_pcie_txpst16_bcfg_s
7003     {
7004 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
7005         uint64_t reserved_21_63        : 43;
7006         uint64_t g4_p5_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen4 preset P5. */
7007         uint64_t reserved_14_15        : 2;
7008         uint64_t g4_p5_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen4 preset P5. */
7009         uint64_t reserved_4_7          : 4;
7010         uint64_t g4_p5_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen4 preset P5. */
7011 #else /* Word 0 - Little Endian */
7012         uint64_t g4_p5_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen4 preset P5. */
7013         uint64_t reserved_4_7          : 4;
7014         uint64_t g4_p5_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen4 preset P5. */
7015         uint64_t reserved_14_15        : 2;
7016         uint64_t g4_p5_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen4 preset P5. */
7017         uint64_t reserved_21_63        : 43;
7018 #endif /* Word 0 - End */
7019     } s;
7020     /* struct bdk_gsernx_lanex_pcie_txpst16_bcfg_s cn; */
7021 };
7022 typedef union bdk_gsernx_lanex_pcie_txpst16_bcfg bdk_gsernx_lanex_pcie_txpst16_bcfg_t;
7023 
7024 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST16_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_TXPST16_BCFG(unsigned long a,unsigned long b)7025 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST16_BCFG(unsigned long a, unsigned long b)
7026 {
7027     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
7028         return 0x87e0900026e0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
7029     __bdk_csr_fatal("GSERNX_LANEX_PCIE_TXPST16_BCFG", 2, a, b, 0, 0);
7030 }
7031 
7032 #define typedef_BDK_GSERNX_LANEX_PCIE_TXPST16_BCFG(a,b) bdk_gsernx_lanex_pcie_txpst16_bcfg_t
7033 #define bustype_BDK_GSERNX_LANEX_PCIE_TXPST16_BCFG(a,b) BDK_CSR_TYPE_RSL
7034 #define basename_BDK_GSERNX_LANEX_PCIE_TXPST16_BCFG(a,b) "GSERNX_LANEX_PCIE_TXPST16_BCFG"
7035 #define device_bar_BDK_GSERNX_LANEX_PCIE_TXPST16_BCFG(a,b) 0x0 /* PF_BAR0 */
7036 #define busnum_BDK_GSERNX_LANEX_PCIE_TXPST16_BCFG(a,b) (a)
7037 #define arguments_BDK_GSERNX_LANEX_PCIE_TXPST16_BCFG(a,b) (a),(b),-1,-1
7038 
7039 /**
7040  * Register (RSL) gsern#_lane#_pcie_txpst17_bcfg
7041  *
7042  * GSER Lane PCIe TX Drive Preset Coefficients Control Register
7043  * TX drive Cpre, Cpost and Cmain Coefficient values for Gen4 preset P6.
7044  * Cpre and Cpost are only 4 and 5 bits in length, respectively, as the
7045  * full 6 bits defined in the PCIe specification are not needed.
7046  */
7047 union bdk_gsernx_lanex_pcie_txpst17_bcfg
7048 {
7049     uint64_t u;
7050     struct bdk_gsernx_lanex_pcie_txpst17_bcfg_s
7051     {
7052 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
7053         uint64_t reserved_21_63        : 43;
7054         uint64_t g4_p6_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen4 preset P6. */
7055         uint64_t reserved_14_15        : 2;
7056         uint64_t g4_p6_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen4 preset P6. */
7057         uint64_t reserved_4_7          : 4;
7058         uint64_t g4_p6_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen4 preset P6. */
7059 #else /* Word 0 - Little Endian */
7060         uint64_t g4_p6_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen4 preset P6. */
7061         uint64_t reserved_4_7          : 4;
7062         uint64_t g4_p6_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen4 preset P6. */
7063         uint64_t reserved_14_15        : 2;
7064         uint64_t g4_p6_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen4 preset P6. */
7065         uint64_t reserved_21_63        : 43;
7066 #endif /* Word 0 - End */
7067     } s;
7068     /* struct bdk_gsernx_lanex_pcie_txpst17_bcfg_s cn; */
7069 };
7070 typedef union bdk_gsernx_lanex_pcie_txpst17_bcfg bdk_gsernx_lanex_pcie_txpst17_bcfg_t;
7071 
7072 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST17_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_TXPST17_BCFG(unsigned long a,unsigned long b)7073 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST17_BCFG(unsigned long a, unsigned long b)
7074 {
7075     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
7076         return 0x87e0900026f0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
7077     __bdk_csr_fatal("GSERNX_LANEX_PCIE_TXPST17_BCFG", 2, a, b, 0, 0);
7078 }
7079 
7080 #define typedef_BDK_GSERNX_LANEX_PCIE_TXPST17_BCFG(a,b) bdk_gsernx_lanex_pcie_txpst17_bcfg_t
7081 #define bustype_BDK_GSERNX_LANEX_PCIE_TXPST17_BCFG(a,b) BDK_CSR_TYPE_RSL
7082 #define basename_BDK_GSERNX_LANEX_PCIE_TXPST17_BCFG(a,b) "GSERNX_LANEX_PCIE_TXPST17_BCFG"
7083 #define device_bar_BDK_GSERNX_LANEX_PCIE_TXPST17_BCFG(a,b) 0x0 /* PF_BAR0 */
7084 #define busnum_BDK_GSERNX_LANEX_PCIE_TXPST17_BCFG(a,b) (a)
7085 #define arguments_BDK_GSERNX_LANEX_PCIE_TXPST17_BCFG(a,b) (a),(b),-1,-1
7086 
7087 /**
7088  * Register (RSL) gsern#_lane#_pcie_txpst18_bcfg
7089  *
7090  * GSER Lane PCIe TX Drive Preset Coefficients Control Register
7091  * TX drive Cpre, Cpost and Cmain Coefficient values for Gen4 preset P7.
7092  * Cpre and Cpost are only 4 and 5 bits in length, respectively, as the
7093  * full 6 bits defined in the PCIe specification are not needed.
7094  */
7095 union bdk_gsernx_lanex_pcie_txpst18_bcfg
7096 {
7097     uint64_t u;
7098     struct bdk_gsernx_lanex_pcie_txpst18_bcfg_s
7099     {
7100 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
7101         uint64_t reserved_21_63        : 43;
7102         uint64_t g4_p7_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen4 preset P7. */
7103         uint64_t reserved_14_15        : 2;
7104         uint64_t g4_p7_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen4 preset P7. */
7105         uint64_t reserved_4_7          : 4;
7106         uint64_t g4_p7_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen4 preset P7. */
7107 #else /* Word 0 - Little Endian */
7108         uint64_t g4_p7_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen4 preset P7. */
7109         uint64_t reserved_4_7          : 4;
7110         uint64_t g4_p7_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen4 preset P7. */
7111         uint64_t reserved_14_15        : 2;
7112         uint64_t g4_p7_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen4 preset P7. */
7113         uint64_t reserved_21_63        : 43;
7114 #endif /* Word 0 - End */
7115     } s;
7116     /* struct bdk_gsernx_lanex_pcie_txpst18_bcfg_s cn; */
7117 };
7118 typedef union bdk_gsernx_lanex_pcie_txpst18_bcfg bdk_gsernx_lanex_pcie_txpst18_bcfg_t;
7119 
7120 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST18_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_TXPST18_BCFG(unsigned long a,unsigned long b)7121 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST18_BCFG(unsigned long a, unsigned long b)
7122 {
7123     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
7124         return 0x87e090002700ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
7125     __bdk_csr_fatal("GSERNX_LANEX_PCIE_TXPST18_BCFG", 2, a, b, 0, 0);
7126 }
7127 
7128 #define typedef_BDK_GSERNX_LANEX_PCIE_TXPST18_BCFG(a,b) bdk_gsernx_lanex_pcie_txpst18_bcfg_t
7129 #define bustype_BDK_GSERNX_LANEX_PCIE_TXPST18_BCFG(a,b) BDK_CSR_TYPE_RSL
7130 #define basename_BDK_GSERNX_LANEX_PCIE_TXPST18_BCFG(a,b) "GSERNX_LANEX_PCIE_TXPST18_BCFG"
7131 #define device_bar_BDK_GSERNX_LANEX_PCIE_TXPST18_BCFG(a,b) 0x0 /* PF_BAR0 */
7132 #define busnum_BDK_GSERNX_LANEX_PCIE_TXPST18_BCFG(a,b) (a)
7133 #define arguments_BDK_GSERNX_LANEX_PCIE_TXPST18_BCFG(a,b) (a),(b),-1,-1
7134 
7135 /**
7136  * Register (RSL) gsern#_lane#_pcie_txpst19_bcfg
7137  *
7138  * GSER Lane PCIe TX Drive Preset Coefficients Control Register
7139  * TX drive Cpre, Cpost and Cmain Coefficient values for Gen4 preset P8.
7140  * Cpre and Cpost are only 4 and 5 bits in length, respectively, as the
7141  * full 6 bits defined in the PCIe specification are not needed.
7142  */
7143 union bdk_gsernx_lanex_pcie_txpst19_bcfg
7144 {
7145     uint64_t u;
7146     struct bdk_gsernx_lanex_pcie_txpst19_bcfg_s
7147     {
7148 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
7149         uint64_t reserved_21_63        : 43;
7150         uint64_t g4_p8_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen4 preset P8. */
7151         uint64_t reserved_14_15        : 2;
7152         uint64_t g4_p8_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen4 preset P8. */
7153         uint64_t reserved_4_7          : 4;
7154         uint64_t g4_p8_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen4 preset P8. */
7155 #else /* Word 0 - Little Endian */
7156         uint64_t g4_p8_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen4 preset P8. */
7157         uint64_t reserved_4_7          : 4;
7158         uint64_t g4_p8_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen4 preset P8. */
7159         uint64_t reserved_14_15        : 2;
7160         uint64_t g4_p8_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen4 preset P8. */
7161         uint64_t reserved_21_63        : 43;
7162 #endif /* Word 0 - End */
7163     } s;
7164     /* struct bdk_gsernx_lanex_pcie_txpst19_bcfg_s cn; */
7165 };
7166 typedef union bdk_gsernx_lanex_pcie_txpst19_bcfg bdk_gsernx_lanex_pcie_txpst19_bcfg_t;
7167 
7168 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST19_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_TXPST19_BCFG(unsigned long a,unsigned long b)7169 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST19_BCFG(unsigned long a, unsigned long b)
7170 {
7171     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
7172         return 0x87e090002710ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
7173     __bdk_csr_fatal("GSERNX_LANEX_PCIE_TXPST19_BCFG", 2, a, b, 0, 0);
7174 }
7175 
7176 #define typedef_BDK_GSERNX_LANEX_PCIE_TXPST19_BCFG(a,b) bdk_gsernx_lanex_pcie_txpst19_bcfg_t
7177 #define bustype_BDK_GSERNX_LANEX_PCIE_TXPST19_BCFG(a,b) BDK_CSR_TYPE_RSL
7178 #define basename_BDK_GSERNX_LANEX_PCIE_TXPST19_BCFG(a,b) "GSERNX_LANEX_PCIE_TXPST19_BCFG"
7179 #define device_bar_BDK_GSERNX_LANEX_PCIE_TXPST19_BCFG(a,b) 0x0 /* PF_BAR0 */
7180 #define busnum_BDK_GSERNX_LANEX_PCIE_TXPST19_BCFG(a,b) (a)
7181 #define arguments_BDK_GSERNX_LANEX_PCIE_TXPST19_BCFG(a,b) (a),(b),-1,-1
7182 
7183 /**
7184  * Register (RSL) gsern#_lane#_pcie_txpst1_bcfg
7185  *
7186  * GSER Lane PCIe TX Drive Preset Coefficients Control Register
7187  * TX drive Cpre, Cpost and Cmain Coefficient values for Gen3 preset P1.
7188  * Cpre and Cpost are only 4 and 5 bits in length, respectively, as the
7189  * full 6 bits defined in the PCIe specification are not needed.
7190  */
7191 union bdk_gsernx_lanex_pcie_txpst1_bcfg
7192 {
7193     uint64_t u;
7194     struct bdk_gsernx_lanex_pcie_txpst1_bcfg_s
7195     {
7196 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
7197         uint64_t reserved_21_63        : 43;
7198         uint64_t g3_p1_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen3 preset P1. */
7199         uint64_t reserved_14_15        : 2;
7200         uint64_t g3_p1_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen3 preset P1. */
7201         uint64_t reserved_4_7          : 4;
7202         uint64_t g3_p1_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen3 preset P1. */
7203 #else /* Word 0 - Little Endian */
7204         uint64_t g3_p1_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen3 preset P1. */
7205         uint64_t reserved_4_7          : 4;
7206         uint64_t g3_p1_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen3 preset P1. */
7207         uint64_t reserved_14_15        : 2;
7208         uint64_t g3_p1_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen3 preset P1. */
7209         uint64_t reserved_21_63        : 43;
7210 #endif /* Word 0 - End */
7211     } s;
7212     /* struct bdk_gsernx_lanex_pcie_txpst1_bcfg_s cn; */
7213 };
7214 typedef union bdk_gsernx_lanex_pcie_txpst1_bcfg bdk_gsernx_lanex_pcie_txpst1_bcfg_t;
7215 
7216 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST1_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_TXPST1_BCFG(unsigned long a,unsigned long b)7217 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST1_BCFG(unsigned long a, unsigned long b)
7218 {
7219     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
7220         return 0x87e090002500ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
7221     __bdk_csr_fatal("GSERNX_LANEX_PCIE_TXPST1_BCFG", 2, a, b, 0, 0);
7222 }
7223 
7224 #define typedef_BDK_GSERNX_LANEX_PCIE_TXPST1_BCFG(a,b) bdk_gsernx_lanex_pcie_txpst1_bcfg_t
7225 #define bustype_BDK_GSERNX_LANEX_PCIE_TXPST1_BCFG(a,b) BDK_CSR_TYPE_RSL
7226 #define basename_BDK_GSERNX_LANEX_PCIE_TXPST1_BCFG(a,b) "GSERNX_LANEX_PCIE_TXPST1_BCFG"
7227 #define device_bar_BDK_GSERNX_LANEX_PCIE_TXPST1_BCFG(a,b) 0x0 /* PF_BAR0 */
7228 #define busnum_BDK_GSERNX_LANEX_PCIE_TXPST1_BCFG(a,b) (a)
7229 #define arguments_BDK_GSERNX_LANEX_PCIE_TXPST1_BCFG(a,b) (a),(b),-1,-1
7230 
7231 /**
7232  * Register (RSL) gsern#_lane#_pcie_txpst20_bcfg
7233  *
7234  * GSER Lane PCIe TX Drive Preset Coefficients Control Register
7235  * TX drive Cpre, Cpost and Cmain Coefficient values for Gen4 preset P9.
7236  * Cpre and Cpost are only 4 and 5 bits in length, respectively, as the
7237  * full 6 bits defined in the PCIe specification are not needed.
7238  */
7239 union bdk_gsernx_lanex_pcie_txpst20_bcfg
7240 {
7241     uint64_t u;
7242     struct bdk_gsernx_lanex_pcie_txpst20_bcfg_s
7243     {
7244 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
7245         uint64_t reserved_21_63        : 43;
7246         uint64_t g4_p9_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen4 preset P9. */
7247         uint64_t reserved_14_15        : 2;
7248         uint64_t g4_p9_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen4 preset P9. */
7249         uint64_t reserved_4_7          : 4;
7250         uint64_t g4_p9_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen4 preset P9. */
7251 #else /* Word 0 - Little Endian */
7252         uint64_t g4_p9_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen4 preset P9. */
7253         uint64_t reserved_4_7          : 4;
7254         uint64_t g4_p9_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen4 preset P9. */
7255         uint64_t reserved_14_15        : 2;
7256         uint64_t g4_p9_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen4 preset P9. */
7257         uint64_t reserved_21_63        : 43;
7258 #endif /* Word 0 - End */
7259     } s;
7260     /* struct bdk_gsernx_lanex_pcie_txpst20_bcfg_s cn; */
7261 };
7262 typedef union bdk_gsernx_lanex_pcie_txpst20_bcfg bdk_gsernx_lanex_pcie_txpst20_bcfg_t;
7263 
7264 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST20_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_TXPST20_BCFG(unsigned long a,unsigned long b)7265 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST20_BCFG(unsigned long a, unsigned long b)
7266 {
7267     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
7268         return 0x87e090002720ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
7269     __bdk_csr_fatal("GSERNX_LANEX_PCIE_TXPST20_BCFG", 2, a, b, 0, 0);
7270 }
7271 
7272 #define typedef_BDK_GSERNX_LANEX_PCIE_TXPST20_BCFG(a,b) bdk_gsernx_lanex_pcie_txpst20_bcfg_t
7273 #define bustype_BDK_GSERNX_LANEX_PCIE_TXPST20_BCFG(a,b) BDK_CSR_TYPE_RSL
7274 #define basename_BDK_GSERNX_LANEX_PCIE_TXPST20_BCFG(a,b) "GSERNX_LANEX_PCIE_TXPST20_BCFG"
7275 #define device_bar_BDK_GSERNX_LANEX_PCIE_TXPST20_BCFG(a,b) 0x0 /* PF_BAR0 */
7276 #define busnum_BDK_GSERNX_LANEX_PCIE_TXPST20_BCFG(a,b) (a)
7277 #define arguments_BDK_GSERNX_LANEX_PCIE_TXPST20_BCFG(a,b) (a),(b),-1,-1
7278 
7279 /**
7280  * Register (RSL) gsern#_lane#_pcie_txpst21_bcfg
7281  *
7282  * GSER Lane PCIe TX Drive Preset Coefficients Control Register
7283  * TX drive Cpre, Cpost and Cmain Coefficient values for Gen4 preset P10.
7284  * Cpre and Cpost are only 4 and 5 bits in length, respectively, as the
7285  * full 6 bits defined in the PCIe specification are not needed.
7286  */
7287 union bdk_gsernx_lanex_pcie_txpst21_bcfg
7288 {
7289     uint64_t u;
7290     struct bdk_gsernx_lanex_pcie_txpst21_bcfg_s
7291     {
7292 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
7293         uint64_t reserved_21_63        : 43;
7294         uint64_t g4_p10_cpost          : 5;  /**< [ 20: 16](R/W) Cpost value for Gen4 preset P10. */
7295         uint64_t reserved_14_15        : 2;
7296         uint64_t g4_p10_cmain          : 6;  /**< [ 13:  8](R/W) Cmain value for Gen4 preset P10. */
7297         uint64_t reserved_4_7          : 4;
7298         uint64_t g4_p10_cpre           : 4;  /**< [  3:  0](R/W) Cpost value for Gen4 preset P10. */
7299 #else /* Word 0 - Little Endian */
7300         uint64_t g4_p10_cpre           : 4;  /**< [  3:  0](R/W) Cpost value for Gen4 preset P10. */
7301         uint64_t reserved_4_7          : 4;
7302         uint64_t g4_p10_cmain          : 6;  /**< [ 13:  8](R/W) Cmain value for Gen4 preset P10. */
7303         uint64_t reserved_14_15        : 2;
7304         uint64_t g4_p10_cpost          : 5;  /**< [ 20: 16](R/W) Cpost value for Gen4 preset P10. */
7305         uint64_t reserved_21_63        : 43;
7306 #endif /* Word 0 - End */
7307     } s;
7308     /* struct bdk_gsernx_lanex_pcie_txpst21_bcfg_s cn; */
7309 };
7310 typedef union bdk_gsernx_lanex_pcie_txpst21_bcfg bdk_gsernx_lanex_pcie_txpst21_bcfg_t;
7311 
7312 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST21_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_TXPST21_BCFG(unsigned long a,unsigned long b)7313 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST21_BCFG(unsigned long a, unsigned long b)
7314 {
7315     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
7316         return 0x87e090002730ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
7317     __bdk_csr_fatal("GSERNX_LANEX_PCIE_TXPST21_BCFG", 2, a, b, 0, 0);
7318 }
7319 
7320 #define typedef_BDK_GSERNX_LANEX_PCIE_TXPST21_BCFG(a,b) bdk_gsernx_lanex_pcie_txpst21_bcfg_t
7321 #define bustype_BDK_GSERNX_LANEX_PCIE_TXPST21_BCFG(a,b) BDK_CSR_TYPE_RSL
7322 #define basename_BDK_GSERNX_LANEX_PCIE_TXPST21_BCFG(a,b) "GSERNX_LANEX_PCIE_TXPST21_BCFG"
7323 #define device_bar_BDK_GSERNX_LANEX_PCIE_TXPST21_BCFG(a,b) 0x0 /* PF_BAR0 */
7324 #define busnum_BDK_GSERNX_LANEX_PCIE_TXPST21_BCFG(a,b) (a)
7325 #define arguments_BDK_GSERNX_LANEX_PCIE_TXPST21_BCFG(a,b) (a),(b),-1,-1
7326 
7327 /**
7328  * Register (RSL) gsern#_lane#_pcie_txpst2_bcfg
7329  *
7330  * GSER Lane PCIe TX Drive Preset Coefficients Control Register
7331  * TX drive Cpre, Cpost and Cmain Coefficient values for Gen3 preset P2.
7332  * Cpre and Cpost are only 4 and 5 bits in length, respectively, as the
7333  * full 6 bits defined in the PCIe specification are not needed.
7334  */
7335 union bdk_gsernx_lanex_pcie_txpst2_bcfg
7336 {
7337     uint64_t u;
7338     struct bdk_gsernx_lanex_pcie_txpst2_bcfg_s
7339     {
7340 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
7341         uint64_t reserved_21_63        : 43;
7342         uint64_t g3_p2_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen3 preset P2. */
7343         uint64_t reserved_14_15        : 2;
7344         uint64_t g3_p2_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen3 preset P2. */
7345         uint64_t reserved_4_7          : 4;
7346         uint64_t g3_p2_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen3 preset P2. */
7347 #else /* Word 0 - Little Endian */
7348         uint64_t g3_p2_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen3 preset P2. */
7349         uint64_t reserved_4_7          : 4;
7350         uint64_t g3_p2_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen3 preset P2. */
7351         uint64_t reserved_14_15        : 2;
7352         uint64_t g3_p2_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen3 preset P2. */
7353         uint64_t reserved_21_63        : 43;
7354 #endif /* Word 0 - End */
7355     } s;
7356     /* struct bdk_gsernx_lanex_pcie_txpst2_bcfg_s cn; */
7357 };
7358 typedef union bdk_gsernx_lanex_pcie_txpst2_bcfg bdk_gsernx_lanex_pcie_txpst2_bcfg_t;
7359 
7360 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST2_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_TXPST2_BCFG(unsigned long a,unsigned long b)7361 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST2_BCFG(unsigned long a, unsigned long b)
7362 {
7363     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
7364         return 0x87e090002510ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
7365     __bdk_csr_fatal("GSERNX_LANEX_PCIE_TXPST2_BCFG", 2, a, b, 0, 0);
7366 }
7367 
7368 #define typedef_BDK_GSERNX_LANEX_PCIE_TXPST2_BCFG(a,b) bdk_gsernx_lanex_pcie_txpst2_bcfg_t
7369 #define bustype_BDK_GSERNX_LANEX_PCIE_TXPST2_BCFG(a,b) BDK_CSR_TYPE_RSL
7370 #define basename_BDK_GSERNX_LANEX_PCIE_TXPST2_BCFG(a,b) "GSERNX_LANEX_PCIE_TXPST2_BCFG"
7371 #define device_bar_BDK_GSERNX_LANEX_PCIE_TXPST2_BCFG(a,b) 0x0 /* PF_BAR0 */
7372 #define busnum_BDK_GSERNX_LANEX_PCIE_TXPST2_BCFG(a,b) (a)
7373 #define arguments_BDK_GSERNX_LANEX_PCIE_TXPST2_BCFG(a,b) (a),(b),-1,-1
7374 
7375 /**
7376  * Register (RSL) gsern#_lane#_pcie_txpst3_bcfg
7377  *
7378  * GSER Lane PCIe TX Drive Preset Coefficients Control Register
7379  * TX drive Cpre, Cpost and Cmain Coefficient values for Gen3 preset P3.
7380  * Cpre and Cpost are only 4 and 5 bits in length, respectively, as the
7381  * full 6 bits defined in the PCIe specification are not needed.
7382  */
7383 union bdk_gsernx_lanex_pcie_txpst3_bcfg
7384 {
7385     uint64_t u;
7386     struct bdk_gsernx_lanex_pcie_txpst3_bcfg_s
7387     {
7388 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
7389         uint64_t reserved_21_63        : 43;
7390         uint64_t g3_p3_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen3 preset P3. */
7391         uint64_t reserved_14_15        : 2;
7392         uint64_t g3_p3_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen3 preset P3. */
7393         uint64_t reserved_4_7          : 4;
7394         uint64_t g3_p3_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen3 preset P3. */
7395 #else /* Word 0 - Little Endian */
7396         uint64_t g3_p3_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen3 preset P3. */
7397         uint64_t reserved_4_7          : 4;
7398         uint64_t g3_p3_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen3 preset P3. */
7399         uint64_t reserved_14_15        : 2;
7400         uint64_t g3_p3_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen3 preset P3. */
7401         uint64_t reserved_21_63        : 43;
7402 #endif /* Word 0 - End */
7403     } s;
7404     /* struct bdk_gsernx_lanex_pcie_txpst3_bcfg_s cn; */
7405 };
7406 typedef union bdk_gsernx_lanex_pcie_txpst3_bcfg bdk_gsernx_lanex_pcie_txpst3_bcfg_t;
7407 
7408 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST3_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_TXPST3_BCFG(unsigned long a,unsigned long b)7409 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST3_BCFG(unsigned long a, unsigned long b)
7410 {
7411     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
7412         return 0x87e090002520ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
7413     __bdk_csr_fatal("GSERNX_LANEX_PCIE_TXPST3_BCFG", 2, a, b, 0, 0);
7414 }
7415 
7416 #define typedef_BDK_GSERNX_LANEX_PCIE_TXPST3_BCFG(a,b) bdk_gsernx_lanex_pcie_txpst3_bcfg_t
7417 #define bustype_BDK_GSERNX_LANEX_PCIE_TXPST3_BCFG(a,b) BDK_CSR_TYPE_RSL
7418 #define basename_BDK_GSERNX_LANEX_PCIE_TXPST3_BCFG(a,b) "GSERNX_LANEX_PCIE_TXPST3_BCFG"
7419 #define device_bar_BDK_GSERNX_LANEX_PCIE_TXPST3_BCFG(a,b) 0x0 /* PF_BAR0 */
7420 #define busnum_BDK_GSERNX_LANEX_PCIE_TXPST3_BCFG(a,b) (a)
7421 #define arguments_BDK_GSERNX_LANEX_PCIE_TXPST3_BCFG(a,b) (a),(b),-1,-1
7422 
7423 /**
7424  * Register (RSL) gsern#_lane#_pcie_txpst4_bcfg
7425  *
7426  * GSER Lane PCIe TX Drive Preset Coefficients Control Register
7427  * TX drive Cpre, Cpost and Cmain Coefficient values for Gen3 preset P4.
7428  * Cpre and Cpost are only 4 and 5 bits in length, respectively, as the
7429  * full 6 bits defined in the PCIe specification are not needed.
7430  */
7431 union bdk_gsernx_lanex_pcie_txpst4_bcfg
7432 {
7433     uint64_t u;
7434     struct bdk_gsernx_lanex_pcie_txpst4_bcfg_s
7435     {
7436 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
7437         uint64_t reserved_21_63        : 43;
7438         uint64_t g3_p4_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen3 preset P4. */
7439         uint64_t reserved_14_15        : 2;
7440         uint64_t g3_p4_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen3 preset P4. */
7441         uint64_t reserved_4_7          : 4;
7442         uint64_t g3_p4_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen3 preset P4. */
7443 #else /* Word 0 - Little Endian */
7444         uint64_t g3_p4_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen3 preset P4. */
7445         uint64_t reserved_4_7          : 4;
7446         uint64_t g3_p4_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen3 preset P4. */
7447         uint64_t reserved_14_15        : 2;
7448         uint64_t g3_p4_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen3 preset P4. */
7449         uint64_t reserved_21_63        : 43;
7450 #endif /* Word 0 - End */
7451     } s;
7452     /* struct bdk_gsernx_lanex_pcie_txpst4_bcfg_s cn; */
7453 };
7454 typedef union bdk_gsernx_lanex_pcie_txpst4_bcfg bdk_gsernx_lanex_pcie_txpst4_bcfg_t;
7455 
7456 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST4_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_TXPST4_BCFG(unsigned long a,unsigned long b)7457 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST4_BCFG(unsigned long a, unsigned long b)
7458 {
7459     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
7460         return 0x87e090002530ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
7461     __bdk_csr_fatal("GSERNX_LANEX_PCIE_TXPST4_BCFG", 2, a, b, 0, 0);
7462 }
7463 
7464 #define typedef_BDK_GSERNX_LANEX_PCIE_TXPST4_BCFG(a,b) bdk_gsernx_lanex_pcie_txpst4_bcfg_t
7465 #define bustype_BDK_GSERNX_LANEX_PCIE_TXPST4_BCFG(a,b) BDK_CSR_TYPE_RSL
7466 #define basename_BDK_GSERNX_LANEX_PCIE_TXPST4_BCFG(a,b) "GSERNX_LANEX_PCIE_TXPST4_BCFG"
7467 #define device_bar_BDK_GSERNX_LANEX_PCIE_TXPST4_BCFG(a,b) 0x0 /* PF_BAR0 */
7468 #define busnum_BDK_GSERNX_LANEX_PCIE_TXPST4_BCFG(a,b) (a)
7469 #define arguments_BDK_GSERNX_LANEX_PCIE_TXPST4_BCFG(a,b) (a),(b),-1,-1
7470 
7471 /**
7472  * Register (RSL) gsern#_lane#_pcie_txpst5_bcfg
7473  *
7474  * GSER Lane PCIe TX Drive Preset Coefficients Control Register
7475  * TX drive Cpre, Cpost and Cmain Coefficient values for Gen3 preset P5.
7476  * Cpre and Cpost are only 4 and 5 bits in length, respectively, as the
7477  * full 6 bits defined in the PCIe specification are not needed.
7478  */
7479 union bdk_gsernx_lanex_pcie_txpst5_bcfg
7480 {
7481     uint64_t u;
7482     struct bdk_gsernx_lanex_pcie_txpst5_bcfg_s
7483     {
7484 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
7485         uint64_t reserved_21_63        : 43;
7486         uint64_t g3_p5_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen3 preset P5. */
7487         uint64_t reserved_14_15        : 2;
7488         uint64_t g3_p5_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen3 preset P5. */
7489         uint64_t reserved_4_7          : 4;
7490         uint64_t g3_p5_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen3 preset P5. */
7491 #else /* Word 0 - Little Endian */
7492         uint64_t g3_p5_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen3 preset P5. */
7493         uint64_t reserved_4_7          : 4;
7494         uint64_t g3_p5_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen3 preset P5. */
7495         uint64_t reserved_14_15        : 2;
7496         uint64_t g3_p5_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen3 preset P5. */
7497         uint64_t reserved_21_63        : 43;
7498 #endif /* Word 0 - End */
7499     } s;
7500     /* struct bdk_gsernx_lanex_pcie_txpst5_bcfg_s cn; */
7501 };
7502 typedef union bdk_gsernx_lanex_pcie_txpst5_bcfg bdk_gsernx_lanex_pcie_txpst5_bcfg_t;
7503 
7504 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST5_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_TXPST5_BCFG(unsigned long a,unsigned long b)7505 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST5_BCFG(unsigned long a, unsigned long b)
7506 {
7507     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
7508         return 0x87e090002540ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
7509     __bdk_csr_fatal("GSERNX_LANEX_PCIE_TXPST5_BCFG", 2, a, b, 0, 0);
7510 }
7511 
7512 #define typedef_BDK_GSERNX_LANEX_PCIE_TXPST5_BCFG(a,b) bdk_gsernx_lanex_pcie_txpst5_bcfg_t
7513 #define bustype_BDK_GSERNX_LANEX_PCIE_TXPST5_BCFG(a,b) BDK_CSR_TYPE_RSL
7514 #define basename_BDK_GSERNX_LANEX_PCIE_TXPST5_BCFG(a,b) "GSERNX_LANEX_PCIE_TXPST5_BCFG"
7515 #define device_bar_BDK_GSERNX_LANEX_PCIE_TXPST5_BCFG(a,b) 0x0 /* PF_BAR0 */
7516 #define busnum_BDK_GSERNX_LANEX_PCIE_TXPST5_BCFG(a,b) (a)
7517 #define arguments_BDK_GSERNX_LANEX_PCIE_TXPST5_BCFG(a,b) (a),(b),-1,-1
7518 
7519 /**
7520  * Register (RSL) gsern#_lane#_pcie_txpst6_bcfg
7521  *
7522  * GSER Lane PCIe TX Drive Preset Coefficients Control Register
7523  * TX drive Cpre, Cpost and Cmain Coefficient values for Gen3 preset P6.
7524  * Cpre and Cpost are only 4 and 5 bits in length, respectively, as the
7525  * full 6 bits defined in the PCIe specification are not needed.
7526  */
7527 union bdk_gsernx_lanex_pcie_txpst6_bcfg
7528 {
7529     uint64_t u;
7530     struct bdk_gsernx_lanex_pcie_txpst6_bcfg_s
7531     {
7532 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
7533         uint64_t reserved_21_63        : 43;
7534         uint64_t g3_p6_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen3 preset P6. */
7535         uint64_t reserved_14_15        : 2;
7536         uint64_t g3_p6_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen3 preset P6. */
7537         uint64_t reserved_4_7          : 4;
7538         uint64_t g3_p6_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen3 preset P6. */
7539 #else /* Word 0 - Little Endian */
7540         uint64_t g3_p6_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen3 preset P6. */
7541         uint64_t reserved_4_7          : 4;
7542         uint64_t g3_p6_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen3 preset P6. */
7543         uint64_t reserved_14_15        : 2;
7544         uint64_t g3_p6_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen3 preset P6. */
7545         uint64_t reserved_21_63        : 43;
7546 #endif /* Word 0 - End */
7547     } s;
7548     /* struct bdk_gsernx_lanex_pcie_txpst6_bcfg_s cn; */
7549 };
7550 typedef union bdk_gsernx_lanex_pcie_txpst6_bcfg bdk_gsernx_lanex_pcie_txpst6_bcfg_t;
7551 
7552 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST6_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_TXPST6_BCFG(unsigned long a,unsigned long b)7553 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST6_BCFG(unsigned long a, unsigned long b)
7554 {
7555     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
7556         return 0x87e090002550ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
7557     __bdk_csr_fatal("GSERNX_LANEX_PCIE_TXPST6_BCFG", 2, a, b, 0, 0);
7558 }
7559 
7560 #define typedef_BDK_GSERNX_LANEX_PCIE_TXPST6_BCFG(a,b) bdk_gsernx_lanex_pcie_txpst6_bcfg_t
7561 #define bustype_BDK_GSERNX_LANEX_PCIE_TXPST6_BCFG(a,b) BDK_CSR_TYPE_RSL
7562 #define basename_BDK_GSERNX_LANEX_PCIE_TXPST6_BCFG(a,b) "GSERNX_LANEX_PCIE_TXPST6_BCFG"
7563 #define device_bar_BDK_GSERNX_LANEX_PCIE_TXPST6_BCFG(a,b) 0x0 /* PF_BAR0 */
7564 #define busnum_BDK_GSERNX_LANEX_PCIE_TXPST6_BCFG(a,b) (a)
7565 #define arguments_BDK_GSERNX_LANEX_PCIE_TXPST6_BCFG(a,b) (a),(b),-1,-1
7566 
7567 /**
7568  * Register (RSL) gsern#_lane#_pcie_txpst7_bcfg
7569  *
7570  * GSER Lane PCIe TX Drive Preset Coefficients Control Register
7571  * TX drive Cpre, Cpost and Cmain Coefficient values for Gen3 preset P7.
7572  * Cpre and Cpost are only 4 and 5 bits in length, respectively, as the
7573  * full 6 bits defined in the PCIe specification are not needed.
7574  */
7575 union bdk_gsernx_lanex_pcie_txpst7_bcfg
7576 {
7577     uint64_t u;
7578     struct bdk_gsernx_lanex_pcie_txpst7_bcfg_s
7579     {
7580 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
7581         uint64_t reserved_21_63        : 43;
7582         uint64_t g3_p7_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen3 preset P7. */
7583         uint64_t reserved_14_15        : 2;
7584         uint64_t g3_p7_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen3 preset P7. */
7585         uint64_t reserved_4_7          : 4;
7586         uint64_t g3_p7_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen3 preset P7. */
7587 #else /* Word 0 - Little Endian */
7588         uint64_t g3_p7_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen3 preset P7. */
7589         uint64_t reserved_4_7          : 4;
7590         uint64_t g3_p7_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen3 preset P7. */
7591         uint64_t reserved_14_15        : 2;
7592         uint64_t g3_p7_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen3 preset P7. */
7593         uint64_t reserved_21_63        : 43;
7594 #endif /* Word 0 - End */
7595     } s;
7596     /* struct bdk_gsernx_lanex_pcie_txpst7_bcfg_s cn; */
7597 };
7598 typedef union bdk_gsernx_lanex_pcie_txpst7_bcfg bdk_gsernx_lanex_pcie_txpst7_bcfg_t;
7599 
7600 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST7_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_TXPST7_BCFG(unsigned long a,unsigned long b)7601 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST7_BCFG(unsigned long a, unsigned long b)
7602 {
7603     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
7604         return 0x87e090002560ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
7605     __bdk_csr_fatal("GSERNX_LANEX_PCIE_TXPST7_BCFG", 2, a, b, 0, 0);
7606 }
7607 
7608 #define typedef_BDK_GSERNX_LANEX_PCIE_TXPST7_BCFG(a,b) bdk_gsernx_lanex_pcie_txpst7_bcfg_t
7609 #define bustype_BDK_GSERNX_LANEX_PCIE_TXPST7_BCFG(a,b) BDK_CSR_TYPE_RSL
7610 #define basename_BDK_GSERNX_LANEX_PCIE_TXPST7_BCFG(a,b) "GSERNX_LANEX_PCIE_TXPST7_BCFG"
7611 #define device_bar_BDK_GSERNX_LANEX_PCIE_TXPST7_BCFG(a,b) 0x0 /* PF_BAR0 */
7612 #define busnum_BDK_GSERNX_LANEX_PCIE_TXPST7_BCFG(a,b) (a)
7613 #define arguments_BDK_GSERNX_LANEX_PCIE_TXPST7_BCFG(a,b) (a),(b),-1,-1
7614 
7615 /**
7616  * Register (RSL) gsern#_lane#_pcie_txpst8_bcfg
7617  *
7618  * GSER Lane PCIe TX Drive Preset Coefficients Control Register
7619  * TX drive Cpre, Cpost and Cmain Coefficient values for Gen3 preset P8.
7620  * Cpre and Cpost are only 4 and 5 bits in length, respectively, as the
7621  * full 6 bits defined in the PCIe specification are not needed.
7622  */
7623 union bdk_gsernx_lanex_pcie_txpst8_bcfg
7624 {
7625     uint64_t u;
7626     struct bdk_gsernx_lanex_pcie_txpst8_bcfg_s
7627     {
7628 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
7629         uint64_t reserved_21_63        : 43;
7630         uint64_t g3_p8_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen3 preset P8. */
7631         uint64_t reserved_14_15        : 2;
7632         uint64_t g3_p8_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen3 preset P8. */
7633         uint64_t reserved_4_7          : 4;
7634         uint64_t g3_p8_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen3 preset P8. */
7635 #else /* Word 0 - Little Endian */
7636         uint64_t g3_p8_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen3 preset P8. */
7637         uint64_t reserved_4_7          : 4;
7638         uint64_t g3_p8_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen3 preset P8. */
7639         uint64_t reserved_14_15        : 2;
7640         uint64_t g3_p8_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen3 preset P8. */
7641         uint64_t reserved_21_63        : 43;
7642 #endif /* Word 0 - End */
7643     } s;
7644     /* struct bdk_gsernx_lanex_pcie_txpst8_bcfg_s cn; */
7645 };
7646 typedef union bdk_gsernx_lanex_pcie_txpst8_bcfg bdk_gsernx_lanex_pcie_txpst8_bcfg_t;
7647 
7648 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST8_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_TXPST8_BCFG(unsigned long a,unsigned long b)7649 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST8_BCFG(unsigned long a, unsigned long b)
7650 {
7651     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
7652         return 0x87e090002570ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
7653     __bdk_csr_fatal("GSERNX_LANEX_PCIE_TXPST8_BCFG", 2, a, b, 0, 0);
7654 }
7655 
7656 #define typedef_BDK_GSERNX_LANEX_PCIE_TXPST8_BCFG(a,b) bdk_gsernx_lanex_pcie_txpst8_bcfg_t
7657 #define bustype_BDK_GSERNX_LANEX_PCIE_TXPST8_BCFG(a,b) BDK_CSR_TYPE_RSL
7658 #define basename_BDK_GSERNX_LANEX_PCIE_TXPST8_BCFG(a,b) "GSERNX_LANEX_PCIE_TXPST8_BCFG"
7659 #define device_bar_BDK_GSERNX_LANEX_PCIE_TXPST8_BCFG(a,b) 0x0 /* PF_BAR0 */
7660 #define busnum_BDK_GSERNX_LANEX_PCIE_TXPST8_BCFG(a,b) (a)
7661 #define arguments_BDK_GSERNX_LANEX_PCIE_TXPST8_BCFG(a,b) (a),(b),-1,-1
7662 
7663 /**
7664  * Register (RSL) gsern#_lane#_pcie_txpst9_bcfg
7665  *
7666  * GSER Lane PCIe TX Drive Preset Coefficients Control Register
7667  * TX drive Cpre, Cpost and Cmain Coefficient values for Gen3 preset P9.
7668  * Cpre and Cpost are only 4 and 5 bits in length, respectively, as the
7669  * full 6 bits defined in the PCIe specification are not needed.
7670  */
7671 union bdk_gsernx_lanex_pcie_txpst9_bcfg
7672 {
7673     uint64_t u;
7674     struct bdk_gsernx_lanex_pcie_txpst9_bcfg_s
7675     {
7676 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
7677         uint64_t reserved_21_63        : 43;
7678         uint64_t g3_p9_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen3 preset P9. */
7679         uint64_t reserved_14_15        : 2;
7680         uint64_t g3_p9_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen3 preset P9. */
7681         uint64_t reserved_4_7          : 4;
7682         uint64_t g3_p9_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen3 preset P9. */
7683 #else /* Word 0 - Little Endian */
7684         uint64_t g3_p9_cpre            : 4;  /**< [  3:  0](R/W) Cpost value for Gen3 preset P9. */
7685         uint64_t reserved_4_7          : 4;
7686         uint64_t g3_p9_cmain           : 6;  /**< [ 13:  8](R/W) Cmain value for Gen3 preset P9. */
7687         uint64_t reserved_14_15        : 2;
7688         uint64_t g3_p9_cpost           : 5;  /**< [ 20: 16](R/W) Cpost value for Gen3 preset P9. */
7689         uint64_t reserved_21_63        : 43;
7690 #endif /* Word 0 - End */
7691     } s;
7692     /* struct bdk_gsernx_lanex_pcie_txpst9_bcfg_s cn; */
7693 };
7694 typedef union bdk_gsernx_lanex_pcie_txpst9_bcfg bdk_gsernx_lanex_pcie_txpst9_bcfg_t;
7695 
7696 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST9_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCIE_TXPST9_BCFG(unsigned long a,unsigned long b)7697 static inline uint64_t BDK_GSERNX_LANEX_PCIE_TXPST9_BCFG(unsigned long a, unsigned long b)
7698 {
7699     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
7700         return 0x87e090002580ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
7701     __bdk_csr_fatal("GSERNX_LANEX_PCIE_TXPST9_BCFG", 2, a, b, 0, 0);
7702 }
7703 
7704 #define typedef_BDK_GSERNX_LANEX_PCIE_TXPST9_BCFG(a,b) bdk_gsernx_lanex_pcie_txpst9_bcfg_t
7705 #define bustype_BDK_GSERNX_LANEX_PCIE_TXPST9_BCFG(a,b) BDK_CSR_TYPE_RSL
7706 #define basename_BDK_GSERNX_LANEX_PCIE_TXPST9_BCFG(a,b) "GSERNX_LANEX_PCIE_TXPST9_BCFG"
7707 #define device_bar_BDK_GSERNX_LANEX_PCIE_TXPST9_BCFG(a,b) 0x0 /* PF_BAR0 */
7708 #define busnum_BDK_GSERNX_LANEX_PCIE_TXPST9_BCFG(a,b) (a)
7709 #define arguments_BDK_GSERNX_LANEX_PCIE_TXPST9_BCFG(a,b) (a),(b),-1,-1
7710 
7711 /**
7712  * Register (RSL) gsern#_lane#_pcs_802p3_bcfg
7713  *
7714  * GSER Lane 802.3 PCS Base Configuration Register 0
7715  * This register controls settings for Ethernet IEEE 802.3 PCS layer.
7716  */
7717 union bdk_gsernx_lanex_pcs_802p3_bcfg
7718 {
7719     uint64_t u;
7720     struct bdk_gsernx_lanex_pcs_802p3_bcfg_s
7721     {
7722 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
7723         uint64_t reserved_4_63         : 60;
7724         uint64_t rx_wpk_order          : 1;  /**< [  3:  3](R/W) Receiver word packing order. Used when the Ethernet MAC is configured for SGMII
7725                                                                  1.25 GBaud. When GSERN()_LANE()_PCS_802P3_BCFG[RX_WPK_20B40B] is set two
7726                                                                  consecutive 20-bit RX data words from the PCS Lite Layer are packed into a
7727                                                                  40-bit word for the Ethernet SGMII MAC.
7728 
7729                                                                  0 = The first 20-bit word from the PCS Lite Layer is transferred to the lower
7730                                                                  20-bit word position, bits[19:0] of the 40-bit word and the next consecutive
7731                                                                  20-bit word from the PCS Lite layer is transferred to the upper 20-bit word
7732                                                                  position, bits[39:20] of the 40-bit word. The assembled 40-bit word is then
7733                                                                  forwarded the SGMII Ethernet MAC.
7734 
7735                                                                  1 = The first 20-bit word from the PCS Lite Layer is transferred to the upper
7736                                                                  20-bit word position, bits[39:20] of the 40-bit word and the next consecutive
7737                                                                  20-bit word from the PCS Lite layer is transferred to the lower 20-bit word
7738                                                                  position, bits[19:0] of the 40-bit word.  The assembled 40-bit word is then
7739                                                                  forwarded the SGMII Ethernet MAC.
7740 
7741                                                                  For diagnostic use only. */
7742         uint64_t tx_wup_order          : 1;  /**< [  2:  2](R/W) Transmitter word unpacking order. Used when the Ethernet MAC is configured for
7743                                                                  SGMII 1.25 GBaud. When GSERN()_LANE()_PCS_802P3_BCFG[TX_WUP_40B20B] is set the
7744                                                                  20-bit consecutive RX data word from the PCS Lite Layer are packed into 40-bit
7745                                                                  words for the Ethernet SGMII MAC.
7746 
7747                                                                  0 = The lower 20-bit word, bits[19:0] of the 40-bit
7748                                                                  word are transferred to the PCS Lite layer followed by the upper 20-bit word,
7749                                                                  bits[39:20] of the 40-bit word..
7750 
7751                                                                  1 = The upper 20-bit word, bits[39:20], are transferred to the PCS Lite layer
7752                                                                  followed by the lower 20-bit word, bits[19:0], of the 40-bit word.
7753 
7754                                                                  For diagnostic use only. */
7755         uint64_t rx_wpk_20b40b         : 1;  /**< [  1:  1](R/W) RX Word Packing 20 bits to 40 bits.  Used when the Ethernet MAC is configured for
7756                                                                  SGMII 1.25 GBaud.
7757                                                                  When set, consecutive 20-bit RX data
7758                                                                  words from the PCS Lite Layer are packed into 40-bit words for the Ethernet SGMII MAC.
7759                                                                  Used in conjunction with GSERN()_LANE()_PCS_802P3_BCFG[RX_WPK_ORDER].  Refer to
7760                                                                  the description for GSERN()_LANE()_PCS_802P3_BCFG[RX_WPK_ORDER].
7761                                                                  For diagnostic use only. */
7762         uint64_t tx_wup_40b20b         : 1;  /**< [  0:  0](R/W) TX Word UnPacking 40 bits to 20 bits.  Used when the Ethernet MAC is configured for
7763                                                                  SGMII 1.25 GBaud.
7764                                                                  When set, the 40-bit TX data words from
7765                                                                  the Ethernet SGMII MAC are transferred to the PCS Lite Layer using two consecutive
7766                                                                  20-bit word transfers.
7767                                                                  Used in conjunction with GSERN()_LANE()_PCS_802P3_BCFG[TX_WUP_ORDER]. Refer to
7768                                                                  the description for GSERN()_LANE()_PCS_802P3_BCFG[RX_WPK_ORDER].
7769                                                                  For diagnostic use only. */
7770 #else /* Word 0 - Little Endian */
7771         uint64_t tx_wup_40b20b         : 1;  /**< [  0:  0](R/W) TX Word UnPacking 40 bits to 20 bits.  Used when the Ethernet MAC is configured for
7772                                                                  SGMII 1.25 GBaud.
7773                                                                  When set, the 40-bit TX data words from
7774                                                                  the Ethernet SGMII MAC are transferred to the PCS Lite Layer using two consecutive
7775                                                                  20-bit word transfers.
7776                                                                  Used in conjunction with GSERN()_LANE()_PCS_802P3_BCFG[TX_WUP_ORDER]. Refer to
7777                                                                  the description for GSERN()_LANE()_PCS_802P3_BCFG[RX_WPK_ORDER].
7778                                                                  For diagnostic use only. */
7779         uint64_t rx_wpk_20b40b         : 1;  /**< [  1:  1](R/W) RX Word Packing 20 bits to 40 bits.  Used when the Ethernet MAC is configured for
7780                                                                  SGMII 1.25 GBaud.
7781                                                                  When set, consecutive 20-bit RX data
7782                                                                  words from the PCS Lite Layer are packed into 40-bit words for the Ethernet SGMII MAC.
7783                                                                  Used in conjunction with GSERN()_LANE()_PCS_802P3_BCFG[RX_WPK_ORDER].  Refer to
7784                                                                  the description for GSERN()_LANE()_PCS_802P3_BCFG[RX_WPK_ORDER].
7785                                                                  For diagnostic use only. */
7786         uint64_t tx_wup_order          : 1;  /**< [  2:  2](R/W) Transmitter word unpacking order. Used when the Ethernet MAC is configured for
7787                                                                  SGMII 1.25 GBaud. When GSERN()_LANE()_PCS_802P3_BCFG[TX_WUP_40B20B] is set the
7788                                                                  20-bit consecutive RX data word from the PCS Lite Layer are packed into 40-bit
7789                                                                  words for the Ethernet SGMII MAC.
7790 
7791                                                                  0 = The lower 20-bit word, bits[19:0] of the 40-bit
7792                                                                  word are transferred to the PCS Lite layer followed by the upper 20-bit word,
7793                                                                  bits[39:20] of the 40-bit word..
7794 
7795                                                                  1 = The upper 20-bit word, bits[39:20], are transferred to the PCS Lite layer
7796                                                                  followed by the lower 20-bit word, bits[19:0], of the 40-bit word.
7797 
7798                                                                  For diagnostic use only. */
7799         uint64_t rx_wpk_order          : 1;  /**< [  3:  3](R/W) Receiver word packing order. Used when the Ethernet MAC is configured for SGMII
7800                                                                  1.25 GBaud. When GSERN()_LANE()_PCS_802P3_BCFG[RX_WPK_20B40B] is set two
7801                                                                  consecutive 20-bit RX data words from the PCS Lite Layer are packed into a
7802                                                                  40-bit word for the Ethernet SGMII MAC.
7803 
7804                                                                  0 = The first 20-bit word from the PCS Lite Layer is transferred to the lower
7805                                                                  20-bit word position, bits[19:0] of the 40-bit word and the next consecutive
7806                                                                  20-bit word from the PCS Lite layer is transferred to the upper 20-bit word
7807                                                                  position, bits[39:20] of the 40-bit word. The assembled 40-bit word is then
7808                                                                  forwarded the SGMII Ethernet MAC.
7809 
7810                                                                  1 = The first 20-bit word from the PCS Lite Layer is transferred to the upper
7811                                                                  20-bit word position, bits[39:20] of the 40-bit word and the next consecutive
7812                                                                  20-bit word from the PCS Lite layer is transferred to the lower 20-bit word
7813                                                                  position, bits[19:0] of the 40-bit word.  The assembled 40-bit word is then
7814                                                                  forwarded the SGMII Ethernet MAC.
7815 
7816                                                                  For diagnostic use only. */
7817         uint64_t reserved_4_63         : 60;
7818 #endif /* Word 0 - End */
7819     } s;
7820     /* struct bdk_gsernx_lanex_pcs_802p3_bcfg_s cn; */
7821 };
7822 typedef union bdk_gsernx_lanex_pcs_802p3_bcfg bdk_gsernx_lanex_pcs_802p3_bcfg_t;
7823 
7824 static inline uint64_t BDK_GSERNX_LANEX_PCS_802P3_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PCS_802P3_BCFG(unsigned long a,unsigned long b)7825 static inline uint64_t BDK_GSERNX_LANEX_PCS_802P3_BCFG(unsigned long a, unsigned long b)
7826 {
7827     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
7828         return 0x87e090003350ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
7829     __bdk_csr_fatal("GSERNX_LANEX_PCS_802P3_BCFG", 2, a, b, 0, 0);
7830 }
7831 
7832 #define typedef_BDK_GSERNX_LANEX_PCS_802P3_BCFG(a,b) bdk_gsernx_lanex_pcs_802p3_bcfg_t
7833 #define bustype_BDK_GSERNX_LANEX_PCS_802P3_BCFG(a,b) BDK_CSR_TYPE_RSL
7834 #define basename_BDK_GSERNX_LANEX_PCS_802P3_BCFG(a,b) "GSERNX_LANEX_PCS_802P3_BCFG"
7835 #define device_bar_BDK_GSERNX_LANEX_PCS_802P3_BCFG(a,b) 0x0 /* PF_BAR0 */
7836 #define busnum_BDK_GSERNX_LANEX_PCS_802P3_BCFG(a,b) (a)
7837 #define arguments_BDK_GSERNX_LANEX_PCS_802P3_BCFG(a,b) (a),(b),-1,-1
7838 
7839 /**
7840  * Register (RSL) gsern#_lane#_pll_1_bcfg
7841  *
7842  * GSER Lane PLL Base Configuration Register 1
7843  */
7844 union bdk_gsernx_lanex_pll_1_bcfg
7845 {
7846     uint64_t u;
7847     struct bdk_gsernx_lanex_pll_1_bcfg_s
7848     {
7849 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
7850         uint64_t reserved_62_63        : 2;
7851         uint64_t cal_cp_mult           : 2;  /**< [ 61: 60](R/W) PLL cal charge pump mult control. */
7852         uint64_t cp                    : 4;  /**< [ 59: 56](R/W) PLL charge pump configuration. */
7853         uint64_t cp_overide            : 1;  /**< [ 55: 55](R/W) PLL charge pump override. */
7854         uint64_t band_ppm              : 2;  /**< [ 54: 53](R/W) PLL band ppm setting. */
7855         uint64_t band                  : 5;  /**< [ 52: 48](R/W/H) PLL manual PLL band inputs; only effective if [BAND_OVERIDE] set. */
7856         uint64_t band_limits           : 3;  /**< [ 47: 45](R/W) Band limits for the PLL calibration procedure. */
7857         uint64_t band_overide          : 1;  /**< [ 44: 44](R/W/H) Bypass PLL calibration and set PLL band with band field inputs. */
7858         uint64_t bg_div16              : 1;  /**< [ 43: 43](R/W) Enable divide by 16 of reference clock to the band gap. */
7859         uint64_t bg_clk_en             : 1;  /**< [ 42: 42](R/W) Enable chopping in the band gap circuit. */
7860         uint64_t dither_en             : 1;  /**< [ 41: 41](R/W) Enable the dithering bit of sigma delta modulator. */
7861         uint64_t cal_sel               : 1;  /**< [ 40: 40](R/W) PLL calibration method select. */
7862         uint64_t vco_sel               : 1;  /**< [ 39: 39](R/W) PLL select one of the two VCOs in the PLL. */
7863         uint64_t sdm_en                : 1;  /**< [ 38: 38](R/W) Enable PLL fractional-N operation. */
7864         uint64_t reserved_29_37        : 9;
7865         uint64_t post_div              : 2;  /**< [ 28: 27](R/W) Forward PLL divider. Used in conjunction with [DIV_N] to set the
7866                                                                  PLL frequency given a reference clock frequency. The output frequency will
7867                                                                  be the VCO frequency divided by [POST_DIV].
7868                                                                    0x0 = Divide PLL frequency by 1.
7869                                                                    0x1 = Divide PLL frequency by 2.
7870                                                                    0x2 = Divide PLL frequency by 4.
7871                                                                    0x3 = Divide PLL frequency by 8. */
7872         uint64_t div_n                 : 9;  /**< [ 26: 18](R/W) PLL feedback divider integer portion. */
7873         uint64_t div_f                 : 18; /**< [ 17:  0](R/W) PLL feedback divider fractional portion. */
7874 #else /* Word 0 - Little Endian */
7875         uint64_t div_f                 : 18; /**< [ 17:  0](R/W) PLL feedback divider fractional portion. */
7876         uint64_t div_n                 : 9;  /**< [ 26: 18](R/W) PLL feedback divider integer portion. */
7877         uint64_t post_div              : 2;  /**< [ 28: 27](R/W) Forward PLL divider. Used in conjunction with [DIV_N] to set the
7878                                                                  PLL frequency given a reference clock frequency. The output frequency will
7879                                                                  be the VCO frequency divided by [POST_DIV].
7880                                                                    0x0 = Divide PLL frequency by 1.
7881                                                                    0x1 = Divide PLL frequency by 2.
7882                                                                    0x2 = Divide PLL frequency by 4.
7883                                                                    0x3 = Divide PLL frequency by 8. */
7884         uint64_t reserved_29_37        : 9;
7885         uint64_t sdm_en                : 1;  /**< [ 38: 38](R/W) Enable PLL fractional-N operation. */
7886         uint64_t vco_sel               : 1;  /**< [ 39: 39](R/W) PLL select one of the two VCOs in the PLL. */
7887         uint64_t cal_sel               : 1;  /**< [ 40: 40](R/W) PLL calibration method select. */
7888         uint64_t dither_en             : 1;  /**< [ 41: 41](R/W) Enable the dithering bit of sigma delta modulator. */
7889         uint64_t bg_clk_en             : 1;  /**< [ 42: 42](R/W) Enable chopping in the band gap circuit. */
7890         uint64_t bg_div16              : 1;  /**< [ 43: 43](R/W) Enable divide by 16 of reference clock to the band gap. */
7891         uint64_t band_overide          : 1;  /**< [ 44: 44](R/W/H) Bypass PLL calibration and set PLL band with band field inputs. */
7892         uint64_t band_limits           : 3;  /**< [ 47: 45](R/W) Band limits for the PLL calibration procedure. */
7893         uint64_t band                  : 5;  /**< [ 52: 48](R/W/H) PLL manual PLL band inputs; only effective if [BAND_OVERIDE] set. */
7894         uint64_t band_ppm              : 2;  /**< [ 54: 53](R/W) PLL band ppm setting. */
7895         uint64_t cp_overide            : 1;  /**< [ 55: 55](R/W) PLL charge pump override. */
7896         uint64_t cp                    : 4;  /**< [ 59: 56](R/W) PLL charge pump configuration. */
7897         uint64_t cal_cp_mult           : 2;  /**< [ 61: 60](R/W) PLL cal charge pump mult control. */
7898         uint64_t reserved_62_63        : 2;
7899 #endif /* Word 0 - End */
7900     } s;
7901     struct bdk_gsernx_lanex_pll_1_bcfg_cn
7902     {
7903 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
7904         uint64_t reserved_62_63        : 2;
7905         uint64_t cal_cp_mult           : 2;  /**< [ 61: 60](R/W) PLL cal charge pump mult control. */
7906         uint64_t cp                    : 4;  /**< [ 59: 56](R/W) PLL charge pump configuration. */
7907         uint64_t cp_overide            : 1;  /**< [ 55: 55](R/W) PLL charge pump override. */
7908         uint64_t band_ppm              : 2;  /**< [ 54: 53](R/W) PLL band ppm setting. */
7909         uint64_t band                  : 5;  /**< [ 52: 48](R/W/H) PLL manual PLL band inputs; only effective if [BAND_OVERIDE] set. */
7910         uint64_t band_limits           : 3;  /**< [ 47: 45](R/W) Band limits for the PLL calibration procedure. */
7911         uint64_t band_overide          : 1;  /**< [ 44: 44](R/W/H) Bypass PLL calibration and set PLL band with band field inputs. */
7912         uint64_t bg_div16              : 1;  /**< [ 43: 43](R/W) Enable divide by 16 of reference clock to the band gap. */
7913         uint64_t bg_clk_en             : 1;  /**< [ 42: 42](R/W) Enable chopping in the band gap circuit. */
7914         uint64_t dither_en             : 1;  /**< [ 41: 41](R/W) Enable the dithering bit of sigma delta modulator. */
7915         uint64_t cal_sel               : 1;  /**< [ 40: 40](R/W) PLL calibration method select. */
7916         uint64_t vco_sel               : 1;  /**< [ 39: 39](R/W) PLL select one of the two VCOs in the PLL. */
7917         uint64_t sdm_en                : 1;  /**< [ 38: 38](R/W) Enable PLL fractional-N operation. */
7918         uint64_t reserved_36_37        : 2;
7919         uint64_t reserved_29_35        : 7;
7920         uint64_t post_div              : 2;  /**< [ 28: 27](R/W) Forward PLL divider. Used in conjunction with [DIV_N] to set the
7921                                                                  PLL frequency given a reference clock frequency. The output frequency will
7922                                                                  be the VCO frequency divided by [POST_DIV].
7923                                                                    0x0 = Divide PLL frequency by 1.
7924                                                                    0x1 = Divide PLL frequency by 2.
7925                                                                    0x2 = Divide PLL frequency by 4.
7926                                                                    0x3 = Divide PLL frequency by 8. */
7927         uint64_t div_n                 : 9;  /**< [ 26: 18](R/W) PLL feedback divider integer portion. */
7928         uint64_t div_f                 : 18; /**< [ 17:  0](R/W) PLL feedback divider fractional portion. */
7929 #else /* Word 0 - Little Endian */
7930         uint64_t div_f                 : 18; /**< [ 17:  0](R/W) PLL feedback divider fractional portion. */
7931         uint64_t div_n                 : 9;  /**< [ 26: 18](R/W) PLL feedback divider integer portion. */
7932         uint64_t post_div              : 2;  /**< [ 28: 27](R/W) Forward PLL divider. Used in conjunction with [DIV_N] to set the
7933                                                                  PLL frequency given a reference clock frequency. The output frequency will
7934                                                                  be the VCO frequency divided by [POST_DIV].
7935                                                                    0x0 = Divide PLL frequency by 1.
7936                                                                    0x1 = Divide PLL frequency by 2.
7937                                                                    0x2 = Divide PLL frequency by 4.
7938                                                                    0x3 = Divide PLL frequency by 8. */
7939         uint64_t reserved_29_35        : 7;
7940         uint64_t reserved_36_37        : 2;
7941         uint64_t sdm_en                : 1;  /**< [ 38: 38](R/W) Enable PLL fractional-N operation. */
7942         uint64_t vco_sel               : 1;  /**< [ 39: 39](R/W) PLL select one of the two VCOs in the PLL. */
7943         uint64_t cal_sel               : 1;  /**< [ 40: 40](R/W) PLL calibration method select. */
7944         uint64_t dither_en             : 1;  /**< [ 41: 41](R/W) Enable the dithering bit of sigma delta modulator. */
7945         uint64_t bg_clk_en             : 1;  /**< [ 42: 42](R/W) Enable chopping in the band gap circuit. */
7946         uint64_t bg_div16              : 1;  /**< [ 43: 43](R/W) Enable divide by 16 of reference clock to the band gap. */
7947         uint64_t band_overide          : 1;  /**< [ 44: 44](R/W/H) Bypass PLL calibration and set PLL band with band field inputs. */
7948         uint64_t band_limits           : 3;  /**< [ 47: 45](R/W) Band limits for the PLL calibration procedure. */
7949         uint64_t band                  : 5;  /**< [ 52: 48](R/W/H) PLL manual PLL band inputs; only effective if [BAND_OVERIDE] set. */
7950         uint64_t band_ppm              : 2;  /**< [ 54: 53](R/W) PLL band ppm setting. */
7951         uint64_t cp_overide            : 1;  /**< [ 55: 55](R/W) PLL charge pump override. */
7952         uint64_t cp                    : 4;  /**< [ 59: 56](R/W) PLL charge pump configuration. */
7953         uint64_t cal_cp_mult           : 2;  /**< [ 61: 60](R/W) PLL cal charge pump mult control. */
7954         uint64_t reserved_62_63        : 2;
7955 #endif /* Word 0 - End */
7956     } cn;
7957 };
7958 typedef union bdk_gsernx_lanex_pll_1_bcfg bdk_gsernx_lanex_pll_1_bcfg_t;
7959 
7960 static inline uint64_t BDK_GSERNX_LANEX_PLL_1_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PLL_1_BCFG(unsigned long a,unsigned long b)7961 static inline uint64_t BDK_GSERNX_LANEX_PLL_1_BCFG(unsigned long a, unsigned long b)
7962 {
7963     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
7964         return 0x87e090000200ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
7965     __bdk_csr_fatal("GSERNX_LANEX_PLL_1_BCFG", 2, a, b, 0, 0);
7966 }
7967 
7968 #define typedef_BDK_GSERNX_LANEX_PLL_1_BCFG(a,b) bdk_gsernx_lanex_pll_1_bcfg_t
7969 #define bustype_BDK_GSERNX_LANEX_PLL_1_BCFG(a,b) BDK_CSR_TYPE_RSL
7970 #define basename_BDK_GSERNX_LANEX_PLL_1_BCFG(a,b) "GSERNX_LANEX_PLL_1_BCFG"
7971 #define device_bar_BDK_GSERNX_LANEX_PLL_1_BCFG(a,b) 0x0 /* PF_BAR0 */
7972 #define busnum_BDK_GSERNX_LANEX_PLL_1_BCFG(a,b) (a)
7973 #define arguments_BDK_GSERNX_LANEX_PLL_1_BCFG(a,b) (a),(b),-1,-1
7974 
7975 /**
7976  * Register (RSL) gsern#_lane#_pll_2_bcfg
7977  *
7978  * GSER Lane PLL Base Configuration Register 2
7979  */
7980 union bdk_gsernx_lanex_pll_2_bcfg
7981 {
7982     uint64_t u;
7983     struct bdk_gsernx_lanex_pll_2_bcfg_s
7984     {
7985 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
7986         uint64_t reserved_56_63        : 8;
7987         uint64_t lock_check_cnt_ovrd_en : 1; /**< [ 55: 55](R/W) Enable use of [LOCK_CHECK_CNT_OVRD]. */
7988         uint64_t lock_check_cnt_ovrd   : 15; /**< [ 54: 40](R/W) Lock check counter value override. This counter is used to wait for PLL lock to
7989                                                                  be valid. It counts every REFCLK cycle and once its done asserts
7990                                                                  GSERN()_LANE()_INIT_BSTS[LOCK_READY]. For Common PLL, REFCLK is the input from the
7991                                                                  pad. For Lane PLL, REFCLK is the output of the common PLL. To use value assert
7992                                                                  GSERN()_LANE()_RST1_BCFG[LOCK_CHECK] or trigger a PLL reset sequence. */
7993         uint64_t reserved_34_39        : 6;
7994         uint64_t vcm_sel               : 1;  /**< [ 33: 33](R/W) For diagnostic use only.
7995                                                                  Internal:
7996                                                                  See PLL designer for how to set these. */
7997         uint64_t cp_boost              : 1;  /**< [ 32: 32](R/W) For diagnostic use only.
7998                                                                  Internal:
7999                                                                  See PLL designer for how to set these. */
8000         uint64_t ssc_sata_mode         : 2;  /**< [ 31: 30](R/W) PLL SATA spread spectrum control.
8001                                                                   0x0 = Down spreading. PPM triangle wave total peak-to-peak spread subtracted from
8002                                                                  nominal frequency.
8003                                                                   0x1 = Up spreading. PPM triangle wave total peak-to-peak spread added to nominal
8004                                                                  frequency.
8005                                                                   0x2 = Center spreading. PPM triangle wave total peak-to-peak spread centered at nominal
8006                                                                  frequency.
8007                                                                   0x3 = Square wave subtracted from nominal frequency. */
8008         uint64_t ssc_ppm               : 2;  /**< [ 29: 28](R/W) Spread-spectrum clocking total peak-to-peak spread.
8009                                                                  0x0 = 5000 PPM.
8010                                                                  0x1 = 3000 PPM.
8011                                                                  0x2 = 2500 PPM.
8012                                                                  0x3 = 1000 PPM. */
8013         uint64_t pnr_refclk_en         : 1;  /**< [ 27: 27](R/W) Enable PLL reference clock to internal logic. */
8014         uint64_t ssc_en                : 1;  /**< [ 26: 26](R/W) Spread-spectrum clocking enable. */
8015         uint64_t shlb_en               : 1;  /**< [ 25: 25](R/W) Used when in shallow loopback mode to mux the CDR receive clock onto
8016                                                                  the transmit data path clock to ensure that the clock frequencies
8017                                                                  are matched (to prevent data overrun). */
8018         uint64_t pfd_offset            : 1;  /**< [ 24: 24](R/W) PLL PFD offset enable. */
8019         uint64_t opamp                 : 4;  /**< [ 23: 20](R/W) PLL loop filter op-amp configuration. */
8020         uint64_t res                   : 4;  /**< [ 19: 16](R/W) PLL loop filter configuration. */
8021         uint64_t reserved_15           : 1;
8022         uint64_t vco_bias              : 3;  /**< [ 14: 12](R/W) VCO bias control. */
8023         uint64_t cal_dac_low           : 4;  /**< [ 11:  8](R/W) PLL calibration DAC low control. */
8024         uint64_t cal_dac_mid           : 4;  /**< [  7:  4](R/W) PLL calibration DAC middle control. */
8025         uint64_t cal_dac_high          : 4;  /**< [  3:  0](R/W) PLL calibration DAC high control. */
8026 #else /* Word 0 - Little Endian */
8027         uint64_t cal_dac_high          : 4;  /**< [  3:  0](R/W) PLL calibration DAC high control. */
8028         uint64_t cal_dac_mid           : 4;  /**< [  7:  4](R/W) PLL calibration DAC middle control. */
8029         uint64_t cal_dac_low           : 4;  /**< [ 11:  8](R/W) PLL calibration DAC low control. */
8030         uint64_t vco_bias              : 3;  /**< [ 14: 12](R/W) VCO bias control. */
8031         uint64_t reserved_15           : 1;
8032         uint64_t res                   : 4;  /**< [ 19: 16](R/W) PLL loop filter configuration. */
8033         uint64_t opamp                 : 4;  /**< [ 23: 20](R/W) PLL loop filter op-amp configuration. */
8034         uint64_t pfd_offset            : 1;  /**< [ 24: 24](R/W) PLL PFD offset enable. */
8035         uint64_t shlb_en               : 1;  /**< [ 25: 25](R/W) Used when in shallow loopback mode to mux the CDR receive clock onto
8036                                                                  the transmit data path clock to ensure that the clock frequencies
8037                                                                  are matched (to prevent data overrun). */
8038         uint64_t ssc_en                : 1;  /**< [ 26: 26](R/W) Spread-spectrum clocking enable. */
8039         uint64_t pnr_refclk_en         : 1;  /**< [ 27: 27](R/W) Enable PLL reference clock to internal logic. */
8040         uint64_t ssc_ppm               : 2;  /**< [ 29: 28](R/W) Spread-spectrum clocking total peak-to-peak spread.
8041                                                                  0x0 = 5000 PPM.
8042                                                                  0x1 = 3000 PPM.
8043                                                                  0x2 = 2500 PPM.
8044                                                                  0x3 = 1000 PPM. */
8045         uint64_t ssc_sata_mode         : 2;  /**< [ 31: 30](R/W) PLL SATA spread spectrum control.
8046                                                                   0x0 = Down spreading. PPM triangle wave total peak-to-peak spread subtracted from
8047                                                                  nominal frequency.
8048                                                                   0x1 = Up spreading. PPM triangle wave total peak-to-peak spread added to nominal
8049                                                                  frequency.
8050                                                                   0x2 = Center spreading. PPM triangle wave total peak-to-peak spread centered at nominal
8051                                                                  frequency.
8052                                                                   0x3 = Square wave subtracted from nominal frequency. */
8053         uint64_t cp_boost              : 1;  /**< [ 32: 32](R/W) For diagnostic use only.
8054                                                                  Internal:
8055                                                                  See PLL designer for how to set these. */
8056         uint64_t vcm_sel               : 1;  /**< [ 33: 33](R/W) For diagnostic use only.
8057                                                                  Internal:
8058                                                                  See PLL designer for how to set these. */
8059         uint64_t reserved_34_39        : 6;
8060         uint64_t lock_check_cnt_ovrd   : 15; /**< [ 54: 40](R/W) Lock check counter value override. This counter is used to wait for PLL lock to
8061                                                                  be valid. It counts every REFCLK cycle and once its done asserts
8062                                                                  GSERN()_LANE()_INIT_BSTS[LOCK_READY]. For Common PLL, REFCLK is the input from the
8063                                                                  pad. For Lane PLL, REFCLK is the output of the common PLL. To use value assert
8064                                                                  GSERN()_LANE()_RST1_BCFG[LOCK_CHECK] or trigger a PLL reset sequence. */
8065         uint64_t lock_check_cnt_ovrd_en : 1; /**< [ 55: 55](R/W) Enable use of [LOCK_CHECK_CNT_OVRD]. */
8066         uint64_t reserved_56_63        : 8;
8067 #endif /* Word 0 - End */
8068     } s;
8069     /* struct bdk_gsernx_lanex_pll_2_bcfg_s cn; */
8070 };
8071 typedef union bdk_gsernx_lanex_pll_2_bcfg bdk_gsernx_lanex_pll_2_bcfg_t;
8072 
8073 static inline uint64_t BDK_GSERNX_LANEX_PLL_2_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_PLL_2_BCFG(unsigned long a,unsigned long b)8074 static inline uint64_t BDK_GSERNX_LANEX_PLL_2_BCFG(unsigned long a, unsigned long b)
8075 {
8076     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
8077         return 0x87e090000210ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
8078     __bdk_csr_fatal("GSERNX_LANEX_PLL_2_BCFG", 2, a, b, 0, 0);
8079 }
8080 
8081 #define typedef_BDK_GSERNX_LANEX_PLL_2_BCFG(a,b) bdk_gsernx_lanex_pll_2_bcfg_t
8082 #define bustype_BDK_GSERNX_LANEX_PLL_2_BCFG(a,b) BDK_CSR_TYPE_RSL
8083 #define basename_BDK_GSERNX_LANEX_PLL_2_BCFG(a,b) "GSERNX_LANEX_PLL_2_BCFG"
8084 #define device_bar_BDK_GSERNX_LANEX_PLL_2_BCFG(a,b) 0x0 /* PF_BAR0 */
8085 #define busnum_BDK_GSERNX_LANEX_PLL_2_BCFG(a,b) (a)
8086 #define arguments_BDK_GSERNX_LANEX_PLL_2_BCFG(a,b) (a),(b),-1,-1
8087 
8088 /**
8089  * Register (RSL) gsern#_lane#_rev
8090  *
8091  * GSER Lane Revision Register
8092  * Revision number
8093  */
8094 union bdk_gsernx_lanex_rev
8095 {
8096     uint64_t u;
8097     struct bdk_gsernx_lanex_rev_s
8098     {
8099 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
8100         uint64_t reserved_8_63         : 56;
8101         uint64_t rev                   : 8;  /**< [  7:  0](RO/H) Revision number for GSERN lane subblock.
8102                                                                  Internal:
8103                                                                  Used primarily for E5. */
8104 #else /* Word 0 - Little Endian */
8105         uint64_t rev                   : 8;  /**< [  7:  0](RO/H) Revision number for GSERN lane subblock.
8106                                                                  Internal:
8107                                                                  Used primarily for E5. */
8108         uint64_t reserved_8_63         : 56;
8109 #endif /* Word 0 - End */
8110     } s;
8111     /* struct bdk_gsernx_lanex_rev_s cn; */
8112 };
8113 typedef union bdk_gsernx_lanex_rev bdk_gsernx_lanex_rev_t;
8114 
8115 static inline uint64_t BDK_GSERNX_LANEX_REV(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_REV(unsigned long a,unsigned long b)8116 static inline uint64_t BDK_GSERNX_LANEX_REV(unsigned long a, unsigned long b)
8117 {
8118     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
8119         return 0x87e090000000ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
8120     __bdk_csr_fatal("GSERNX_LANEX_REV", 2, a, b, 0, 0);
8121 }
8122 
8123 #define typedef_BDK_GSERNX_LANEX_REV(a,b) bdk_gsernx_lanex_rev_t
8124 #define bustype_BDK_GSERNX_LANEX_REV(a,b) BDK_CSR_TYPE_RSL
8125 #define basename_BDK_GSERNX_LANEX_REV(a,b) "GSERNX_LANEX_REV"
8126 #define device_bar_BDK_GSERNX_LANEX_REV(a,b) 0x0 /* PF_BAR0 */
8127 #define busnum_BDK_GSERNX_LANEX_REV(a,b) (a)
8128 #define arguments_BDK_GSERNX_LANEX_REV(a,b) (a),(b),-1,-1
8129 
8130 /**
8131  * Register (RSL) gsern#_lane#_rst1_bcfg
8132  *
8133  * GSER Lane Reset State Machine Controls and Overrides Register 1
8134  */
8135 union bdk_gsernx_lanex_rst1_bcfg
8136 {
8137     uint64_t u;
8138     struct bdk_gsernx_lanex_rst1_bcfg_s
8139     {
8140 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
8141         uint64_t reserved_56_63        : 8;
8142         uint64_t domain_rst_en         : 1;  /**< [ 55: 55](R/W) Domain reset enable.
8143                                                                  0 = Prevent reseting lane logic with domain reset.
8144                                                                  1 = Enable reseting all lane logic with domain reset.
8145 
8146                                                                  For PCIe configurations, typically 1 for a root complex and 0 for an endpoint. */
8147         uint64_t reserved_48_54        : 7;
8148         uint64_t rx_go2deep_idle       : 1;  /**< [ 47: 47](R/W) Set to sequence the receiver into deep idle. */
8149         uint64_t rx_pd_qac_q           : 1;  /**< [ 46: 46](R/W) Power control for the custom analog quadrature accuracy corrector
8150                                                                  (QAC). This QAC corrects for phase error between the I clock and the Q
8151                                                                  (quadrature, doutq) clock.
8152                                                                  0 = Power up the I/Q QAC.
8153                                                                  1 = Power down the I/Q QAC. When in this state,
8154                                                                  GSERN()_LANE()_RX_QAC_BCFG[CDR_QAC_SELQ] should also be set to zero to
8155                                                                  disconnect the QAC from the clock data recovery (CDR) loop. */
8156         uint64_t rx_pd_qac_e           : 1;  /**< [ 45: 45](R/W) Power control for the custom analog quadrature accuracy corrector
8157                                                                  (QAC). This QAC corrects for phase error between the I clock and the E
8158                                                                  (eye, doute) clock.
8159                                                                  0 = Power up the I/E QAC.
8160                                                                  1 = Power down the I/E QAC. When in this state,
8161                                                                  GSERN()_LANE()_RX_QAC_BCFG[CDR_QAC_SELQ] should also be set to zero to
8162                                                                  disconnect the QAC from the clock data recovery (CDR) loop. */
8163         uint64_t rx_pd_idle            : 1;  /**< [ 44: 44](R/W) Set to power down the idle detector in the custom analog
8164                                                                  receiver. */
8165         uint64_t rx_rst_deser          : 1;  /**< [ 43: 43](R/W) Set to reset the deserializers to the offset DAC, current
8166                                                                  bias DAC, and interpolator re-mapping. */
8167         uint64_t rx_rst_dcc_q          : 1;  /**< [ 42: 42](R/W) Set to reset the integrator in the duty-cycle corrector
8168                                                                  (DCC) on the Q (quadrature, data, doutq) path. */
8169         uint64_t rx_rst_dcc_i          : 1;  /**< [ 41: 41](R/W) Set to reset the integrator in the duty-cycle corrector
8170                                                                  (DCC) on the I (in-phase, edge, douti) path. */
8171         uint64_t rx_rst_dcc_e          : 1;  /**< [ 40: 40](R/W) Set to reset the integrator in the duty-cycle corrector
8172                                                                  (DCC) on the E (eye, doute) path */
8173         uint64_t idle                  : 1;  /**< [ 39: 39](R/W) Set to idle the custom receiver and baseline wander
8174                                                                  compensation (bwlc). */
8175         uint64_t rx_rst_qac_q          : 1;  /**< [ 38: 38](R/W) Set reset to the doutq datapath quadrature corrector
8176                                                                  filter and associated logic. */
8177         uint64_t rx_rst_qac_e          : 1;  /**< [ 37: 37](R/W) Set reset to the doute quadrature corrector filter and
8178                                                                  associated logic. */
8179         uint64_t rx_rst_blwc           : 1;  /**< [ 36: 36](R/W) Set to reset the analog baseline wander compensation
8180                                                                  block. */
8181         uint64_t rx_rst_cdrfsm         : 1;  /**< [ 35: 35](R/W) Set to reset the CDR FSM. */
8182         uint64_t rx_rst_voter          : 1;  /**< [ 34: 34](R/W) Set to reset the analog voter block. */
8183         uint64_t rx_rst_div_e          : 1;  /**< [ 33: 33](R/W) Set to reset the analog CDR clock dividers in the eye data path for
8184                                                                  div{5, 8, 10, 16, 20}. */
8185         uint64_t rx_rst_div            : 1;  /**< [ 32: 32](R/W) Set to reset the analog CDR clock dividers in the quadrature data path
8186                                                                  for div{5, 8, 10, 16, 20}. */
8187         uint64_t rx_rst_interp_q       : 1;  /**< [ 31: 31](R/W) Set to reset the Q (quadrature, doutq) pipe analog
8188                                                                  interpolator logic (only, not the full datapaths). */
8189         uint64_t rx_rst_interp_i       : 1;  /**< [ 30: 30](R/W) Set to reset the I (in-phase, douti) pipe analog
8190                                                                  interpolator logic (only, not the full datapath). */
8191         uint64_t rx_rst_interp_e       : 1;  /**< [ 29: 29](R/W) Set to reset the E (eye, doute) analog interpolator logic
8192                                                                  (only, not the full datapath). */
8193         uint64_t rx_pd_interp_q        : 1;  /**< [ 28: 28](R/W) Set to power down the I (in-phase, douti) analog
8194                                                                  interpolator logic and output clocks (only, not the full clock path). */
8195         uint64_t rx_pd_interp_i        : 1;  /**< [ 27: 27](R/W) Set to power down the I (in-phase, douti) analog
8196                                                                  interpolator logic and output clocks (only, not the full clock path). */
8197         uint64_t rx_pd_interp_e        : 1;  /**< [ 26: 26](R/W) Set to power down the E (eye, doute) analog interpolator
8198                                                                  logic and output clocks (only, not the full clock path). */
8199         uint64_t rx_pd_dfe_x           : 1;  /**< [ 25: 25](R/W) Set to power down the DFE X path. The X path is passed to
8200                                                                  the DFE I (edge, douti) pipe depending on edgesel_{even,odd}. */
8201         uint64_t rx_pd_dfe_q           : 1;  /**< [ 24: 24](R/W) Set to power down the DFE Q (data, doutq) path (only, not
8202                                                                  the full datapath) */
8203         uint64_t rx_pd_dfe_i           : 1;  /**< [ 23: 23](R/W) Set to power down the DFE I (edge, douti) path (only, not
8204                                                                  the full datapath). */
8205         uint64_t rx_pd_dfe_e           : 1;  /**< [ 22: 22](R/W) Set to power down the DFE E (eye, doute) path (only, not
8206                                                                  the full datapath). */
8207         uint64_t rx_pd_dcc_q           : 1;  /**< [ 21: 21](R/W) Set to power down the duty-cycle corrector (DCC) of the Q
8208                                                                  (quadrature, doutq) clock after the interpolator and before the
8209                                                                  divider (only, not the full clock path). */
8210         uint64_t rx_pd_dcc_i           : 1;  /**< [ 20: 20](R/W) Set to power down the duty-cycle corrector (DCC) of the I
8211                                                                  (in-phase, douti) clock after the interpolator and before the divider
8212                                                                  (not the full clock path). */
8213         uint64_t rx_pd_dcc_e           : 1;  /**< [ 19: 19](R/W) Set to power down the duty-cycle corrector (DCC) of the E
8214                                                                  (eye, doute) clock after the interpolator and before the divider (not
8215                                                                  the full clock path). */
8216         uint64_t rx_pd_biasdac         : 1;  /**< [ 18: 18](R/W) Set to power down the current bias DAC, which would power
8217                                                                  down any amplifier in the RX (CTLE, VGA, DFE summer, DCC, QAC, etc.). */
8218         uint64_t rx_pd_afe             : 1;  /**< [ 17: 17](R/W) Set to power down the analog front-end (AFE). */
8219         uint64_t rx_en_cdrfsm          : 1;  /**< [ 16: 16](R/W) Set to enable (power-up) the CDR FSM. */
8220         uint64_t reserved_13_15        : 3;
8221         uint64_t pll_go2deep_idle      : 1;  /**< [ 12: 12](R/W) Set to cycle the PLL into deep idle. */
8222         uint64_t lock_ppm              : 2;  /**< [ 11: 10](R/W) PLL lock PPM setting; after GSERN()_LANE()_RST1_BCFG[LOCK_WAIT], compare
8223                                                                  reference clock and divided VCO clock for this many cycles:
8224                                                                    0x0 = Compare after   5000 reference clock cycles.
8225                                                                    0x1 = Compare after  10000 reference clock cycles.
8226                                                                    0x2 = Compare after  20000 reference clock cycles.
8227                                                                    0x3 = Compare after   2500 reference clock cycles. */
8228         uint64_t lock_wait             : 2;  /**< [  9:  8](R/W) Wait time for PLL lock check function to start:
8229                                                                    0x0 = Wait  2500 reference clock cycles.
8230                                                                    0x1 = Wait  5000 reference clock cycles.
8231                                                                    0x2 = Wait 10000 reference clock cycles.
8232                                                                    0x3 = Wait  1250 reference clock cycles. */
8233         uint64_t lock_check            : 1;  /**< [  7:  7](R/W) Trigger a PLL lock status check; result returned in
8234                                                                  GSERN()_LANE()_INIT_BSTS[LOCK] when GSERN()_LANE()_INIT_BSTS[LOCK_READY]
8235                                                                  asserts. deassert and re-assert to repeat checking. */
8236         uint64_t vco_cal_reset         : 1;  /**< [  6:  6](R/W) PLL VCO calibration state machine reset. */
8237         uint64_t fracn_reset           : 1;  /**< [  5:  5](R/W) PLL fractional-N state machine reset. */
8238         uint64_t ssc_reset             : 1;  /**< [  4:  4](R/W) PLL SSC state machine reset. */
8239         uint64_t post_div_reset        : 1;  /**< [  3:  3](RO) Reserved.
8240                                                                  Internal:
8241                                                                  Was common PLL post divider reset.  No longer used. */
8242         uint64_t reset                 : 1;  /**< [  2:  2](R/W) PLL primary reset; must assert [POST_DIV_RESET] if [RESET] is asserted. */
8243         uint64_t cal_en                : 1;  /**< [  1:  1](R/W) Enable PLL calibration procedure. */
8244         uint64_t pwdn                  : 1;  /**< [  0:  0](R/W) PLL power down control. */
8245 #else /* Word 0 - Little Endian */
8246         uint64_t pwdn                  : 1;  /**< [  0:  0](R/W) PLL power down control. */
8247         uint64_t cal_en                : 1;  /**< [  1:  1](R/W) Enable PLL calibration procedure. */
8248         uint64_t reset                 : 1;  /**< [  2:  2](R/W) PLL primary reset; must assert [POST_DIV_RESET] if [RESET] is asserted. */
8249         uint64_t post_div_reset        : 1;  /**< [  3:  3](RO) Reserved.
8250                                                                  Internal:
8251                                                                  Was common PLL post divider reset.  No longer used. */
8252         uint64_t ssc_reset             : 1;  /**< [  4:  4](R/W) PLL SSC state machine reset. */
8253         uint64_t fracn_reset           : 1;  /**< [  5:  5](R/W) PLL fractional-N state machine reset. */
8254         uint64_t vco_cal_reset         : 1;  /**< [  6:  6](R/W) PLL VCO calibration state machine reset. */
8255         uint64_t lock_check            : 1;  /**< [  7:  7](R/W) Trigger a PLL lock status check; result returned in
8256                                                                  GSERN()_LANE()_INIT_BSTS[LOCK] when GSERN()_LANE()_INIT_BSTS[LOCK_READY]
8257                                                                  asserts. deassert and re-assert to repeat checking. */
8258         uint64_t lock_wait             : 2;  /**< [  9:  8](R/W) Wait time for PLL lock check function to start:
8259                                                                    0x0 = Wait  2500 reference clock cycles.
8260                                                                    0x1 = Wait  5000 reference clock cycles.
8261                                                                    0x2 = Wait 10000 reference clock cycles.
8262                                                                    0x3 = Wait  1250 reference clock cycles. */
8263         uint64_t lock_ppm              : 2;  /**< [ 11: 10](R/W) PLL lock PPM setting; after GSERN()_LANE()_RST1_BCFG[LOCK_WAIT], compare
8264                                                                  reference clock and divided VCO clock for this many cycles:
8265                                                                    0x0 = Compare after   5000 reference clock cycles.
8266                                                                    0x1 = Compare after  10000 reference clock cycles.
8267                                                                    0x2 = Compare after  20000 reference clock cycles.
8268                                                                    0x3 = Compare after   2500 reference clock cycles. */
8269         uint64_t pll_go2deep_idle      : 1;  /**< [ 12: 12](R/W) Set to cycle the PLL into deep idle. */
8270         uint64_t reserved_13_15        : 3;
8271         uint64_t rx_en_cdrfsm          : 1;  /**< [ 16: 16](R/W) Set to enable (power-up) the CDR FSM. */
8272         uint64_t rx_pd_afe             : 1;  /**< [ 17: 17](R/W) Set to power down the analog front-end (AFE). */
8273         uint64_t rx_pd_biasdac         : 1;  /**< [ 18: 18](R/W) Set to power down the current bias DAC, which would power
8274                                                                  down any amplifier in the RX (CTLE, VGA, DFE summer, DCC, QAC, etc.). */
8275         uint64_t rx_pd_dcc_e           : 1;  /**< [ 19: 19](R/W) Set to power down the duty-cycle corrector (DCC) of the E
8276                                                                  (eye, doute) clock after the interpolator and before the divider (not
8277                                                                  the full clock path). */
8278         uint64_t rx_pd_dcc_i           : 1;  /**< [ 20: 20](R/W) Set to power down the duty-cycle corrector (DCC) of the I
8279                                                                  (in-phase, douti) clock after the interpolator and before the divider
8280                                                                  (not the full clock path). */
8281         uint64_t rx_pd_dcc_q           : 1;  /**< [ 21: 21](R/W) Set to power down the duty-cycle corrector (DCC) of the Q
8282                                                                  (quadrature, doutq) clock after the interpolator and before the
8283                                                                  divider (only, not the full clock path). */
8284         uint64_t rx_pd_dfe_e           : 1;  /**< [ 22: 22](R/W) Set to power down the DFE E (eye, doute) path (only, not
8285                                                                  the full datapath). */
8286         uint64_t rx_pd_dfe_i           : 1;  /**< [ 23: 23](R/W) Set to power down the DFE I (edge, douti) path (only, not
8287                                                                  the full datapath). */
8288         uint64_t rx_pd_dfe_q           : 1;  /**< [ 24: 24](R/W) Set to power down the DFE Q (data, doutq) path (only, not
8289                                                                  the full datapath) */
8290         uint64_t rx_pd_dfe_x           : 1;  /**< [ 25: 25](R/W) Set to power down the DFE X path. The X path is passed to
8291                                                                  the DFE I (edge, douti) pipe depending on edgesel_{even,odd}. */
8292         uint64_t rx_pd_interp_e        : 1;  /**< [ 26: 26](R/W) Set to power down the E (eye, doute) analog interpolator
8293                                                                  logic and output clocks (only, not the full clock path). */
8294         uint64_t rx_pd_interp_i        : 1;  /**< [ 27: 27](R/W) Set to power down the I (in-phase, douti) analog
8295                                                                  interpolator logic and output clocks (only, not the full clock path). */
8296         uint64_t rx_pd_interp_q        : 1;  /**< [ 28: 28](R/W) Set to power down the I (in-phase, douti) analog
8297                                                                  interpolator logic and output clocks (only, not the full clock path). */
8298         uint64_t rx_rst_interp_e       : 1;  /**< [ 29: 29](R/W) Set to reset the E (eye, doute) analog interpolator logic
8299                                                                  (only, not the full datapath). */
8300         uint64_t rx_rst_interp_i       : 1;  /**< [ 30: 30](R/W) Set to reset the I (in-phase, douti) pipe analog
8301                                                                  interpolator logic (only, not the full datapath). */
8302         uint64_t rx_rst_interp_q       : 1;  /**< [ 31: 31](R/W) Set to reset the Q (quadrature, doutq) pipe analog
8303                                                                  interpolator logic (only, not the full datapaths). */
8304         uint64_t rx_rst_div            : 1;  /**< [ 32: 32](R/W) Set to reset the analog CDR clock dividers in the quadrature data path
8305                                                                  for div{5, 8, 10, 16, 20}. */
8306         uint64_t rx_rst_div_e          : 1;  /**< [ 33: 33](R/W) Set to reset the analog CDR clock dividers in the eye data path for
8307                                                                  div{5, 8, 10, 16, 20}. */
8308         uint64_t rx_rst_voter          : 1;  /**< [ 34: 34](R/W) Set to reset the analog voter block. */
8309         uint64_t rx_rst_cdrfsm         : 1;  /**< [ 35: 35](R/W) Set to reset the CDR FSM. */
8310         uint64_t rx_rst_blwc           : 1;  /**< [ 36: 36](R/W) Set to reset the analog baseline wander compensation
8311                                                                  block. */
8312         uint64_t rx_rst_qac_e          : 1;  /**< [ 37: 37](R/W) Set reset to the doute quadrature corrector filter and
8313                                                                  associated logic. */
8314         uint64_t rx_rst_qac_q          : 1;  /**< [ 38: 38](R/W) Set reset to the doutq datapath quadrature corrector
8315                                                                  filter and associated logic. */
8316         uint64_t idle                  : 1;  /**< [ 39: 39](R/W) Set to idle the custom receiver and baseline wander
8317                                                                  compensation (bwlc). */
8318         uint64_t rx_rst_dcc_e          : 1;  /**< [ 40: 40](R/W) Set to reset the integrator in the duty-cycle corrector
8319                                                                  (DCC) on the E (eye, doute) path */
8320         uint64_t rx_rst_dcc_i          : 1;  /**< [ 41: 41](R/W) Set to reset the integrator in the duty-cycle corrector
8321                                                                  (DCC) on the I (in-phase, edge, douti) path. */
8322         uint64_t rx_rst_dcc_q          : 1;  /**< [ 42: 42](R/W) Set to reset the integrator in the duty-cycle corrector
8323                                                                  (DCC) on the Q (quadrature, data, doutq) path. */
8324         uint64_t rx_rst_deser          : 1;  /**< [ 43: 43](R/W) Set to reset the deserializers to the offset DAC, current
8325                                                                  bias DAC, and interpolator re-mapping. */
8326         uint64_t rx_pd_idle            : 1;  /**< [ 44: 44](R/W) Set to power down the idle detector in the custom analog
8327                                                                  receiver. */
8328         uint64_t rx_pd_qac_e           : 1;  /**< [ 45: 45](R/W) Power control for the custom analog quadrature accuracy corrector
8329                                                                  (QAC). This QAC corrects for phase error between the I clock and the E
8330                                                                  (eye, doute) clock.
8331                                                                  0 = Power up the I/E QAC.
8332                                                                  1 = Power down the I/E QAC. When in this state,
8333                                                                  GSERN()_LANE()_RX_QAC_BCFG[CDR_QAC_SELQ] should also be set to zero to
8334                                                                  disconnect the QAC from the clock data recovery (CDR) loop. */
8335         uint64_t rx_pd_qac_q           : 1;  /**< [ 46: 46](R/W) Power control for the custom analog quadrature accuracy corrector
8336                                                                  (QAC). This QAC corrects for phase error between the I clock and the Q
8337                                                                  (quadrature, doutq) clock.
8338                                                                  0 = Power up the I/Q QAC.
8339                                                                  1 = Power down the I/Q QAC. When in this state,
8340                                                                  GSERN()_LANE()_RX_QAC_BCFG[CDR_QAC_SELQ] should also be set to zero to
8341                                                                  disconnect the QAC from the clock data recovery (CDR) loop. */
8342         uint64_t rx_go2deep_idle       : 1;  /**< [ 47: 47](R/W) Set to sequence the receiver into deep idle. */
8343         uint64_t reserved_48_54        : 7;
8344         uint64_t domain_rst_en         : 1;  /**< [ 55: 55](R/W) Domain reset enable.
8345                                                                  0 = Prevent reseting lane logic with domain reset.
8346                                                                  1 = Enable reseting all lane logic with domain reset.
8347 
8348                                                                  For PCIe configurations, typically 1 for a root complex and 0 for an endpoint. */
8349         uint64_t reserved_56_63        : 8;
8350 #endif /* Word 0 - End */
8351     } s;
8352     /* struct bdk_gsernx_lanex_rst1_bcfg_s cn; */
8353 };
8354 typedef union bdk_gsernx_lanex_rst1_bcfg bdk_gsernx_lanex_rst1_bcfg_t;
8355 
8356 static inline uint64_t BDK_GSERNX_LANEX_RST1_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RST1_BCFG(unsigned long a,unsigned long b)8357 static inline uint64_t BDK_GSERNX_LANEX_RST1_BCFG(unsigned long a, unsigned long b)
8358 {
8359     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
8360         return 0x87e090000310ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
8361     __bdk_csr_fatal("GSERNX_LANEX_RST1_BCFG", 2, a, b, 0, 0);
8362 }
8363 
8364 #define typedef_BDK_GSERNX_LANEX_RST1_BCFG(a,b) bdk_gsernx_lanex_rst1_bcfg_t
8365 #define bustype_BDK_GSERNX_LANEX_RST1_BCFG(a,b) BDK_CSR_TYPE_RSL
8366 #define basename_BDK_GSERNX_LANEX_RST1_BCFG(a,b) "GSERNX_LANEX_RST1_BCFG"
8367 #define device_bar_BDK_GSERNX_LANEX_RST1_BCFG(a,b) 0x0 /* PF_BAR0 */
8368 #define busnum_BDK_GSERNX_LANEX_RST1_BCFG(a,b) (a)
8369 #define arguments_BDK_GSERNX_LANEX_RST1_BCFG(a,b) (a),(b),-1,-1
8370 
8371 /**
8372  * Register (RSL) gsern#_lane#_rst2_bcfg
8373  *
8374  * GSER Lane Reset State Machine Controls and Overrides Register 2
8375  */
8376 union bdk_gsernx_lanex_rst2_bcfg
8377 {
8378     uint64_t u;
8379     struct bdk_gsernx_lanex_rst2_bcfg_s
8380     {
8381 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
8382         uint64_t reserved_58_63        : 6;
8383         uint64_t adpt_trigger_wait     : 4;  /**< [ 57: 54](R/W) Wait time for after triggering adaptation before checking adaptation status. Set
8384                                                                  to a minimum of 3. Set to the desired value before or at the same time as
8385                                                                  setting [RST_ADPT_RST_SM] to zero. */
8386         uint64_t reserved_50_53        : 4;
8387         uint64_t adpt_wait             : 18; /**< [ 49: 32](R/W) Wait time for adaptation to complete. Set at least as long as the maximum of:
8388                                                                    * GSERN()_LANE()_RX_5_BCFG[VGA_TIMER_MAX].
8389                                                                    * GSERN()_LANE()_RX_5_BCFG[DFE_TIMER_MAX].
8390                                                                    * GSERN()_LANE()_RX_6_BCFG[CTLELTE_TIMER_MAX].
8391                                                                    * GSERN()_LANE()_RX_6_BCFG[CTLEZ_TIMER_MAX].
8392                                                                    * GSERN()_LANE()_RX_6_BCFG[CTLE_TIMER_MAX].
8393                                                                    * GSERN()_LANE()_RX_12_BCFG[AFEOS_TIMER_MAX].
8394                                                                    * GSERN()_LANE()_RX_19_BCFG[BLWC_TIMER_MAX].
8395                                                                    * GSERN()_LANE()_RX_23_BCFG[PREVGA_GN_TIMER_MAX].
8396 
8397                                                                  The adaptation state machine will move on when all enabled adaptation operations
8398                                                                  complete within the [ADPT_WAIT] count. If they do not complete within the wait
8399                                                                  time, the state machine will move on when the counter expires. Set to the
8400                                                                  desired value before or at the same time as setting [RST_ADPT_RST_SM] to zero. */
8401         uint64_t reserved_30_31        : 2;
8402         uint64_t do_prevga_gn_adpt     : 1;  /**< [ 29: 29](R/W) Set to one to allow the adaptation reset state machine to trigger PREVGA_GN adaptation
8403                                                                  when [RST_ADPT_RST_SM] is deasserted. */
8404         uint64_t do_blwc_adpt          : 1;  /**< [ 28: 28](R/W) Set to one to allow the adaptation reset state machine to trigger BLWC adaptation
8405                                                                  when [RST_ADPT_RST_SM] is deasserted. */
8406         uint64_t do_afeos_adpt         : 1;  /**< [ 27: 27](R/W) Set to one to allow the adaptation reset state machine to trigger AFEOS adaptation
8407                                                                  when [RST_ADPT_RST_SM] is deasserted. */
8408         uint64_t do_ctlelte_adpt       : 1;  /**< [ 26: 26](R/W) Set to one to allow the adaptation reset state machine to trigger CTLELTE adaptation
8409                                                                  when [RST_ADPT_RST_SM] is deasserted. */
8410         uint64_t do_ctlez_adpt         : 1;  /**< [ 25: 25](R/W) Set to one to allow the adaptation reset state machine to trigger CTLEZ adaptation
8411                                                                  when [RST_ADPT_RST_SM] is deasserted. */
8412         uint64_t do_ctle_adpt          : 1;  /**< [ 24: 24](R/W) Set to one to allow the adaptation reset state machine to trigger CTLE adaptation
8413                                                                  when [RST_ADPT_RST_SM] is deasserted. */
8414         uint64_t do_dfe_adpt           : 1;  /**< [ 23: 23](R/W) Set to one to allow the adaptation reset state machine to trigger DFE adaptation
8415                                                                  when [RST_ADPT_RST_SM] is deasserted. */
8416         uint64_t do_vga_adpt           : 1;  /**< [ 22: 22](R/W) Set to one to allow the adaptation reset state machine to trigger VGA adaptation
8417                                                                  when [RST_ADPT_RST_SM] is deasserted. */
8418         uint64_t rst_adpt_rst_sm       : 1;  /**< [ 21: 21](R/W) Set to one to reset the adaptation reset state machine; set to zero to allow the
8419                                                                  adaptation reset state machine to run. Leave set to one to run adaptation
8420                                                                  entirely under SW control through the GSERN()_LANE()_RX_7_BCFG[*_RST]
8421                                                                  controls. Write to zero at the same time or after the desired [DO_*_ADPT]
8422                                                                  controls are enabled to allow the reset state machine to initiate
8423                                                                  adaptation. Note - for pausing and restarting adaptation associated with PCIe
8424                                                                  rate changes and all power state transitions, the reset state machine should
8425                                                                  control adaptation. */
8426         uint64_t rst_eye_rst_sm        : 1;  /**< [ 20: 20](R/W) Set to reset the eye data path reset and power-up/power-down
8427                                                                  state machine; set low to allow the eye data path reset and soft
8428                                                                  power-up/power-down state machine to run (if [LN_RESET_USE_EYE] is
8429                                                                  asserted). */
8430         uint64_t ln_reset_use_eye      : 1;  /**< [ 19: 19](R/W) Set to enable the eye (doute) data path reset and
8431                                                                  power-up/power-down state machine to run at cold reset when
8432                                                                  [RST_EYE_RST_SM] deasserts. After cold reset, assert or deassert
8433                                                                  [LN_RESET_USE_EYE] to run the eye data path soft power-up or
8434                                                                  power-down sequence. */
8435         uint64_t rst_rx_rst_sm         : 1;  /**< [ 18: 18](R/W) Set to reset the receiver reset state machine; set low to run
8436                                                                  the receiver reset initialization state machine. */
8437         uint64_t rst_tx_rst_sm         : 1;  /**< [ 17: 17](R/W) Set to reset the transmitter reset state machine; set low to
8438                                                                  run the transmitter reset initialization state machine. */
8439         uint64_t rst_pll_rst_sm        : 1;  /**< [ 16: 16](R/W) Set to reset the full lane reset state machine (PLL, TX,
8440                                                                  and RX); set low to run the complete reset initialization sequence
8441                                                                  starting with lane PLL initialization. */
8442         uint64_t reserved_13_15        : 3;
8443         uint64_t tx_dcc_iboost         : 1;  /**< [ 12: 12](R/W) Set to assert the iboost control bit of the
8444                                                                  transmit duty cycle correcter. Should be programmed as desired before
8445                                                                  sequencing the transmitter reset state machine. Differs
8446                                                                  from [TX_DCC_LOWF] in the data rate range that it is set at. */
8447         uint64_t tx_go2deep_idle       : 1;  /**< [ 11: 11](R/W) Set to sequence the transmitter into deep idle. */
8448         uint64_t tx_dcc_lowf           : 1;  /**< [ 10: 10](R/W) Set to assert the low-frequency control bit of the transmit duty cycle
8449                                                                  correcter. Should be programmed as desired before sequencing the transmitter
8450                                                                  reset state machine. Set to 1 for data rates below 4 Gbaud. */
8451         uint64_t tx_idle               : 1;  /**< [  9:  9](R/W) Set to put the transmitter into idle (weak terminate). */
8452         uint64_t tx_div_rst            : 1;  /**< [  8:  8](R/W) Set to reset the counter in the analog transmitter clock
8453                                                                  divider. */
8454         uint64_t tx_dcc_rst            : 1;  /**< [  7:  7](R/W) Set to reset the analog duty cycle corrector in the
8455                                                                  transmitter. */
8456         uint64_t reserved_6            : 1;
8457         uint64_t tx_enctl              : 1;  /**< [  5:  5](R/W) Set to enable the analog TX controls (c*, en*). */
8458         uint64_t tx_cdrdiv3            : 1;  /**< [  4:  4](R/W) Set to enable the analog divide by 3 post scalar divider in the
8459                                                                  TX divider. If GSERN()_LANE()_CDRFSM_BCFG[CLK_SEL] is set to use the div3clk from
8460                                                                  the transmitter this bit needs to be enabled. */
8461         uint64_t tx_endiv5             : 1;  /**< [  3:  3](R/W) Set to enable the analog divide by 4 or 5 post scalar dividers
8462                                                                  in the TX divider. */
8463         uint64_t reserved_2            : 1;
8464         uint64_t tx_pdb                : 1;  /**< [  1:  1](R/W) Set to zero to power down the entire analog TX driver, disabling
8465                                                                  current mirrors, current DACs, and op-amps. */
8466         uint64_t tx_dcc_pdb            : 1;  /**< [  0:  0](R/W) Set to zero to power-down the low-swing input, CML to CMOS shifter,
8467                                                                  and duty cycle corrector. */
8468 #else /* Word 0 - Little Endian */
8469         uint64_t tx_dcc_pdb            : 1;  /**< [  0:  0](R/W) Set to zero to power-down the low-swing input, CML to CMOS shifter,
8470                                                                  and duty cycle corrector. */
8471         uint64_t tx_pdb                : 1;  /**< [  1:  1](R/W) Set to zero to power down the entire analog TX driver, disabling
8472                                                                  current mirrors, current DACs, and op-amps. */
8473         uint64_t reserved_2            : 1;
8474         uint64_t tx_endiv5             : 1;  /**< [  3:  3](R/W) Set to enable the analog divide by 4 or 5 post scalar dividers
8475                                                                  in the TX divider. */
8476         uint64_t tx_cdrdiv3            : 1;  /**< [  4:  4](R/W) Set to enable the analog divide by 3 post scalar divider in the
8477                                                                  TX divider. If GSERN()_LANE()_CDRFSM_BCFG[CLK_SEL] is set to use the div3clk from
8478                                                                  the transmitter this bit needs to be enabled. */
8479         uint64_t tx_enctl              : 1;  /**< [  5:  5](R/W) Set to enable the analog TX controls (c*, en*). */
8480         uint64_t reserved_6            : 1;
8481         uint64_t tx_dcc_rst            : 1;  /**< [  7:  7](R/W) Set to reset the analog duty cycle corrector in the
8482                                                                  transmitter. */
8483         uint64_t tx_div_rst            : 1;  /**< [  8:  8](R/W) Set to reset the counter in the analog transmitter clock
8484                                                                  divider. */
8485         uint64_t tx_idle               : 1;  /**< [  9:  9](R/W) Set to put the transmitter into idle (weak terminate). */
8486         uint64_t tx_dcc_lowf           : 1;  /**< [ 10: 10](R/W) Set to assert the low-frequency control bit of the transmit duty cycle
8487                                                                  correcter. Should be programmed as desired before sequencing the transmitter
8488                                                                  reset state machine. Set to 1 for data rates below 4 Gbaud. */
8489         uint64_t tx_go2deep_idle       : 1;  /**< [ 11: 11](R/W) Set to sequence the transmitter into deep idle. */
8490         uint64_t tx_dcc_iboost         : 1;  /**< [ 12: 12](R/W) Set to assert the iboost control bit of the
8491                                                                  transmit duty cycle correcter. Should be programmed as desired before
8492                                                                  sequencing the transmitter reset state machine. Differs
8493                                                                  from [TX_DCC_LOWF] in the data rate range that it is set at. */
8494         uint64_t reserved_13_15        : 3;
8495         uint64_t rst_pll_rst_sm        : 1;  /**< [ 16: 16](R/W) Set to reset the full lane reset state machine (PLL, TX,
8496                                                                  and RX); set low to run the complete reset initialization sequence
8497                                                                  starting with lane PLL initialization. */
8498         uint64_t rst_tx_rst_sm         : 1;  /**< [ 17: 17](R/W) Set to reset the transmitter reset state machine; set low to
8499                                                                  run the transmitter reset initialization state machine. */
8500         uint64_t rst_rx_rst_sm         : 1;  /**< [ 18: 18](R/W) Set to reset the receiver reset state machine; set low to run
8501                                                                  the receiver reset initialization state machine. */
8502         uint64_t ln_reset_use_eye      : 1;  /**< [ 19: 19](R/W) Set to enable the eye (doute) data path reset and
8503                                                                  power-up/power-down state machine to run at cold reset when
8504                                                                  [RST_EYE_RST_SM] deasserts. After cold reset, assert or deassert
8505                                                                  [LN_RESET_USE_EYE] to run the eye data path soft power-up or
8506                                                                  power-down sequence. */
8507         uint64_t rst_eye_rst_sm        : 1;  /**< [ 20: 20](R/W) Set to reset the eye data path reset and power-up/power-down
8508                                                                  state machine; set low to allow the eye data path reset and soft
8509                                                                  power-up/power-down state machine to run (if [LN_RESET_USE_EYE] is
8510                                                                  asserted). */
8511         uint64_t rst_adpt_rst_sm       : 1;  /**< [ 21: 21](R/W) Set to one to reset the adaptation reset state machine; set to zero to allow the
8512                                                                  adaptation reset state machine to run. Leave set to one to run adaptation
8513                                                                  entirely under SW control through the GSERN()_LANE()_RX_7_BCFG[*_RST]
8514                                                                  controls. Write to zero at the same time or after the desired [DO_*_ADPT]
8515                                                                  controls are enabled to allow the reset state machine to initiate
8516                                                                  adaptation. Note - for pausing and restarting adaptation associated with PCIe
8517                                                                  rate changes and all power state transitions, the reset state machine should
8518                                                                  control adaptation. */
8519         uint64_t do_vga_adpt           : 1;  /**< [ 22: 22](R/W) Set to one to allow the adaptation reset state machine to trigger VGA adaptation
8520                                                                  when [RST_ADPT_RST_SM] is deasserted. */
8521         uint64_t do_dfe_adpt           : 1;  /**< [ 23: 23](R/W) Set to one to allow the adaptation reset state machine to trigger DFE adaptation
8522                                                                  when [RST_ADPT_RST_SM] is deasserted. */
8523         uint64_t do_ctle_adpt          : 1;  /**< [ 24: 24](R/W) Set to one to allow the adaptation reset state machine to trigger CTLE adaptation
8524                                                                  when [RST_ADPT_RST_SM] is deasserted. */
8525         uint64_t do_ctlez_adpt         : 1;  /**< [ 25: 25](R/W) Set to one to allow the adaptation reset state machine to trigger CTLEZ adaptation
8526                                                                  when [RST_ADPT_RST_SM] is deasserted. */
8527         uint64_t do_ctlelte_adpt       : 1;  /**< [ 26: 26](R/W) Set to one to allow the adaptation reset state machine to trigger CTLELTE adaptation
8528                                                                  when [RST_ADPT_RST_SM] is deasserted. */
8529         uint64_t do_afeos_adpt         : 1;  /**< [ 27: 27](R/W) Set to one to allow the adaptation reset state machine to trigger AFEOS adaptation
8530                                                                  when [RST_ADPT_RST_SM] is deasserted. */
8531         uint64_t do_blwc_adpt          : 1;  /**< [ 28: 28](R/W) Set to one to allow the adaptation reset state machine to trigger BLWC adaptation
8532                                                                  when [RST_ADPT_RST_SM] is deasserted. */
8533         uint64_t do_prevga_gn_adpt     : 1;  /**< [ 29: 29](R/W) Set to one to allow the adaptation reset state machine to trigger PREVGA_GN adaptation
8534                                                                  when [RST_ADPT_RST_SM] is deasserted. */
8535         uint64_t reserved_30_31        : 2;
8536         uint64_t adpt_wait             : 18; /**< [ 49: 32](R/W) Wait time for adaptation to complete. Set at least as long as the maximum of:
8537                                                                    * GSERN()_LANE()_RX_5_BCFG[VGA_TIMER_MAX].
8538                                                                    * GSERN()_LANE()_RX_5_BCFG[DFE_TIMER_MAX].
8539                                                                    * GSERN()_LANE()_RX_6_BCFG[CTLELTE_TIMER_MAX].
8540                                                                    * GSERN()_LANE()_RX_6_BCFG[CTLEZ_TIMER_MAX].
8541                                                                    * GSERN()_LANE()_RX_6_BCFG[CTLE_TIMER_MAX].
8542                                                                    * GSERN()_LANE()_RX_12_BCFG[AFEOS_TIMER_MAX].
8543                                                                    * GSERN()_LANE()_RX_19_BCFG[BLWC_TIMER_MAX].
8544                                                                    * GSERN()_LANE()_RX_23_BCFG[PREVGA_GN_TIMER_MAX].
8545 
8546                                                                  The adaptation state machine will move on when all enabled adaptation operations
8547                                                                  complete within the [ADPT_WAIT] count. If they do not complete within the wait
8548                                                                  time, the state machine will move on when the counter expires. Set to the
8549                                                                  desired value before or at the same time as setting [RST_ADPT_RST_SM] to zero. */
8550         uint64_t reserved_50_53        : 4;
8551         uint64_t adpt_trigger_wait     : 4;  /**< [ 57: 54](R/W) Wait time for after triggering adaptation before checking adaptation status. Set
8552                                                                  to a minimum of 3. Set to the desired value before or at the same time as
8553                                                                  setting [RST_ADPT_RST_SM] to zero. */
8554         uint64_t reserved_58_63        : 6;
8555 #endif /* Word 0 - End */
8556     } s;
8557     /* struct bdk_gsernx_lanex_rst2_bcfg_s cn; */
8558 };
8559 typedef union bdk_gsernx_lanex_rst2_bcfg bdk_gsernx_lanex_rst2_bcfg_t;
8560 
8561 static inline uint64_t BDK_GSERNX_LANEX_RST2_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RST2_BCFG(unsigned long a,unsigned long b)8562 static inline uint64_t BDK_GSERNX_LANEX_RST2_BCFG(unsigned long a, unsigned long b)
8563 {
8564     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
8565         return 0x87e090000320ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
8566     __bdk_csr_fatal("GSERNX_LANEX_RST2_BCFG", 2, a, b, 0, 0);
8567 }
8568 
8569 #define typedef_BDK_GSERNX_LANEX_RST2_BCFG(a,b) bdk_gsernx_lanex_rst2_bcfg_t
8570 #define bustype_BDK_GSERNX_LANEX_RST2_BCFG(a,b) BDK_CSR_TYPE_RSL
8571 #define basename_BDK_GSERNX_LANEX_RST2_BCFG(a,b) "GSERNX_LANEX_RST2_BCFG"
8572 #define device_bar_BDK_GSERNX_LANEX_RST2_BCFG(a,b) 0x0 /* PF_BAR0 */
8573 #define busnum_BDK_GSERNX_LANEX_RST2_BCFG(a,b) (a)
8574 #define arguments_BDK_GSERNX_LANEX_RST2_BCFG(a,b) (a),(b),-1,-1
8575 
8576 /**
8577  * Register (RSL) gsern#_lane#_rst_cnt1_bcfg
8578  *
8579  * GSER Lane Reset State Machine Delay Count Register 1
8580  * Wait counts for the lane reset state machines. All fields must be set
8581  * before bringing the lane out of reset.
8582  */
8583 union bdk_gsernx_lanex_rst_cnt1_bcfg
8584 {
8585     uint64_t u;
8586     struct bdk_gsernx_lanex_rst_cnt1_bcfg_s
8587     {
8588 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
8589         uint64_t reserved_63           : 1;
8590         uint64_t cal_en_wait           : 15; /**< [ 62: 48](R/W) Wait count in service clock cycles after calibration enable before deasserting
8591                                                                  calibration enable to the PLL. Set this field to one less than the desired
8592                                                                  number of cycles of delay. The service clock for the GSER PHY is connected to
8593                                                                  the reference clock used by the primary chip clock PLLs. Typically service clock
8594                                                                  is 100 MHz. */
8595         uint64_t reserved_44_47        : 4;
8596         uint64_t pre_cal_en_wait       : 12; /**< [ 43: 32](R/W) Wait count in service clock cycles after deasserting pwdn before asserting
8597                                                                  calibration enable to the PLL. Set this field to one less than the desired
8598                                                                  number of cycles of delay. */
8599         uint64_t reserved_25_31        : 7;
8600         uint64_t pre_pll_sm_reset_wait : 9;  /**< [ 24: 16](R/W) Wait count in service clock cycles after deasserting pwdn before
8601                                                                  asserting calibration enable to the PLL. Set this field to one less than the
8602                                                                  desired number of cycles of delay. */
8603         uint64_t reserved_13_15        : 3;
8604         uint64_t pre_pwup_wait         : 13; /**< [ 12:  0](R/W) Wait count in service clock cycles after initial trigger before deasserting
8605                                                                  power down to the PLL. The actual delay will be three cycles more than set
8606                                                                  here. The common block PLL state machine will typically wait 2^12 cycles before
8607                                                                  triggering the lane PLL to start. This field allows for staggering startup of
8608                                                                  different lanes by up to about 80us. */
8609 #else /* Word 0 - Little Endian */
8610         uint64_t pre_pwup_wait         : 13; /**< [ 12:  0](R/W) Wait count in service clock cycles after initial trigger before deasserting
8611                                                                  power down to the PLL. The actual delay will be three cycles more than set
8612                                                                  here. The common block PLL state machine will typically wait 2^12 cycles before
8613                                                                  triggering the lane PLL to start. This field allows for staggering startup of
8614                                                                  different lanes by up to about 80us. */
8615         uint64_t reserved_13_15        : 3;
8616         uint64_t pre_pll_sm_reset_wait : 9;  /**< [ 24: 16](R/W) Wait count in service clock cycles after deasserting pwdn before
8617                                                                  asserting calibration enable to the PLL. Set this field to one less than the
8618                                                                  desired number of cycles of delay. */
8619         uint64_t reserved_25_31        : 7;
8620         uint64_t pre_cal_en_wait       : 12; /**< [ 43: 32](R/W) Wait count in service clock cycles after deasserting pwdn before asserting
8621                                                                  calibration enable to the PLL. Set this field to one less than the desired
8622                                                                  number of cycles of delay. */
8623         uint64_t reserved_44_47        : 4;
8624         uint64_t cal_en_wait           : 15; /**< [ 62: 48](R/W) Wait count in service clock cycles after calibration enable before deasserting
8625                                                                  calibration enable to the PLL. Set this field to one less than the desired
8626                                                                  number of cycles of delay. The service clock for the GSER PHY is connected to
8627                                                                  the reference clock used by the primary chip clock PLLs. Typically service clock
8628                                                                  is 100 MHz. */
8629         uint64_t reserved_63           : 1;
8630 #endif /* Word 0 - End */
8631     } s;
8632     /* struct bdk_gsernx_lanex_rst_cnt1_bcfg_s cn; */
8633 };
8634 typedef union bdk_gsernx_lanex_rst_cnt1_bcfg bdk_gsernx_lanex_rst_cnt1_bcfg_t;
8635 
8636 static inline uint64_t BDK_GSERNX_LANEX_RST_CNT1_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RST_CNT1_BCFG(unsigned long a,unsigned long b)8637 static inline uint64_t BDK_GSERNX_LANEX_RST_CNT1_BCFG(unsigned long a, unsigned long b)
8638 {
8639     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
8640         return 0x87e090000330ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
8641     __bdk_csr_fatal("GSERNX_LANEX_RST_CNT1_BCFG", 2, a, b, 0, 0);
8642 }
8643 
8644 #define typedef_BDK_GSERNX_LANEX_RST_CNT1_BCFG(a,b) bdk_gsernx_lanex_rst_cnt1_bcfg_t
8645 #define bustype_BDK_GSERNX_LANEX_RST_CNT1_BCFG(a,b) BDK_CSR_TYPE_RSL
8646 #define basename_BDK_GSERNX_LANEX_RST_CNT1_BCFG(a,b) "GSERNX_LANEX_RST_CNT1_BCFG"
8647 #define device_bar_BDK_GSERNX_LANEX_RST_CNT1_BCFG(a,b) 0x0 /* PF_BAR0 */
8648 #define busnum_BDK_GSERNX_LANEX_RST_CNT1_BCFG(a,b) (a)
8649 #define arguments_BDK_GSERNX_LANEX_RST_CNT1_BCFG(a,b) (a),(b),-1,-1
8650 
8651 /**
8652  * Register (RSL) gsern#_lane#_rst_cnt2_bcfg
8653  *
8654  * GSER Lane Reset State Machine Delay Count Register 2
8655  * Wait counts for the lane reset state machines. All fields must be set
8656  * before bringing the lane out of reset.
8657  */
8658 union bdk_gsernx_lanex_rst_cnt2_bcfg
8659 {
8660     uint64_t u;
8661     struct bdk_gsernx_lanex_rst_cnt2_bcfg_s
8662     {
8663 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
8664         uint64_t reserved_57_63        : 7;
8665         uint64_t rx_pre_qac_sel_wait   : 9;  /**< [ 56: 48](R/W) Wait count in service clock cycles after the deasserting reset to
8666                                                                  the QAC filter logic before asserting select to the q and e pipe qac
8667                                                                  filters. Set this field to one less than the desired number of
8668                                                                  cycles of delay. */
8669         uint64_t reserved_46_47        : 2;
8670         uint64_t txrx_pre_pwup_wait    : 14; /**< [ 45: 32](R/W) Wait count in service clock cycles after the lane PLL exits reset before
8671                                                                  deasserting power down signals to the transmitter and receiver. Set this field
8672                                                                  to three less than the desired number of cycles of delay. */
8673         uint64_t reserved_29_31        : 3;
8674         uint64_t pre_pdiv_reset_wait   : 13; /**< [ 28: 16](R/W) Reserved.
8675                                                                  Internal:
8676                                                                  The lane PLL no longer has a postdivider
8677                                                                  reset. (This was the wait count in service clock cycles after
8678                                                                  deasserting reset before deasserting reset to the PLL
8679                                                                  postdivider. Set this field to one less than the desired number of
8680                                                                  cycles of delay.) */
8681         uint64_t reserved_12_15        : 4;
8682         uint64_t pre_pll_reset_wait    : 12; /**< [ 11:  0](R/W) Wait count in service clock cycles after calibration enable deasserts
8683                                                                  before deasserting reset to the PLL. Set this field to one less
8684                                                                  than the desired number of cycles of delay. */
8685 #else /* Word 0 - Little Endian */
8686         uint64_t pre_pll_reset_wait    : 12; /**< [ 11:  0](R/W) Wait count in service clock cycles after calibration enable deasserts
8687                                                                  before deasserting reset to the PLL. Set this field to one less
8688                                                                  than the desired number of cycles of delay. */
8689         uint64_t reserved_12_15        : 4;
8690         uint64_t pre_pdiv_reset_wait   : 13; /**< [ 28: 16](R/W) Reserved.
8691                                                                  Internal:
8692                                                                  The lane PLL no longer has a postdivider
8693                                                                  reset. (This was the wait count in service clock cycles after
8694                                                                  deasserting reset before deasserting reset to the PLL
8695                                                                  postdivider. Set this field to one less than the desired number of
8696                                                                  cycles of delay.) */
8697         uint64_t reserved_29_31        : 3;
8698         uint64_t txrx_pre_pwup_wait    : 14; /**< [ 45: 32](R/W) Wait count in service clock cycles after the lane PLL exits reset before
8699                                                                  deasserting power down signals to the transmitter and receiver. Set this field
8700                                                                  to three less than the desired number of cycles of delay. */
8701         uint64_t reserved_46_47        : 2;
8702         uint64_t rx_pre_qac_sel_wait   : 9;  /**< [ 56: 48](R/W) Wait count in service clock cycles after the deasserting reset to
8703                                                                  the QAC filter logic before asserting select to the q and e pipe qac
8704                                                                  filters. Set this field to one less than the desired number of
8705                                                                  cycles of delay. */
8706         uint64_t reserved_57_63        : 7;
8707 #endif /* Word 0 - End */
8708     } s;
8709     /* struct bdk_gsernx_lanex_rst_cnt2_bcfg_s cn; */
8710 };
8711 typedef union bdk_gsernx_lanex_rst_cnt2_bcfg bdk_gsernx_lanex_rst_cnt2_bcfg_t;
8712 
8713 static inline uint64_t BDK_GSERNX_LANEX_RST_CNT2_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RST_CNT2_BCFG(unsigned long a,unsigned long b)8714 static inline uint64_t BDK_GSERNX_LANEX_RST_CNT2_BCFG(unsigned long a, unsigned long b)
8715 {
8716     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
8717         return 0x87e090000340ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
8718     __bdk_csr_fatal("GSERNX_LANEX_RST_CNT2_BCFG", 2, a, b, 0, 0);
8719 }
8720 
8721 #define typedef_BDK_GSERNX_LANEX_RST_CNT2_BCFG(a,b) bdk_gsernx_lanex_rst_cnt2_bcfg_t
8722 #define bustype_BDK_GSERNX_LANEX_RST_CNT2_BCFG(a,b) BDK_CSR_TYPE_RSL
8723 #define basename_BDK_GSERNX_LANEX_RST_CNT2_BCFG(a,b) "GSERNX_LANEX_RST_CNT2_BCFG"
8724 #define device_bar_BDK_GSERNX_LANEX_RST_CNT2_BCFG(a,b) 0x0 /* PF_BAR0 */
8725 #define busnum_BDK_GSERNX_LANEX_RST_CNT2_BCFG(a,b) (a)
8726 #define arguments_BDK_GSERNX_LANEX_RST_CNT2_BCFG(a,b) (a),(b),-1,-1
8727 
8728 /**
8729  * Register (RSL) gsern#_lane#_rst_cnt3_bcfg
8730  *
8731  * GSER Lane Reset State Machine Delay Count Register 3
8732  * Wait counts for the lane reset state machines. All fields must be set
8733  * before bringing the lane out of reset.
8734  */
8735 union bdk_gsernx_lanex_rst_cnt3_bcfg
8736 {
8737     uint64_t u;
8738     struct bdk_gsernx_lanex_rst_cnt3_bcfg_s
8739     {
8740 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
8741         uint64_t reserved_59_63        : 5;
8742         uint64_t rx_pre_run_wait       : 11; /**< [ 58: 48](R/W) Wait count in service clock cycles after deasserting reset to the
8743                                                                  baseline wander correction logic before indicating that the receiver
8744                                                                  is ready. Set this field to one less than the desired number of
8745                                                                  cycles of delay. */
8746         uint64_t reserved_41_47        : 7;
8747         uint64_t pre_rst_iq_wait       : 9;  /**< [ 40: 32](R/W) Wait count in service clock cycles after deasserting reset to the
8748                                                                  receiver clock divider before deasserting reset to the i, q, and e
8749                                                                  pipe interpolators. Set this field to one less than the desired
8750                                                                  number of cycles of delay. */
8751         uint64_t reserved_25_31        : 7;
8752         uint64_t pre_tx_div_rst_wait   : 9;  /**< [ 24: 16](R/W) Wait count in service clock cycles after deasserting reset to the duty cycle
8753                                                                  correctors in the transmitter before deasserting reset to the transmitter clock
8754                                                                  divider. Set this field to one less than the desired number of cycles of
8755                                                                  delay. */
8756         uint64_t reserved_9_15         : 7;
8757         uint64_t pre_en_cdrfsm_wait    : 9;  /**< [  8:  0](R/W) Wait count in service clock cycles after asserting power up to the
8758                                                                  custom receiver before enabling the CDR finite state machine. Set
8759                                                                  this field to one less than the desired number of cycles of delay. */
8760 #else /* Word 0 - Little Endian */
8761         uint64_t pre_en_cdrfsm_wait    : 9;  /**< [  8:  0](R/W) Wait count in service clock cycles after asserting power up to the
8762                                                                  custom receiver before enabling the CDR finite state machine. Set
8763                                                                  this field to one less than the desired number of cycles of delay. */
8764         uint64_t reserved_9_15         : 7;
8765         uint64_t pre_tx_div_rst_wait   : 9;  /**< [ 24: 16](R/W) Wait count in service clock cycles after deasserting reset to the duty cycle
8766                                                                  correctors in the transmitter before deasserting reset to the transmitter clock
8767                                                                  divider. Set this field to one less than the desired number of cycles of
8768                                                                  delay. */
8769         uint64_t reserved_25_31        : 7;
8770         uint64_t pre_rst_iq_wait       : 9;  /**< [ 40: 32](R/W) Wait count in service clock cycles after deasserting reset to the
8771                                                                  receiver clock divider before deasserting reset to the i, q, and e
8772                                                                  pipe interpolators. Set this field to one less than the desired
8773                                                                  number of cycles of delay. */
8774         uint64_t reserved_41_47        : 7;
8775         uint64_t rx_pre_run_wait       : 11; /**< [ 58: 48](R/W) Wait count in service clock cycles after deasserting reset to the
8776                                                                  baseline wander correction logic before indicating that the receiver
8777                                                                  is ready. Set this field to one less than the desired number of
8778                                                                  cycles of delay. */
8779         uint64_t reserved_59_63        : 5;
8780 #endif /* Word 0 - End */
8781     } s;
8782     /* struct bdk_gsernx_lanex_rst_cnt3_bcfg_s cn; */
8783 };
8784 typedef union bdk_gsernx_lanex_rst_cnt3_bcfg bdk_gsernx_lanex_rst_cnt3_bcfg_t;
8785 
8786 static inline uint64_t BDK_GSERNX_LANEX_RST_CNT3_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RST_CNT3_BCFG(unsigned long a,unsigned long b)8787 static inline uint64_t BDK_GSERNX_LANEX_RST_CNT3_BCFG(unsigned long a, unsigned long b)
8788 {
8789     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
8790         return 0x87e090000350ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
8791     __bdk_csr_fatal("GSERNX_LANEX_RST_CNT3_BCFG", 2, a, b, 0, 0);
8792 }
8793 
8794 #define typedef_BDK_GSERNX_LANEX_RST_CNT3_BCFG(a,b) bdk_gsernx_lanex_rst_cnt3_bcfg_t
8795 #define bustype_BDK_GSERNX_LANEX_RST_CNT3_BCFG(a,b) BDK_CSR_TYPE_RSL
8796 #define basename_BDK_GSERNX_LANEX_RST_CNT3_BCFG(a,b) "GSERNX_LANEX_RST_CNT3_BCFG"
8797 #define device_bar_BDK_GSERNX_LANEX_RST_CNT3_BCFG(a,b) 0x0 /* PF_BAR0 */
8798 #define busnum_BDK_GSERNX_LANEX_RST_CNT3_BCFG(a,b) (a)
8799 #define arguments_BDK_GSERNX_LANEX_RST_CNT3_BCFG(a,b) (a),(b),-1,-1
8800 
8801 /**
8802  * Register (RSL) gsern#_lane#_rst_cnt4_bcfg
8803  *
8804  * GSER Lane Reset State Machine Delay Count Register 4
8805  * Wait counts for the lane reset state machines. All fields must be set
8806  * before bringing the lane out of reset.
8807  */
8808 union bdk_gsernx_lanex_rst_cnt4_bcfg
8809 {
8810     uint64_t u;
8811     struct bdk_gsernx_lanex_rst_cnt4_bcfg_s
8812     {
8813 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
8814         uint64_t reserved_57_63        : 7;
8815         uint64_t svc_clk_freq          : 1;  /**< [ 56: 56](R/W) For diagnostic use only.
8816                                                                  Internal:
8817                                                                  This bit reserved for future enhancements.  The RTL to use it is not coded. Freq selection
8818                                                                  for service clock as used in the reset state machine. 0 = 100 MHz. 1 = 156.25 MHz. This
8819                                                                  scales only the wait counts not set via CSR registers. */
8820         uint64_t reserved_50_55        : 6;
8821         uint64_t blwc_reset_wait       : 18; /**< [ 49: 32](R/W) Wait count in service clock cycles after deasserting reset to the
8822                                                                  CDR FSM before deasserting reset to the baseline wander correction
8823                                                                  circuit (BLWC). The power-up document specifies this as 16 service
8824                                                                  clock cycles, but verbal communication says that's only correct for
8825                                                                  cases of small frequency offset between the lane PLL and the
8826                                                                  received data stream clock, i.e., it doesn't apply for SSC (except
8827                                                                  PCIe). Since the actual requirement is not specified, this field
8828                                                                  allows for the full range of the counter in the receiver reset state
8829                                                                  machine. */
8830         uint64_t reserved_20_31        : 12;
8831         uint64_t dfe_afe_oscal_wait    : 20; /**< [ 19:  0](R/W) Maximum wait count in service clock cycles after triggering the dfe
8832                                                                  and afe offset calibration sequences before deasserting
8833                                                                  reset_voter. Normally the receiver reset state machine will move on
8834                                                                  when DFE and AFE offset calibration is complete. This is a time-out
8835                                                                  parameter in case the offset calibration state machines do not
8836                                                                  complete. Set this field to one less than the desired number of
8837                                                                  cycles of delay. */
8838 #else /* Word 0 - Little Endian */
8839         uint64_t dfe_afe_oscal_wait    : 20; /**< [ 19:  0](R/W) Maximum wait count in service clock cycles after triggering the dfe
8840                                                                  and afe offset calibration sequences before deasserting
8841                                                                  reset_voter. Normally the receiver reset state machine will move on
8842                                                                  when DFE and AFE offset calibration is complete. This is a time-out
8843                                                                  parameter in case the offset calibration state machines do not
8844                                                                  complete. Set this field to one less than the desired number of
8845                                                                  cycles of delay. */
8846         uint64_t reserved_20_31        : 12;
8847         uint64_t blwc_reset_wait       : 18; /**< [ 49: 32](R/W) Wait count in service clock cycles after deasserting reset to the
8848                                                                  CDR FSM before deasserting reset to the baseline wander correction
8849                                                                  circuit (BLWC). The power-up document specifies this as 16 service
8850                                                                  clock cycles, but verbal communication says that's only correct for
8851                                                                  cases of small frequency offset between the lane PLL and the
8852                                                                  received data stream clock, i.e., it doesn't apply for SSC (except
8853                                                                  PCIe). Since the actual requirement is not specified, this field
8854                                                                  allows for the full range of the counter in the receiver reset state
8855                                                                  machine. */
8856         uint64_t reserved_50_55        : 6;
8857         uint64_t svc_clk_freq          : 1;  /**< [ 56: 56](R/W) For diagnostic use only.
8858                                                                  Internal:
8859                                                                  This bit reserved for future enhancements.  The RTL to use it is not coded. Freq selection
8860                                                                  for service clock as used in the reset state machine. 0 = 100 MHz. 1 = 156.25 MHz. This
8861                                                                  scales only the wait counts not set via CSR registers. */
8862         uint64_t reserved_57_63        : 7;
8863 #endif /* Word 0 - End */
8864     } s;
8865     /* struct bdk_gsernx_lanex_rst_cnt4_bcfg_s cn; */
8866 };
8867 typedef union bdk_gsernx_lanex_rst_cnt4_bcfg bdk_gsernx_lanex_rst_cnt4_bcfg_t;
8868 
8869 static inline uint64_t BDK_GSERNX_LANEX_RST_CNT4_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RST_CNT4_BCFG(unsigned long a,unsigned long b)8870 static inline uint64_t BDK_GSERNX_LANEX_RST_CNT4_BCFG(unsigned long a, unsigned long b)
8871 {
8872     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
8873         return 0x87e090000360ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
8874     __bdk_csr_fatal("GSERNX_LANEX_RST_CNT4_BCFG", 2, a, b, 0, 0);
8875 }
8876 
8877 #define typedef_BDK_GSERNX_LANEX_RST_CNT4_BCFG(a,b) bdk_gsernx_lanex_rst_cnt4_bcfg_t
8878 #define bustype_BDK_GSERNX_LANEX_RST_CNT4_BCFG(a,b) BDK_CSR_TYPE_RSL
8879 #define basename_BDK_GSERNX_LANEX_RST_CNT4_BCFG(a,b) "GSERNX_LANEX_RST_CNT4_BCFG"
8880 #define device_bar_BDK_GSERNX_LANEX_RST_CNT4_BCFG(a,b) 0x0 /* PF_BAR0 */
8881 #define busnum_BDK_GSERNX_LANEX_RST_CNT4_BCFG(a,b) (a)
8882 #define arguments_BDK_GSERNX_LANEX_RST_CNT4_BCFG(a,b) (a),(b),-1,-1
8883 
8884 /**
8885  * Register (RSL) gsern#_lane#_rst_cnt5_bcfg
8886  *
8887  * GSER Lane Reset State Machine Delay Count Register 4
8888  * Wait counts for the lane reset state machines. All fields must be set
8889  * before bringing the lane out of reset.
8890  */
8891 union bdk_gsernx_lanex_rst_cnt5_bcfg
8892 {
8893     uint64_t u;
8894     struct bdk_gsernx_lanex_rst_cnt5_bcfg_s
8895     {
8896 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
8897         uint64_t reserved_33_63        : 31;
8898         uint64_t idle_exit_wait_en     : 1;  /**< [ 32: 32](R/W) Enable use of [IDLE_EXIT_WAIT] as a limit on the wait time for the receiver
8899                                                                  electrical idle indicator to deassert after resetting the voter. When
8900                                                                  [IDLE_EXIT_WAIT_EN] is low, the state machine will wait forever for the
8901                                                                  electrical idle signal to deassert. Note that the reset state machine will not
8902                                                                  see idle deassert until after the first idle offset calibration has completed
8903                                                                  after exiting reset. */
8904         uint64_t reserved_28_31        : 4;
8905         uint64_t idle_exit_wait        : 28; /**< [ 27:  0](R/W) Maximum wait count in service clock cycles for the receiver electrical idle
8906                                                                  indicator to deassert after resetting the voter. If the receiver electrical idle
8907                                                                  indication remains asserted, the reset state machine will move on after this
8908                                                                  count expires. */
8909 #else /* Word 0 - Little Endian */
8910         uint64_t idle_exit_wait        : 28; /**< [ 27:  0](R/W) Maximum wait count in service clock cycles for the receiver electrical idle
8911                                                                  indicator to deassert after resetting the voter. If the receiver electrical idle
8912                                                                  indication remains asserted, the reset state machine will move on after this
8913                                                                  count expires. */
8914         uint64_t reserved_28_31        : 4;
8915         uint64_t idle_exit_wait_en     : 1;  /**< [ 32: 32](R/W) Enable use of [IDLE_EXIT_WAIT] as a limit on the wait time for the receiver
8916                                                                  electrical idle indicator to deassert after resetting the voter. When
8917                                                                  [IDLE_EXIT_WAIT_EN] is low, the state machine will wait forever for the
8918                                                                  electrical idle signal to deassert. Note that the reset state machine will not
8919                                                                  see idle deassert until after the first idle offset calibration has completed
8920                                                                  after exiting reset. */
8921         uint64_t reserved_33_63        : 31;
8922 #endif /* Word 0 - End */
8923     } s;
8924     /* struct bdk_gsernx_lanex_rst_cnt5_bcfg_s cn; */
8925 };
8926 typedef union bdk_gsernx_lanex_rst_cnt5_bcfg bdk_gsernx_lanex_rst_cnt5_bcfg_t;
8927 
8928 static inline uint64_t BDK_GSERNX_LANEX_RST_CNT5_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RST_CNT5_BCFG(unsigned long a,unsigned long b)8929 static inline uint64_t BDK_GSERNX_LANEX_RST_CNT5_BCFG(unsigned long a, unsigned long b)
8930 {
8931     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
8932         return 0x87e090000370ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
8933     __bdk_csr_fatal("GSERNX_LANEX_RST_CNT5_BCFG", 2, a, b, 0, 0);
8934 }
8935 
8936 #define typedef_BDK_GSERNX_LANEX_RST_CNT5_BCFG(a,b) bdk_gsernx_lanex_rst_cnt5_bcfg_t
8937 #define bustype_BDK_GSERNX_LANEX_RST_CNT5_BCFG(a,b) BDK_CSR_TYPE_RSL
8938 #define basename_BDK_GSERNX_LANEX_RST_CNT5_BCFG(a,b) "GSERNX_LANEX_RST_CNT5_BCFG"
8939 #define device_bar_BDK_GSERNX_LANEX_RST_CNT5_BCFG(a,b) 0x0 /* PF_BAR0 */
8940 #define busnum_BDK_GSERNX_LANEX_RST_CNT5_BCFG(a,b) (a)
8941 #define arguments_BDK_GSERNX_LANEX_RST_CNT5_BCFG(a,b) (a),(b),-1,-1
8942 
8943 /**
8944  * Register (RSL) gsern#_lane#_rstclkmsk_bcfg
8945  *
8946  * GSER Lane Reset State Machine Transmit Clock Alignment Register
8947  * Controls for transmit alignment of lanes within a link requiring aligned transmit
8948  * data.
8949  */
8950 union bdk_gsernx_lanex_rstclkmsk_bcfg
8951 {
8952     uint64_t u;
8953     struct bdk_gsernx_lanex_rstclkmsk_bcfg_s
8954     {
8955 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
8956         uint64_t reserved_44_63        : 20;
8957         uint64_t txdivrst_algn_qlm_mask : 4; /**< [ 43: 40](R/W) Selection control for which QLMs in this QLM's link group to align in timing the
8958                                                                  deassertion of reset to this lane's transmitter's clock divider.
8959                                                                  \<0\> = Wait for QLM 0.
8960                                                                  \<1\> = Wait for QLM 1.
8961                                                                  \<2\> = Wait for QLM 2.
8962                                                                  \<3\> = Wait for QLM 3.
8963 
8964                                                                  The bit corresponding to the current QLM is ignored. */
8965         uint64_t reserved_36_39        : 4;
8966         uint64_t txdivrst_algn_lane_mask : 4;/**< [ 35: 32](R/W) Selection control for which lanes in the current QLM to align in timing the
8967                                                                  deassertion of reset to this lane's transmitter's clock divider.
8968                                                                  \<0\> = Wait for lane 0.
8969                                                                  \<1\> = Wait for lane 1.
8970                                                                  \<2\> = Wait for lane 2.
8971                                                                  \<3\> = Wait for lane 3.
8972 
8973                                                                  The bit corresponding to the current Lane is ignored. */
8974         uint64_t reserved_21_31        : 11;
8975         uint64_t txdivrst_algn_wait_en : 1;  /**< [ 20: 20](R/W) Enable use of [TXDIVRST_ALGN_WAIT] as a time out waiting for other lanes to be
8976                                                                  ready to start their divided transmit clocks. With this bit cleared the lane
8977                                                                  will wait indefinitely. */
8978         uint64_t txdivrst_algn_wait    : 20; /**< [ 19:  0](R/W) Maximum wait count in service clock cycles, after this lane is ready to start
8979                                                                  its divided transmit clock, for other lanes in the link to be ready to start
8980                                                                  their divided transmit clocks. This is the maximum wait time, after which the
8981                                                                  state machine will move on, whether the other lanes have indicated ready or not. */
8982 #else /* Word 0 - Little Endian */
8983         uint64_t txdivrst_algn_wait    : 20; /**< [ 19:  0](R/W) Maximum wait count in service clock cycles, after this lane is ready to start
8984                                                                  its divided transmit clock, for other lanes in the link to be ready to start
8985                                                                  their divided transmit clocks. This is the maximum wait time, after which the
8986                                                                  state machine will move on, whether the other lanes have indicated ready or not. */
8987         uint64_t txdivrst_algn_wait_en : 1;  /**< [ 20: 20](R/W) Enable use of [TXDIVRST_ALGN_WAIT] as a time out waiting for other lanes to be
8988                                                                  ready to start their divided transmit clocks. With this bit cleared the lane
8989                                                                  will wait indefinitely. */
8990         uint64_t reserved_21_31        : 11;
8991         uint64_t txdivrst_algn_lane_mask : 4;/**< [ 35: 32](R/W) Selection control for which lanes in the current QLM to align in timing the
8992                                                                  deassertion of reset to this lane's transmitter's clock divider.
8993                                                                  \<0\> = Wait for lane 0.
8994                                                                  \<1\> = Wait for lane 1.
8995                                                                  \<2\> = Wait for lane 2.
8996                                                                  \<3\> = Wait for lane 3.
8997 
8998                                                                  The bit corresponding to the current Lane is ignored. */
8999         uint64_t reserved_36_39        : 4;
9000         uint64_t txdivrst_algn_qlm_mask : 4; /**< [ 43: 40](R/W) Selection control for which QLMs in this QLM's link group to align in timing the
9001                                                                  deassertion of reset to this lane's transmitter's clock divider.
9002                                                                  \<0\> = Wait for QLM 0.
9003                                                                  \<1\> = Wait for QLM 1.
9004                                                                  \<2\> = Wait for QLM 2.
9005                                                                  \<3\> = Wait for QLM 3.
9006 
9007                                                                  The bit corresponding to the current QLM is ignored. */
9008         uint64_t reserved_44_63        : 20;
9009 #endif /* Word 0 - End */
9010     } s;
9011     /* struct bdk_gsernx_lanex_rstclkmsk_bcfg_s cn; */
9012 };
9013 typedef union bdk_gsernx_lanex_rstclkmsk_bcfg bdk_gsernx_lanex_rstclkmsk_bcfg_t;
9014 
9015 static inline uint64_t BDK_GSERNX_LANEX_RSTCLKMSK_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RSTCLKMSK_BCFG(unsigned long a,unsigned long b)9016 static inline uint64_t BDK_GSERNX_LANEX_RSTCLKMSK_BCFG(unsigned long a, unsigned long b)
9017 {
9018     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
9019         return 0x87e090000470ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
9020     __bdk_csr_fatal("GSERNX_LANEX_RSTCLKMSK_BCFG", 2, a, b, 0, 0);
9021 }
9022 
9023 #define typedef_BDK_GSERNX_LANEX_RSTCLKMSK_BCFG(a,b) bdk_gsernx_lanex_rstclkmsk_bcfg_t
9024 #define bustype_BDK_GSERNX_LANEX_RSTCLKMSK_BCFG(a,b) BDK_CSR_TYPE_RSL
9025 #define basename_BDK_GSERNX_LANEX_RSTCLKMSK_BCFG(a,b) "GSERNX_LANEX_RSTCLKMSK_BCFG"
9026 #define device_bar_BDK_GSERNX_LANEX_RSTCLKMSK_BCFG(a,b) 0x0 /* PF_BAR0 */
9027 #define busnum_BDK_GSERNX_LANEX_RSTCLKMSK_BCFG(a,b) (a)
9028 #define arguments_BDK_GSERNX_LANEX_RSTCLKMSK_BCFG(a,b) (a),(b),-1,-1
9029 
9030 /**
9031  * Register (RSL) gsern#_lane#_rx_0_bcfg
9032  *
9033  * GSER Lane RX Base Configuration Register 0
9034  * Register controls for postcursor overrides from c2 through c9. Each
9035  * override setting has a corresponding enable bit which will cause the
9036  * calibration control logic to use the override register setting instead
9037  * of the calibration result.
9038  */
9039 union bdk_gsernx_lanex_rx_0_bcfg
9040 {
9041     uint64_t u;
9042     struct bdk_gsernx_lanex_rx_0_bcfg_s
9043     {
9044 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
9045         uint64_t reserved_63           : 1;
9046         uint64_t c9_ovrd_en            : 1;  /**< [ 62: 62](R/W) Enable use of [C9_OVRD]. */
9047         uint64_t c9_ovrd               : 6;  /**< [ 61: 56](R/W) 9th postcursor override value. */
9048         uint64_t reserved_55           : 1;
9049         uint64_t c8_ovrd_en            : 1;  /**< [ 54: 54](R/W) Enable use of [C8_OVRD]. */
9050         uint64_t c8_ovrd               : 6;  /**< [ 53: 48](R/W) 8th postcursor override value. */
9051         uint64_t reserved_47           : 1;
9052         uint64_t c7_ovrd_en            : 1;  /**< [ 46: 46](R/W) Enable use of [C7_OVRD]. */
9053         uint64_t c7_ovrd               : 6;  /**< [ 45: 40](R/W) 7th postcursor override value. */
9054         uint64_t reserved_39           : 1;
9055         uint64_t c6_ovrd_en            : 1;  /**< [ 38: 38](R/W) Enable use of [C6_OVRD]. */
9056         uint64_t c6_ovrd               : 6;  /**< [ 37: 32](R/W) 6th postcursor override value. */
9057         uint64_t reserved_31           : 1;
9058         uint64_t c5_ovrd_en            : 1;  /**< [ 30: 30](R/W) Enable use of [C5_OVRD]. */
9059         uint64_t c5_ovrd               : 6;  /**< [ 29: 24](R/W) 5th postcursor override value. */
9060         uint64_t reserved_23           : 1;
9061         uint64_t c4_ovrd_en            : 1;  /**< [ 22: 22](R/W) Enable use of [C4_OVRD]. */
9062         uint64_t c4_ovrd               : 6;  /**< [ 21: 16](R/W) 4th postcursor value override. */
9063         uint64_t reserved_15           : 1;
9064         uint64_t c3_ovrd_en            : 1;  /**< [ 14: 14](R/W) Enable use of [C3_OVRD]. */
9065         uint64_t c3_ovrd               : 6;  /**< [ 13:  8](R/W) 3rd postcursor override value. */
9066         uint64_t reserved_7            : 1;
9067         uint64_t c2_ovrd_en            : 1;  /**< [  6:  6](R/W) Enable use of [C2_OVRD]. */
9068         uint64_t c2_ovrd               : 6;  /**< [  5:  0](R/W) Second postcursor override value. */
9069 #else /* Word 0 - Little Endian */
9070         uint64_t c2_ovrd               : 6;  /**< [  5:  0](R/W) Second postcursor override value. */
9071         uint64_t c2_ovrd_en            : 1;  /**< [  6:  6](R/W) Enable use of [C2_OVRD]. */
9072         uint64_t reserved_7            : 1;
9073         uint64_t c3_ovrd               : 6;  /**< [ 13:  8](R/W) 3rd postcursor override value. */
9074         uint64_t c3_ovrd_en            : 1;  /**< [ 14: 14](R/W) Enable use of [C3_OVRD]. */
9075         uint64_t reserved_15           : 1;
9076         uint64_t c4_ovrd               : 6;  /**< [ 21: 16](R/W) 4th postcursor value override. */
9077         uint64_t c4_ovrd_en            : 1;  /**< [ 22: 22](R/W) Enable use of [C4_OVRD]. */
9078         uint64_t reserved_23           : 1;
9079         uint64_t c5_ovrd               : 6;  /**< [ 29: 24](R/W) 5th postcursor override value. */
9080         uint64_t c5_ovrd_en            : 1;  /**< [ 30: 30](R/W) Enable use of [C5_OVRD]. */
9081         uint64_t reserved_31           : 1;
9082         uint64_t c6_ovrd               : 6;  /**< [ 37: 32](R/W) 6th postcursor override value. */
9083         uint64_t c6_ovrd_en            : 1;  /**< [ 38: 38](R/W) Enable use of [C6_OVRD]. */
9084         uint64_t reserved_39           : 1;
9085         uint64_t c7_ovrd               : 6;  /**< [ 45: 40](R/W) 7th postcursor override value. */
9086         uint64_t c7_ovrd_en            : 1;  /**< [ 46: 46](R/W) Enable use of [C7_OVRD]. */
9087         uint64_t reserved_47           : 1;
9088         uint64_t c8_ovrd               : 6;  /**< [ 53: 48](R/W) 8th postcursor override value. */
9089         uint64_t c8_ovrd_en            : 1;  /**< [ 54: 54](R/W) Enable use of [C8_OVRD]. */
9090         uint64_t reserved_55           : 1;
9091         uint64_t c9_ovrd               : 6;  /**< [ 61: 56](R/W) 9th postcursor override value. */
9092         uint64_t c9_ovrd_en            : 1;  /**< [ 62: 62](R/W) Enable use of [C9_OVRD]. */
9093         uint64_t reserved_63           : 1;
9094 #endif /* Word 0 - End */
9095     } s;
9096     /* struct bdk_gsernx_lanex_rx_0_bcfg_s cn; */
9097 };
9098 typedef union bdk_gsernx_lanex_rx_0_bcfg bdk_gsernx_lanex_rx_0_bcfg_t;
9099 
9100 static inline uint64_t BDK_GSERNX_LANEX_RX_0_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_0_BCFG(unsigned long a,unsigned long b)9101 static inline uint64_t BDK_GSERNX_LANEX_RX_0_BCFG(unsigned long a, unsigned long b)
9102 {
9103     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
9104         return 0x87e090000c60ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
9105     __bdk_csr_fatal("GSERNX_LANEX_RX_0_BCFG", 2, a, b, 0, 0);
9106 }
9107 
9108 #define typedef_BDK_GSERNX_LANEX_RX_0_BCFG(a,b) bdk_gsernx_lanex_rx_0_bcfg_t
9109 #define bustype_BDK_GSERNX_LANEX_RX_0_BCFG(a,b) BDK_CSR_TYPE_RSL
9110 #define basename_BDK_GSERNX_LANEX_RX_0_BCFG(a,b) "GSERNX_LANEX_RX_0_BCFG"
9111 #define device_bar_BDK_GSERNX_LANEX_RX_0_BCFG(a,b) 0x0 /* PF_BAR0 */
9112 #define busnum_BDK_GSERNX_LANEX_RX_0_BCFG(a,b) (a)
9113 #define arguments_BDK_GSERNX_LANEX_RX_0_BCFG(a,b) (a),(b),-1,-1
9114 
9115 /**
9116  * Register (RSL) gsern#_lane#_rx_0_bsts
9117  *
9118  * GSER Lane RX Base Status Register 0
9119  * Status registers for postcursor values (either calibration results or
9120  * overrides) from c2 through c9. Values in this register are only valid if
9121  * GSERN()_LANE()_RX_5_BSTS[DFE_ADAPT_STATUS] is deasserted (indicating DFE adaptation has
9122  * completed), or if the corresponding CSR override enable is asserted.
9123  */
9124 union bdk_gsernx_lanex_rx_0_bsts
9125 {
9126     uint64_t u;
9127     struct bdk_gsernx_lanex_rx_0_bsts_s
9128     {
9129 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
9130         uint64_t reserved_62_63        : 2;
9131         uint64_t c9                    : 6;  /**< [ 61: 56](RO/H) 9th postcursor value. */
9132         uint64_t reserved_54_55        : 2;
9133         uint64_t c8                    : 6;  /**< [ 53: 48](RO/H) 8th postcursor value. */
9134         uint64_t reserved_46_47        : 2;
9135         uint64_t c7                    : 6;  /**< [ 45: 40](RO/H) 7th postcursor value. */
9136         uint64_t reserved_38_39        : 2;
9137         uint64_t c6                    : 6;  /**< [ 37: 32](RO/H) 6th postcursor value. */
9138         uint64_t reserved_30_31        : 2;
9139         uint64_t c5                    : 6;  /**< [ 29: 24](RO/H) 5th postcursor value. */
9140         uint64_t reserved_22_23        : 2;
9141         uint64_t c4                    : 6;  /**< [ 21: 16](RO/H) 4th postcursor value. */
9142         uint64_t reserved_14_15        : 2;
9143         uint64_t c3                    : 6;  /**< [ 13:  8](RO/H) 3rd postcursor value. */
9144         uint64_t reserved_6_7          : 2;
9145         uint64_t c2                    : 6;  /**< [  5:  0](RO/H) 2nd postcursor value. */
9146 #else /* Word 0 - Little Endian */
9147         uint64_t c2                    : 6;  /**< [  5:  0](RO/H) 2nd postcursor value. */
9148         uint64_t reserved_6_7          : 2;
9149         uint64_t c3                    : 6;  /**< [ 13:  8](RO/H) 3rd postcursor value. */
9150         uint64_t reserved_14_15        : 2;
9151         uint64_t c4                    : 6;  /**< [ 21: 16](RO/H) 4th postcursor value. */
9152         uint64_t reserved_22_23        : 2;
9153         uint64_t c5                    : 6;  /**< [ 29: 24](RO/H) 5th postcursor value. */
9154         uint64_t reserved_30_31        : 2;
9155         uint64_t c6                    : 6;  /**< [ 37: 32](RO/H) 6th postcursor value. */
9156         uint64_t reserved_38_39        : 2;
9157         uint64_t c7                    : 6;  /**< [ 45: 40](RO/H) 7th postcursor value. */
9158         uint64_t reserved_46_47        : 2;
9159         uint64_t c8                    : 6;  /**< [ 53: 48](RO/H) 8th postcursor value. */
9160         uint64_t reserved_54_55        : 2;
9161         uint64_t c9                    : 6;  /**< [ 61: 56](RO/H) 9th postcursor value. */
9162         uint64_t reserved_62_63        : 2;
9163 #endif /* Word 0 - End */
9164     } s;
9165     /* struct bdk_gsernx_lanex_rx_0_bsts_s cn; */
9166 };
9167 typedef union bdk_gsernx_lanex_rx_0_bsts bdk_gsernx_lanex_rx_0_bsts_t;
9168 
9169 static inline uint64_t BDK_GSERNX_LANEX_RX_0_BSTS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_0_BSTS(unsigned long a,unsigned long b)9170 static inline uint64_t BDK_GSERNX_LANEX_RX_0_BSTS(unsigned long a, unsigned long b)
9171 {
9172     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
9173         return 0x87e090001650ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
9174     __bdk_csr_fatal("GSERNX_LANEX_RX_0_BSTS", 2, a, b, 0, 0);
9175 }
9176 
9177 #define typedef_BDK_GSERNX_LANEX_RX_0_BSTS(a,b) bdk_gsernx_lanex_rx_0_bsts_t
9178 #define bustype_BDK_GSERNX_LANEX_RX_0_BSTS(a,b) BDK_CSR_TYPE_RSL
9179 #define basename_BDK_GSERNX_LANEX_RX_0_BSTS(a,b) "GSERNX_LANEX_RX_0_BSTS"
9180 #define device_bar_BDK_GSERNX_LANEX_RX_0_BSTS(a,b) 0x0 /* PF_BAR0 */
9181 #define busnum_BDK_GSERNX_LANEX_RX_0_BSTS(a,b) (a)
9182 #define arguments_BDK_GSERNX_LANEX_RX_0_BSTS(a,b) (a),(b),-1,-1
9183 
9184 /**
9185  * Register (RSL) gsern#_lane#_rx_10_bcfg
9186  *
9187  * GSER Lane RX Base Configuration Register 10
9188  * Configuration registers for LMS adaptation. Deadband increment settings for adaptation.
9189  */
9190 union bdk_gsernx_lanex_rx_10_bcfg
9191 {
9192     uint64_t u;
9193     struct bdk_gsernx_lanex_rx_10_bcfg_s
9194     {
9195 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
9196         uint64_t reserved_60_63        : 4;
9197         uint64_t ctlelte_deadband_inc  : 12; /**< [ 59: 48](R/W) CTLELTE adaptation deadband increment setting.
9198                                                                  12-bit field with 4 integer bits and 8 fraction bits (unsigned). */
9199         uint64_t ctlez_deadband_inc    : 12; /**< [ 47: 36](R/W) CTLEZ adaptation deadband increment setting.
9200                                                                  12-bit field with 4 integer bits and 8 fraction bits (unsigned). */
9201         uint64_t ctle_deadband_inc     : 12; /**< [ 35: 24](R/W) CTLE adaptation deadband increment setting.
9202                                                                  12-bit field with 4 integer bits and 8 fraction bits (unsigned). */
9203         uint64_t dfe_deadband_inc      : 12; /**< [ 23: 12](R/W) Coeff adaptation deadband increment setting.
9204                                                                  12-bit field with 4 integer bits and 8 fraction bits (unsigned). */
9205         uint64_t vga_deadband_inc      : 12; /**< [ 11:  0](R/W) VGA adaptation deadband increment setting.
9206                                                                  12-bit field with 4 integer bits and 8 fraction bits (unsigned). */
9207 #else /* Word 0 - Little Endian */
9208         uint64_t vga_deadband_inc      : 12; /**< [ 11:  0](R/W) VGA adaptation deadband increment setting.
9209                                                                  12-bit field with 4 integer bits and 8 fraction bits (unsigned). */
9210         uint64_t dfe_deadband_inc      : 12; /**< [ 23: 12](R/W) Coeff adaptation deadband increment setting.
9211                                                                  12-bit field with 4 integer bits and 8 fraction bits (unsigned). */
9212         uint64_t ctle_deadband_inc     : 12; /**< [ 35: 24](R/W) CTLE adaptation deadband increment setting.
9213                                                                  12-bit field with 4 integer bits and 8 fraction bits (unsigned). */
9214         uint64_t ctlez_deadband_inc    : 12; /**< [ 47: 36](R/W) CTLEZ adaptation deadband increment setting.
9215                                                                  12-bit field with 4 integer bits and 8 fraction bits (unsigned). */
9216         uint64_t ctlelte_deadband_inc  : 12; /**< [ 59: 48](R/W) CTLELTE adaptation deadband increment setting.
9217                                                                  12-bit field with 4 integer bits and 8 fraction bits (unsigned). */
9218         uint64_t reserved_60_63        : 4;
9219 #endif /* Word 0 - End */
9220     } s;
9221     /* struct bdk_gsernx_lanex_rx_10_bcfg_s cn; */
9222 };
9223 typedef union bdk_gsernx_lanex_rx_10_bcfg bdk_gsernx_lanex_rx_10_bcfg_t;
9224 
9225 static inline uint64_t BDK_GSERNX_LANEX_RX_10_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_10_BCFG(unsigned long a,unsigned long b)9226 static inline uint64_t BDK_GSERNX_LANEX_RX_10_BCFG(unsigned long a, unsigned long b)
9227 {
9228     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
9229         return 0x87e090000d00ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
9230     __bdk_csr_fatal("GSERNX_LANEX_RX_10_BCFG", 2, a, b, 0, 0);
9231 }
9232 
9233 #define typedef_BDK_GSERNX_LANEX_RX_10_BCFG(a,b) bdk_gsernx_lanex_rx_10_bcfg_t
9234 #define bustype_BDK_GSERNX_LANEX_RX_10_BCFG(a,b) BDK_CSR_TYPE_RSL
9235 #define basename_BDK_GSERNX_LANEX_RX_10_BCFG(a,b) "GSERNX_LANEX_RX_10_BCFG"
9236 #define device_bar_BDK_GSERNX_LANEX_RX_10_BCFG(a,b) 0x0 /* PF_BAR0 */
9237 #define busnum_BDK_GSERNX_LANEX_RX_10_BCFG(a,b) (a)
9238 #define arguments_BDK_GSERNX_LANEX_RX_10_BCFG(a,b) (a),(b),-1,-1
9239 
9240 /**
9241  * Register (RSL) gsern#_lane#_rx_10_bsts
9242  *
9243  * GSER Lane RX Base Status Register 10
9244  * Status registers for BLWC LMS adaptation. Current BLWC Deadband settings for adaptation.
9245  */
9246 union bdk_gsernx_lanex_rx_10_bsts
9247 {
9248     uint64_t u;
9249     struct bdk_gsernx_lanex_rx_10_bsts_s
9250     {
9251 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
9252         uint64_t blwc_subrate_now      : 16; /**< [ 63: 48](RO/H) BLWC subrate_now counter value. Only valid when
9253                                                                  GSERN()_LANE()_RX_10_BSTS[BLWC_ADAPT_STATUS] is clear. */
9254         uint64_t reserved_44_47        : 4;
9255         uint64_t blwc_upv_count        : 16; /**< [ 43: 28](RO/H) BLWC up-vote counter value.  Only valid when
9256                                                                  GSERN()_LANE()_RX_10_BSTS[BLWC_ADAPT_STATUS] is clear. */
9257         uint64_t blwc_adapt_status     : 1;  /**< [ 27: 27](RO/H) BLWC adaptation status. When 0, training is inactive. When 1, training is active. */
9258         uint64_t blwc_adapt_count      : 15; /**< [ 26: 12](RO/H) BLWC adaptation timer current count value.  15-bit field, maximum value 0x7FFF.
9259                                                                  Only valid when GSERN()_LANE()_RX_10_BSTS[BLWC_ADAPT_STATUS] is clear. */
9260         uint64_t blwc_deadband_now     : 12; /**< [ 11:  0](RO/H) Current 12-bit integer value of BLWC adaptation deadband
9261                                                                  setting. Note that the 8 fraction bits of the accumulator are not
9262                                                                  reported. Only valid when GSERN()_LANE()_RX_10_BSTS[BLWC_ADAPT_STATUS] is clear. */
9263 #else /* Word 0 - Little Endian */
9264         uint64_t blwc_deadband_now     : 12; /**< [ 11:  0](RO/H) Current 12-bit integer value of BLWC adaptation deadband
9265                                                                  setting. Note that the 8 fraction bits of the accumulator are not
9266                                                                  reported. Only valid when GSERN()_LANE()_RX_10_BSTS[BLWC_ADAPT_STATUS] is clear. */
9267         uint64_t blwc_adapt_count      : 15; /**< [ 26: 12](RO/H) BLWC adaptation timer current count value.  15-bit field, maximum value 0x7FFF.
9268                                                                  Only valid when GSERN()_LANE()_RX_10_BSTS[BLWC_ADAPT_STATUS] is clear. */
9269         uint64_t blwc_adapt_status     : 1;  /**< [ 27: 27](RO/H) BLWC adaptation status. When 0, training is inactive. When 1, training is active. */
9270         uint64_t blwc_upv_count        : 16; /**< [ 43: 28](RO/H) BLWC up-vote counter value.  Only valid when
9271                                                                  GSERN()_LANE()_RX_10_BSTS[BLWC_ADAPT_STATUS] is clear. */
9272         uint64_t reserved_44_47        : 4;
9273         uint64_t blwc_subrate_now      : 16; /**< [ 63: 48](RO/H) BLWC subrate_now counter value. Only valid when
9274                                                                  GSERN()_LANE()_RX_10_BSTS[BLWC_ADAPT_STATUS] is clear. */
9275 #endif /* Word 0 - End */
9276     } s;
9277     /* struct bdk_gsernx_lanex_rx_10_bsts_s cn; */
9278 };
9279 typedef union bdk_gsernx_lanex_rx_10_bsts bdk_gsernx_lanex_rx_10_bsts_t;
9280 
9281 static inline uint64_t BDK_GSERNX_LANEX_RX_10_BSTS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_10_BSTS(unsigned long a,unsigned long b)9282 static inline uint64_t BDK_GSERNX_LANEX_RX_10_BSTS(unsigned long a, unsigned long b)
9283 {
9284     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
9285         return 0x87e0900016f0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
9286     __bdk_csr_fatal("GSERNX_LANEX_RX_10_BSTS", 2, a, b, 0, 0);
9287 }
9288 
9289 #define typedef_BDK_GSERNX_LANEX_RX_10_BSTS(a,b) bdk_gsernx_lanex_rx_10_bsts_t
9290 #define bustype_BDK_GSERNX_LANEX_RX_10_BSTS(a,b) BDK_CSR_TYPE_RSL
9291 #define basename_BDK_GSERNX_LANEX_RX_10_BSTS(a,b) "GSERNX_LANEX_RX_10_BSTS"
9292 #define device_bar_BDK_GSERNX_LANEX_RX_10_BSTS(a,b) 0x0 /* PF_BAR0 */
9293 #define busnum_BDK_GSERNX_LANEX_RX_10_BSTS(a,b) (a)
9294 #define arguments_BDK_GSERNX_LANEX_RX_10_BSTS(a,b) (a),(b),-1,-1
9295 
9296 /**
9297  * Register (RSL) gsern#_lane#_rx_11_bcfg
9298  *
9299  * GSER Lane RX Base Configuration Register 11
9300  * Configuration registers for Offset Compensation.
9301  */
9302 union bdk_gsernx_lanex_rx_11_bcfg
9303 {
9304     uint64_t u;
9305     struct bdk_gsernx_lanex_rx_11_bcfg_s
9306     {
9307 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
9308         uint64_t reserved_16_63        : 48;
9309         uint64_t afe_oscomp_delay      : 8;  /**< [ 15:  8](R/W) Start delay for the AFE offset compensation, after DFE offset
9310                                                                  compensation completes. */
9311         uint64_t dfe_oscomp_delay      : 8;  /**< [  7:  0](R/W) Start delay for the DFE offset compensation. */
9312 #else /* Word 0 - Little Endian */
9313         uint64_t dfe_oscomp_delay      : 8;  /**< [  7:  0](R/W) Start delay for the DFE offset compensation. */
9314         uint64_t afe_oscomp_delay      : 8;  /**< [ 15:  8](R/W) Start delay for the AFE offset compensation, after DFE offset
9315                                                                  compensation completes. */
9316         uint64_t reserved_16_63        : 48;
9317 #endif /* Word 0 - End */
9318     } s;
9319     /* struct bdk_gsernx_lanex_rx_11_bcfg_s cn; */
9320 };
9321 typedef union bdk_gsernx_lanex_rx_11_bcfg bdk_gsernx_lanex_rx_11_bcfg_t;
9322 
9323 static inline uint64_t BDK_GSERNX_LANEX_RX_11_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_11_BCFG(unsigned long a,unsigned long b)9324 static inline uint64_t BDK_GSERNX_LANEX_RX_11_BCFG(unsigned long a, unsigned long b)
9325 {
9326     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
9327         return 0x87e090000d10ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
9328     __bdk_csr_fatal("GSERNX_LANEX_RX_11_BCFG", 2, a, b, 0, 0);
9329 }
9330 
9331 #define typedef_BDK_GSERNX_LANEX_RX_11_BCFG(a,b) bdk_gsernx_lanex_rx_11_bcfg_t
9332 #define bustype_BDK_GSERNX_LANEX_RX_11_BCFG(a,b) BDK_CSR_TYPE_RSL
9333 #define basename_BDK_GSERNX_LANEX_RX_11_BCFG(a,b) "GSERNX_LANEX_RX_11_BCFG"
9334 #define device_bar_BDK_GSERNX_LANEX_RX_11_BCFG(a,b) 0x0 /* PF_BAR0 */
9335 #define busnum_BDK_GSERNX_LANEX_RX_11_BCFG(a,b) (a)
9336 #define arguments_BDK_GSERNX_LANEX_RX_11_BCFG(a,b) (a),(b),-1,-1
9337 
9338 /**
9339  * Register (RSL) gsern#_lane#_rx_11_bsts
9340  *
9341  * GSER Lane RX Base Status Register 11
9342  * Status registers for PREVGA_GN LMS adaptation. Current PREVGA_GN Deadband settings for adaptation.
9343  */
9344 union bdk_gsernx_lanex_rx_11_bsts
9345 {
9346     uint64_t u;
9347     struct bdk_gsernx_lanex_rx_11_bsts_s
9348     {
9349 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
9350         uint64_t prevga_gn_subrate_now : 16; /**< [ 63: 48](RO/H) PREVGA_GN subrate_now counter value. Only valid when
9351                                                                  GSERN()_LANE()_RX_11_BSTS[PREVGA_GN_ADAPT_STATUS] is clear. */
9352         uint64_t reserved_44_47        : 4;
9353         uint64_t prevga_gn_upv_count   : 16; /**< [ 43: 28](RO/H) PREVGA_GN up-vote counter value.  Only valid when
9354                                                                  GSERN()_LANE()_RX_11_BSTS[PREVGA_GN_ADAPT_STATUS] is clear. */
9355         uint64_t prevga_gn_adapt_status : 1; /**< [ 27: 27](RO/H) PREVGA_GN adaptation status. When 0, training is inactive. When 1, training is active. */
9356         uint64_t prevga_gn_adapt_count : 15; /**< [ 26: 12](RO/H) PREVGA_GN adaptation timer current count value.  15-bit field, maximum value 0x7FFF.
9357                                                                  Only valid when GSERN()_LANE()_RX_11_BSTS[PREVGA_GN_ADAPT_STATUS] is clear. */
9358         uint64_t prevga_gn_deadband_now : 12;/**< [ 11:  0](RO/H) Current 12-bit integer value of PREVGA_GN adaptation deadband
9359                                                                  setting. Note that the 8 fraction bits of the accumulator are not
9360                                                                  reported. Only valid when GSERN()_LANE()_RX_11_BSTS[PREVGA_GN_ADAPT_STATUS] is clear. */
9361 #else /* Word 0 - Little Endian */
9362         uint64_t prevga_gn_deadband_now : 12;/**< [ 11:  0](RO/H) Current 12-bit integer value of PREVGA_GN adaptation deadband
9363                                                                  setting. Note that the 8 fraction bits of the accumulator are not
9364                                                                  reported. Only valid when GSERN()_LANE()_RX_11_BSTS[PREVGA_GN_ADAPT_STATUS] is clear. */
9365         uint64_t prevga_gn_adapt_count : 15; /**< [ 26: 12](RO/H) PREVGA_GN adaptation timer current count value.  15-bit field, maximum value 0x7FFF.
9366                                                                  Only valid when GSERN()_LANE()_RX_11_BSTS[PREVGA_GN_ADAPT_STATUS] is clear. */
9367         uint64_t prevga_gn_adapt_status : 1; /**< [ 27: 27](RO/H) PREVGA_GN adaptation status. When 0, training is inactive. When 1, training is active. */
9368         uint64_t prevga_gn_upv_count   : 16; /**< [ 43: 28](RO/H) PREVGA_GN up-vote counter value.  Only valid when
9369                                                                  GSERN()_LANE()_RX_11_BSTS[PREVGA_GN_ADAPT_STATUS] is clear. */
9370         uint64_t reserved_44_47        : 4;
9371         uint64_t prevga_gn_subrate_now : 16; /**< [ 63: 48](RO/H) PREVGA_GN subrate_now counter value. Only valid when
9372                                                                  GSERN()_LANE()_RX_11_BSTS[PREVGA_GN_ADAPT_STATUS] is clear. */
9373 #endif /* Word 0 - End */
9374     } s;
9375     /* struct bdk_gsernx_lanex_rx_11_bsts_s cn; */
9376 };
9377 typedef union bdk_gsernx_lanex_rx_11_bsts bdk_gsernx_lanex_rx_11_bsts_t;
9378 
9379 static inline uint64_t BDK_GSERNX_LANEX_RX_11_BSTS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_11_BSTS(unsigned long a,unsigned long b)9380 static inline uint64_t BDK_GSERNX_LANEX_RX_11_BSTS(unsigned long a, unsigned long b)
9381 {
9382     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
9383         return 0x87e090001700ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
9384     __bdk_csr_fatal("GSERNX_LANEX_RX_11_BSTS", 2, a, b, 0, 0);
9385 }
9386 
9387 #define typedef_BDK_GSERNX_LANEX_RX_11_BSTS(a,b) bdk_gsernx_lanex_rx_11_bsts_t
9388 #define bustype_BDK_GSERNX_LANEX_RX_11_BSTS(a,b) BDK_CSR_TYPE_RSL
9389 #define basename_BDK_GSERNX_LANEX_RX_11_BSTS(a,b) "GSERNX_LANEX_RX_11_BSTS"
9390 #define device_bar_BDK_GSERNX_LANEX_RX_11_BSTS(a,b) 0x0 /* PF_BAR0 */
9391 #define busnum_BDK_GSERNX_LANEX_RX_11_BSTS(a,b) (a)
9392 #define arguments_BDK_GSERNX_LANEX_RX_11_BSTS(a,b) (a),(b),-1,-1
9393 
9394 /**
9395  * Register (RSL) gsern#_lane#_rx_12_bcfg
9396  *
9397  * GSER Lane RX Base Configuration Register 12
9398  * Configuration registers for AFE Offset Adaptation.
9399  */
9400 union bdk_gsernx_lanex_rx_12_bcfg
9401 {
9402     uint64_t u;
9403     struct bdk_gsernx_lanex_rx_12_bcfg_s
9404     {
9405 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
9406         uint64_t reserved_52_63        : 12;
9407         uint64_t afeos_leak_sgn        : 1;  /**< [ 51: 51](R/W) AFEOS leak sign. 0 = Positive (add). 1 = Negative (subtract). */
9408         uint64_t afeos_deadband        : 12; /**< [ 50: 39](R/W) AFE OS adaptation deadband settings.
9409                                                                  12-bit field to match accumulator, but typically a value less than 0x0FF is used. */
9410         uint64_t afeos_deadband_inc    : 12; /**< [ 38: 27](R/W) AFE OS adaptation deadband increment setting.
9411                                                                  12-bit field with 4 integer bits and 8 fraction bits (unsigned). */
9412         uint64_t afeos_leak            : 3;  /**< [ 26: 24](R/W) AFEOS adaptation leak parameter setting.
9413                                                                    0x0 = 1/128.
9414                                                                    0x1 = 1/64.
9415                                                                    0x2 = 1/32.
9416                                                                    0x3 = 1/16.
9417                                                                    0x4 = 1/8.
9418                                                                    0x5 = 1/4.
9419                                                                    0x6 = 1/2.
9420                                                                    0x7 = Disabled. */
9421         uint64_t reserved_19_23        : 5;
9422         uint64_t afeos_mu              : 3;  /**< [ 18: 16](R/W) AFEOS adaptation mu parameter setting.
9423                                                                    0x0 = 1/16.
9424                                                                    0x1 = 1/8.
9425                                                                    0x2 = 1/4.
9426                                                                    0x3 = 1/2.
9427                                                                    0x4 = 1.
9428                                                                    0x5 = 2.
9429                                                                    0x6 = 4.
9430                                                                    0x7 = 8. */
9431         uint64_t reserved_15           : 1;
9432         uint64_t afeos_timer_max       : 15; /**< [ 14:  0](R/W) AFEOS adaptation timer maximum count value.
9433                                                                  15-bit field, maximum value 0x7FFF. */
9434 #else /* Word 0 - Little Endian */
9435         uint64_t afeos_timer_max       : 15; /**< [ 14:  0](R/W) AFEOS adaptation timer maximum count value.
9436                                                                  15-bit field, maximum value 0x7FFF. */
9437         uint64_t reserved_15           : 1;
9438         uint64_t afeos_mu              : 3;  /**< [ 18: 16](R/W) AFEOS adaptation mu parameter setting.
9439                                                                    0x0 = 1/16.
9440                                                                    0x1 = 1/8.
9441                                                                    0x2 = 1/4.
9442                                                                    0x3 = 1/2.
9443                                                                    0x4 = 1.
9444                                                                    0x5 = 2.
9445                                                                    0x6 = 4.
9446                                                                    0x7 = 8. */
9447         uint64_t reserved_19_23        : 5;
9448         uint64_t afeos_leak            : 3;  /**< [ 26: 24](R/W) AFEOS adaptation leak parameter setting.
9449                                                                    0x0 = 1/128.
9450                                                                    0x1 = 1/64.
9451                                                                    0x2 = 1/32.
9452                                                                    0x3 = 1/16.
9453                                                                    0x4 = 1/8.
9454                                                                    0x5 = 1/4.
9455                                                                    0x6 = 1/2.
9456                                                                    0x7 = Disabled. */
9457         uint64_t afeos_deadband_inc    : 12; /**< [ 38: 27](R/W) AFE OS adaptation deadband increment setting.
9458                                                                  12-bit field with 4 integer bits and 8 fraction bits (unsigned). */
9459         uint64_t afeos_deadband        : 12; /**< [ 50: 39](R/W) AFE OS adaptation deadband settings.
9460                                                                  12-bit field to match accumulator, but typically a value less than 0x0FF is used. */
9461         uint64_t afeos_leak_sgn        : 1;  /**< [ 51: 51](R/W) AFEOS leak sign. 0 = Positive (add). 1 = Negative (subtract). */
9462         uint64_t reserved_52_63        : 12;
9463 #endif /* Word 0 - End */
9464     } s;
9465     /* struct bdk_gsernx_lanex_rx_12_bcfg_s cn; */
9466 };
9467 typedef union bdk_gsernx_lanex_rx_12_bcfg bdk_gsernx_lanex_rx_12_bcfg_t;
9468 
9469 static inline uint64_t BDK_GSERNX_LANEX_RX_12_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_12_BCFG(unsigned long a,unsigned long b)9470 static inline uint64_t BDK_GSERNX_LANEX_RX_12_BCFG(unsigned long a, unsigned long b)
9471 {
9472     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
9473         return 0x87e090000d20ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
9474     __bdk_csr_fatal("GSERNX_LANEX_RX_12_BCFG", 2, a, b, 0, 0);
9475 }
9476 
9477 #define typedef_BDK_GSERNX_LANEX_RX_12_BCFG(a,b) bdk_gsernx_lanex_rx_12_bcfg_t
9478 #define bustype_BDK_GSERNX_LANEX_RX_12_BCFG(a,b) BDK_CSR_TYPE_RSL
9479 #define basename_BDK_GSERNX_LANEX_RX_12_BCFG(a,b) "GSERNX_LANEX_RX_12_BCFG"
9480 #define device_bar_BDK_GSERNX_LANEX_RX_12_BCFG(a,b) 0x0 /* PF_BAR0 */
9481 #define busnum_BDK_GSERNX_LANEX_RX_12_BCFG(a,b) (a)
9482 #define arguments_BDK_GSERNX_LANEX_RX_12_BCFG(a,b) (a),(b),-1,-1
9483 
9484 /**
9485  * Register (RSL) gsern#_lane#_rx_13_bcfg
9486  *
9487  * GSER Lane RX Base Configuration Register 13
9488  * Configuration registers for AFE LMS adaptation
9489  * Adaptation controls for Subrate parameters.
9490  */
9491 union bdk_gsernx_lanex_rx_13_bcfg
9492 {
9493     uint64_t u;
9494     struct bdk_gsernx_lanex_rx_13_bcfg_s
9495     {
9496 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
9497         uint64_t reserved_35_63        : 29;
9498         uint64_t afeos_subrate_scale   : 3;  /**< [ 34: 32](R/W) AFE subrate now counter scaling value for comparison against the up vote counter.
9499                                                                    0x0 = 1/32.
9500                                                                    0x1 = 1/16.
9501                                                                    0x2 = 3/32.
9502                                                                    0x3 = 1/8.
9503                                                                    0x4 = 3/16.
9504                                                                    0x5 = 1/4.
9505                                                                    0x6 = 3/8.
9506                                                                    0x7 = 1/2. */
9507         uint64_t afeos_subrate_init    : 16; /**< [ 31: 16](R/W) Subrate counter initial value. Sets the starting value for the LMS update interval, if
9508                                                                  subrate gearshifting is enabled.
9509                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
9510         uint64_t afeos_subrate_final   : 16; /**< [ 15:  0](R/W) Subrate counter final value. Sets the ending value for the LMS update interval, if subrate
9511                                                                  gearshifting is enabled.
9512                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
9513 #else /* Word 0 - Little Endian */
9514         uint64_t afeos_subrate_final   : 16; /**< [ 15:  0](R/W) Subrate counter final value. Sets the ending value for the LMS update interval, if subrate
9515                                                                  gearshifting is enabled.
9516                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
9517         uint64_t afeos_subrate_init    : 16; /**< [ 31: 16](R/W) Subrate counter initial value. Sets the starting value for the LMS update interval, if
9518                                                                  subrate gearshifting is enabled.
9519                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
9520         uint64_t afeos_subrate_scale   : 3;  /**< [ 34: 32](R/W) AFE subrate now counter scaling value for comparison against the up vote counter.
9521                                                                    0x0 = 1/32.
9522                                                                    0x1 = 1/16.
9523                                                                    0x2 = 3/32.
9524                                                                    0x3 = 1/8.
9525                                                                    0x4 = 3/16.
9526                                                                    0x5 = 1/4.
9527                                                                    0x6 = 3/8.
9528                                                                    0x7 = 1/2. */
9529         uint64_t reserved_35_63        : 29;
9530 #endif /* Word 0 - End */
9531     } s;
9532     /* struct bdk_gsernx_lanex_rx_13_bcfg_s cn; */
9533 };
9534 typedef union bdk_gsernx_lanex_rx_13_bcfg bdk_gsernx_lanex_rx_13_bcfg_t;
9535 
9536 static inline uint64_t BDK_GSERNX_LANEX_RX_13_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_13_BCFG(unsigned long a,unsigned long b)9537 static inline uint64_t BDK_GSERNX_LANEX_RX_13_BCFG(unsigned long a, unsigned long b)
9538 {
9539     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
9540         return 0x87e090000d30ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
9541     __bdk_csr_fatal("GSERNX_LANEX_RX_13_BCFG", 2, a, b, 0, 0);
9542 }
9543 
9544 #define typedef_BDK_GSERNX_LANEX_RX_13_BCFG(a,b) bdk_gsernx_lanex_rx_13_bcfg_t
9545 #define bustype_BDK_GSERNX_LANEX_RX_13_BCFG(a,b) BDK_CSR_TYPE_RSL
9546 #define basename_BDK_GSERNX_LANEX_RX_13_BCFG(a,b) "GSERNX_LANEX_RX_13_BCFG"
9547 #define device_bar_BDK_GSERNX_LANEX_RX_13_BCFG(a,b) 0x0 /* PF_BAR0 */
9548 #define busnum_BDK_GSERNX_LANEX_RX_13_BCFG(a,b) (a)
9549 #define arguments_BDK_GSERNX_LANEX_RX_13_BCFG(a,b) (a),(b),-1,-1
9550 
9551 /**
9552  * Register (RSL) gsern#_lane#_rx_14_bcfg
9553  *
9554  * GSER Lane RX Base Configuration Register 14
9555  * This register configures LMS adaptation.
9556  */
9557 union bdk_gsernx_lanex_rx_14_bcfg
9558 {
9559     uint64_t u;
9560     struct bdk_gsernx_lanex_rx_14_bcfg_s
9561     {
9562 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
9563         uint64_t reserved_44_63        : 20;
9564         uint64_t c6_c15_limit_hi       : 6;  /**< [ 43: 38](R/W) C6 to C15 postcursor limit high. */
9565         uint64_t c6_c15_limit_lo       : 6;  /**< [ 37: 32](R/W) C6 to C15 postcursor limit low. */
9566         uint64_t reserved_24_31        : 8;
9567         uint64_t dfe_c1_deadband       : 12; /**< [ 23: 12](R/W) DFE C1 adaptation deadband settings.
9568                                                                  12-bit field to match accumulator, but typically a value less than 0x0FF is used. */
9569         uint64_t dfe_c1_deadband_inc   : 12; /**< [ 11:  0](R/W) DFE C1 adaptation deadband increment setting.
9570                                                                  12-bit field with 4 integer bits and 8 fraction bits (unsigned). */
9571 #else /* Word 0 - Little Endian */
9572         uint64_t dfe_c1_deadband_inc   : 12; /**< [ 11:  0](R/W) DFE C1 adaptation deadband increment setting.
9573                                                                  12-bit field with 4 integer bits and 8 fraction bits (unsigned). */
9574         uint64_t dfe_c1_deadband       : 12; /**< [ 23: 12](R/W) DFE C1 adaptation deadband settings.
9575                                                                  12-bit field to match accumulator, but typically a value less than 0x0FF is used. */
9576         uint64_t reserved_24_31        : 8;
9577         uint64_t c6_c15_limit_lo       : 6;  /**< [ 37: 32](R/W) C6 to C15 postcursor limit low. */
9578         uint64_t c6_c15_limit_hi       : 6;  /**< [ 43: 38](R/W) C6 to C15 postcursor limit high. */
9579         uint64_t reserved_44_63        : 20;
9580 #endif /* Word 0 - End */
9581     } s;
9582     /* struct bdk_gsernx_lanex_rx_14_bcfg_s cn; */
9583 };
9584 typedef union bdk_gsernx_lanex_rx_14_bcfg bdk_gsernx_lanex_rx_14_bcfg_t;
9585 
9586 static inline uint64_t BDK_GSERNX_LANEX_RX_14_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_14_BCFG(unsigned long a,unsigned long b)9587 static inline uint64_t BDK_GSERNX_LANEX_RX_14_BCFG(unsigned long a, unsigned long b)
9588 {
9589     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
9590         return 0x87e090000d40ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
9591     __bdk_csr_fatal("GSERNX_LANEX_RX_14_BCFG", 2, a, b, 0, 0);
9592 }
9593 
9594 #define typedef_BDK_GSERNX_LANEX_RX_14_BCFG(a,b) bdk_gsernx_lanex_rx_14_bcfg_t
9595 #define bustype_BDK_GSERNX_LANEX_RX_14_BCFG(a,b) BDK_CSR_TYPE_RSL
9596 #define basename_BDK_GSERNX_LANEX_RX_14_BCFG(a,b) "GSERNX_LANEX_RX_14_BCFG"
9597 #define device_bar_BDK_GSERNX_LANEX_RX_14_BCFG(a,b) 0x0 /* PF_BAR0 */
9598 #define busnum_BDK_GSERNX_LANEX_RX_14_BCFG(a,b) (a)
9599 #define arguments_BDK_GSERNX_LANEX_RX_14_BCFG(a,b) (a),(b),-1,-1
9600 
9601 /**
9602  * Register (RSL) gsern#_lane#_rx_15_bcfg
9603  *
9604  * GSER Lane RX Base Configuration Register 15
9605  * This register configures LMS adaptation.
9606  */
9607 union bdk_gsernx_lanex_rx_15_bcfg
9608 {
9609     uint64_t u;
9610     struct bdk_gsernx_lanex_rx_15_bcfg_s
9611     {
9612 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
9613         uint64_t reserved_62_63        : 2;
9614         uint64_t c5_limit_hi           : 6;  /**< [ 61: 56](R/W) C5 postcursor limit high. */
9615         uint64_t c4_limit_hi           : 6;  /**< [ 55: 50](R/W) C4 postcursor limit high. */
9616         uint64_t c3_limit_hi           : 6;  /**< [ 49: 44](R/W) C3 postcursor limit high. */
9617         uint64_t c2_limit_hi           : 6;  /**< [ 43: 38](R/W) C2 postcursor limit high. */
9618         uint64_t c1_limit_hi           : 6;  /**< [ 37: 32](R/W) C1 postcursor limit high. */
9619         uint64_t reserved_30_31        : 2;
9620         uint64_t c5_limit_lo           : 6;  /**< [ 29: 24](R/W) C5 postcursor limit low. */
9621         uint64_t c4_limit_lo           : 6;  /**< [ 23: 18](R/W) C4 postcursor limit low. */
9622         uint64_t c3_limit_lo           : 6;  /**< [ 17: 12](R/W) C3 postcursor limit low. */
9623         uint64_t c2_limit_lo           : 6;  /**< [ 11:  6](R/W) C2 postcursor limit low. */
9624         uint64_t c1_limit_lo           : 6;  /**< [  5:  0](R/W) C1 postcursor limit low. */
9625 #else /* Word 0 - Little Endian */
9626         uint64_t c1_limit_lo           : 6;  /**< [  5:  0](R/W) C1 postcursor limit low. */
9627         uint64_t c2_limit_lo           : 6;  /**< [ 11:  6](R/W) C2 postcursor limit low. */
9628         uint64_t c3_limit_lo           : 6;  /**< [ 17: 12](R/W) C3 postcursor limit low. */
9629         uint64_t c4_limit_lo           : 6;  /**< [ 23: 18](R/W) C4 postcursor limit low. */
9630         uint64_t c5_limit_lo           : 6;  /**< [ 29: 24](R/W) C5 postcursor limit low. */
9631         uint64_t reserved_30_31        : 2;
9632         uint64_t c1_limit_hi           : 6;  /**< [ 37: 32](R/W) C1 postcursor limit high. */
9633         uint64_t c2_limit_hi           : 6;  /**< [ 43: 38](R/W) C2 postcursor limit high. */
9634         uint64_t c3_limit_hi           : 6;  /**< [ 49: 44](R/W) C3 postcursor limit high. */
9635         uint64_t c4_limit_hi           : 6;  /**< [ 55: 50](R/W) C4 postcursor limit high. */
9636         uint64_t c5_limit_hi           : 6;  /**< [ 61: 56](R/W) C5 postcursor limit high. */
9637         uint64_t reserved_62_63        : 2;
9638 #endif /* Word 0 - End */
9639     } s;
9640     /* struct bdk_gsernx_lanex_rx_15_bcfg_s cn; */
9641 };
9642 typedef union bdk_gsernx_lanex_rx_15_bcfg bdk_gsernx_lanex_rx_15_bcfg_t;
9643 
9644 static inline uint64_t BDK_GSERNX_LANEX_RX_15_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_15_BCFG(unsigned long a,unsigned long b)9645 static inline uint64_t BDK_GSERNX_LANEX_RX_15_BCFG(unsigned long a, unsigned long b)
9646 {
9647     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
9648         return 0x87e090000d50ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
9649     __bdk_csr_fatal("GSERNX_LANEX_RX_15_BCFG", 2, a, b, 0, 0);
9650 }
9651 
9652 #define typedef_BDK_GSERNX_LANEX_RX_15_BCFG(a,b) bdk_gsernx_lanex_rx_15_bcfg_t
9653 #define bustype_BDK_GSERNX_LANEX_RX_15_BCFG(a,b) BDK_CSR_TYPE_RSL
9654 #define basename_BDK_GSERNX_LANEX_RX_15_BCFG(a,b) "GSERNX_LANEX_RX_15_BCFG"
9655 #define device_bar_BDK_GSERNX_LANEX_RX_15_BCFG(a,b) 0x0 /* PF_BAR0 */
9656 #define busnum_BDK_GSERNX_LANEX_RX_15_BCFG(a,b) (a)
9657 #define arguments_BDK_GSERNX_LANEX_RX_15_BCFG(a,b) (a),(b),-1,-1
9658 
9659 /**
9660  * Register (RSL) gsern#_lane#_rx_16_bcfg
9661  *
9662  * GSER Lane RX Base Configuration Register 16
9663  * Override registers for LMS adaptation. Deadband settings for adaptation.
9664  */
9665 union bdk_gsernx_lanex_rx_16_bcfg
9666 {
9667     uint64_t u;
9668     struct bdk_gsernx_lanex_rx_16_bcfg_s
9669     {
9670 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
9671         uint64_t reserved_52_63        : 12;
9672         uint64_t ctlez_deadband_now_ovrd_en : 1;/**< [ 51: 51](R/W) Enable use of [CTLEZ_DEADBAND_NOW_OVRD]. */
9673         uint64_t ctlez_deadband_now_ovrd : 12;/**< [ 50: 39](R/W) CTLEZ adaptation deadband now override. */
9674         uint64_t ctle_deadband_now_ovrd_en : 1;/**< [ 38: 38](R/W) Enable use of [CTLE_DEADBAND_NOW_OVRD]. */
9675         uint64_t ctle_deadband_now_ovrd : 12;/**< [ 37: 26](R/W) CTLE adaptation deadband now override. */
9676         uint64_t dfe_deadband_now_ovrd_en : 1;/**< [ 25: 25](R/W) Enable use of [DFE_DEADBAND_NOW_OVRD]. */
9677         uint64_t dfe_deadband_now_ovrd : 12; /**< [ 24: 13](R/W) Coeff Adaptation deadband now override. */
9678         uint64_t vga_deadband_now_ovrd_en : 1;/**< [ 12: 12](R/W) Enable use of [VGA_DEADBAND_NOW_OVRD]. */
9679         uint64_t vga_deadband_now_ovrd : 12; /**< [ 11:  0](R/W) VGA adaptation deadband now override. */
9680 #else /* Word 0 - Little Endian */
9681         uint64_t vga_deadband_now_ovrd : 12; /**< [ 11:  0](R/W) VGA adaptation deadband now override. */
9682         uint64_t vga_deadband_now_ovrd_en : 1;/**< [ 12: 12](R/W) Enable use of [VGA_DEADBAND_NOW_OVRD]. */
9683         uint64_t dfe_deadband_now_ovrd : 12; /**< [ 24: 13](R/W) Coeff Adaptation deadband now override. */
9684         uint64_t dfe_deadband_now_ovrd_en : 1;/**< [ 25: 25](R/W) Enable use of [DFE_DEADBAND_NOW_OVRD]. */
9685         uint64_t ctle_deadband_now_ovrd : 12;/**< [ 37: 26](R/W) CTLE adaptation deadband now override. */
9686         uint64_t ctle_deadband_now_ovrd_en : 1;/**< [ 38: 38](R/W) Enable use of [CTLE_DEADBAND_NOW_OVRD]. */
9687         uint64_t ctlez_deadband_now_ovrd : 12;/**< [ 50: 39](R/W) CTLEZ adaptation deadband now override. */
9688         uint64_t ctlez_deadband_now_ovrd_en : 1;/**< [ 51: 51](R/W) Enable use of [CTLEZ_DEADBAND_NOW_OVRD]. */
9689         uint64_t reserved_52_63        : 12;
9690 #endif /* Word 0 - End */
9691     } s;
9692     /* struct bdk_gsernx_lanex_rx_16_bcfg_s cn; */
9693 };
9694 typedef union bdk_gsernx_lanex_rx_16_bcfg bdk_gsernx_lanex_rx_16_bcfg_t;
9695 
9696 static inline uint64_t BDK_GSERNX_LANEX_RX_16_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_16_BCFG(unsigned long a,unsigned long b)9697 static inline uint64_t BDK_GSERNX_LANEX_RX_16_BCFG(unsigned long a, unsigned long b)
9698 {
9699     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
9700         return 0x87e090000d60ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
9701     __bdk_csr_fatal("GSERNX_LANEX_RX_16_BCFG", 2, a, b, 0, 0);
9702 }
9703 
9704 #define typedef_BDK_GSERNX_LANEX_RX_16_BCFG(a,b) bdk_gsernx_lanex_rx_16_bcfg_t
9705 #define bustype_BDK_GSERNX_LANEX_RX_16_BCFG(a,b) BDK_CSR_TYPE_RSL
9706 #define basename_BDK_GSERNX_LANEX_RX_16_BCFG(a,b) "GSERNX_LANEX_RX_16_BCFG"
9707 #define device_bar_BDK_GSERNX_LANEX_RX_16_BCFG(a,b) 0x0 /* PF_BAR0 */
9708 #define busnum_BDK_GSERNX_LANEX_RX_16_BCFG(a,b) (a)
9709 #define arguments_BDK_GSERNX_LANEX_RX_16_BCFG(a,b) (a),(b),-1,-1
9710 
9711 /**
9712  * Register (RSL) gsern#_lane#_rx_17_bcfg
9713  *
9714  * GSER Lane RX Base Configuration Register 17
9715  * Override registers for LMS adaptation. Deadband settings for adaptation.
9716  */
9717 union bdk_gsernx_lanex_rx_17_bcfg
9718 {
9719     uint64_t u;
9720     struct bdk_gsernx_lanex_rx_17_bcfg_s
9721     {
9722 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
9723         uint64_t reserved_52_63        : 12;
9724         uint64_t blwc_deadband_now_ovrd_en : 1;/**< [ 51: 51](R/W) Enable use of [BLWC_DEADBAND_NOW_OVRD]. */
9725         uint64_t blwc_deadband_now_ovrd : 12;/**< [ 50: 39](R/W) BLWC adaptation deadband now override. */
9726         uint64_t dfe_c1_deadband_now_ovrd_en : 1;/**< [ 38: 38](R/W) Enable use of [DFE_C1_DEADBAND_NOW_OVRD]. */
9727         uint64_t dfe_c1_deadband_now_ovrd : 12;/**< [ 37: 26](R/W) DFE C1 Adaptation deadband now override. */
9728         uint64_t afeos_deadband_now_ovrd_en : 1;/**< [ 25: 25](R/W) Enable use of [AFEOS_DEADBAND_NOW_OVRD]. */
9729         uint64_t afeos_deadband_now_ovrd : 12;/**< [ 24: 13](R/W) AFE OS adaptation deadband now override. */
9730         uint64_t ctlelte_deadband_now_ovrd_en : 1;/**< [ 12: 12](R/W) Enable use of [CTLELTE_DEADBAND_NOW_OVRD]. */
9731         uint64_t ctlelte_deadband_now_ovrd : 12;/**< [ 11:  0](R/W) CTLELTE adaptation deadband now override. */
9732 #else /* Word 0 - Little Endian */
9733         uint64_t ctlelte_deadband_now_ovrd : 12;/**< [ 11:  0](R/W) CTLELTE adaptation deadband now override. */
9734         uint64_t ctlelte_deadband_now_ovrd_en : 1;/**< [ 12: 12](R/W) Enable use of [CTLELTE_DEADBAND_NOW_OVRD]. */
9735         uint64_t afeos_deadband_now_ovrd : 12;/**< [ 24: 13](R/W) AFE OS adaptation deadband now override. */
9736         uint64_t afeos_deadband_now_ovrd_en : 1;/**< [ 25: 25](R/W) Enable use of [AFEOS_DEADBAND_NOW_OVRD]. */
9737         uint64_t dfe_c1_deadband_now_ovrd : 12;/**< [ 37: 26](R/W) DFE C1 Adaptation deadband now override. */
9738         uint64_t dfe_c1_deadband_now_ovrd_en : 1;/**< [ 38: 38](R/W) Enable use of [DFE_C1_DEADBAND_NOW_OVRD]. */
9739         uint64_t blwc_deadband_now_ovrd : 12;/**< [ 50: 39](R/W) BLWC adaptation deadband now override. */
9740         uint64_t blwc_deadband_now_ovrd_en : 1;/**< [ 51: 51](R/W) Enable use of [BLWC_DEADBAND_NOW_OVRD]. */
9741         uint64_t reserved_52_63        : 12;
9742 #endif /* Word 0 - End */
9743     } s;
9744     /* struct bdk_gsernx_lanex_rx_17_bcfg_s cn; */
9745 };
9746 typedef union bdk_gsernx_lanex_rx_17_bcfg bdk_gsernx_lanex_rx_17_bcfg_t;
9747 
9748 static inline uint64_t BDK_GSERNX_LANEX_RX_17_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_17_BCFG(unsigned long a,unsigned long b)9749 static inline uint64_t BDK_GSERNX_LANEX_RX_17_BCFG(unsigned long a, unsigned long b)
9750 {
9751     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
9752         return 0x87e090000d70ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
9753     __bdk_csr_fatal("GSERNX_LANEX_RX_17_BCFG", 2, a, b, 0, 0);
9754 }
9755 
9756 #define typedef_BDK_GSERNX_LANEX_RX_17_BCFG(a,b) bdk_gsernx_lanex_rx_17_bcfg_t
9757 #define bustype_BDK_GSERNX_LANEX_RX_17_BCFG(a,b) BDK_CSR_TYPE_RSL
9758 #define basename_BDK_GSERNX_LANEX_RX_17_BCFG(a,b) "GSERNX_LANEX_RX_17_BCFG"
9759 #define device_bar_BDK_GSERNX_LANEX_RX_17_BCFG(a,b) 0x0 /* PF_BAR0 */
9760 #define busnum_BDK_GSERNX_LANEX_RX_17_BCFG(a,b) (a)
9761 #define arguments_BDK_GSERNX_LANEX_RX_17_BCFG(a,b) (a),(b),-1,-1
9762 
9763 /**
9764  * Register (RSL) gsern#_lane#_rx_18_bcfg
9765  *
9766  * GSER Lane RX Base Configuration Register 18
9767  * Override registers for LMS adaptation. Deadband settings for adaptation.
9768  */
9769 union bdk_gsernx_lanex_rx_18_bcfg
9770 {
9771     uint64_t u;
9772     struct bdk_gsernx_lanex_rx_18_bcfg_s
9773     {
9774 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
9775         uint64_t reserved_51_63        : 13;
9776         uint64_t blwc_subrate_now_ovrd_en : 1;/**< [ 50: 50](R/W) Enable use of [BLWC_SUBRATE_NOW_OVRD]. */
9777         uint64_t afeos_subrate_now_ovrd_en : 1;/**< [ 49: 49](R/W) Enable use of [AFEOS_SUBRATE_NOW_OVRD]. */
9778         uint64_t subrate_now_ovrd_en   : 1;  /**< [ 48: 48](R/W) Enable use of [SUBRATE_NOW_OVRD]. */
9779         uint64_t blwc_subrate_now_ovrd : 16; /**< [ 47: 32](R/W) BLWC Subrate_Now counter override value. */
9780         uint64_t afeos_subrate_now_ovrd : 16;/**< [ 31: 16](R/W) AFEOS Subrate_Now counter override value. */
9781         uint64_t subrate_now_ovrd      : 16; /**< [ 15:  0](R/W) Subrate_Now counter override value. */
9782 #else /* Word 0 - Little Endian */
9783         uint64_t subrate_now_ovrd      : 16; /**< [ 15:  0](R/W) Subrate_Now counter override value. */
9784         uint64_t afeos_subrate_now_ovrd : 16;/**< [ 31: 16](R/W) AFEOS Subrate_Now counter override value. */
9785         uint64_t blwc_subrate_now_ovrd : 16; /**< [ 47: 32](R/W) BLWC Subrate_Now counter override value. */
9786         uint64_t subrate_now_ovrd_en   : 1;  /**< [ 48: 48](R/W) Enable use of [SUBRATE_NOW_OVRD]. */
9787         uint64_t afeos_subrate_now_ovrd_en : 1;/**< [ 49: 49](R/W) Enable use of [AFEOS_SUBRATE_NOW_OVRD]. */
9788         uint64_t blwc_subrate_now_ovrd_en : 1;/**< [ 50: 50](R/W) Enable use of [BLWC_SUBRATE_NOW_OVRD]. */
9789         uint64_t reserved_51_63        : 13;
9790 #endif /* Word 0 - End */
9791     } s;
9792     /* struct bdk_gsernx_lanex_rx_18_bcfg_s cn; */
9793 };
9794 typedef union bdk_gsernx_lanex_rx_18_bcfg bdk_gsernx_lanex_rx_18_bcfg_t;
9795 
9796 static inline uint64_t BDK_GSERNX_LANEX_RX_18_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_18_BCFG(unsigned long a,unsigned long b)9797 static inline uint64_t BDK_GSERNX_LANEX_RX_18_BCFG(unsigned long a, unsigned long b)
9798 {
9799     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
9800         return 0x87e090000d80ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
9801     __bdk_csr_fatal("GSERNX_LANEX_RX_18_BCFG", 2, a, b, 0, 0);
9802 }
9803 
9804 #define typedef_BDK_GSERNX_LANEX_RX_18_BCFG(a,b) bdk_gsernx_lanex_rx_18_bcfg_t
9805 #define bustype_BDK_GSERNX_LANEX_RX_18_BCFG(a,b) BDK_CSR_TYPE_RSL
9806 #define basename_BDK_GSERNX_LANEX_RX_18_BCFG(a,b) "GSERNX_LANEX_RX_18_BCFG"
9807 #define device_bar_BDK_GSERNX_LANEX_RX_18_BCFG(a,b) 0x0 /* PF_BAR0 */
9808 #define busnum_BDK_GSERNX_LANEX_RX_18_BCFG(a,b) (a)
9809 #define arguments_BDK_GSERNX_LANEX_RX_18_BCFG(a,b) (a),(b),-1,-1
9810 
9811 /**
9812  * Register (RSL) gsern#_lane#_rx_19_bcfg
9813  *
9814  * GSER Lane RX Base Configuration Register 19
9815  * Configuration registers for AFE Offset Adaptation.
9816  */
9817 union bdk_gsernx_lanex_rx_19_bcfg
9818 {
9819     uint64_t u;
9820     struct bdk_gsernx_lanex_rx_19_bcfg_s
9821     {
9822 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
9823         uint64_t reserved_57_63        : 7;
9824         uint64_t blwc_leak_sgn         : 1;  /**< [ 56: 56](R/W) BLWC leak sign. 0 = Positive (add). 1 = Negative (subtract). */
9825         uint64_t blwc_updn_len         : 5;  /**< [ 55: 51](R/W) Accumulation length for BLWC drift up/down control. Range is 1 to 20. */
9826         uint64_t blwc_deadband         : 12; /**< [ 50: 39](R/W) BLWC adaptation deadband settings.
9827                                                                  12-bit field to match accumulator, but typically a value less than 0x0FF is used. */
9828         uint64_t blwc_deadband_inc     : 12; /**< [ 38: 27](R/W) BLWC adaptation deadband increment setting.
9829                                                                  12-bit field with 4 integer bits and 8 fraction bits (unsigned). */
9830         uint64_t blwc_leak             : 3;  /**< [ 26: 24](R/W) BLWC adaptation leak parameter setting.
9831                                                                    0x0 = 1/128.
9832                                                                    0x1 = 1/64.
9833                                                                    0x2 = 1/32.
9834                                                                    0x3 = 1/16.
9835                                                                    0x4 = 1/8.
9836                                                                    0x5 = 1/4.
9837                                                                    0x6 = 1/2.
9838                                                                    0x7 = Disabled. */
9839         uint64_t reserved_19_23        : 5;
9840         uint64_t blwc_mu               : 3;  /**< [ 18: 16](R/W) BLWC adaptation mu parameter setting.
9841                                                                    0x0 = 1/16.
9842                                                                    0x1 = 1/8.
9843                                                                    0x2 = 1/4.
9844                                                                    0x3 = 1/2.
9845                                                                    0x4 = 1.
9846                                                                    0x5 = 2.
9847                                                                    0x6 = 4.
9848                                                                    0x7 = 8. */
9849         uint64_t reserved_15           : 1;
9850         uint64_t blwc_timer_max        : 15; /**< [ 14:  0](R/W) BLWC adaptation timer maximum count value.
9851                                                                  15-bit field, maximum value 0x7FFF. */
9852 #else /* Word 0 - Little Endian */
9853         uint64_t blwc_timer_max        : 15; /**< [ 14:  0](R/W) BLWC adaptation timer maximum count value.
9854                                                                  15-bit field, maximum value 0x7FFF. */
9855         uint64_t reserved_15           : 1;
9856         uint64_t blwc_mu               : 3;  /**< [ 18: 16](R/W) BLWC adaptation mu parameter setting.
9857                                                                    0x0 = 1/16.
9858                                                                    0x1 = 1/8.
9859                                                                    0x2 = 1/4.
9860                                                                    0x3 = 1/2.
9861                                                                    0x4 = 1.
9862                                                                    0x5 = 2.
9863                                                                    0x6 = 4.
9864                                                                    0x7 = 8. */
9865         uint64_t reserved_19_23        : 5;
9866         uint64_t blwc_leak             : 3;  /**< [ 26: 24](R/W) BLWC adaptation leak parameter setting.
9867                                                                    0x0 = 1/128.
9868                                                                    0x1 = 1/64.
9869                                                                    0x2 = 1/32.
9870                                                                    0x3 = 1/16.
9871                                                                    0x4 = 1/8.
9872                                                                    0x5 = 1/4.
9873                                                                    0x6 = 1/2.
9874                                                                    0x7 = Disabled. */
9875         uint64_t blwc_deadband_inc     : 12; /**< [ 38: 27](R/W) BLWC adaptation deadband increment setting.
9876                                                                  12-bit field with 4 integer bits and 8 fraction bits (unsigned). */
9877         uint64_t blwc_deadband         : 12; /**< [ 50: 39](R/W) BLWC adaptation deadband settings.
9878                                                                  12-bit field to match accumulator, but typically a value less than 0x0FF is used. */
9879         uint64_t blwc_updn_len         : 5;  /**< [ 55: 51](R/W) Accumulation length for BLWC drift up/down control. Range is 1 to 20. */
9880         uint64_t blwc_leak_sgn         : 1;  /**< [ 56: 56](R/W) BLWC leak sign. 0 = Positive (add). 1 = Negative (subtract). */
9881         uint64_t reserved_57_63        : 7;
9882 #endif /* Word 0 - End */
9883     } s;
9884     /* struct bdk_gsernx_lanex_rx_19_bcfg_s cn; */
9885 };
9886 typedef union bdk_gsernx_lanex_rx_19_bcfg bdk_gsernx_lanex_rx_19_bcfg_t;
9887 
9888 static inline uint64_t BDK_GSERNX_LANEX_RX_19_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_19_BCFG(unsigned long a,unsigned long b)9889 static inline uint64_t BDK_GSERNX_LANEX_RX_19_BCFG(unsigned long a, unsigned long b)
9890 {
9891     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
9892         return 0x87e090000d90ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
9893     __bdk_csr_fatal("GSERNX_LANEX_RX_19_BCFG", 2, a, b, 0, 0);
9894 }
9895 
9896 #define typedef_BDK_GSERNX_LANEX_RX_19_BCFG(a,b) bdk_gsernx_lanex_rx_19_bcfg_t
9897 #define bustype_BDK_GSERNX_LANEX_RX_19_BCFG(a,b) BDK_CSR_TYPE_RSL
9898 #define basename_BDK_GSERNX_LANEX_RX_19_BCFG(a,b) "GSERNX_LANEX_RX_19_BCFG"
9899 #define device_bar_BDK_GSERNX_LANEX_RX_19_BCFG(a,b) 0x0 /* PF_BAR0 */
9900 #define busnum_BDK_GSERNX_LANEX_RX_19_BCFG(a,b) (a)
9901 #define arguments_BDK_GSERNX_LANEX_RX_19_BCFG(a,b) (a),(b),-1,-1
9902 
9903 /**
9904  * Register (RSL) gsern#_lane#_rx_1_bcfg
9905  *
9906  * GSER Lane RX Base Configuration Register 1
9907  * Register controls for postcursor overrides from c10 through c15, and BLWC gain.
9908  * Each override setting has a corresponding enable bit which will cause the
9909  * calibration control logic to use the override register setting instead
9910  * of the calibration result.
9911  */
9912 union bdk_gsernx_lanex_rx_1_bcfg
9913 {
9914     uint64_t u;
9915     struct bdk_gsernx_lanex_rx_1_bcfg_s
9916     {
9917 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
9918         uint64_t reserved_57_63        : 7;
9919         uint64_t prevga_gn_ovrd_en     : 1;  /**< [ 56: 56](R/W) Enable use of [PREVGA_GN_OVRD]. */
9920         uint64_t prevga_gn_ovrd        : 3;  /**< [ 55: 53](R/W) PREVGA_GN gain value override. */
9921         uint64_t blwc_ovrd_en          : 1;  /**< [ 52: 52](R/W) Enable use of [BLWC_OVRD]. */
9922         uint64_t blwc_ovrd             : 5;  /**< [ 51: 47](R/W) BLWC gain value override. */
9923         uint64_t c15_ovrd_en           : 1;  /**< [ 46: 46](R/W) Enable use of [C15_OVRD]. */
9924         uint64_t c15_ovrd              : 6;  /**< [ 45: 40](R/W) 15th postcursor value override. */
9925         uint64_t reserved_39           : 1;
9926         uint64_t c14_ovrd_en           : 1;  /**< [ 38: 38](R/W) Enable use of [C14_OVRD]. */
9927         uint64_t c14_ovrd              : 6;  /**< [ 37: 32](R/W) 14th postcursor value override. */
9928         uint64_t reserved_31           : 1;
9929         uint64_t c13_ovrd_en           : 1;  /**< [ 30: 30](R/W) Enable use of [C13_OVRD]. */
9930         uint64_t c13_ovrd              : 6;  /**< [ 29: 24](R/W) 13th postcursor value override. */
9931         uint64_t reserved_23           : 1;
9932         uint64_t c12_ovrd_en           : 1;  /**< [ 22: 22](R/W) Enable use of [C12_OVRD]. */
9933         uint64_t c12_ovrd              : 6;  /**< [ 21: 16](R/W) 12th postcursor value override. */
9934         uint64_t reserved_15           : 1;
9935         uint64_t c11_ovrd_en           : 1;  /**< [ 14: 14](R/W) Enable use of [C11_OVRD]. */
9936         uint64_t c11_ovrd              : 6;  /**< [ 13:  8](R/W) 11th postcursor value override. */
9937         uint64_t reserved_7            : 1;
9938         uint64_t c10_ovrd_en           : 1;  /**< [  6:  6](R/W) Enable use of [C10_OVRD]. */
9939         uint64_t c10_ovrd              : 6;  /**< [  5:  0](R/W) 10th postcursor value override. */
9940 #else /* Word 0 - Little Endian */
9941         uint64_t c10_ovrd              : 6;  /**< [  5:  0](R/W) 10th postcursor value override. */
9942         uint64_t c10_ovrd_en           : 1;  /**< [  6:  6](R/W) Enable use of [C10_OVRD]. */
9943         uint64_t reserved_7            : 1;
9944         uint64_t c11_ovrd              : 6;  /**< [ 13:  8](R/W) 11th postcursor value override. */
9945         uint64_t c11_ovrd_en           : 1;  /**< [ 14: 14](R/W) Enable use of [C11_OVRD]. */
9946         uint64_t reserved_15           : 1;
9947         uint64_t c12_ovrd              : 6;  /**< [ 21: 16](R/W) 12th postcursor value override. */
9948         uint64_t c12_ovrd_en           : 1;  /**< [ 22: 22](R/W) Enable use of [C12_OVRD]. */
9949         uint64_t reserved_23           : 1;
9950         uint64_t c13_ovrd              : 6;  /**< [ 29: 24](R/W) 13th postcursor value override. */
9951         uint64_t c13_ovrd_en           : 1;  /**< [ 30: 30](R/W) Enable use of [C13_OVRD]. */
9952         uint64_t reserved_31           : 1;
9953         uint64_t c14_ovrd              : 6;  /**< [ 37: 32](R/W) 14th postcursor value override. */
9954         uint64_t c14_ovrd_en           : 1;  /**< [ 38: 38](R/W) Enable use of [C14_OVRD]. */
9955         uint64_t reserved_39           : 1;
9956         uint64_t c15_ovrd              : 6;  /**< [ 45: 40](R/W) 15th postcursor value override. */
9957         uint64_t c15_ovrd_en           : 1;  /**< [ 46: 46](R/W) Enable use of [C15_OVRD]. */
9958         uint64_t blwc_ovrd             : 5;  /**< [ 51: 47](R/W) BLWC gain value override. */
9959         uint64_t blwc_ovrd_en          : 1;  /**< [ 52: 52](R/W) Enable use of [BLWC_OVRD]. */
9960         uint64_t prevga_gn_ovrd        : 3;  /**< [ 55: 53](R/W) PREVGA_GN gain value override. */
9961         uint64_t prevga_gn_ovrd_en     : 1;  /**< [ 56: 56](R/W) Enable use of [PREVGA_GN_OVRD]. */
9962         uint64_t reserved_57_63        : 7;
9963 #endif /* Word 0 - End */
9964     } s;
9965     /* struct bdk_gsernx_lanex_rx_1_bcfg_s cn; */
9966 };
9967 typedef union bdk_gsernx_lanex_rx_1_bcfg bdk_gsernx_lanex_rx_1_bcfg_t;
9968 
9969 static inline uint64_t BDK_GSERNX_LANEX_RX_1_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_1_BCFG(unsigned long a,unsigned long b)9970 static inline uint64_t BDK_GSERNX_LANEX_RX_1_BCFG(unsigned long a, unsigned long b)
9971 {
9972     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
9973         return 0x87e090000c70ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
9974     __bdk_csr_fatal("GSERNX_LANEX_RX_1_BCFG", 2, a, b, 0, 0);
9975 }
9976 
9977 #define typedef_BDK_GSERNX_LANEX_RX_1_BCFG(a,b) bdk_gsernx_lanex_rx_1_bcfg_t
9978 #define bustype_BDK_GSERNX_LANEX_RX_1_BCFG(a,b) BDK_CSR_TYPE_RSL
9979 #define basename_BDK_GSERNX_LANEX_RX_1_BCFG(a,b) "GSERNX_LANEX_RX_1_BCFG"
9980 #define device_bar_BDK_GSERNX_LANEX_RX_1_BCFG(a,b) 0x0 /* PF_BAR0 */
9981 #define busnum_BDK_GSERNX_LANEX_RX_1_BCFG(a,b) (a)
9982 #define arguments_BDK_GSERNX_LANEX_RX_1_BCFG(a,b) (a),(b),-1,-1
9983 
9984 /**
9985  * Register (RSL) gsern#_lane#_rx_1_bsts
9986  *
9987  * GSER Lane RX Base Status Register 1
9988  * Status registers for postcursor values (either calibration results or
9989  * overrides) from c10 through c15. Values in this register are only valid
9990  * if GSERN()_LANE()_RX_5_BSTS[DFE_ADAPT_STATUS] is deasserted (indicating DFE adaptation
9991  * has completed), or if the corresponding CSR override enable is asserted.
9992  */
9993 union bdk_gsernx_lanex_rx_1_bsts
9994 {
9995     uint64_t u;
9996     struct bdk_gsernx_lanex_rx_1_bsts_s
9997     {
9998 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
9999         uint64_t reserved_46_63        : 18;
10000         uint64_t c15                   : 6;  /**< [ 45: 40](RO/H) 15th postcursor value. */
10001         uint64_t reserved_38_39        : 2;
10002         uint64_t c14                   : 6;  /**< [ 37: 32](RO/H) 14th postcursor value. */
10003         uint64_t reserved_30_31        : 2;
10004         uint64_t c13                   : 6;  /**< [ 29: 24](RO/H) 13th postcursor value. */
10005         uint64_t reserved_22_23        : 2;
10006         uint64_t c12                   : 6;  /**< [ 21: 16](RO/H) 12th postcursor value. */
10007         uint64_t reserved_14_15        : 2;
10008         uint64_t c11                   : 6;  /**< [ 13:  8](RO/H) 11th postcursor value. */
10009         uint64_t reserved_6_7          : 2;
10010         uint64_t c10                   : 6;  /**< [  5:  0](RO/H) 10th postcursor value. */
10011 #else /* Word 0 - Little Endian */
10012         uint64_t c10                   : 6;  /**< [  5:  0](RO/H) 10th postcursor value. */
10013         uint64_t reserved_6_7          : 2;
10014         uint64_t c11                   : 6;  /**< [ 13:  8](RO/H) 11th postcursor value. */
10015         uint64_t reserved_14_15        : 2;
10016         uint64_t c12                   : 6;  /**< [ 21: 16](RO/H) 12th postcursor value. */
10017         uint64_t reserved_22_23        : 2;
10018         uint64_t c13                   : 6;  /**< [ 29: 24](RO/H) 13th postcursor value. */
10019         uint64_t reserved_30_31        : 2;
10020         uint64_t c14                   : 6;  /**< [ 37: 32](RO/H) 14th postcursor value. */
10021         uint64_t reserved_38_39        : 2;
10022         uint64_t c15                   : 6;  /**< [ 45: 40](RO/H) 15th postcursor value. */
10023         uint64_t reserved_46_63        : 18;
10024 #endif /* Word 0 - End */
10025     } s;
10026     /* struct bdk_gsernx_lanex_rx_1_bsts_s cn; */
10027 };
10028 typedef union bdk_gsernx_lanex_rx_1_bsts bdk_gsernx_lanex_rx_1_bsts_t;
10029 
10030 static inline uint64_t BDK_GSERNX_LANEX_RX_1_BSTS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_1_BSTS(unsigned long a,unsigned long b)10031 static inline uint64_t BDK_GSERNX_LANEX_RX_1_BSTS(unsigned long a, unsigned long b)
10032 {
10033     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
10034         return 0x87e090001660ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
10035     __bdk_csr_fatal("GSERNX_LANEX_RX_1_BSTS", 2, a, b, 0, 0);
10036 }
10037 
10038 #define typedef_BDK_GSERNX_LANEX_RX_1_BSTS(a,b) bdk_gsernx_lanex_rx_1_bsts_t
10039 #define bustype_BDK_GSERNX_LANEX_RX_1_BSTS(a,b) BDK_CSR_TYPE_RSL
10040 #define basename_BDK_GSERNX_LANEX_RX_1_BSTS(a,b) "GSERNX_LANEX_RX_1_BSTS"
10041 #define device_bar_BDK_GSERNX_LANEX_RX_1_BSTS(a,b) 0x0 /* PF_BAR0 */
10042 #define busnum_BDK_GSERNX_LANEX_RX_1_BSTS(a,b) (a)
10043 #define arguments_BDK_GSERNX_LANEX_RX_1_BSTS(a,b) (a),(b),-1,-1
10044 
10045 /**
10046  * Register (RSL) gsern#_lane#_rx_20_bcfg
10047  *
10048  * GSER Lane RX Base Configuration Register 20
10049  * Configuration registers for BLWC LMS adaptation
10050  * Adaptation controls for Subrate parameters.
10051  */
10052 union bdk_gsernx_lanex_rx_20_bcfg
10053 {
10054     uint64_t u;
10055     struct bdk_gsernx_lanex_rx_20_bcfg_s
10056     {
10057 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
10058         uint64_t reserved_35_63        : 29;
10059         uint64_t blwc_subrate_scale    : 3;  /**< [ 34: 32](R/W) BLWC subrate now counter scaling value for comparison against the up vote counter.
10060                                                                    0x0 = 1/32.
10061                                                                    0x1 = 1/16.
10062                                                                    0x2 = 3/32.
10063                                                                    0x3 = 1/8.
10064                                                                    0x4 = 3/16.
10065                                                                    0x5 = 1/4.
10066                                                                    0x6 = 3/8.
10067                                                                    0x7 = 1/2. */
10068         uint64_t blwc_subrate_init     : 16; /**< [ 31: 16](R/W) Subrate counter initial value. Sets the initial value for the LMS update interval, if
10069                                                                  subrate gearshifting is enabled.
10070                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
10071         uint64_t blwc_subrate_final    : 16; /**< [ 15:  0](R/W) Subrate counter final value. Sets the ending value for the LMS update interval, if subrate
10072                                                                  gearshifting is enabled.
10073                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled.
10074                                                                  Subrate counter final value. */
10075 #else /* Word 0 - Little Endian */
10076         uint64_t blwc_subrate_final    : 16; /**< [ 15:  0](R/W) Subrate counter final value. Sets the ending value for the LMS update interval, if subrate
10077                                                                  gearshifting is enabled.
10078                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled.
10079                                                                  Subrate counter final value. */
10080         uint64_t blwc_subrate_init     : 16; /**< [ 31: 16](R/W) Subrate counter initial value. Sets the initial value for the LMS update interval, if
10081                                                                  subrate gearshifting is enabled.
10082                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
10083         uint64_t blwc_subrate_scale    : 3;  /**< [ 34: 32](R/W) BLWC subrate now counter scaling value for comparison against the up vote counter.
10084                                                                    0x0 = 1/32.
10085                                                                    0x1 = 1/16.
10086                                                                    0x2 = 3/32.
10087                                                                    0x3 = 1/8.
10088                                                                    0x4 = 3/16.
10089                                                                    0x5 = 1/4.
10090                                                                    0x6 = 3/8.
10091                                                                    0x7 = 1/2. */
10092         uint64_t reserved_35_63        : 29;
10093 #endif /* Word 0 - End */
10094     } s;
10095     /* struct bdk_gsernx_lanex_rx_20_bcfg_s cn; */
10096 };
10097 typedef union bdk_gsernx_lanex_rx_20_bcfg bdk_gsernx_lanex_rx_20_bcfg_t;
10098 
10099 static inline uint64_t BDK_GSERNX_LANEX_RX_20_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_20_BCFG(unsigned long a,unsigned long b)10100 static inline uint64_t BDK_GSERNX_LANEX_RX_20_BCFG(unsigned long a, unsigned long b)
10101 {
10102     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
10103         return 0x87e090000da0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
10104     __bdk_csr_fatal("GSERNX_LANEX_RX_20_BCFG", 2, a, b, 0, 0);
10105 }
10106 
10107 #define typedef_BDK_GSERNX_LANEX_RX_20_BCFG(a,b) bdk_gsernx_lanex_rx_20_bcfg_t
10108 #define bustype_BDK_GSERNX_LANEX_RX_20_BCFG(a,b) BDK_CSR_TYPE_RSL
10109 #define basename_BDK_GSERNX_LANEX_RX_20_BCFG(a,b) "GSERNX_LANEX_RX_20_BCFG"
10110 #define device_bar_BDK_GSERNX_LANEX_RX_20_BCFG(a,b) 0x0 /* PF_BAR0 */
10111 #define busnum_BDK_GSERNX_LANEX_RX_20_BCFG(a,b) (a)
10112 #define arguments_BDK_GSERNX_LANEX_RX_20_BCFG(a,b) (a),(b),-1,-1
10113 
10114 /**
10115  * Register (RSL) gsern#_lane#_rx_21_bcfg
10116  *
10117  * GSER Lane RX Base Configuration Register 20
10118  * Configuration registers for PREVGA_GN LMS adaptation
10119  * Adaptation controls for Subrate parameters.
10120  */
10121 union bdk_gsernx_lanex_rx_21_bcfg
10122 {
10123     uint64_t u;
10124     struct bdk_gsernx_lanex_rx_21_bcfg_s
10125     {
10126 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
10127         uint64_t reserved_52_63        : 12;
10128         uint64_t prevga_gn_subrate_now_ovrd_en : 1;/**< [ 51: 51](R/W) Enable use of [PREVGA_GN_SUBRATE_NOW_OVRD]. */
10129         uint64_t prevga_gn_subrate_now_ovrd : 16;/**< [ 50: 35](R/W) PREVGA_GN Subrate_Now counter override value. */
10130         uint64_t prevga_gn_subrate_scale : 3;/**< [ 34: 32](R/W) PREVGA_GN subrate now counter scaling value for comparison against the up vote counter.
10131                                                                    0x0 = 1/32.
10132                                                                    0x1 = 1/16.
10133                                                                    0x2 = 3/32.
10134                                                                    0x3 = 1/8.
10135                                                                    0x4 = 3/16.
10136                                                                    0x5 = 1/4.
10137                                                                    0x6 = 3/8.
10138                                                                    0x7 = 1/2. */
10139         uint64_t prevga_gn_subrate_init : 16;/**< [ 31: 16](R/W) Subrate counter initial value. Sets the initial value for the LMS update interval, if
10140                                                                  subrate gearshifting is enabled.
10141                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
10142         uint64_t prevga_gn_subrate_fin : 16; /**< [ 15:  0](R/W) Subrate counter final value. Sets the ending value for the LMS update interval, if subrate
10143                                                                  gearshifting is enabled.
10144                                                                  Set SUBRATE_INIT = SUBRATE_FIN if subrate gearshifting is not enabled.
10145                                                                  Subrate counter final value. */
10146 #else /* Word 0 - Little Endian */
10147         uint64_t prevga_gn_subrate_fin : 16; /**< [ 15:  0](R/W) Subrate counter final value. Sets the ending value for the LMS update interval, if subrate
10148                                                                  gearshifting is enabled.
10149                                                                  Set SUBRATE_INIT = SUBRATE_FIN if subrate gearshifting is not enabled.
10150                                                                  Subrate counter final value. */
10151         uint64_t prevga_gn_subrate_init : 16;/**< [ 31: 16](R/W) Subrate counter initial value. Sets the initial value for the LMS update interval, if
10152                                                                  subrate gearshifting is enabled.
10153                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
10154         uint64_t prevga_gn_subrate_scale : 3;/**< [ 34: 32](R/W) PREVGA_GN subrate now counter scaling value for comparison against the up vote counter.
10155                                                                    0x0 = 1/32.
10156                                                                    0x1 = 1/16.
10157                                                                    0x2 = 3/32.
10158                                                                    0x3 = 1/8.
10159                                                                    0x4 = 3/16.
10160                                                                    0x5 = 1/4.
10161                                                                    0x6 = 3/8.
10162                                                                    0x7 = 1/2. */
10163         uint64_t prevga_gn_subrate_now_ovrd : 16;/**< [ 50: 35](R/W) PREVGA_GN Subrate_Now counter override value. */
10164         uint64_t prevga_gn_subrate_now_ovrd_en : 1;/**< [ 51: 51](R/W) Enable use of [PREVGA_GN_SUBRATE_NOW_OVRD]. */
10165         uint64_t reserved_52_63        : 12;
10166 #endif /* Word 0 - End */
10167     } s;
10168     /* struct bdk_gsernx_lanex_rx_21_bcfg_s cn; */
10169 };
10170 typedef union bdk_gsernx_lanex_rx_21_bcfg bdk_gsernx_lanex_rx_21_bcfg_t;
10171 
10172 static inline uint64_t BDK_GSERNX_LANEX_RX_21_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_21_BCFG(unsigned long a,unsigned long b)10173 static inline uint64_t BDK_GSERNX_LANEX_RX_21_BCFG(unsigned long a, unsigned long b)
10174 {
10175     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
10176         return 0x87e090000db0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
10177     __bdk_csr_fatal("GSERNX_LANEX_RX_21_BCFG", 2, a, b, 0, 0);
10178 }
10179 
10180 #define typedef_BDK_GSERNX_LANEX_RX_21_BCFG(a,b) bdk_gsernx_lanex_rx_21_bcfg_t
10181 #define bustype_BDK_GSERNX_LANEX_RX_21_BCFG(a,b) BDK_CSR_TYPE_RSL
10182 #define basename_BDK_GSERNX_LANEX_RX_21_BCFG(a,b) "GSERNX_LANEX_RX_21_BCFG"
10183 #define device_bar_BDK_GSERNX_LANEX_RX_21_BCFG(a,b) 0x0 /* PF_BAR0 */
10184 #define busnum_BDK_GSERNX_LANEX_RX_21_BCFG(a,b) (a)
10185 #define arguments_BDK_GSERNX_LANEX_RX_21_BCFG(a,b) (a),(b),-1,-1
10186 
10187 /**
10188  * Register (RSL) gsern#_lane#_rx_22_bcfg
10189  *
10190  * GSER Lane RX Base Configuration Register 22
10191  * Override registers for LMS adaptation. Deadband settings for adaptation.
10192  */
10193 union bdk_gsernx_lanex_rx_22_bcfg
10194 {
10195     uint64_t u;
10196     struct bdk_gsernx_lanex_rx_22_bcfg_s
10197     {
10198 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
10199         uint64_t reserved_52_63        : 12;
10200         uint64_t prevga_gn_deadband_now_ovrd_en : 1;/**< [ 51: 51](R/W) Enable use of [PREVGA_GN_DEADBAND_NOW_OVRD]. */
10201         uint64_t prevga_gn_deadband_now_ovrd : 12;/**< [ 50: 39](R/W) PREVGA_GN adaptation deadband now override. */
10202         uint64_t reserved_0_38         : 39;
10203 #else /* Word 0 - Little Endian */
10204         uint64_t reserved_0_38         : 39;
10205         uint64_t prevga_gn_deadband_now_ovrd : 12;/**< [ 50: 39](R/W) PREVGA_GN adaptation deadband now override. */
10206         uint64_t prevga_gn_deadband_now_ovrd_en : 1;/**< [ 51: 51](R/W) Enable use of [PREVGA_GN_DEADBAND_NOW_OVRD]. */
10207         uint64_t reserved_52_63        : 12;
10208 #endif /* Word 0 - End */
10209     } s;
10210     /* struct bdk_gsernx_lanex_rx_22_bcfg_s cn; */
10211 };
10212 typedef union bdk_gsernx_lanex_rx_22_bcfg bdk_gsernx_lanex_rx_22_bcfg_t;
10213 
10214 static inline uint64_t BDK_GSERNX_LANEX_RX_22_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_22_BCFG(unsigned long a,unsigned long b)10215 static inline uint64_t BDK_GSERNX_LANEX_RX_22_BCFG(unsigned long a, unsigned long b)
10216 {
10217     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
10218         return 0x87e090000dc0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
10219     __bdk_csr_fatal("GSERNX_LANEX_RX_22_BCFG", 2, a, b, 0, 0);
10220 }
10221 
10222 #define typedef_BDK_GSERNX_LANEX_RX_22_BCFG(a,b) bdk_gsernx_lanex_rx_22_bcfg_t
10223 #define bustype_BDK_GSERNX_LANEX_RX_22_BCFG(a,b) BDK_CSR_TYPE_RSL
10224 #define basename_BDK_GSERNX_LANEX_RX_22_BCFG(a,b) "GSERNX_LANEX_RX_22_BCFG"
10225 #define device_bar_BDK_GSERNX_LANEX_RX_22_BCFG(a,b) 0x0 /* PF_BAR0 */
10226 #define busnum_BDK_GSERNX_LANEX_RX_22_BCFG(a,b) (a)
10227 #define arguments_BDK_GSERNX_LANEX_RX_22_BCFG(a,b) (a),(b),-1,-1
10228 
10229 /**
10230  * Register (RSL) gsern#_lane#_rx_23_bcfg
10231  *
10232  * GSER Lane RX Base Configuration Register 23
10233  * Configuration registers for PREVGA_GN gain adaptation.
10234  */
10235 union bdk_gsernx_lanex_rx_23_bcfg
10236 {
10237     uint64_t u;
10238     struct bdk_gsernx_lanex_rx_23_bcfg_s
10239     {
10240 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
10241         uint64_t reserved_52_63        : 12;
10242         uint64_t prevga_gn_leak_sgn    : 1;  /**< [ 51: 51](R/W) PREVGA_GN leak sign. 0 = Positive (add). 1 = Negative (subtract). */
10243         uint64_t prevga_gn_deadband    : 12; /**< [ 50: 39](R/W) PREVGA_GN adaptation deadband settings. Typically a value less than 0x0FF is used. */
10244         uint64_t prevga_gn_deadband_inc : 12;/**< [ 38: 27](R/W) PREVGA_GN adaptation deadband increment setting.
10245                                                                  12-bit field with 4 integer bits and 8 fraction bits (unsigned). */
10246         uint64_t prevga_gn_leak        : 3;  /**< [ 26: 24](R/W) PREVGA_GN adaptation leak parameter setting.
10247                                                                    0x0 = 1/128.
10248                                                                    0x1 = 1/64.
10249                                                                    0x2 = 1/32.
10250                                                                    0x3 = 1/16.
10251                                                                    0x4 = 1/8.
10252                                                                    0x5 = 1/4.
10253                                                                    0x6 = 1/2.
10254                                                                    0x7 = Disabled. */
10255         uint64_t reserved_19_23        : 5;
10256         uint64_t prevga_gn_mu          : 3;  /**< [ 18: 16](R/W) PREVGA_GN adaptation mu parameter setting.
10257                                                                    0x0 = 1/16.
10258                                                                    0x1 = 1/8.
10259                                                                    0x2 = 1/4.
10260                                                                    0x3 = 1/2.
10261                                                                    0x4 = 1.
10262                                                                    0x5 = 2.
10263                                                                    0x6 = 4.
10264                                                                    0x7 = 8. */
10265         uint64_t reserved_15           : 1;
10266         uint64_t prevga_gn_timer_max   : 15; /**< [ 14:  0](R/W) PREVGA_GN adaptation timer maximum count value. */
10267 #else /* Word 0 - Little Endian */
10268         uint64_t prevga_gn_timer_max   : 15; /**< [ 14:  0](R/W) PREVGA_GN adaptation timer maximum count value. */
10269         uint64_t reserved_15           : 1;
10270         uint64_t prevga_gn_mu          : 3;  /**< [ 18: 16](R/W) PREVGA_GN adaptation mu parameter setting.
10271                                                                    0x0 = 1/16.
10272                                                                    0x1 = 1/8.
10273                                                                    0x2 = 1/4.
10274                                                                    0x3 = 1/2.
10275                                                                    0x4 = 1.
10276                                                                    0x5 = 2.
10277                                                                    0x6 = 4.
10278                                                                    0x7 = 8. */
10279         uint64_t reserved_19_23        : 5;
10280         uint64_t prevga_gn_leak        : 3;  /**< [ 26: 24](R/W) PREVGA_GN adaptation leak parameter setting.
10281                                                                    0x0 = 1/128.
10282                                                                    0x1 = 1/64.
10283                                                                    0x2 = 1/32.
10284                                                                    0x3 = 1/16.
10285                                                                    0x4 = 1/8.
10286                                                                    0x5 = 1/4.
10287                                                                    0x6 = 1/2.
10288                                                                    0x7 = Disabled. */
10289         uint64_t prevga_gn_deadband_inc : 12;/**< [ 38: 27](R/W) PREVGA_GN adaptation deadband increment setting.
10290                                                                  12-bit field with 4 integer bits and 8 fraction bits (unsigned). */
10291         uint64_t prevga_gn_deadband    : 12; /**< [ 50: 39](R/W) PREVGA_GN adaptation deadband settings. Typically a value less than 0x0FF is used. */
10292         uint64_t prevga_gn_leak_sgn    : 1;  /**< [ 51: 51](R/W) PREVGA_GN leak sign. 0 = Positive (add). 1 = Negative (subtract). */
10293         uint64_t reserved_52_63        : 12;
10294 #endif /* Word 0 - End */
10295     } s;
10296     /* struct bdk_gsernx_lanex_rx_23_bcfg_s cn; */
10297 };
10298 typedef union bdk_gsernx_lanex_rx_23_bcfg bdk_gsernx_lanex_rx_23_bcfg_t;
10299 
10300 static inline uint64_t BDK_GSERNX_LANEX_RX_23_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_23_BCFG(unsigned long a,unsigned long b)10301 static inline uint64_t BDK_GSERNX_LANEX_RX_23_BCFG(unsigned long a, unsigned long b)
10302 {
10303     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
10304         return 0x87e090000dd0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
10305     __bdk_csr_fatal("GSERNX_LANEX_RX_23_BCFG", 2, a, b, 0, 0);
10306 }
10307 
10308 #define typedef_BDK_GSERNX_LANEX_RX_23_BCFG(a,b) bdk_gsernx_lanex_rx_23_bcfg_t
10309 #define bustype_BDK_GSERNX_LANEX_RX_23_BCFG(a,b) BDK_CSR_TYPE_RSL
10310 #define basename_BDK_GSERNX_LANEX_RX_23_BCFG(a,b) "GSERNX_LANEX_RX_23_BCFG"
10311 #define device_bar_BDK_GSERNX_LANEX_RX_23_BCFG(a,b) 0x0 /* PF_BAR0 */
10312 #define busnum_BDK_GSERNX_LANEX_RX_23_BCFG(a,b) (a)
10313 #define arguments_BDK_GSERNX_LANEX_RX_23_BCFG(a,b) (a),(b),-1,-1
10314 
10315 /**
10316  * Register (RSL) gsern#_lane#_rx_24_bcfg
10317  *
10318  * GSER Lane RX Base Configuration Register 24
10319  * Configuration registers for DFE offset compensation timer.
10320  */
10321 union bdk_gsernx_lanex_rx_24_bcfg
10322 {
10323     uint64_t u;
10324     struct bdk_gsernx_lanex_rx_24_bcfg_s
10325     {
10326 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
10327         uint64_t dfe_oscomp_timer_en   : 1;  /**< [ 63: 63](R/W) Enable for DFE offset compensation timer. When set, allows DFE offset
10328                                                                  compensation timer to trigger DFE offset compensation upon timer expiration. */
10329         uint64_t reserved_32_62        : 31;
10330         uint64_t dfe_oscomp_timer_max  : 32; /**< [ 31:  0](R/W) Maximum value of the DFE offset compensation Timer. When the timer reaches the
10331                                                                  value set by this field, the DFE offset compensation process is triggered. Also,
10332                                                                  when the timer reaches this value, the timer is reset to zero and allowed to
10333                                                                  begin counting again. */
10334 #else /* Word 0 - Little Endian */
10335         uint64_t dfe_oscomp_timer_max  : 32; /**< [ 31:  0](R/W) Maximum value of the DFE offset compensation Timer. When the timer reaches the
10336                                                                  value set by this field, the DFE offset compensation process is triggered. Also,
10337                                                                  when the timer reaches this value, the timer is reset to zero and allowed to
10338                                                                  begin counting again. */
10339         uint64_t reserved_32_62        : 31;
10340         uint64_t dfe_oscomp_timer_en   : 1;  /**< [ 63: 63](R/W) Enable for DFE offset compensation timer. When set, allows DFE offset
10341                                                                  compensation timer to trigger DFE offset compensation upon timer expiration. */
10342 #endif /* Word 0 - End */
10343     } s;
10344     /* struct bdk_gsernx_lanex_rx_24_bcfg_s cn; */
10345 };
10346 typedef union bdk_gsernx_lanex_rx_24_bcfg bdk_gsernx_lanex_rx_24_bcfg_t;
10347 
10348 static inline uint64_t BDK_GSERNX_LANEX_RX_24_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_24_BCFG(unsigned long a,unsigned long b)10349 static inline uint64_t BDK_GSERNX_LANEX_RX_24_BCFG(unsigned long a, unsigned long b)
10350 {
10351     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
10352         return 0x87e090000de0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
10353     __bdk_csr_fatal("GSERNX_LANEX_RX_24_BCFG", 2, a, b, 0, 0);
10354 }
10355 
10356 #define typedef_BDK_GSERNX_LANEX_RX_24_BCFG(a,b) bdk_gsernx_lanex_rx_24_bcfg_t
10357 #define bustype_BDK_GSERNX_LANEX_RX_24_BCFG(a,b) BDK_CSR_TYPE_RSL
10358 #define basename_BDK_GSERNX_LANEX_RX_24_BCFG(a,b) "GSERNX_LANEX_RX_24_BCFG"
10359 #define device_bar_BDK_GSERNX_LANEX_RX_24_BCFG(a,b) 0x0 /* PF_BAR0 */
10360 #define busnum_BDK_GSERNX_LANEX_RX_24_BCFG(a,b) (a)
10361 #define arguments_BDK_GSERNX_LANEX_RX_24_BCFG(a,b) (a),(b),-1,-1
10362 
10363 /**
10364  * Register (RSL) gsern#_lane#_rx_2_bcfg
10365  *
10366  * GSER Lane RX Base Configuration Register 2
10367  * Register controls for first postcursor overrides of even/odd paths. Each
10368  * override setting has a corresponding enable bit which will cause the
10369  * calibration control logic to use the override register setting instead
10370  * of the calibration result.
10371  */
10372 union bdk_gsernx_lanex_rx_2_bcfg
10373 {
10374     uint64_t u;
10375     struct bdk_gsernx_lanex_rx_2_bcfg_s
10376     {
10377 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
10378         uint64_t reserved_63           : 1;
10379         uint64_t c1_1e_ovrd_en         : 1;  /**< [ 62: 62](R/W) Enable use of [C1_1E_OVRD]. */
10380         uint64_t c1_1e_ovrd            : 6;  /**< [ 61: 56](R/W) First postcursor value on odd E path override. */
10381         uint64_t reserved_55           : 1;
10382         uint64_t c1_0e_ovrd_en         : 1;  /**< [ 54: 54](R/W) Enable use of [C1_0E_OVRD]. */
10383         uint64_t c1_0e_ovrd            : 6;  /**< [ 53: 48](R/W) First postcursor value on even E path override. */
10384         uint64_t reserved_47           : 1;
10385         uint64_t c1_1x_ovrd_en         : 1;  /**< [ 46: 46](R/W) Enable use of [C1_1X_OVRD]. */
10386         uint64_t c1_1x_ovrd            : 6;  /**< [ 45: 40](R/W) First postcursor value on odd X path override. */
10387         uint64_t reserved_39           : 1;
10388         uint64_t c1_0x_ovrd_en         : 1;  /**< [ 38: 38](R/W) Enable use of [C1_0X_OVRD]. */
10389         uint64_t c1_0x_ovrd            : 6;  /**< [ 37: 32](R/W) First postcursor value on even X path override. */
10390         uint64_t reserved_31           : 1;
10391         uint64_t c1_1i_ovrd_en         : 1;  /**< [ 30: 30](R/W) Enable use of [C1_1I_OVRD]. */
10392         uint64_t c1_1i_ovrd            : 6;  /**< [ 29: 24](R/W) First postcursor value on odd I path override. */
10393         uint64_t reserved_23           : 1;
10394         uint64_t c1_0i_ovrd_en         : 1;  /**< [ 22: 22](R/W) Enable use of [C1_0I_OVRD]. */
10395         uint64_t c1_0i_ovrd            : 6;  /**< [ 21: 16](R/W) First postcursor value on even I path override. */
10396         uint64_t reserved_15           : 1;
10397         uint64_t c1_1q_ovrd_en         : 1;  /**< [ 14: 14](R/W) Enable use of [C1_1Q_OVRD]. */
10398         uint64_t c1_1q_ovrd            : 6;  /**< [ 13:  8](R/W) First postcursor value on odd Q path override. */
10399         uint64_t reserved_7            : 1;
10400         uint64_t c1_0q_ovrd_en         : 1;  /**< [  6:  6](R/W) Enable use of [C1_0Q_OVRD]. */
10401         uint64_t c1_0q_ovrd            : 6;  /**< [  5:  0](R/W) First postcursor value on even Q path override. */
10402 #else /* Word 0 - Little Endian */
10403         uint64_t c1_0q_ovrd            : 6;  /**< [  5:  0](R/W) First postcursor value on even Q path override. */
10404         uint64_t c1_0q_ovrd_en         : 1;  /**< [  6:  6](R/W) Enable use of [C1_0Q_OVRD]. */
10405         uint64_t reserved_7            : 1;
10406         uint64_t c1_1q_ovrd            : 6;  /**< [ 13:  8](R/W) First postcursor value on odd Q path override. */
10407         uint64_t c1_1q_ovrd_en         : 1;  /**< [ 14: 14](R/W) Enable use of [C1_1Q_OVRD]. */
10408         uint64_t reserved_15           : 1;
10409         uint64_t c1_0i_ovrd            : 6;  /**< [ 21: 16](R/W) First postcursor value on even I path override. */
10410         uint64_t c1_0i_ovrd_en         : 1;  /**< [ 22: 22](R/W) Enable use of [C1_0I_OVRD]. */
10411         uint64_t reserved_23           : 1;
10412         uint64_t c1_1i_ovrd            : 6;  /**< [ 29: 24](R/W) First postcursor value on odd I path override. */
10413         uint64_t c1_1i_ovrd_en         : 1;  /**< [ 30: 30](R/W) Enable use of [C1_1I_OVRD]. */
10414         uint64_t reserved_31           : 1;
10415         uint64_t c1_0x_ovrd            : 6;  /**< [ 37: 32](R/W) First postcursor value on even X path override. */
10416         uint64_t c1_0x_ovrd_en         : 1;  /**< [ 38: 38](R/W) Enable use of [C1_0X_OVRD]. */
10417         uint64_t reserved_39           : 1;
10418         uint64_t c1_1x_ovrd            : 6;  /**< [ 45: 40](R/W) First postcursor value on odd X path override. */
10419         uint64_t c1_1x_ovrd_en         : 1;  /**< [ 46: 46](R/W) Enable use of [C1_1X_OVRD]. */
10420         uint64_t reserved_47           : 1;
10421         uint64_t c1_0e_ovrd            : 6;  /**< [ 53: 48](R/W) First postcursor value on even E path override. */
10422         uint64_t c1_0e_ovrd_en         : 1;  /**< [ 54: 54](R/W) Enable use of [C1_0E_OVRD]. */
10423         uint64_t reserved_55           : 1;
10424         uint64_t c1_1e_ovrd            : 6;  /**< [ 61: 56](R/W) First postcursor value on odd E path override. */
10425         uint64_t c1_1e_ovrd_en         : 1;  /**< [ 62: 62](R/W) Enable use of [C1_1E_OVRD]. */
10426         uint64_t reserved_63           : 1;
10427 #endif /* Word 0 - End */
10428     } s;
10429     /* struct bdk_gsernx_lanex_rx_2_bcfg_s cn; */
10430 };
10431 typedef union bdk_gsernx_lanex_rx_2_bcfg bdk_gsernx_lanex_rx_2_bcfg_t;
10432 
10433 static inline uint64_t BDK_GSERNX_LANEX_RX_2_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_2_BCFG(unsigned long a,unsigned long b)10434 static inline uint64_t BDK_GSERNX_LANEX_RX_2_BCFG(unsigned long a, unsigned long b)
10435 {
10436     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
10437         return 0x87e090000c80ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
10438     __bdk_csr_fatal("GSERNX_LANEX_RX_2_BCFG", 2, a, b, 0, 0);
10439 }
10440 
10441 #define typedef_BDK_GSERNX_LANEX_RX_2_BCFG(a,b) bdk_gsernx_lanex_rx_2_bcfg_t
10442 #define bustype_BDK_GSERNX_LANEX_RX_2_BCFG(a,b) BDK_CSR_TYPE_RSL
10443 #define basename_BDK_GSERNX_LANEX_RX_2_BCFG(a,b) "GSERNX_LANEX_RX_2_BCFG"
10444 #define device_bar_BDK_GSERNX_LANEX_RX_2_BCFG(a,b) 0x0 /* PF_BAR0 */
10445 #define busnum_BDK_GSERNX_LANEX_RX_2_BCFG(a,b) (a)
10446 #define arguments_BDK_GSERNX_LANEX_RX_2_BCFG(a,b) (a),(b),-1,-1
10447 
10448 /**
10449  * Register (RSL) gsern#_lane#_rx_2_bsts
10450  *
10451  * GSER Lane RX Base Status Register 2
10452  * Status registers for first postcursor values (either calibration
10453  * results or overrides) of even/odd paths. Values in this register are
10454  * only valid if GSERN()_LANE()_RX_5_BSTS[DFE_ADAPT_STATUS] is deasserted (indicating DFE
10455  * adaptation has completed), or if the corresponding CSR override enable
10456  * is asserted.
10457  */
10458 union bdk_gsernx_lanex_rx_2_bsts
10459 {
10460     uint64_t u;
10461     struct bdk_gsernx_lanex_rx_2_bsts_s
10462     {
10463 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
10464         uint64_t reserved_62_63        : 2;
10465         uint64_t c1_1e                 : 6;  /**< [ 61: 56](RO/H) First postcursor value on odd E path. */
10466         uint64_t reserved_54_55        : 2;
10467         uint64_t c1_0e                 : 6;  /**< [ 53: 48](RO/H) First postcursor value on even E path. */
10468         uint64_t reserved_46_47        : 2;
10469         uint64_t c1_1x                 : 6;  /**< [ 45: 40](RO/H) First postcursor value on odd X path. */
10470         uint64_t reserved_38_39        : 2;
10471         uint64_t c1_0x                 : 6;  /**< [ 37: 32](RO/H) First postcursor value on even X path. */
10472         uint64_t reserved_30_31        : 2;
10473         uint64_t c1_1i                 : 6;  /**< [ 29: 24](RO/H) First postcursor value on odd I path. */
10474         uint64_t reserved_22_23        : 2;
10475         uint64_t c1_0i                 : 6;  /**< [ 21: 16](RO/H) First postcursor value on even I path. */
10476         uint64_t reserved_14_15        : 2;
10477         uint64_t c1_1q                 : 6;  /**< [ 13:  8](RO/H) First postcursor value on odd Q path. */
10478         uint64_t reserved_6_7          : 2;
10479         uint64_t c1_0q                 : 6;  /**< [  5:  0](RO/H) First postcursor value on even Q path. */
10480 #else /* Word 0 - Little Endian */
10481         uint64_t c1_0q                 : 6;  /**< [  5:  0](RO/H) First postcursor value on even Q path. */
10482         uint64_t reserved_6_7          : 2;
10483         uint64_t c1_1q                 : 6;  /**< [ 13:  8](RO/H) First postcursor value on odd Q path. */
10484         uint64_t reserved_14_15        : 2;
10485         uint64_t c1_0i                 : 6;  /**< [ 21: 16](RO/H) First postcursor value on even I path. */
10486         uint64_t reserved_22_23        : 2;
10487         uint64_t c1_1i                 : 6;  /**< [ 29: 24](RO/H) First postcursor value on odd I path. */
10488         uint64_t reserved_30_31        : 2;
10489         uint64_t c1_0x                 : 6;  /**< [ 37: 32](RO/H) First postcursor value on even X path. */
10490         uint64_t reserved_38_39        : 2;
10491         uint64_t c1_1x                 : 6;  /**< [ 45: 40](RO/H) First postcursor value on odd X path. */
10492         uint64_t reserved_46_47        : 2;
10493         uint64_t c1_0e                 : 6;  /**< [ 53: 48](RO/H) First postcursor value on even E path. */
10494         uint64_t reserved_54_55        : 2;
10495         uint64_t c1_1e                 : 6;  /**< [ 61: 56](RO/H) First postcursor value on odd E path. */
10496         uint64_t reserved_62_63        : 2;
10497 #endif /* Word 0 - End */
10498     } s;
10499     /* struct bdk_gsernx_lanex_rx_2_bsts_s cn; */
10500 };
10501 typedef union bdk_gsernx_lanex_rx_2_bsts bdk_gsernx_lanex_rx_2_bsts_t;
10502 
10503 static inline uint64_t BDK_GSERNX_LANEX_RX_2_BSTS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_2_BSTS(unsigned long a,unsigned long b)10504 static inline uint64_t BDK_GSERNX_LANEX_RX_2_BSTS(unsigned long a, unsigned long b)
10505 {
10506     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
10507         return 0x87e090001670ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
10508     __bdk_csr_fatal("GSERNX_LANEX_RX_2_BSTS", 2, a, b, 0, 0);
10509 }
10510 
10511 #define typedef_BDK_GSERNX_LANEX_RX_2_BSTS(a,b) bdk_gsernx_lanex_rx_2_bsts_t
10512 #define bustype_BDK_GSERNX_LANEX_RX_2_BSTS(a,b) BDK_CSR_TYPE_RSL
10513 #define basename_BDK_GSERNX_LANEX_RX_2_BSTS(a,b) "GSERNX_LANEX_RX_2_BSTS"
10514 #define device_bar_BDK_GSERNX_LANEX_RX_2_BSTS(a,b) 0x0 /* PF_BAR0 */
10515 #define busnum_BDK_GSERNX_LANEX_RX_2_BSTS(a,b) (a)
10516 #define arguments_BDK_GSERNX_LANEX_RX_2_BSTS(a,b) (a),(b),-1,-1
10517 
10518 /**
10519  * Register (RSL) gsern#_lane#_rx_3_bcfg
10520  *
10521  * GSER Lane RX Base Configuration Register 3
10522  * Register controls for calibration muxes and switch enable overrides.
10523  * Some bit is this register are override controls (*_OVRD). Each
10524  * override setting has a corresponding enable which will cause the
10525  * calibration logic to use the override register setting instead of the
10526  * calibration result.
10527  */
10528 union bdk_gsernx_lanex_rx_3_bcfg
10529 {
10530     uint64_t u;
10531     struct bdk_gsernx_lanex_rx_3_bcfg_s
10532     {
10533 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
10534         uint64_t reserved_60_63        : 4;
10535         uint64_t cali1_odd_ovrd_en     : 1;  /**< [ 59: 59](R/W) Enable use of [CALI1_ODD_OVRD]. */
10536         uint64_t cali1_even_ovrd_en    : 1;  /**< [ 58: 58](R/W) Enable use of [CALI1_EVEN_OVRD]. */
10537         uint64_t cali0_odd_ovrd_en     : 1;  /**< [ 57: 57](R/W) Enable use of [CALI0_ODD_OVRD]. */
10538         uint64_t cali0_even_ovrd_en    : 1;  /**< [ 56: 56](R/W) Enable use of [CALI0_EVEN_OVRD]. */
10539         uint64_t cali1_odd_ovrd        : 8;  /**< [ 55: 48](R/W) Input calibration switch enable for speculation path 1
10540                                                                  in odd paths override. */
10541         uint64_t cali1_even_ovrd       : 8;  /**< [ 47: 40](R/W) Input calibration switch enable for speculation path 1
10542                                                                  in even paths override. */
10543         uint64_t cali0_odd_ovrd        : 8;  /**< [ 39: 32](R/W) Input calibration switch enable for speculation path 0
10544                                                                  in odd paths override. */
10545         uint64_t cali0_even_ovrd       : 8;  /**< [ 31: 24](R/W) Input calibration switch enable for speculation path 0
10546                                                                  in even paths override. */
10547         uint64_t reserved_20_23        : 4;
10548         uint64_t calsel_odd_ovrd_en    : 1;  /**< [ 19: 19](R/W) Enable use of [CALSEL_ODD_OVRD]. */
10549         uint64_t calsel_even_ovrd_en   : 1;  /**< [ 18: 18](R/W) Enable use of [CALSEL_EVEN_OVRD]. */
10550         uint64_t calo_odd_ovrd_en      : 1;  /**< [ 17: 17](R/W) Enable use of [CALO_ODD_OVRD]. */
10551         uint64_t calo_even_ovrd_en     : 1;  /**< [ 16: 16](R/W) Enable use of [CALO_EVEN_OVRD]. */
10552         uint64_t calsel_odd_ovrd       : 4;  /**< [ 15: 12](R/W) Odd calibration speculation mux override value. */
10553         uint64_t calsel_even_ovrd      : 4;  /**< [ 11:  8](R/W) Even calibration speculation mux override value. */
10554         uint64_t calo_odd_ovrd         : 4;  /**< [  7:  4](R/W) Odd Slicer output calibration mux control override value. */
10555         uint64_t calo_even_ovrd        : 4;  /**< [  3:  0](R/W) Even Slicer output calibration mux control override value. */
10556 #else /* Word 0 - Little Endian */
10557         uint64_t calo_even_ovrd        : 4;  /**< [  3:  0](R/W) Even Slicer output calibration mux control override value. */
10558         uint64_t calo_odd_ovrd         : 4;  /**< [  7:  4](R/W) Odd Slicer output calibration mux control override value. */
10559         uint64_t calsel_even_ovrd      : 4;  /**< [ 11:  8](R/W) Even calibration speculation mux override value. */
10560         uint64_t calsel_odd_ovrd       : 4;  /**< [ 15: 12](R/W) Odd calibration speculation mux override value. */
10561         uint64_t calo_even_ovrd_en     : 1;  /**< [ 16: 16](R/W) Enable use of [CALO_EVEN_OVRD]. */
10562         uint64_t calo_odd_ovrd_en      : 1;  /**< [ 17: 17](R/W) Enable use of [CALO_ODD_OVRD]. */
10563         uint64_t calsel_even_ovrd_en   : 1;  /**< [ 18: 18](R/W) Enable use of [CALSEL_EVEN_OVRD]. */
10564         uint64_t calsel_odd_ovrd_en    : 1;  /**< [ 19: 19](R/W) Enable use of [CALSEL_ODD_OVRD]. */
10565         uint64_t reserved_20_23        : 4;
10566         uint64_t cali0_even_ovrd       : 8;  /**< [ 31: 24](R/W) Input calibration switch enable for speculation path 0
10567                                                                  in even paths override. */
10568         uint64_t cali0_odd_ovrd        : 8;  /**< [ 39: 32](R/W) Input calibration switch enable for speculation path 0
10569                                                                  in odd paths override. */
10570         uint64_t cali1_even_ovrd       : 8;  /**< [ 47: 40](R/W) Input calibration switch enable for speculation path 1
10571                                                                  in even paths override. */
10572         uint64_t cali1_odd_ovrd        : 8;  /**< [ 55: 48](R/W) Input calibration switch enable for speculation path 1
10573                                                                  in odd paths override. */
10574         uint64_t cali0_even_ovrd_en    : 1;  /**< [ 56: 56](R/W) Enable use of [CALI0_EVEN_OVRD]. */
10575         uint64_t cali0_odd_ovrd_en     : 1;  /**< [ 57: 57](R/W) Enable use of [CALI0_ODD_OVRD]. */
10576         uint64_t cali1_even_ovrd_en    : 1;  /**< [ 58: 58](R/W) Enable use of [CALI1_EVEN_OVRD]. */
10577         uint64_t cali1_odd_ovrd_en     : 1;  /**< [ 59: 59](R/W) Enable use of [CALI1_ODD_OVRD]. */
10578         uint64_t reserved_60_63        : 4;
10579 #endif /* Word 0 - End */
10580     } s;
10581     /* struct bdk_gsernx_lanex_rx_3_bcfg_s cn; */
10582 };
10583 typedef union bdk_gsernx_lanex_rx_3_bcfg bdk_gsernx_lanex_rx_3_bcfg_t;
10584 
10585 static inline uint64_t BDK_GSERNX_LANEX_RX_3_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_3_BCFG(unsigned long a,unsigned long b)10586 static inline uint64_t BDK_GSERNX_LANEX_RX_3_BCFG(unsigned long a, unsigned long b)
10587 {
10588     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
10589         return 0x87e090000c90ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
10590     __bdk_csr_fatal("GSERNX_LANEX_RX_3_BCFG", 2, a, b, 0, 0);
10591 }
10592 
10593 #define typedef_BDK_GSERNX_LANEX_RX_3_BCFG(a,b) bdk_gsernx_lanex_rx_3_bcfg_t
10594 #define bustype_BDK_GSERNX_LANEX_RX_3_BCFG(a,b) BDK_CSR_TYPE_RSL
10595 #define basename_BDK_GSERNX_LANEX_RX_3_BCFG(a,b) "GSERNX_LANEX_RX_3_BCFG"
10596 #define device_bar_BDK_GSERNX_LANEX_RX_3_BCFG(a,b) 0x0 /* PF_BAR0 */
10597 #define busnum_BDK_GSERNX_LANEX_RX_3_BCFG(a,b) (a)
10598 #define arguments_BDK_GSERNX_LANEX_RX_3_BCFG(a,b) (a),(b),-1,-1
10599 
10600 /**
10601  * Register (RSL) gsern#_lane#_rx_3_bsts
10602  *
10603  * GSER Lane RX Base Status Register 3
10604  * Status registers for calibration muxes and switch enables (either
10605  * calibration results ors). Values in this register are only valid if
10606  * GSERN()_LANE()_RX_5_BSTS[DFE_ADAPT_STATUS] is deasserted (indicating DFE adaptation has
10607  * completed), or if the corresponding CSR override enable is asserted.
10608  */
10609 union bdk_gsernx_lanex_rx_3_bsts
10610 {
10611     uint64_t u;
10612     struct bdk_gsernx_lanex_rx_3_bsts_s
10613     {
10614 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
10615         uint64_t reserved_56_63        : 8;
10616         uint64_t cali1_odd             : 8;  /**< [ 55: 48](RO/H) Input calibration switch enable for speculation path 1
10617                                                                  in odd paths. */
10618         uint64_t cali1_even            : 8;  /**< [ 47: 40](RO/H) Input calibration switch enable for speculation path 1
10619                                                                  in even paths. */
10620         uint64_t cali0_odd             : 8;  /**< [ 39: 32](RO/H) Input calibration switch enable for speculation path 0
10621                                                                  in odd paths. */
10622         uint64_t cali0_even            : 8;  /**< [ 31: 24](RO/H) Input calibration switch enable for speculation path 0
10623                                                                  in even paths. */
10624         uint64_t reserved_16_23        : 8;
10625         uint64_t calsel_odd            : 4;  /**< [ 15: 12](RO/H) Odd calibration speculation mux. */
10626         uint64_t calsel_even           : 4;  /**< [ 11:  8](RO/H) Even calibration speculation mux. */
10627         uint64_t calo_odd              : 4;  /**< [  7:  4](RO/H) Odd slicer output calibration mux control. */
10628         uint64_t calo_even             : 4;  /**< [  3:  0](RO/H) Even slicer output calibration mux control. */
10629 #else /* Word 0 - Little Endian */
10630         uint64_t calo_even             : 4;  /**< [  3:  0](RO/H) Even slicer output calibration mux control. */
10631         uint64_t calo_odd              : 4;  /**< [  7:  4](RO/H) Odd slicer output calibration mux control. */
10632         uint64_t calsel_even           : 4;  /**< [ 11:  8](RO/H) Even calibration speculation mux. */
10633         uint64_t calsel_odd            : 4;  /**< [ 15: 12](RO/H) Odd calibration speculation mux. */
10634         uint64_t reserved_16_23        : 8;
10635         uint64_t cali0_even            : 8;  /**< [ 31: 24](RO/H) Input calibration switch enable for speculation path 0
10636                                                                  in even paths. */
10637         uint64_t cali0_odd             : 8;  /**< [ 39: 32](RO/H) Input calibration switch enable for speculation path 0
10638                                                                  in odd paths. */
10639         uint64_t cali1_even            : 8;  /**< [ 47: 40](RO/H) Input calibration switch enable for speculation path 1
10640                                                                  in even paths. */
10641         uint64_t cali1_odd             : 8;  /**< [ 55: 48](RO/H) Input calibration switch enable for speculation path 1
10642                                                                  in odd paths. */
10643         uint64_t reserved_56_63        : 8;
10644 #endif /* Word 0 - End */
10645     } s;
10646     /* struct bdk_gsernx_lanex_rx_3_bsts_s cn; */
10647 };
10648 typedef union bdk_gsernx_lanex_rx_3_bsts bdk_gsernx_lanex_rx_3_bsts_t;
10649 
10650 static inline uint64_t BDK_GSERNX_LANEX_RX_3_BSTS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_3_BSTS(unsigned long a,unsigned long b)10651 static inline uint64_t BDK_GSERNX_LANEX_RX_3_BSTS(unsigned long a, unsigned long b)
10652 {
10653     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
10654         return 0x87e090001680ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
10655     __bdk_csr_fatal("GSERNX_LANEX_RX_3_BSTS", 2, a, b, 0, 0);
10656 }
10657 
10658 #define typedef_BDK_GSERNX_LANEX_RX_3_BSTS(a,b) bdk_gsernx_lanex_rx_3_bsts_t
10659 #define bustype_BDK_GSERNX_LANEX_RX_3_BSTS(a,b) BDK_CSR_TYPE_RSL
10660 #define basename_BDK_GSERNX_LANEX_RX_3_BSTS(a,b) "GSERNX_LANEX_RX_3_BSTS"
10661 #define device_bar_BDK_GSERNX_LANEX_RX_3_BSTS(a,b) 0x0 /* PF_BAR0 */
10662 #define busnum_BDK_GSERNX_LANEX_RX_3_BSTS(a,b) (a)
10663 #define arguments_BDK_GSERNX_LANEX_RX_3_BSTS(a,b) (a),(b),-1,-1
10664 
10665 /**
10666  * Register (RSL) gsern#_lane#_rx_4_bcfg
10667  *
10668  * GSER Lane RX Base Configuration Register 4
10669  * Register controls for VGA, CTLE, and OS_AFE overrides.
10670  * Some bit is this register are override controls (*_OVRD). Each
10671  * override setting has a corresponding enable which will cause the
10672  * calibration logic to use the override register setting instead of the
10673  * calibration result.
10674  */
10675 union bdk_gsernx_lanex_rx_4_bcfg
10676 {
10677     uint64_t u;
10678     struct bdk_gsernx_lanex_rx_4_bcfg_s
10679     {
10680 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
10681         uint64_t reserved_62_63        : 2;
10682         uint64_t edgesel_even_ovrd_en  : 1;  /**< [ 61: 61](R/W) Enable use of [EDGESEL_EVEN_OVRD]. */
10683         uint64_t edgesel_even_ovrd     : 1;  /**< [ 60: 60](R/W) EDGESEL_EVEN override value. */
10684         uint64_t edgesel_odd_ovrd_en   : 1;  /**< [ 59: 59](R/W) Enable use of [EDGESEL_ODD_OVRD]. */
10685         uint64_t edgesel_odd_ovrd      : 1;  /**< [ 58: 58](R/W) EDGESEL_ODD override value. */
10686         uint64_t en_os_afe_ovrd_en     : 1;  /**< [ 57: 57](R/W) Enable use of [EN_OS_AFE_OVRD]. */
10687         uint64_t en_os_afe_ovrd        : 1;  /**< [ 56: 56](R/W) OS_AFE_EN override value. */
10688         uint64_t reserved_55           : 1;
10689         uint64_t os_afe_odd_ovrd_en    : 1;  /**< [ 54: 54](R/W) Enable use of [OS_AFE_ODD_OVRD]. */
10690         uint64_t os_afe_odd_ovrd       : 6;  /**< [ 53: 48](R/W) OS_AFE_ODD offset override value. */
10691         uint64_t reserved_47           : 1;
10692         uint64_t os_afe_even_ovrd_en   : 1;  /**< [ 46: 46](R/W) Enable use of [OS_AFE_EVEN_OVRD]. */
10693         uint64_t os_afe_even_ovrd      : 6;  /**< [ 45: 40](R/W) OS_AFE_EVEN offset override value. */
10694         uint64_t reserved_37_39        : 3;
10695         uint64_t ctle_lte_zero_ovrd_en : 1;  /**< [ 36: 36](R/W) CTLE LTE zero frequency override enable.
10696                                                                  By default, the override should be enabled; otherwise, CTLE_LTE_ZERO
10697                                                                  will be set equal to CTLE_ZERO within the RX adaptation FSM. */
10698         uint64_t ctle_lte_zero_ovrd    : 4;  /**< [ 35: 32](R/W) CTLE LTE zero frequency override value. */
10699         uint64_t reserved_29_31        : 3;
10700         uint64_t ctle_lte_gain_ovrd_en : 1;  /**< [ 28: 28](R/W) Enable use of [CTLE_LTE_GAIN_OVRD]. */
10701         uint64_t ctle_lte_gain_ovrd    : 4;  /**< [ 27: 24](R/W) CTLE LTE DC gain override value. */
10702         uint64_t reserved_21_23        : 3;
10703         uint64_t ctle_zero_ovrd_en     : 1;  /**< [ 20: 20](R/W) Enable use of [CTLE_ZERO_OVRD]. */
10704         uint64_t ctle_zero_ovrd        : 4;  /**< [ 19: 16](R/W) CTLE zero frequency override value. */
10705         uint64_t reserved_13_15        : 3;
10706         uint64_t ctle_gain_ovrd_en     : 1;  /**< [ 12: 12](R/W) Enable use of [CTLE_GAIN_OVRD]. */
10707         uint64_t ctle_gain_ovrd        : 4;  /**< [ 11:  8](R/W) CTLE DC gain override value. */
10708         uint64_t reserved_5_7          : 3;
10709         uint64_t vga_gain_ovrd_en      : 1;  /**< [  4:  4](R/W) Enable use of [VGA_GAIN_OVRD]. */
10710         uint64_t vga_gain_ovrd         : 4;  /**< [  3:  0](R/W) VGA DC gain override value. */
10711 #else /* Word 0 - Little Endian */
10712         uint64_t vga_gain_ovrd         : 4;  /**< [  3:  0](R/W) VGA DC gain override value. */
10713         uint64_t vga_gain_ovrd_en      : 1;  /**< [  4:  4](R/W) Enable use of [VGA_GAIN_OVRD]. */
10714         uint64_t reserved_5_7          : 3;
10715         uint64_t ctle_gain_ovrd        : 4;  /**< [ 11:  8](R/W) CTLE DC gain override value. */
10716         uint64_t ctle_gain_ovrd_en     : 1;  /**< [ 12: 12](R/W) Enable use of [CTLE_GAIN_OVRD]. */
10717         uint64_t reserved_13_15        : 3;
10718         uint64_t ctle_zero_ovrd        : 4;  /**< [ 19: 16](R/W) CTLE zero frequency override value. */
10719         uint64_t ctle_zero_ovrd_en     : 1;  /**< [ 20: 20](R/W) Enable use of [CTLE_ZERO_OVRD]. */
10720         uint64_t reserved_21_23        : 3;
10721         uint64_t ctle_lte_gain_ovrd    : 4;  /**< [ 27: 24](R/W) CTLE LTE DC gain override value. */
10722         uint64_t ctle_lte_gain_ovrd_en : 1;  /**< [ 28: 28](R/W) Enable use of [CTLE_LTE_GAIN_OVRD]. */
10723         uint64_t reserved_29_31        : 3;
10724         uint64_t ctle_lte_zero_ovrd    : 4;  /**< [ 35: 32](R/W) CTLE LTE zero frequency override value. */
10725         uint64_t ctle_lte_zero_ovrd_en : 1;  /**< [ 36: 36](R/W) CTLE LTE zero frequency override enable.
10726                                                                  By default, the override should be enabled; otherwise, CTLE_LTE_ZERO
10727                                                                  will be set equal to CTLE_ZERO within the RX adaptation FSM. */
10728         uint64_t reserved_37_39        : 3;
10729         uint64_t os_afe_even_ovrd      : 6;  /**< [ 45: 40](R/W) OS_AFE_EVEN offset override value. */
10730         uint64_t os_afe_even_ovrd_en   : 1;  /**< [ 46: 46](R/W) Enable use of [OS_AFE_EVEN_OVRD]. */
10731         uint64_t reserved_47           : 1;
10732         uint64_t os_afe_odd_ovrd       : 6;  /**< [ 53: 48](R/W) OS_AFE_ODD offset override value. */
10733         uint64_t os_afe_odd_ovrd_en    : 1;  /**< [ 54: 54](R/W) Enable use of [OS_AFE_ODD_OVRD]. */
10734         uint64_t reserved_55           : 1;
10735         uint64_t en_os_afe_ovrd        : 1;  /**< [ 56: 56](R/W) OS_AFE_EN override value. */
10736         uint64_t en_os_afe_ovrd_en     : 1;  /**< [ 57: 57](R/W) Enable use of [EN_OS_AFE_OVRD]. */
10737         uint64_t edgesel_odd_ovrd      : 1;  /**< [ 58: 58](R/W) EDGESEL_ODD override value. */
10738         uint64_t edgesel_odd_ovrd_en   : 1;  /**< [ 59: 59](R/W) Enable use of [EDGESEL_ODD_OVRD]. */
10739         uint64_t edgesel_even_ovrd     : 1;  /**< [ 60: 60](R/W) EDGESEL_EVEN override value. */
10740         uint64_t edgesel_even_ovrd_en  : 1;  /**< [ 61: 61](R/W) Enable use of [EDGESEL_EVEN_OVRD]. */
10741         uint64_t reserved_62_63        : 2;
10742 #endif /* Word 0 - End */
10743     } s;
10744     /* struct bdk_gsernx_lanex_rx_4_bcfg_s cn; */
10745 };
10746 typedef union bdk_gsernx_lanex_rx_4_bcfg bdk_gsernx_lanex_rx_4_bcfg_t;
10747 
10748 static inline uint64_t BDK_GSERNX_LANEX_RX_4_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_4_BCFG(unsigned long a,unsigned long b)10749 static inline uint64_t BDK_GSERNX_LANEX_RX_4_BCFG(unsigned long a, unsigned long b)
10750 {
10751     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
10752         return 0x87e090000ca0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
10753     __bdk_csr_fatal("GSERNX_LANEX_RX_4_BCFG", 2, a, b, 0, 0);
10754 }
10755 
10756 #define typedef_BDK_GSERNX_LANEX_RX_4_BCFG(a,b) bdk_gsernx_lanex_rx_4_bcfg_t
10757 #define bustype_BDK_GSERNX_LANEX_RX_4_BCFG(a,b) BDK_CSR_TYPE_RSL
10758 #define basename_BDK_GSERNX_LANEX_RX_4_BCFG(a,b) "GSERNX_LANEX_RX_4_BCFG"
10759 #define device_bar_BDK_GSERNX_LANEX_RX_4_BCFG(a,b) 0x0 /* PF_BAR0 */
10760 #define busnum_BDK_GSERNX_LANEX_RX_4_BCFG(a,b) (a)
10761 #define arguments_BDK_GSERNX_LANEX_RX_4_BCFG(a,b) (a),(b),-1,-1
10762 
10763 /**
10764  * Register (RSL) gsern#_lane#_rx_4_bsts
10765  *
10766  * GSER Lane RX Base Status Register 4
10767  * Status registers for VGA, CTLE, and OS_AFE values
10768  * (either calibration results ors).
10769  */
10770 union bdk_gsernx_lanex_rx_4_bsts
10771 {
10772     uint64_t u;
10773     struct bdk_gsernx_lanex_rx_4_bsts_s
10774     {
10775 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
10776         uint64_t blwc                  : 5;  /**< [ 63: 59](RO/H) BLWC. This field is only valid if GSERN()_LANE()_RX_10_BSTS[BLWC_ADAPT_STATUS]
10777                                                                  is deasserted (indicating BLWC adaptation has completed), or if the
10778                                                                  corresponding CSR override enable is asserted. */
10779         uint64_t reserved_57_58        : 2;
10780         uint64_t en_os_afe             : 1;  /**< [ 56: 56](RO/H) AFE offset compensation enable value in-use. This field is only
10781                                                                  valid if GSERN()_LANE()_RX_OS_5_BSTS[AFE_OFFSET_STATUS] is asserted (indicating AFE
10782                                                                  offset adaptation has completed), or if the corresponding CSR
10783                                                                  override enable is asserted. */
10784         uint64_t reserved_54_55        : 2;
10785         uint64_t os_afe_odd            : 6;  /**< [ 53: 48](RO/H) AFE odd offset compensation value in-use. This field is only valid
10786                                                                  if GSERN()_LANE()_RX_OS_5_BSTS[AFE_OFFSET_STATUS] is asserted (indicating AFE offset
10787                                                                  adaptation has completed), or if the corresponding CSR override
10788                                                                  enable is asserted. */
10789         uint64_t reserved_46_47        : 2;
10790         uint64_t os_afe_even           : 6;  /**< [ 45: 40](RO/H) AFE even offset compensation value in-use. This field is only valid
10791                                                                  if GSERN()_LANE()_RX_OS_5_BSTS[AFE_OFFSET_STATUS] is asserted (indicating AFE offset
10792                                                                  adaptation has completed), or if the corresponding CSR override
10793                                                                  enable is asserted. */
10794         uint64_t reserved_36_39        : 4;
10795         uint64_t ctle_lte_zero         : 4;  /**< [ 35: 32](RO/H) CTLE LTE zero frequency. This field is only valid if
10796                                                                  GSERN()_LANE()_RX_5_BSTS[CTLEZ_ADAPT_STATUS] is deasserted (indicating VGA
10797                                                                  adaptation has completed), or if the corresponding CSR override
10798                                                                  enable is asserted. */
10799         uint64_t reserved_28_31        : 4;
10800         uint64_t ctle_lte_gain         : 4;  /**< [ 27: 24](RO/H) CTLE LTE DC gain. This field is only valid if
10801                                                                  GSERN()_LANE()_RX_5_BSTS[CTLE_ADAPT_STATUS] is deasserted (indicating VGA
10802                                                                  adaptation has completed), or if the corresponding CSR override
10803                                                                  enable is asserted. */
10804         uint64_t reserved_20_23        : 4;
10805         uint64_t ctle_zero             : 4;  /**< [ 19: 16](RO/H) CTLE zero frequency. This field is only valid if
10806                                                                  GSERN()_LANE()_RX_5_BSTS[CTLE_ADAPT_STATUS] is deasserted (indicating VGA
10807                                                                  adaptation has completed), or if the corresponding CSR override
10808                                                                  enable is asserted. */
10809         uint64_t reserved_12_15        : 4;
10810         uint64_t ctle_gain             : 4;  /**< [ 11:  8](RO/H) CTLE DC gain. This field is only valid if
10811                                                                  GSERN()_LANE()_RX_5_BSTS[CTLE_ADAPT_STATUS] is deasserted (indicating VGA
10812                                                                  adaptation has completed), or if the corresponding CSR override
10813                                                                  enable is asserted. */
10814         uint64_t reserved_7            : 1;
10815         uint64_t prevga_gn             : 3;  /**< [  6:  4](RO/H) Pre-VGA gain. This field is only valid if
10816                                                                  GSERN()_LANE()_RX_11_BSTS[PREVGA_GN_ADAPT_STATUS] is deasserted (indicating Pre-VGA
10817                                                                  gain adaptation has completed), or if the corresponding CSR override
10818                                                                  enable is asserted. */
10819         uint64_t vga_gain              : 4;  /**< [  3:  0](RO/H) VGA DC gain. This field is only valid if GSERN()_LANE()_RX_5_BSTS[VGA_ADAPT_STATUS]
10820                                                                  is deasserted (indicating VGA adaptation has completed), or if the
10821                                                                  corresponding CSR override enable is asserted. */
10822 #else /* Word 0 - Little Endian */
10823         uint64_t vga_gain              : 4;  /**< [  3:  0](RO/H) VGA DC gain. This field is only valid if GSERN()_LANE()_RX_5_BSTS[VGA_ADAPT_STATUS]
10824                                                                  is deasserted (indicating VGA adaptation has completed), or if the
10825                                                                  corresponding CSR override enable is asserted. */
10826         uint64_t prevga_gn             : 3;  /**< [  6:  4](RO/H) Pre-VGA gain. This field is only valid if
10827                                                                  GSERN()_LANE()_RX_11_BSTS[PREVGA_GN_ADAPT_STATUS] is deasserted (indicating Pre-VGA
10828                                                                  gain adaptation has completed), or if the corresponding CSR override
10829                                                                  enable is asserted. */
10830         uint64_t reserved_7            : 1;
10831         uint64_t ctle_gain             : 4;  /**< [ 11:  8](RO/H) CTLE DC gain. This field is only valid if
10832                                                                  GSERN()_LANE()_RX_5_BSTS[CTLE_ADAPT_STATUS] is deasserted (indicating VGA
10833                                                                  adaptation has completed), or if the corresponding CSR override
10834                                                                  enable is asserted. */
10835         uint64_t reserved_12_15        : 4;
10836         uint64_t ctle_zero             : 4;  /**< [ 19: 16](RO/H) CTLE zero frequency. This field is only valid if
10837                                                                  GSERN()_LANE()_RX_5_BSTS[CTLE_ADAPT_STATUS] is deasserted (indicating VGA
10838                                                                  adaptation has completed), or if the corresponding CSR override
10839                                                                  enable is asserted. */
10840         uint64_t reserved_20_23        : 4;
10841         uint64_t ctle_lte_gain         : 4;  /**< [ 27: 24](RO/H) CTLE LTE DC gain. This field is only valid if
10842                                                                  GSERN()_LANE()_RX_5_BSTS[CTLE_ADAPT_STATUS] is deasserted (indicating VGA
10843                                                                  adaptation has completed), or if the corresponding CSR override
10844                                                                  enable is asserted. */
10845         uint64_t reserved_28_31        : 4;
10846         uint64_t ctle_lte_zero         : 4;  /**< [ 35: 32](RO/H) CTLE LTE zero frequency. This field is only valid if
10847                                                                  GSERN()_LANE()_RX_5_BSTS[CTLEZ_ADAPT_STATUS] is deasserted (indicating VGA
10848                                                                  adaptation has completed), or if the corresponding CSR override
10849                                                                  enable is asserted. */
10850         uint64_t reserved_36_39        : 4;
10851         uint64_t os_afe_even           : 6;  /**< [ 45: 40](RO/H) AFE even offset compensation value in-use. This field is only valid
10852                                                                  if GSERN()_LANE()_RX_OS_5_BSTS[AFE_OFFSET_STATUS] is asserted (indicating AFE offset
10853                                                                  adaptation has completed), or if the corresponding CSR override
10854                                                                  enable is asserted. */
10855         uint64_t reserved_46_47        : 2;
10856         uint64_t os_afe_odd            : 6;  /**< [ 53: 48](RO/H) AFE odd offset compensation value in-use. This field is only valid
10857                                                                  if GSERN()_LANE()_RX_OS_5_BSTS[AFE_OFFSET_STATUS] is asserted (indicating AFE offset
10858                                                                  adaptation has completed), or if the corresponding CSR override
10859                                                                  enable is asserted. */
10860         uint64_t reserved_54_55        : 2;
10861         uint64_t en_os_afe             : 1;  /**< [ 56: 56](RO/H) AFE offset compensation enable value in-use. This field is only
10862                                                                  valid if GSERN()_LANE()_RX_OS_5_BSTS[AFE_OFFSET_STATUS] is asserted (indicating AFE
10863                                                                  offset adaptation has completed), or if the corresponding CSR
10864                                                                  override enable is asserted. */
10865         uint64_t reserved_57_58        : 2;
10866         uint64_t blwc                  : 5;  /**< [ 63: 59](RO/H) BLWC. This field is only valid if GSERN()_LANE()_RX_10_BSTS[BLWC_ADAPT_STATUS]
10867                                                                  is deasserted (indicating BLWC adaptation has completed), or if the
10868                                                                  corresponding CSR override enable is asserted. */
10869 #endif /* Word 0 - End */
10870     } s;
10871     /* struct bdk_gsernx_lanex_rx_4_bsts_s cn; */
10872 };
10873 typedef union bdk_gsernx_lanex_rx_4_bsts bdk_gsernx_lanex_rx_4_bsts_t;
10874 
10875 static inline uint64_t BDK_GSERNX_LANEX_RX_4_BSTS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_4_BSTS(unsigned long a,unsigned long b)10876 static inline uint64_t BDK_GSERNX_LANEX_RX_4_BSTS(unsigned long a, unsigned long b)
10877 {
10878     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
10879         return 0x87e090001690ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
10880     __bdk_csr_fatal("GSERNX_LANEX_RX_4_BSTS", 2, a, b, 0, 0);
10881 }
10882 
10883 #define typedef_BDK_GSERNX_LANEX_RX_4_BSTS(a,b) bdk_gsernx_lanex_rx_4_bsts_t
10884 #define bustype_BDK_GSERNX_LANEX_RX_4_BSTS(a,b) BDK_CSR_TYPE_RSL
10885 #define basename_BDK_GSERNX_LANEX_RX_4_BSTS(a,b) "GSERNX_LANEX_RX_4_BSTS"
10886 #define device_bar_BDK_GSERNX_LANEX_RX_4_BSTS(a,b) 0x0 /* PF_BAR0 */
10887 #define busnum_BDK_GSERNX_LANEX_RX_4_BSTS(a,b) (a)
10888 #define arguments_BDK_GSERNX_LANEX_RX_4_BSTS(a,b) (a),(b),-1,-1
10889 
10890 /**
10891  * Register (RSL) gsern#_lane#_rx_5_bcfg
10892  *
10893  * GSER Lane RX Base Configuration Register 5
10894  * Adaptation parameters for DFE coefficients.
10895  */
10896 union bdk_gsernx_lanex_rx_5_bcfg
10897 {
10898     uint64_t u;
10899     struct bdk_gsernx_lanex_rx_5_bcfg_s
10900     {
10901 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
10902         uint64_t reserved_63           : 1;
10903         uint64_t ctle_leak_sgn         : 1;  /**< [ 62: 62](R/W) CTLE leak sign. 0 = Positive (add). 1 = Negative (subtract). */
10904         uint64_t ctlez_leak_sgn        : 1;  /**< [ 61: 61](R/W) CTLE leak sign. 0 = Positive (add). 1 = Negative (subtract). */
10905         uint64_t dfe_c1_leak_sgn       : 1;  /**< [ 60: 60](R/W) DFE C1 leak sign. 0 = Positive (add). 1 = Negative (subtract). */
10906         uint64_t vga_leak_sgn          : 1;  /**< [ 59: 59](R/W) VGA leak sign. 0 = Positive (add). 1 = Negative (subtract). */
10907         uint64_t dfe_c1_leak           : 3;  /**< [ 58: 56](R/W) DFE C1 Gain adaptation leak parameter setting.
10908                                                                    0x0 = 1/128.
10909                                                                    0x1 = 1/64.
10910                                                                    0x2 = 1/32.
10911                                                                    0x3 = 1/16.
10912                                                                    0x4 = 1/8.
10913                                                                    0x5 = 1/4.
10914                                                                    0x6 = 1/2.
10915                                                                    0x7 = Disabled. */
10916         uint64_t dfe_c1_mu             : 3;  /**< [ 55: 53](R/W) DFE C1 adaptation mu parameter setting.
10917                                                                    0x0 = 1/16.
10918                                                                    0x1 = 1/8.
10919                                                                    0x2 = 1/4.
10920                                                                    0x3 = 1/2.
10921                                                                    0x4 = 1.
10922                                                                    0x5 = 2.
10923                                                                    0x6 = 4.
10924                                                                    0x7 = 8. */
10925         uint64_t vga_leak              : 3;  /**< [ 52: 50](R/W) VGA gain adaptation leak parameter setting.
10926                                                                    0x0 = 1/128.
10927                                                                    0x1 = 1/64.
10928                                                                    0x2 = 1/32.
10929                                                                    0x3 = 1/16.
10930                                                                    0x4 = 1/8.
10931                                                                    0x5 = 1/4.
10932                                                                    0x6 = 1/2.
10933                                                                    0x7 = Disabled. */
10934         uint64_t vga_mu                : 3;  /**< [ 49: 47](R/W) VGA adaptation mu parameter setting.
10935                                                                    0x0 = 1/16.
10936                                                                    0x1 = 1/8.
10937                                                                    0x2 = 1/4.
10938                                                                    0x3 = 1/2.
10939                                                                    0x4 = 1.
10940                                                                    0x5 = 2.
10941                                                                    0x6 = 4.
10942                                                                    0x7 = 8. */
10943         uint64_t vga_timer_max         : 15; /**< [ 46: 32](R/W) VGA adaptation timer maximum count value.
10944                                                                  15-bit field, maximum value 0x7FFF. */
10945         uint64_t reserved_22_31        : 10;
10946         uint64_t dfe_leak_sgn          : 1;  /**< [ 21: 21](R/W) DFE leak sign. 0 = Positive (add). 1 = Negative (subtract). */
10947         uint64_t dfe_leak              : 3;  /**< [ 20: 18](R/W) DFE adaptation leak parameter setting.
10948                                                                    0x0 = 1/128.
10949                                                                    0x1 = 1/64.
10950                                                                    0x2 = 1/32.
10951                                                                    0x3 = 1/16.
10952                                                                    0x4 = 1/8.
10953                                                                    0x5 = 1/4.
10954                                                                    0x6 = 1/2.
10955                                                                    0x7 = Disabled. */
10956         uint64_t dfe_mu                : 3;  /**< [ 17: 15](R/W) DFE adaptation mu parameter setting.
10957                                                                    0x0 = 1/16.
10958                                                                    0x1 = 1/8.
10959                                                                    0x2 = 1/4.
10960                                                                    0x3 = 1/2.
10961                                                                    0x4 = 1.
10962                                                                    0x5 = 2.
10963                                                                    0x6 = 4.
10964                                                                    0x7 = 8. */
10965         uint64_t dfe_timer_max         : 15; /**< [ 14:  0](R/W) DFE adaptation timer maximum count value.
10966                                                                  15-bit field, maximum value 0x7FFF. */
10967 #else /* Word 0 - Little Endian */
10968         uint64_t dfe_timer_max         : 15; /**< [ 14:  0](R/W) DFE adaptation timer maximum count value.
10969                                                                  15-bit field, maximum value 0x7FFF. */
10970         uint64_t dfe_mu                : 3;  /**< [ 17: 15](R/W) DFE adaptation mu parameter setting.
10971                                                                    0x0 = 1/16.
10972                                                                    0x1 = 1/8.
10973                                                                    0x2 = 1/4.
10974                                                                    0x3 = 1/2.
10975                                                                    0x4 = 1.
10976                                                                    0x5 = 2.
10977                                                                    0x6 = 4.
10978                                                                    0x7 = 8. */
10979         uint64_t dfe_leak              : 3;  /**< [ 20: 18](R/W) DFE adaptation leak parameter setting.
10980                                                                    0x0 = 1/128.
10981                                                                    0x1 = 1/64.
10982                                                                    0x2 = 1/32.
10983                                                                    0x3 = 1/16.
10984                                                                    0x4 = 1/8.
10985                                                                    0x5 = 1/4.
10986                                                                    0x6 = 1/2.
10987                                                                    0x7 = Disabled. */
10988         uint64_t dfe_leak_sgn          : 1;  /**< [ 21: 21](R/W) DFE leak sign. 0 = Positive (add). 1 = Negative (subtract). */
10989         uint64_t reserved_22_31        : 10;
10990         uint64_t vga_timer_max         : 15; /**< [ 46: 32](R/W) VGA adaptation timer maximum count value.
10991                                                                  15-bit field, maximum value 0x7FFF. */
10992         uint64_t vga_mu                : 3;  /**< [ 49: 47](R/W) VGA adaptation mu parameter setting.
10993                                                                    0x0 = 1/16.
10994                                                                    0x1 = 1/8.
10995                                                                    0x2 = 1/4.
10996                                                                    0x3 = 1/2.
10997                                                                    0x4 = 1.
10998                                                                    0x5 = 2.
10999                                                                    0x6 = 4.
11000                                                                    0x7 = 8. */
11001         uint64_t vga_leak              : 3;  /**< [ 52: 50](R/W) VGA gain adaptation leak parameter setting.
11002                                                                    0x0 = 1/128.
11003                                                                    0x1 = 1/64.
11004                                                                    0x2 = 1/32.
11005                                                                    0x3 = 1/16.
11006                                                                    0x4 = 1/8.
11007                                                                    0x5 = 1/4.
11008                                                                    0x6 = 1/2.
11009                                                                    0x7 = Disabled. */
11010         uint64_t dfe_c1_mu             : 3;  /**< [ 55: 53](R/W) DFE C1 adaptation mu parameter setting.
11011                                                                    0x0 = 1/16.
11012                                                                    0x1 = 1/8.
11013                                                                    0x2 = 1/4.
11014                                                                    0x3 = 1/2.
11015                                                                    0x4 = 1.
11016                                                                    0x5 = 2.
11017                                                                    0x6 = 4.
11018                                                                    0x7 = 8. */
11019         uint64_t dfe_c1_leak           : 3;  /**< [ 58: 56](R/W) DFE C1 Gain adaptation leak parameter setting.
11020                                                                    0x0 = 1/128.
11021                                                                    0x1 = 1/64.
11022                                                                    0x2 = 1/32.
11023                                                                    0x3 = 1/16.
11024                                                                    0x4 = 1/8.
11025                                                                    0x5 = 1/4.
11026                                                                    0x6 = 1/2.
11027                                                                    0x7 = Disabled. */
11028         uint64_t vga_leak_sgn          : 1;  /**< [ 59: 59](R/W) VGA leak sign. 0 = Positive (add). 1 = Negative (subtract). */
11029         uint64_t dfe_c1_leak_sgn       : 1;  /**< [ 60: 60](R/W) DFE C1 leak sign. 0 = Positive (add). 1 = Negative (subtract). */
11030         uint64_t ctlez_leak_sgn        : 1;  /**< [ 61: 61](R/W) CTLE leak sign. 0 = Positive (add). 1 = Negative (subtract). */
11031         uint64_t ctle_leak_sgn         : 1;  /**< [ 62: 62](R/W) CTLE leak sign. 0 = Positive (add). 1 = Negative (subtract). */
11032         uint64_t reserved_63           : 1;
11033 #endif /* Word 0 - End */
11034     } s;
11035     /* struct bdk_gsernx_lanex_rx_5_bcfg_s cn; */
11036 };
11037 typedef union bdk_gsernx_lanex_rx_5_bcfg bdk_gsernx_lanex_rx_5_bcfg_t;
11038 
11039 static inline uint64_t BDK_GSERNX_LANEX_RX_5_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_5_BCFG(unsigned long a,unsigned long b)11040 static inline uint64_t BDK_GSERNX_LANEX_RX_5_BCFG(unsigned long a, unsigned long b)
11041 {
11042     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
11043         return 0x87e090000cb0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
11044     __bdk_csr_fatal("GSERNX_LANEX_RX_5_BCFG", 2, a, b, 0, 0);
11045 }
11046 
11047 #define typedef_BDK_GSERNX_LANEX_RX_5_BCFG(a,b) bdk_gsernx_lanex_rx_5_bcfg_t
11048 #define bustype_BDK_GSERNX_LANEX_RX_5_BCFG(a,b) BDK_CSR_TYPE_RSL
11049 #define basename_BDK_GSERNX_LANEX_RX_5_BCFG(a,b) "GSERNX_LANEX_RX_5_BCFG"
11050 #define device_bar_BDK_GSERNX_LANEX_RX_5_BCFG(a,b) 0x0 /* PF_BAR0 */
11051 #define busnum_BDK_GSERNX_LANEX_RX_5_BCFG(a,b) (a)
11052 #define arguments_BDK_GSERNX_LANEX_RX_5_BCFG(a,b) (a),(b),-1,-1
11053 
11054 /**
11055  * Register (RSL) gsern#_lane#_rx_5_bsts
11056  *
11057  * GSER Lane RX Base Status Register 5
11058  * Status registers for VGA, CTLE, and DFE adaptation.
11059  */
11060 union bdk_gsernx_lanex_rx_5_bsts
11061 {
11062     uint64_t u;
11063     struct bdk_gsernx_lanex_rx_5_bsts_s
11064     {
11065 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
11066         uint64_t ctlez_adapt_count     : 15; /**< [ 63: 49](RO/H) CTLEZ adaptation timer count value. Only valid when
11067                                                                  GSERN()_LANE()_RX_5_BSTS[CTLEZ_ADAPT_STATUS] is deasserted. */
11068         uint64_t ctlez_adapt_status    : 1;  /**< [ 48: 48](RO/H) CTLEZ adaptation status. When 0, training is inactive. When 1, training is active. */
11069         uint64_t ctle_adapt_count      : 15; /**< [ 47: 33](RO/H) CTLE adaptation timer count value. Only valid when
11070                                                                  GSERN()_LANE()_RX_5_BSTS[CTLE_ADAPT_STATUS] is deasserted. */
11071         uint64_t ctle_adapt_status     : 1;  /**< [ 32: 32](RO/H) CTLE adaptation status. When 0, training is inactive. When 1, training is active. */
11072         uint64_t dfe_adapt_count       : 15; /**< [ 31: 17](RO/H) DFE adaptation timer count value. Only valid when
11073                                                                  GSERN()_LANE()_RX_5_BSTS[DFE_ADAPT_STATUS] is deasserted. */
11074         uint64_t dfe_adapt_status      : 1;  /**< [ 16: 16](RO/H) DFE adaptation status. When 0, training is inactive. When 1, training is active. */
11075         uint64_t vga_adapt_count       : 15; /**< [ 15:  1](RO/H) VGA Gain adaptation timer count value. Only valid when
11076                                                                  GSERN()_LANE()_RX_5_BSTS[VGA_ADAPT_STATUS] is deasserted. */
11077         uint64_t vga_adapt_status      : 1;  /**< [  0:  0](RO/H) VGA Gain adaptation status. When 0, training is inactive. When 1, training is active. */
11078 #else /* Word 0 - Little Endian */
11079         uint64_t vga_adapt_status      : 1;  /**< [  0:  0](RO/H) VGA Gain adaptation status. When 0, training is inactive. When 1, training is active. */
11080         uint64_t vga_adapt_count       : 15; /**< [ 15:  1](RO/H) VGA Gain adaptation timer count value. Only valid when
11081                                                                  GSERN()_LANE()_RX_5_BSTS[VGA_ADAPT_STATUS] is deasserted. */
11082         uint64_t dfe_adapt_status      : 1;  /**< [ 16: 16](RO/H) DFE adaptation status. When 0, training is inactive. When 1, training is active. */
11083         uint64_t dfe_adapt_count       : 15; /**< [ 31: 17](RO/H) DFE adaptation timer count value. Only valid when
11084                                                                  GSERN()_LANE()_RX_5_BSTS[DFE_ADAPT_STATUS] is deasserted. */
11085         uint64_t ctle_adapt_status     : 1;  /**< [ 32: 32](RO/H) CTLE adaptation status. When 0, training is inactive. When 1, training is active. */
11086         uint64_t ctle_adapt_count      : 15; /**< [ 47: 33](RO/H) CTLE adaptation timer count value. Only valid when
11087                                                                  GSERN()_LANE()_RX_5_BSTS[CTLE_ADAPT_STATUS] is deasserted. */
11088         uint64_t ctlez_adapt_status    : 1;  /**< [ 48: 48](RO/H) CTLEZ adaptation status. When 0, training is inactive. When 1, training is active. */
11089         uint64_t ctlez_adapt_count     : 15; /**< [ 63: 49](RO/H) CTLEZ adaptation timer count value. Only valid when
11090                                                                  GSERN()_LANE()_RX_5_BSTS[CTLEZ_ADAPT_STATUS] is deasserted. */
11091 #endif /* Word 0 - End */
11092     } s;
11093     /* struct bdk_gsernx_lanex_rx_5_bsts_s cn; */
11094 };
11095 typedef union bdk_gsernx_lanex_rx_5_bsts bdk_gsernx_lanex_rx_5_bsts_t;
11096 
11097 static inline uint64_t BDK_GSERNX_LANEX_RX_5_BSTS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_5_BSTS(unsigned long a,unsigned long b)11098 static inline uint64_t BDK_GSERNX_LANEX_RX_5_BSTS(unsigned long a, unsigned long b)
11099 {
11100     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
11101         return 0x87e0900016a0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
11102     __bdk_csr_fatal("GSERNX_LANEX_RX_5_BSTS", 2, a, b, 0, 0);
11103 }
11104 
11105 #define typedef_BDK_GSERNX_LANEX_RX_5_BSTS(a,b) bdk_gsernx_lanex_rx_5_bsts_t
11106 #define bustype_BDK_GSERNX_LANEX_RX_5_BSTS(a,b) BDK_CSR_TYPE_RSL
11107 #define basename_BDK_GSERNX_LANEX_RX_5_BSTS(a,b) "GSERNX_LANEX_RX_5_BSTS"
11108 #define device_bar_BDK_GSERNX_LANEX_RX_5_BSTS(a,b) 0x0 /* PF_BAR0 */
11109 #define busnum_BDK_GSERNX_LANEX_RX_5_BSTS(a,b) (a)
11110 #define arguments_BDK_GSERNX_LANEX_RX_5_BSTS(a,b) (a),(b),-1,-1
11111 
11112 /**
11113  * Register (RSL) gsern#_lane#_rx_6_bcfg
11114  *
11115  * GSER Lane RX Base Configuration Register 6
11116  * Adaptation controls for DFE CTLE and CTLEZ parameter.
11117  */
11118 union bdk_gsernx_lanex_rx_6_bcfg
11119 {
11120     uint64_t u;
11121     struct bdk_gsernx_lanex_rx_6_bcfg_s
11122     {
11123 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
11124         uint64_t ctlelte_leak_sgn      : 1;  /**< [ 63: 63](R/W) CTLELTE leak sign. 0 = Positive (add). 1 = Negative (subtract). */
11125         uint64_t ctlelte_leak          : 3;  /**< [ 62: 60](R/W) CTLELTE adaptation leak parameter setting.
11126                                                                    0x0 = 1/128.
11127                                                                    0x1 = 1/64.
11128                                                                    0x2 = 1/32.
11129                                                                    0x3 = 1/16.
11130                                                                    0x4 = 1/8.
11131                                                                    0x5 = 1/4.
11132                                                                    0x6 = 1/2.
11133                                                                    0x7 = Disabled. */
11134         uint64_t ctlelte_mu            : 3;  /**< [ 59: 57](R/W) CTLELTE adaptation mu parameter setting.
11135                                                                    0x0 = 1/16.
11136                                                                    0x1 = 1/8.
11137                                                                    0x2 = 1/4.
11138                                                                    0x3 = 1/2.
11139                                                                    0x4 = 1.
11140                                                                    0x5 = 2.
11141                                                                    0x6 = 4.
11142                                                                    0x7 = 8. */
11143         uint64_t ctlelte_timer_max     : 15; /**< [ 56: 42](R/W) CTLELTE adaptation timer maximum count value.
11144                                                                  15-bit field, maximum value 0x7FFF. */
11145         uint64_t ctlez_leak            : 3;  /**< [ 41: 39](R/W) CTLEZ adaptation leak parameter setting.
11146                                                                    0x0 = 1/128.
11147                                                                    0x1 = 1/64.
11148                                                                    0x2 = 1/32.
11149                                                                    0x3 = 1/16.
11150                                                                    0x4 = 1/8.
11151                                                                    0x5 = 1/4.
11152                                                                    0x6 = 1/2.
11153                                                                    0x7 = Disabled. */
11154         uint64_t ctlez_mu              : 3;  /**< [ 38: 36](R/W) CTLEZ adaptation mu parameter setting.
11155                                                                    0x0 = 1/16.
11156                                                                    0x1 = 1/8.
11157                                                                    0x2 = 1/4.
11158                                                                    0x3 = 1/2.
11159                                                                    0x4 = 1.
11160                                                                    0x5 = 2.
11161                                                                    0x6 = 4.
11162                                                                    0x7 = 8. */
11163         uint64_t ctlez_timer_max       : 15; /**< [ 35: 21](R/W) CTLEZ adaptation timer maximum count value.
11164                                                                  15-bit field, maximum value 0x7FFF. */
11165         uint64_t ctle_leak             : 3;  /**< [ 20: 18](R/W) DFE CTLE adaptation leak parameter setting.
11166                                                                    0x0 = 1/128.
11167                                                                    0x1 = 1/64.
11168                                                                    0x2 = 1/32.
11169                                                                    0x3 = 1/16.
11170                                                                    0x4 = 1/8.
11171                                                                    0x5 = 1/4.
11172                                                                    0x6 = 1/2.
11173                                                                    0x7 = Disabled. */
11174         uint64_t ctle_mu               : 3;  /**< [ 17: 15](R/W) DFE CTLE adaptation mu parameter setting.
11175                                                                    0x0 = 1/16.
11176                                                                    0x1 = 1/8.
11177                                                                    0x2 = 1/4.
11178                                                                    0x3 = 1/2.
11179                                                                    0x4 = 1.
11180                                                                    0x5 = 2.
11181                                                                    0x6 = 4.
11182                                                                    0x7 = 8. */
11183         uint64_t ctle_timer_max        : 15; /**< [ 14:  0](R/W) DFE CTLE adaptation timer maximum count value.
11184                                                                  15-bit field, maximum value 0x7FFF. */
11185 #else /* Word 0 - Little Endian */
11186         uint64_t ctle_timer_max        : 15; /**< [ 14:  0](R/W) DFE CTLE adaptation timer maximum count value.
11187                                                                  15-bit field, maximum value 0x7FFF. */
11188         uint64_t ctle_mu               : 3;  /**< [ 17: 15](R/W) DFE CTLE adaptation mu parameter setting.
11189                                                                    0x0 = 1/16.
11190                                                                    0x1 = 1/8.
11191                                                                    0x2 = 1/4.
11192                                                                    0x3 = 1/2.
11193                                                                    0x4 = 1.
11194                                                                    0x5 = 2.
11195                                                                    0x6 = 4.
11196                                                                    0x7 = 8. */
11197         uint64_t ctle_leak             : 3;  /**< [ 20: 18](R/W) DFE CTLE adaptation leak parameter setting.
11198                                                                    0x0 = 1/128.
11199                                                                    0x1 = 1/64.
11200                                                                    0x2 = 1/32.
11201                                                                    0x3 = 1/16.
11202                                                                    0x4 = 1/8.
11203                                                                    0x5 = 1/4.
11204                                                                    0x6 = 1/2.
11205                                                                    0x7 = Disabled. */
11206         uint64_t ctlez_timer_max       : 15; /**< [ 35: 21](R/W) CTLEZ adaptation timer maximum count value.
11207                                                                  15-bit field, maximum value 0x7FFF. */
11208         uint64_t ctlez_mu              : 3;  /**< [ 38: 36](R/W) CTLEZ adaptation mu parameter setting.
11209                                                                    0x0 = 1/16.
11210                                                                    0x1 = 1/8.
11211                                                                    0x2 = 1/4.
11212                                                                    0x3 = 1/2.
11213                                                                    0x4 = 1.
11214                                                                    0x5 = 2.
11215                                                                    0x6 = 4.
11216                                                                    0x7 = 8. */
11217         uint64_t ctlez_leak            : 3;  /**< [ 41: 39](R/W) CTLEZ adaptation leak parameter setting.
11218                                                                    0x0 = 1/128.
11219                                                                    0x1 = 1/64.
11220                                                                    0x2 = 1/32.
11221                                                                    0x3 = 1/16.
11222                                                                    0x4 = 1/8.
11223                                                                    0x5 = 1/4.
11224                                                                    0x6 = 1/2.
11225                                                                    0x7 = Disabled. */
11226         uint64_t ctlelte_timer_max     : 15; /**< [ 56: 42](R/W) CTLELTE adaptation timer maximum count value.
11227                                                                  15-bit field, maximum value 0x7FFF. */
11228         uint64_t ctlelte_mu            : 3;  /**< [ 59: 57](R/W) CTLELTE adaptation mu parameter setting.
11229                                                                    0x0 = 1/16.
11230                                                                    0x1 = 1/8.
11231                                                                    0x2 = 1/4.
11232                                                                    0x3 = 1/2.
11233                                                                    0x4 = 1.
11234                                                                    0x5 = 2.
11235                                                                    0x6 = 4.
11236                                                                    0x7 = 8. */
11237         uint64_t ctlelte_leak          : 3;  /**< [ 62: 60](R/W) CTLELTE adaptation leak parameter setting.
11238                                                                    0x0 = 1/128.
11239                                                                    0x1 = 1/64.
11240                                                                    0x2 = 1/32.
11241                                                                    0x3 = 1/16.
11242                                                                    0x4 = 1/8.
11243                                                                    0x5 = 1/4.
11244                                                                    0x6 = 1/2.
11245                                                                    0x7 = Disabled. */
11246         uint64_t ctlelte_leak_sgn      : 1;  /**< [ 63: 63](R/W) CTLELTE leak sign. 0 = Positive (add). 1 = Negative (subtract). */
11247 #endif /* Word 0 - End */
11248     } s;
11249     /* struct bdk_gsernx_lanex_rx_6_bcfg_s cn; */
11250 };
11251 typedef union bdk_gsernx_lanex_rx_6_bcfg bdk_gsernx_lanex_rx_6_bcfg_t;
11252 
11253 static inline uint64_t BDK_GSERNX_LANEX_RX_6_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_6_BCFG(unsigned long a,unsigned long b)11254 static inline uint64_t BDK_GSERNX_LANEX_RX_6_BCFG(unsigned long a, unsigned long b)
11255 {
11256     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
11257         return 0x87e090000cc0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
11258     __bdk_csr_fatal("GSERNX_LANEX_RX_6_BCFG", 2, a, b, 0, 0);
11259 }
11260 
11261 #define typedef_BDK_GSERNX_LANEX_RX_6_BCFG(a,b) bdk_gsernx_lanex_rx_6_bcfg_t
11262 #define bustype_BDK_GSERNX_LANEX_RX_6_BCFG(a,b) BDK_CSR_TYPE_RSL
11263 #define basename_BDK_GSERNX_LANEX_RX_6_BCFG(a,b) "GSERNX_LANEX_RX_6_BCFG"
11264 #define device_bar_BDK_GSERNX_LANEX_RX_6_BCFG(a,b) 0x0 /* PF_BAR0 */
11265 #define busnum_BDK_GSERNX_LANEX_RX_6_BCFG(a,b) (a)
11266 #define arguments_BDK_GSERNX_LANEX_RX_6_BCFG(a,b) (a),(b),-1,-1
11267 
11268 /**
11269  * Register (RSL) gsern#_lane#_rx_6_bsts
11270  *
11271  * GSER Lane RX Base Status Register 6
11272  * Status registers for LMS adaptation.
11273  */
11274 union bdk_gsernx_lanex_rx_6_bsts
11275 {
11276     uint64_t u;
11277     struct bdk_gsernx_lanex_rx_6_bsts_s
11278     {
11279 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
11280         uint64_t reserved_48_63        : 16;
11281         uint64_t ctlelte_adapt_count   : 15; /**< [ 47: 33](RO/H) CTLELTE adaptation timer count value. Only valid when
11282                                                                  GSERN()_LANE()_RX_6_BSTS[CTLELTE_ADAPT_STATUS] is deasserted. */
11283         uint64_t ctlelte_adapt_status  : 1;  /**< [ 32: 32](RO/H) CTLELTE adaptation status. When 0, training is inactive. When 1, training is active. */
11284         uint64_t subrate_now           : 16; /**< [ 31: 16](RO/H) Subrate_Now counter value. Only valid when
11285                                                                  GSERN()_LANE()_RX_6_BSTS[CTLELTE_ADAPT_STATUS] is deasserted. */
11286         uint64_t upv_count             : 16; /**< [ 15:  0](RO/H) UPV (Up-Vote) counter value.  Only valid when
11287                                                                  GSERN()_LANE()_RX_6_BSTS[CTLELTE_ADAPT_STATUS] is deasserted. */
11288 #else /* Word 0 - Little Endian */
11289         uint64_t upv_count             : 16; /**< [ 15:  0](RO/H) UPV (Up-Vote) counter value.  Only valid when
11290                                                                  GSERN()_LANE()_RX_6_BSTS[CTLELTE_ADAPT_STATUS] is deasserted. */
11291         uint64_t subrate_now           : 16; /**< [ 31: 16](RO/H) Subrate_Now counter value. Only valid when
11292                                                                  GSERN()_LANE()_RX_6_BSTS[CTLELTE_ADAPT_STATUS] is deasserted. */
11293         uint64_t ctlelte_adapt_status  : 1;  /**< [ 32: 32](RO/H) CTLELTE adaptation status. When 0, training is inactive. When 1, training is active. */
11294         uint64_t ctlelte_adapt_count   : 15; /**< [ 47: 33](RO/H) CTLELTE adaptation timer count value. Only valid when
11295                                                                  GSERN()_LANE()_RX_6_BSTS[CTLELTE_ADAPT_STATUS] is deasserted. */
11296         uint64_t reserved_48_63        : 16;
11297 #endif /* Word 0 - End */
11298     } s;
11299     /* struct bdk_gsernx_lanex_rx_6_bsts_s cn; */
11300 };
11301 typedef union bdk_gsernx_lanex_rx_6_bsts bdk_gsernx_lanex_rx_6_bsts_t;
11302 
11303 static inline uint64_t BDK_GSERNX_LANEX_RX_6_BSTS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_6_BSTS(unsigned long a,unsigned long b)11304 static inline uint64_t BDK_GSERNX_LANEX_RX_6_BSTS(unsigned long a, unsigned long b)
11305 {
11306     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
11307         return 0x87e0900016b0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
11308     __bdk_csr_fatal("GSERNX_LANEX_RX_6_BSTS", 2, a, b, 0, 0);
11309 }
11310 
11311 #define typedef_BDK_GSERNX_LANEX_RX_6_BSTS(a,b) bdk_gsernx_lanex_rx_6_bsts_t
11312 #define bustype_BDK_GSERNX_LANEX_RX_6_BSTS(a,b) BDK_CSR_TYPE_RSL
11313 #define basename_BDK_GSERNX_LANEX_RX_6_BSTS(a,b) "GSERNX_LANEX_RX_6_BSTS"
11314 #define device_bar_BDK_GSERNX_LANEX_RX_6_BSTS(a,b) 0x0 /* PF_BAR0 */
11315 #define busnum_BDK_GSERNX_LANEX_RX_6_BSTS(a,b) (a)
11316 #define arguments_BDK_GSERNX_LANEX_RX_6_BSTS(a,b) (a),(b),-1,-1
11317 
11318 /**
11319  * Register (RSL) gsern#_lane#_rx_7_bcfg
11320  *
11321  * GSER Lane RX Base Configuration Register 7
11322  * Adaptation reset/mode for the DFE.
11323  */
11324 union bdk_gsernx_lanex_rx_7_bcfg
11325 {
11326     uint64_t u;
11327     struct bdk_gsernx_lanex_rx_7_bcfg_s
11328     {
11329 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
11330         uint64_t reserved_28_63        : 36;
11331         uint64_t gain_diff_max         : 4;  /**< [ 27: 24](R/W) Gain Difference Maximum Value. This value is used in the correlation function
11332                                                                  for the Pre-VGA Gain and VGA Gain adaptation.
11333                                                                  The gain difference maximum value is used to manage the adapation rates of these
11334                                                                  two parameters (Pre-VGA Gain and VGA Gain). */
11335         uint64_t prevga_gn_upv_rst     : 1;  /**< [ 23: 23](R/W) PREVGA_GN UPV count reset. Set to zero before running the receiver reset state
11336                                                                  machine to bring the receiver up using PREVGA_GN adaptation subrate gear-shifting.
11337                                                                  When enabled, the gear-shifting function can increment the current subrate
11338                                                                  when the UPV count equals the current subrate (scaled). May be set to 1 if
11339                                                                  gearshifting is not used. */
11340         uint64_t prevga_gn_subrate_rst : 1;  /**< [ 22: 22](R/W) PREVGA_GN subrate counter reset. The subrate counter controls the interval between LMS
11341                                                                  updates.
11342                                                                  When 1, the counter is reset. When 0, the counter increments to the value
11343                                                                  controlled by GSERN()_LANE()_RX_21_BCFG[PREVGA_GN_SUBRATE_INIT] and
11344                                                                  GSERN()_LANE()_RX_21_BCFG[PREVGA_GN_SUBRATE_FIN]. */
11345         uint64_t prevga_gn_rst         : 2;  /**< [ 21: 20](R/W) PREVGA_GN adaptation reset/mode setting.
11346                                                                    0x0 = Reset.
11347                                                                    0x1 = Run once adaptation.
11348                                                                    0x2 = Pause adaptation.
11349                                                                    0x3 = Run continuous adaptation. */
11350         uint64_t blwc_upv_rst          : 1;  /**< [ 19: 19](R/W) BLWC UPV count reset. Set to zero before running the receiver reset state
11351                                                                  machine to bring the receiver up using BLWC adaptation subrate gearshifting.
11352                                                                  When enabled, the gearshifting function can increment the current subrate
11353                                                                  when the UPV count equals the current subrate (scaled). May be set to 1 if
11354                                                                  gearshifting is not used. */
11355         uint64_t blwc_subrate_rst      : 1;  /**< [ 18: 18](R/W) BLWC subrate counter reset. The subrate counter controls the interval between LMS updates.
11356                                                                  When 1, the counter is reset. When 0, the counter increments to the value controlled by
11357                                                                  the BLWC_SUBRATE_INIT and BLWC_SUBRATE_FINAL registers. */
11358         uint64_t blwc_rst              : 2;  /**< [ 17: 16](R/W) BLWC adaptation reset/mode setting.
11359                                                                    0x0 = Reset.
11360                                                                    0x1 = Run once adaptation.
11361                                                                    0x2 = Pause adaptation.
11362                                                                    0x3 = Run continuous adaptation. */
11363         uint64_t afeos_upv_rst         : 1;  /**< [ 15: 15](R/W) AFEOS UPV count reset. Set to zero before running the receiver reset state
11364                                                                  machine to bring the receiver up using AFEOS adaptation subrate gearshifting.
11365                                                                  When enabled, the gearshifting function can increment the current subrate
11366                                                                  when the UPV count equals the current subrate (scaled). May be set to 1 if
11367                                                                  gearshifting is not used. */
11368         uint64_t afeos_subrate_rst     : 1;  /**< [ 14: 14](R/W) AFEOS subrate counter reset. The subrate counter controls the interval between LMS
11369                                                                  updates.
11370                                                                  When 1, the counter is reset. When 0, the counter increments to the value controlled by
11371                                                                  the AFEOS_SUBRATE_INIT and AFEOS_SUBRATE_FINAL registers. */
11372         uint64_t afeos_rst             : 2;  /**< [ 13: 12](R/W) AFE offset adaptation reset/mode setting.
11373                                                                    0x0 = Reset.
11374                                                                    0x1 = Run once adaptation.
11375                                                                    0x2 = Pause adaptation.
11376                                                                    0x3 = Run continuous adaptation. */
11377         uint64_t upv_rst               : 1;  /**< [ 11: 11](R/W) UPV count reset. Set to zero before running the receiver reset state
11378                                                                  machine to bring the receiver up using adaptation subrate gearshifting.
11379                                                                  When enabled, the gearshifting function can increment the current subrate
11380                                                                  when the UPV count equals the current subrate (scaled). May be set to 1 if
11381                                                                  gearshifting is not used. */
11382         uint64_t subrate_rst           : 1;  /**< [ 10: 10](R/W) Subrate counter reset. The subrate counter controls the interval between LMS updates.
11383                                                                  When 1, the counter is reset. When 0, the counter increments to the value controlled by
11384                                                                  the SUBRATE INIT and SUBRATE_FINAL registers. */
11385         uint64_t ctlelte_rst           : 2;  /**< [  9:  8](R/W) CTLELTE adaptation reset/mode setting.
11386                                                                    0x0 = Reset.
11387                                                                    0x1 = Run once adaptation.
11388                                                                    0x2 = Pause adaptation.
11389                                                                    0x3 = Run continuous adaptation. */
11390         uint64_t ctlez_rst             : 2;  /**< [  7:  6](R/W) CTLEZ adaptation reset/mode setting.
11391                                                                    0x0 = Reset.
11392                                                                    0x1 = Run once adaptation.
11393                                                                    0x2 = Pause adaptation.
11394                                                                    0x3 = Run continuous adaptation. */
11395         uint64_t vga_rst               : 2;  /**< [  5:  4](R/W) VGA Gain adaptation reset/mode setting.
11396                                                                    0x0 = Reset.
11397                                                                    0x1 = Run once adaptation.
11398                                                                    0x2 = Pause adaptation.
11399                                                                    0x3 = Run continuous adaptation. */
11400         uint64_t ctle_rst              : 2;  /**< [  3:  2](R/W) CTLE/CTLEZ adaptation reset/mode setting.
11401                                                                    0x0 = Reset.
11402                                                                    0x1 = Run once adaptation.
11403                                                                    0x2 = Pause adaptation.
11404                                                                    0x3 = Run continuous adaptation. */
11405         uint64_t dfe_rst               : 2;  /**< [  1:  0](R/W) DFE adaptation reset/mode setting.
11406                                                                    0x0 = Reset.
11407                                                                    0x1 = Run once adaptation.
11408                                                                    0x2 = Pause adaptation.
11409                                                                    0x3 = Run continuous adaptation. */
11410 #else /* Word 0 - Little Endian */
11411         uint64_t dfe_rst               : 2;  /**< [  1:  0](R/W) DFE adaptation reset/mode setting.
11412                                                                    0x0 = Reset.
11413                                                                    0x1 = Run once adaptation.
11414                                                                    0x2 = Pause adaptation.
11415                                                                    0x3 = Run continuous adaptation. */
11416         uint64_t ctle_rst              : 2;  /**< [  3:  2](R/W) CTLE/CTLEZ adaptation reset/mode setting.
11417                                                                    0x0 = Reset.
11418                                                                    0x1 = Run once adaptation.
11419                                                                    0x2 = Pause adaptation.
11420                                                                    0x3 = Run continuous adaptation. */
11421         uint64_t vga_rst               : 2;  /**< [  5:  4](R/W) VGA Gain adaptation reset/mode setting.
11422                                                                    0x0 = Reset.
11423                                                                    0x1 = Run once adaptation.
11424                                                                    0x2 = Pause adaptation.
11425                                                                    0x3 = Run continuous adaptation. */
11426         uint64_t ctlez_rst             : 2;  /**< [  7:  6](R/W) CTLEZ adaptation reset/mode setting.
11427                                                                    0x0 = Reset.
11428                                                                    0x1 = Run once adaptation.
11429                                                                    0x2 = Pause adaptation.
11430                                                                    0x3 = Run continuous adaptation. */
11431         uint64_t ctlelte_rst           : 2;  /**< [  9:  8](R/W) CTLELTE adaptation reset/mode setting.
11432                                                                    0x0 = Reset.
11433                                                                    0x1 = Run once adaptation.
11434                                                                    0x2 = Pause adaptation.
11435                                                                    0x3 = Run continuous adaptation. */
11436         uint64_t subrate_rst           : 1;  /**< [ 10: 10](R/W) Subrate counter reset. The subrate counter controls the interval between LMS updates.
11437                                                                  When 1, the counter is reset. When 0, the counter increments to the value controlled by
11438                                                                  the SUBRATE INIT and SUBRATE_FINAL registers. */
11439         uint64_t upv_rst               : 1;  /**< [ 11: 11](R/W) UPV count reset. Set to zero before running the receiver reset state
11440                                                                  machine to bring the receiver up using adaptation subrate gearshifting.
11441                                                                  When enabled, the gearshifting function can increment the current subrate
11442                                                                  when the UPV count equals the current subrate (scaled). May be set to 1 if
11443                                                                  gearshifting is not used. */
11444         uint64_t afeos_rst             : 2;  /**< [ 13: 12](R/W) AFE offset adaptation reset/mode setting.
11445                                                                    0x0 = Reset.
11446                                                                    0x1 = Run once adaptation.
11447                                                                    0x2 = Pause adaptation.
11448                                                                    0x3 = Run continuous adaptation. */
11449         uint64_t afeos_subrate_rst     : 1;  /**< [ 14: 14](R/W) AFEOS subrate counter reset. The subrate counter controls the interval between LMS
11450                                                                  updates.
11451                                                                  When 1, the counter is reset. When 0, the counter increments to the value controlled by
11452                                                                  the AFEOS_SUBRATE_INIT and AFEOS_SUBRATE_FINAL registers. */
11453         uint64_t afeos_upv_rst         : 1;  /**< [ 15: 15](R/W) AFEOS UPV count reset. Set to zero before running the receiver reset state
11454                                                                  machine to bring the receiver up using AFEOS adaptation subrate gearshifting.
11455                                                                  When enabled, the gearshifting function can increment the current subrate
11456                                                                  when the UPV count equals the current subrate (scaled). May be set to 1 if
11457                                                                  gearshifting is not used. */
11458         uint64_t blwc_rst              : 2;  /**< [ 17: 16](R/W) BLWC adaptation reset/mode setting.
11459                                                                    0x0 = Reset.
11460                                                                    0x1 = Run once adaptation.
11461                                                                    0x2 = Pause adaptation.
11462                                                                    0x3 = Run continuous adaptation. */
11463         uint64_t blwc_subrate_rst      : 1;  /**< [ 18: 18](R/W) BLWC subrate counter reset. The subrate counter controls the interval between LMS updates.
11464                                                                  When 1, the counter is reset. When 0, the counter increments to the value controlled by
11465                                                                  the BLWC_SUBRATE_INIT and BLWC_SUBRATE_FINAL registers. */
11466         uint64_t blwc_upv_rst          : 1;  /**< [ 19: 19](R/W) BLWC UPV count reset. Set to zero before running the receiver reset state
11467                                                                  machine to bring the receiver up using BLWC adaptation subrate gearshifting.
11468                                                                  When enabled, the gearshifting function can increment the current subrate
11469                                                                  when the UPV count equals the current subrate (scaled). May be set to 1 if
11470                                                                  gearshifting is not used. */
11471         uint64_t prevga_gn_rst         : 2;  /**< [ 21: 20](R/W) PREVGA_GN adaptation reset/mode setting.
11472                                                                    0x0 = Reset.
11473                                                                    0x1 = Run once adaptation.
11474                                                                    0x2 = Pause adaptation.
11475                                                                    0x3 = Run continuous adaptation. */
11476         uint64_t prevga_gn_subrate_rst : 1;  /**< [ 22: 22](R/W) PREVGA_GN subrate counter reset. The subrate counter controls the interval between LMS
11477                                                                  updates.
11478                                                                  When 1, the counter is reset. When 0, the counter increments to the value
11479                                                                  controlled by GSERN()_LANE()_RX_21_BCFG[PREVGA_GN_SUBRATE_INIT] and
11480                                                                  GSERN()_LANE()_RX_21_BCFG[PREVGA_GN_SUBRATE_FIN]. */
11481         uint64_t prevga_gn_upv_rst     : 1;  /**< [ 23: 23](R/W) PREVGA_GN UPV count reset. Set to zero before running the receiver reset state
11482                                                                  machine to bring the receiver up using PREVGA_GN adaptation subrate gear-shifting.
11483                                                                  When enabled, the gear-shifting function can increment the current subrate
11484                                                                  when the UPV count equals the current subrate (scaled). May be set to 1 if
11485                                                                  gearshifting is not used. */
11486         uint64_t gain_diff_max         : 4;  /**< [ 27: 24](R/W) Gain Difference Maximum Value. This value is used in the correlation function
11487                                                                  for the Pre-VGA Gain and VGA Gain adaptation.
11488                                                                  The gain difference maximum value is used to manage the adapation rates of these
11489                                                                  two parameters (Pre-VGA Gain and VGA Gain). */
11490         uint64_t reserved_28_63        : 36;
11491 #endif /* Word 0 - End */
11492     } s;
11493     /* struct bdk_gsernx_lanex_rx_7_bcfg_s cn; */
11494 };
11495 typedef union bdk_gsernx_lanex_rx_7_bcfg bdk_gsernx_lanex_rx_7_bcfg_t;
11496 
11497 static inline uint64_t BDK_GSERNX_LANEX_RX_7_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_7_BCFG(unsigned long a,unsigned long b)11498 static inline uint64_t BDK_GSERNX_LANEX_RX_7_BCFG(unsigned long a, unsigned long b)
11499 {
11500     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
11501         return 0x87e090000cd0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
11502     __bdk_csr_fatal("GSERNX_LANEX_RX_7_BCFG", 2, a, b, 0, 0);
11503 }
11504 
11505 #define typedef_BDK_GSERNX_LANEX_RX_7_BCFG(a,b) bdk_gsernx_lanex_rx_7_bcfg_t
11506 #define bustype_BDK_GSERNX_LANEX_RX_7_BCFG(a,b) BDK_CSR_TYPE_RSL
11507 #define basename_BDK_GSERNX_LANEX_RX_7_BCFG(a,b) "GSERNX_LANEX_RX_7_BCFG"
11508 #define device_bar_BDK_GSERNX_LANEX_RX_7_BCFG(a,b) 0x0 /* PF_BAR0 */
11509 #define busnum_BDK_GSERNX_LANEX_RX_7_BCFG(a,b) (a)
11510 #define arguments_BDK_GSERNX_LANEX_RX_7_BCFG(a,b) (a),(b),-1,-1
11511 
11512 /**
11513  * Register (RSL) gsern#_lane#_rx_7_bsts
11514  *
11515  * GSER Lane RX Base Status Register 7
11516  * Configuration registers for LMS adaptation. Current Deadband settings for adaptation.
11517  */
11518 union bdk_gsernx_lanex_rx_7_bsts
11519 {
11520     uint64_t u;
11521     struct bdk_gsernx_lanex_rx_7_bsts_s
11522     {
11523 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
11524         uint64_t reserved_60_63        : 4;
11525         uint64_t ctlelte_deadband_now  : 12; /**< [ 59: 48](RO/H) Current 12-bit integer value of CTLELTE adaptation deadband
11526                                                                  setting. Note that the 8 fraction bits of the accumulator are not
11527                                                                  reported. Only valid when GSERN()_LANE()_RX_6_BSTS[CTLELTE_ADAPT_STATUS] is
11528                                                                  asserted. */
11529         uint64_t ctlez_deadband_now    : 12; /**< [ 47: 36](RO/H) Current 12-bit integer value of CTLEZ adaptation deadband
11530                                                                  setting. Note that the 8 fraction bits of the accumulator are not
11531                                                                  reported. Only valid when GSERN()_LANE()_RX_5_BSTS[CTLEZ_ADAPT_STATUS] is
11532                                                                  deasserted. */
11533         uint64_t ctle_deadband_now     : 12; /**< [ 35: 24](RO/H) Current 12-bit integer value of CTLE adaptation deadband
11534                                                                  setting. Note that the 8 fraction bits of the accumulator are not
11535                                                                  reported. Only valid when GSERN()_LANE()_RX_5_BSTS[CTLE_ADAPT_STATUS] is
11536                                                                  deasserted. */
11537         uint64_t dfe_deadband_now      : 12; /**< [ 23: 12](RO/H) Current 12-bit integer value of Coeff Adaptation deadband
11538                                                                  setting. Note that the 8 fraction bits of the accumulator are not
11539                                                                  reported. Only valid when GSERN()_LANE()_RX_5_BSTS[DFE_ADAPT_STATUS] is deasserted. */
11540         uint64_t vga_deadband_now      : 12; /**< [ 11:  0](RO/H) Current 12-bit integer value of VGA adaptation deadband
11541                                                                  setting. Note that the 8 fraction bits of the accumulator are not
11542                                                                  reported. Only valid when GSERN()_LANE()_RX_5_BSTS[VGA_ADAPT_STATUS] is deasserted. */
11543 #else /* Word 0 - Little Endian */
11544         uint64_t vga_deadband_now      : 12; /**< [ 11:  0](RO/H) Current 12-bit integer value of VGA adaptation deadband
11545                                                                  setting. Note that the 8 fraction bits of the accumulator are not
11546                                                                  reported. Only valid when GSERN()_LANE()_RX_5_BSTS[VGA_ADAPT_STATUS] is deasserted. */
11547         uint64_t dfe_deadband_now      : 12; /**< [ 23: 12](RO/H) Current 12-bit integer value of Coeff Adaptation deadband
11548                                                                  setting. Note that the 8 fraction bits of the accumulator are not
11549                                                                  reported. Only valid when GSERN()_LANE()_RX_5_BSTS[DFE_ADAPT_STATUS] is deasserted. */
11550         uint64_t ctle_deadband_now     : 12; /**< [ 35: 24](RO/H) Current 12-bit integer value of CTLE adaptation deadband
11551                                                                  setting. Note that the 8 fraction bits of the accumulator are not
11552                                                                  reported. Only valid when GSERN()_LANE()_RX_5_BSTS[CTLE_ADAPT_STATUS] is
11553                                                                  deasserted. */
11554         uint64_t ctlez_deadband_now    : 12; /**< [ 47: 36](RO/H) Current 12-bit integer value of CTLEZ adaptation deadband
11555                                                                  setting. Note that the 8 fraction bits of the accumulator are not
11556                                                                  reported. Only valid when GSERN()_LANE()_RX_5_BSTS[CTLEZ_ADAPT_STATUS] is
11557                                                                  deasserted. */
11558         uint64_t ctlelte_deadband_now  : 12; /**< [ 59: 48](RO/H) Current 12-bit integer value of CTLELTE adaptation deadband
11559                                                                  setting. Note that the 8 fraction bits of the accumulator are not
11560                                                                  reported. Only valid when GSERN()_LANE()_RX_6_BSTS[CTLELTE_ADAPT_STATUS] is
11561                                                                  asserted. */
11562         uint64_t reserved_60_63        : 4;
11563 #endif /* Word 0 - End */
11564     } s;
11565     /* struct bdk_gsernx_lanex_rx_7_bsts_s cn; */
11566 };
11567 typedef union bdk_gsernx_lanex_rx_7_bsts bdk_gsernx_lanex_rx_7_bsts_t;
11568 
11569 static inline uint64_t BDK_GSERNX_LANEX_RX_7_BSTS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_7_BSTS(unsigned long a,unsigned long b)11570 static inline uint64_t BDK_GSERNX_LANEX_RX_7_BSTS(unsigned long a, unsigned long b)
11571 {
11572     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
11573         return 0x87e0900016c0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
11574     __bdk_csr_fatal("GSERNX_LANEX_RX_7_BSTS", 2, a, b, 0, 0);
11575 }
11576 
11577 #define typedef_BDK_GSERNX_LANEX_RX_7_BSTS(a,b) bdk_gsernx_lanex_rx_7_bsts_t
11578 #define bustype_BDK_GSERNX_LANEX_RX_7_BSTS(a,b) BDK_CSR_TYPE_RSL
11579 #define basename_BDK_GSERNX_LANEX_RX_7_BSTS(a,b) "GSERNX_LANEX_RX_7_BSTS"
11580 #define device_bar_BDK_GSERNX_LANEX_RX_7_BSTS(a,b) 0x0 /* PF_BAR0 */
11581 #define busnum_BDK_GSERNX_LANEX_RX_7_BSTS(a,b) (a)
11582 #define arguments_BDK_GSERNX_LANEX_RX_7_BSTS(a,b) (a),(b),-1,-1
11583 
11584 /**
11585  * Register (RSL) gsern#_lane#_rx_8_bcfg
11586  *
11587  * GSER Lane RX Base Configuration Register 8
11588  * Configuration registers for LMS adaptation
11589  * Adaptation controls for Subrate parameters.
11590  */
11591 union bdk_gsernx_lanex_rx_8_bcfg
11592 {
11593     uint64_t u;
11594     struct bdk_gsernx_lanex_rx_8_bcfg_s
11595     {
11596 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
11597         uint64_t reserved_50_63        : 14;
11598         uint64_t dfe_edgemode_ovrd     : 1;  /**< [ 49: 49](R/W) 0 = Selects non-transition bits for DFE adaptation.
11599                                                                  1 = Selects transition bits for DFE adaptation.
11600 
11601                                                                  It applies the mode to the I, Q, and X paths.
11602                                                                  GSERN()_LANE()_EYE_CTL_2[CAPTURE_EDGEMODE] sets the E path. */
11603         uint64_t dfe_edgemode_ovrd_en  : 1;  /**< [ 48: 48](R/W) 0 = DFE state machine controls DFE edge mode select.
11604                                                                  Currently, the DFE FSM will time interleave between both
11605                                                                  edge modes (i.e. 50% non-transition, 50% transition).
11606 
11607                                                                  1 = [DFE_EDGEMODE_OVRD] controls DFE edge mode select. */
11608         uint64_t reserved_35_47        : 13;
11609         uint64_t subrate_scale         : 3;  /**< [ 34: 32](R/W) Subrate now counter scaling value for compare against Up Vote counter.
11610                                                                    0x0 = 1/32.
11611                                                                    0x1 = 1/16.
11612                                                                    0x2 = 3/32.
11613                                                                    0x3 = 1/8.
11614                                                                    0x4 = 3/16.
11615                                                                    0x5 = 1/4.
11616                                                                    0x6 = 3/8.
11617                                                                    0x7 = 1/2. */
11618         uint64_t subrate_init          : 16; /**< [ 31: 16](R/W) Subrate counter initial value. Sets the starting value for the LMS update interval, if
11619                                                                  subrate gearshifting is enabled.
11620                                                                  Set [SUBRATE_INIT] = [SUBRATE_FINAL] if subrate gearshifting is not
11621                                                                  enabled. */
11622         uint64_t subrate_final         : 16; /**< [ 15:  0](R/W) Subrate counter final value. Sets the final value for the LMS update interval, if subrate
11623                                                                  gearshifting is enabled.
11624                                                                  Set [SUBRATE_INIT] = [SUBRATE_FINAL] if subrate gearshifting is not
11625                                                                  enabled. */
11626 #else /* Word 0 - Little Endian */
11627         uint64_t subrate_final         : 16; /**< [ 15:  0](R/W) Subrate counter final value. Sets the final value for the LMS update interval, if subrate
11628                                                                  gearshifting is enabled.
11629                                                                  Set [SUBRATE_INIT] = [SUBRATE_FINAL] if subrate gearshifting is not
11630                                                                  enabled. */
11631         uint64_t subrate_init          : 16; /**< [ 31: 16](R/W) Subrate counter initial value. Sets the starting value for the LMS update interval, if
11632                                                                  subrate gearshifting is enabled.
11633                                                                  Set [SUBRATE_INIT] = [SUBRATE_FINAL] if subrate gearshifting is not
11634                                                                  enabled. */
11635         uint64_t subrate_scale         : 3;  /**< [ 34: 32](R/W) Subrate now counter scaling value for compare against Up Vote counter.
11636                                                                    0x0 = 1/32.
11637                                                                    0x1 = 1/16.
11638                                                                    0x2 = 3/32.
11639                                                                    0x3 = 1/8.
11640                                                                    0x4 = 3/16.
11641                                                                    0x5 = 1/4.
11642                                                                    0x6 = 3/8.
11643                                                                    0x7 = 1/2. */
11644         uint64_t reserved_35_47        : 13;
11645         uint64_t dfe_edgemode_ovrd_en  : 1;  /**< [ 48: 48](R/W) 0 = DFE state machine controls DFE edge mode select.
11646                                                                  Currently, the DFE FSM will time interleave between both
11647                                                                  edge modes (i.e. 50% non-transition, 50% transition).
11648 
11649                                                                  1 = [DFE_EDGEMODE_OVRD] controls DFE edge mode select. */
11650         uint64_t dfe_edgemode_ovrd     : 1;  /**< [ 49: 49](R/W) 0 = Selects non-transition bits for DFE adaptation.
11651                                                                  1 = Selects transition bits for DFE adaptation.
11652 
11653                                                                  It applies the mode to the I, Q, and X paths.
11654                                                                  GSERN()_LANE()_EYE_CTL_2[CAPTURE_EDGEMODE] sets the E path. */
11655         uint64_t reserved_50_63        : 14;
11656 #endif /* Word 0 - End */
11657     } s;
11658     /* struct bdk_gsernx_lanex_rx_8_bcfg_s cn; */
11659 };
11660 typedef union bdk_gsernx_lanex_rx_8_bcfg bdk_gsernx_lanex_rx_8_bcfg_t;
11661 
11662 static inline uint64_t BDK_GSERNX_LANEX_RX_8_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_8_BCFG(unsigned long a,unsigned long b)11663 static inline uint64_t BDK_GSERNX_LANEX_RX_8_BCFG(unsigned long a, unsigned long b)
11664 {
11665     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
11666         return 0x87e090000ce0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
11667     __bdk_csr_fatal("GSERNX_LANEX_RX_8_BCFG", 2, a, b, 0, 0);
11668 }
11669 
11670 #define typedef_BDK_GSERNX_LANEX_RX_8_BCFG(a,b) bdk_gsernx_lanex_rx_8_bcfg_t
11671 #define bustype_BDK_GSERNX_LANEX_RX_8_BCFG(a,b) BDK_CSR_TYPE_RSL
11672 #define basename_BDK_GSERNX_LANEX_RX_8_BCFG(a,b) "GSERNX_LANEX_RX_8_BCFG"
11673 #define device_bar_BDK_GSERNX_LANEX_RX_8_BCFG(a,b) 0x0 /* PF_BAR0 */
11674 #define busnum_BDK_GSERNX_LANEX_RX_8_BCFG(a,b) (a)
11675 #define arguments_BDK_GSERNX_LANEX_RX_8_BCFG(a,b) (a),(b),-1,-1
11676 
11677 /**
11678  * Register (RSL) gsern#_lane#_rx_8_bsts
11679  *
11680  * GSER Lane RX Base Status Register 8
11681  * Status registers for AFEOS LMS adaptation. Current AFEOS Deadband settings for adaptation.
11682  */
11683 union bdk_gsernx_lanex_rx_8_bsts
11684 {
11685     uint64_t u;
11686     struct bdk_gsernx_lanex_rx_8_bsts_s
11687     {
11688 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
11689         uint64_t afeos_subrate_now     : 16; /**< [ 63: 48](RO/H) AFEOS subrate_now counter value. Only valid when
11690                                                                  GSERN()_LANE()_RX_8_BSTS[AFEOS_ADAPT_STATUS] is clear. */
11691         uint64_t reserved_44_47        : 4;
11692         uint64_t afeos_upv_count       : 16; /**< [ 43: 28](RO/H) AFE up-vote counter value.  Only valid when
11693                                                                  GSERN()_LANE()_RX_8_BSTS[AFEOS_ADAPT_STATUS] is clear. */
11694         uint64_t afeos_adapt_status    : 1;  /**< [ 27: 27](RO/H) AFEOS adaptation status. When 0, training is inactive. When 1, training is active. */
11695         uint64_t afeos_adapt_count     : 15; /**< [ 26: 12](RO/H) AFEOS adaptation timer current count value.  15-bit field, maximum value 0x7FFF.
11696                                                                  Only valid when GSERN()_LANE()_RX_8_BSTS[AFEOS_ADAPT_STATUS] is clear. */
11697         uint64_t afeos_deadband_now    : 12; /**< [ 11:  0](RO/H) Current 12-bit integer value of AFEOS adaptation deadband
11698                                                                  setting. Note that the 8 fraction bits of the accumulator are not
11699                                                                  reported. Only valid when GSERN()_LANE()_RX_8_BSTS[AFEOS_ADAPT_STATUS] is clear. */
11700 #else /* Word 0 - Little Endian */
11701         uint64_t afeos_deadband_now    : 12; /**< [ 11:  0](RO/H) Current 12-bit integer value of AFEOS adaptation deadband
11702                                                                  setting. Note that the 8 fraction bits of the accumulator are not
11703                                                                  reported. Only valid when GSERN()_LANE()_RX_8_BSTS[AFEOS_ADAPT_STATUS] is clear. */
11704         uint64_t afeos_adapt_count     : 15; /**< [ 26: 12](RO/H) AFEOS adaptation timer current count value.  15-bit field, maximum value 0x7FFF.
11705                                                                  Only valid when GSERN()_LANE()_RX_8_BSTS[AFEOS_ADAPT_STATUS] is clear. */
11706         uint64_t afeos_adapt_status    : 1;  /**< [ 27: 27](RO/H) AFEOS adaptation status. When 0, training is inactive. When 1, training is active. */
11707         uint64_t afeos_upv_count       : 16; /**< [ 43: 28](RO/H) AFE up-vote counter value.  Only valid when
11708                                                                  GSERN()_LANE()_RX_8_BSTS[AFEOS_ADAPT_STATUS] is clear. */
11709         uint64_t reserved_44_47        : 4;
11710         uint64_t afeos_subrate_now     : 16; /**< [ 63: 48](RO/H) AFEOS subrate_now counter value. Only valid when
11711                                                                  GSERN()_LANE()_RX_8_BSTS[AFEOS_ADAPT_STATUS] is clear. */
11712 #endif /* Word 0 - End */
11713     } s;
11714     /* struct bdk_gsernx_lanex_rx_8_bsts_s cn; */
11715 };
11716 typedef union bdk_gsernx_lanex_rx_8_bsts bdk_gsernx_lanex_rx_8_bsts_t;
11717 
11718 static inline uint64_t BDK_GSERNX_LANEX_RX_8_BSTS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_8_BSTS(unsigned long a,unsigned long b)11719 static inline uint64_t BDK_GSERNX_LANEX_RX_8_BSTS(unsigned long a, unsigned long b)
11720 {
11721     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
11722         return 0x87e0900016d0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
11723     __bdk_csr_fatal("GSERNX_LANEX_RX_8_BSTS", 2, a, b, 0, 0);
11724 }
11725 
11726 #define typedef_BDK_GSERNX_LANEX_RX_8_BSTS(a,b) bdk_gsernx_lanex_rx_8_bsts_t
11727 #define bustype_BDK_GSERNX_LANEX_RX_8_BSTS(a,b) BDK_CSR_TYPE_RSL
11728 #define basename_BDK_GSERNX_LANEX_RX_8_BSTS(a,b) "GSERNX_LANEX_RX_8_BSTS"
11729 #define device_bar_BDK_GSERNX_LANEX_RX_8_BSTS(a,b) 0x0 /* PF_BAR0 */
11730 #define busnum_BDK_GSERNX_LANEX_RX_8_BSTS(a,b) (a)
11731 #define arguments_BDK_GSERNX_LANEX_RX_8_BSTS(a,b) (a),(b),-1,-1
11732 
11733 /**
11734  * Register (RSL) gsern#_lane#_rx_9_bcfg
11735  *
11736  * GSER Lane RX Base Configuration Register 9
11737  * Configuration registers for LMS adaptation. Deadband settings for adaptation.
11738  */
11739 union bdk_gsernx_lanex_rx_9_bcfg
11740 {
11741     uint64_t u;
11742     struct bdk_gsernx_lanex_rx_9_bcfg_s
11743     {
11744 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
11745         uint64_t reserved_60_63        : 4;
11746         uint64_t ctlelte_deadband      : 12; /**< [ 59: 48](R/W) CTLELTE adaptation deadband settings.
11747                                                                  12-bit field to match accumulator, but typically a value less than 0x0FF is used. */
11748         uint64_t ctlez_deadband        : 12; /**< [ 47: 36](R/W) CTLEZ adaptation deadband settings.
11749                                                                  12-bit field to match accumulator, but typically a value less than 0x0FF is used. */
11750         uint64_t ctle_deadband         : 12; /**< [ 35: 24](R/W) CTLE adaptation deadband settings.
11751                                                                  12-bit field to match accumulator, but typically a value less than 0x0FF is used. */
11752         uint64_t dfe_deadband          : 12; /**< [ 23: 12](R/W) Coeff adaptation deadband settings.
11753                                                                  12-bit field to match accumulator, but typically a value less than 0x0FF is used. */
11754         uint64_t vga_deadband          : 12; /**< [ 11:  0](R/W) VGA adaptation deadband settings.
11755                                                                  12-bit field to match accumulator, but typically a value less than 0x0FF is used. */
11756 #else /* Word 0 - Little Endian */
11757         uint64_t vga_deadband          : 12; /**< [ 11:  0](R/W) VGA adaptation deadband settings.
11758                                                                  12-bit field to match accumulator, but typically a value less than 0x0FF is used. */
11759         uint64_t dfe_deadband          : 12; /**< [ 23: 12](R/W) Coeff adaptation deadband settings.
11760                                                                  12-bit field to match accumulator, but typically a value less than 0x0FF is used. */
11761         uint64_t ctle_deadband         : 12; /**< [ 35: 24](R/W) CTLE adaptation deadband settings.
11762                                                                  12-bit field to match accumulator, but typically a value less than 0x0FF is used. */
11763         uint64_t ctlez_deadband        : 12; /**< [ 47: 36](R/W) CTLEZ adaptation deadband settings.
11764                                                                  12-bit field to match accumulator, but typically a value less than 0x0FF is used. */
11765         uint64_t ctlelte_deadband      : 12; /**< [ 59: 48](R/W) CTLELTE adaptation deadband settings.
11766                                                                  12-bit field to match accumulator, but typically a value less than 0x0FF is used. */
11767         uint64_t reserved_60_63        : 4;
11768 #endif /* Word 0 - End */
11769     } s;
11770     /* struct bdk_gsernx_lanex_rx_9_bcfg_s cn; */
11771 };
11772 typedef union bdk_gsernx_lanex_rx_9_bcfg bdk_gsernx_lanex_rx_9_bcfg_t;
11773 
11774 static inline uint64_t BDK_GSERNX_LANEX_RX_9_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_9_BCFG(unsigned long a,unsigned long b)11775 static inline uint64_t BDK_GSERNX_LANEX_RX_9_BCFG(unsigned long a, unsigned long b)
11776 {
11777     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
11778         return 0x87e090000cf0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
11779     __bdk_csr_fatal("GSERNX_LANEX_RX_9_BCFG", 2, a, b, 0, 0);
11780 }
11781 
11782 #define typedef_BDK_GSERNX_LANEX_RX_9_BCFG(a,b) bdk_gsernx_lanex_rx_9_bcfg_t
11783 #define bustype_BDK_GSERNX_LANEX_RX_9_BCFG(a,b) BDK_CSR_TYPE_RSL
11784 #define basename_BDK_GSERNX_LANEX_RX_9_BCFG(a,b) "GSERNX_LANEX_RX_9_BCFG"
11785 #define device_bar_BDK_GSERNX_LANEX_RX_9_BCFG(a,b) 0x0 /* PF_BAR0 */
11786 #define busnum_BDK_GSERNX_LANEX_RX_9_BCFG(a,b) (a)
11787 #define arguments_BDK_GSERNX_LANEX_RX_9_BCFG(a,b) (a),(b),-1,-1
11788 
11789 /**
11790  * Register (RSL) gsern#_lane#_rx_9_bsts
11791  *
11792  * GSER Lane RX Base Status Register 9
11793  * Status registers for DFE LMS adaptation.
11794  */
11795 union bdk_gsernx_lanex_rx_9_bsts
11796 {
11797     uint64_t u;
11798     struct bdk_gsernx_lanex_rx_9_bsts_s
11799     {
11800 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
11801         uint64_t reserved_12_63        : 52;
11802         uint64_t dfe_c1_deadband_now   : 12; /**< [ 11:  0](RO/H) Current 12-bit integer value of Coeff adaptation deadband
11803                                                                  setting. Note that the 8 fraction bits of the accumulator are not
11804                                                                  reported. Only valid when GSERN()_LANE()_RX_5_BSTS[DFE_ADAPT_STATUS] is clear. */
11805 #else /* Word 0 - Little Endian */
11806         uint64_t dfe_c1_deadband_now   : 12; /**< [ 11:  0](RO/H) Current 12-bit integer value of Coeff adaptation deadband
11807                                                                  setting. Note that the 8 fraction bits of the accumulator are not
11808                                                                  reported. Only valid when GSERN()_LANE()_RX_5_BSTS[DFE_ADAPT_STATUS] is clear. */
11809         uint64_t reserved_12_63        : 52;
11810 #endif /* Word 0 - End */
11811     } s;
11812     /* struct bdk_gsernx_lanex_rx_9_bsts_s cn; */
11813 };
11814 typedef union bdk_gsernx_lanex_rx_9_bsts bdk_gsernx_lanex_rx_9_bsts_t;
11815 
11816 static inline uint64_t BDK_GSERNX_LANEX_RX_9_BSTS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_9_BSTS(unsigned long a,unsigned long b)11817 static inline uint64_t BDK_GSERNX_LANEX_RX_9_BSTS(unsigned long a, unsigned long b)
11818 {
11819     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
11820         return 0x87e0900016e0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
11821     __bdk_csr_fatal("GSERNX_LANEX_RX_9_BSTS", 2, a, b, 0, 0);
11822 }
11823 
11824 #define typedef_BDK_GSERNX_LANEX_RX_9_BSTS(a,b) bdk_gsernx_lanex_rx_9_bsts_t
11825 #define bustype_BDK_GSERNX_LANEX_RX_9_BSTS(a,b) BDK_CSR_TYPE_RSL
11826 #define basename_BDK_GSERNX_LANEX_RX_9_BSTS(a,b) "GSERNX_LANEX_RX_9_BSTS"
11827 #define device_bar_BDK_GSERNX_LANEX_RX_9_BSTS(a,b) 0x0 /* PF_BAR0 */
11828 #define busnum_BDK_GSERNX_LANEX_RX_9_BSTS(a,b) (a)
11829 #define arguments_BDK_GSERNX_LANEX_RX_9_BSTS(a,b) (a),(b),-1,-1
11830 
11831 /**
11832  * Register (RSL) gsern#_lane#_rx_idle_cal_cfg
11833  *
11834  * GSER Lane RX Idle Offset Dynamic ReCalibration Control Register
11835  * Idle dynamic recalibration FSM control register.  Used to configure the duration,
11836  * frequency, and modes for the dynamic recalibration of the idle offset.  Also,
11837  * allows for enable/disable of this feature.
11838  */
11839 union bdk_gsernx_lanex_rx_idle_cal_cfg
11840 {
11841     uint64_t u;
11842     struct bdk_gsernx_lanex_rx_idle_cal_cfg_s
11843     {
11844 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
11845         uint64_t idle_recal_disable    : 1;  /**< [ 63: 63](R/W) Single bit for enabling or disability the recalibration if idle offset.  (This
11846                                                                  bit does not affect the initial calibration of the idle offset).
11847                                                                    0 = Allow idle recalibration to run.
11848                                                                    1 = Disable dynamic recalibration of the idle offset. */
11849         uint64_t idle_recal_oob_mode_disable : 1;/**< [ 62: 62](R/W) Single bit for enabling or disability the dynamic recalibration OOB delay feature.
11850                                                                  This feature allows us to push out any idle offset recalibration when any OOB
11851                                                                  activity has been detected on the idle signal.
11852                                                                    0 = Allow idle recalibration to detect OOB transactions and delay recalibration
11853                                                                    1 = Disable OOB transaction detection and do NOT delay recalibration. */
11854         uint64_t idle_oob_adder_counter_clear : 1;/**< [ 61: 61](R/W) This bit one set to high, forces the counter counting the number of OOB caused
11855                                                                  dealys to 8'h00.  This is a static clear signal and has to be asserted to enable
11856                                                                  the counter to resume counting.  The count is in terms of the number of
11857                                                                  RECALIBRATION_OOB_COUNT_ADDER increments.
11858                                                                    0 = Allow [OOB_DELAY_ADDER_COUNT] to increment.
11859                                                                    1 = Forces [OOB_DELAY_ADDER_COUNT] to 0x0.
11860 
11861                                                                  Internal:
11862                                                                  FIXME no such field RECALIBRATION_OOB_COUNT_ADDER then remove above exempt attribute. */
11863         uint64_t reserved_40_60        : 21;
11864         uint64_t max_oob_adder_count   : 8;  /**< [ 39: 32](R/W) Maximum number of OOB forced pushouts of the idle recalibrations allowed.  If the
11865                                                                  number of pushouts matches this number, the idle offset is forced to recalibrate
11866                                                                  regardless of the state of the link. */
11867         uint64_t oob_delay_adder_count : 32; /**< [ 31:  0](R/W) Number of svc_clk ticks allowed to delay the idle recalibration.  Default is equal to
11868                                                                  1 second based on a 10 ns service clock cycle time. */
11869 #else /* Word 0 - Little Endian */
11870         uint64_t oob_delay_adder_count : 32; /**< [ 31:  0](R/W) Number of svc_clk ticks allowed to delay the idle recalibration.  Default is equal to
11871                                                                  1 second based on a 10 ns service clock cycle time. */
11872         uint64_t max_oob_adder_count   : 8;  /**< [ 39: 32](R/W) Maximum number of OOB forced pushouts of the idle recalibrations allowed.  If the
11873                                                                  number of pushouts matches this number, the idle offset is forced to recalibrate
11874                                                                  regardless of the state of the link. */
11875         uint64_t reserved_40_60        : 21;
11876         uint64_t idle_oob_adder_counter_clear : 1;/**< [ 61: 61](R/W) This bit one set to high, forces the counter counting the number of OOB caused
11877                                                                  dealys to 8'h00.  This is a static clear signal and has to be asserted to enable
11878                                                                  the counter to resume counting.  The count is in terms of the number of
11879                                                                  RECALIBRATION_OOB_COUNT_ADDER increments.
11880                                                                    0 = Allow [OOB_DELAY_ADDER_COUNT] to increment.
11881                                                                    1 = Forces [OOB_DELAY_ADDER_COUNT] to 0x0.
11882 
11883                                                                  Internal:
11884                                                                  FIXME no such field RECALIBRATION_OOB_COUNT_ADDER then remove above exempt attribute. */
11885         uint64_t idle_recal_oob_mode_disable : 1;/**< [ 62: 62](R/W) Single bit for enabling or disability the dynamic recalibration OOB delay feature.
11886                                                                  This feature allows us to push out any idle offset recalibration when any OOB
11887                                                                  activity has been detected on the idle signal.
11888                                                                    0 = Allow idle recalibration to detect OOB transactions and delay recalibration
11889                                                                    1 = Disable OOB transaction detection and do NOT delay recalibration. */
11890         uint64_t idle_recal_disable    : 1;  /**< [ 63: 63](R/W) Single bit for enabling or disability the recalibration if idle offset.  (This
11891                                                                  bit does not affect the initial calibration of the idle offset).
11892                                                                    0 = Allow idle recalibration to run.
11893                                                                    1 = Disable dynamic recalibration of the idle offset. */
11894 #endif /* Word 0 - End */
11895     } s;
11896     /* struct bdk_gsernx_lanex_rx_idle_cal_cfg_s cn; */
11897 };
11898 typedef union bdk_gsernx_lanex_rx_idle_cal_cfg bdk_gsernx_lanex_rx_idle_cal_cfg_t;
11899 
11900 static inline uint64_t BDK_GSERNX_LANEX_RX_IDLE_CAL_CFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_IDLE_CAL_CFG(unsigned long a,unsigned long b)11901 static inline uint64_t BDK_GSERNX_LANEX_RX_IDLE_CAL_CFG(unsigned long a, unsigned long b)
11902 {
11903     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
11904         return 0x87e090001530ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
11905     __bdk_csr_fatal("GSERNX_LANEX_RX_IDLE_CAL_CFG", 2, a, b, 0, 0);
11906 }
11907 
11908 #define typedef_BDK_GSERNX_LANEX_RX_IDLE_CAL_CFG(a,b) bdk_gsernx_lanex_rx_idle_cal_cfg_t
11909 #define bustype_BDK_GSERNX_LANEX_RX_IDLE_CAL_CFG(a,b) BDK_CSR_TYPE_RSL
11910 #define basename_BDK_GSERNX_LANEX_RX_IDLE_CAL_CFG(a,b) "GSERNX_LANEX_RX_IDLE_CAL_CFG"
11911 #define device_bar_BDK_GSERNX_LANEX_RX_IDLE_CAL_CFG(a,b) 0x0 /* PF_BAR0 */
11912 #define busnum_BDK_GSERNX_LANEX_RX_IDLE_CAL_CFG(a,b) (a)
11913 #define arguments_BDK_GSERNX_LANEX_RX_IDLE_CAL_CFG(a,b) (a),(b),-1,-1
11914 
11915 /**
11916  * Register (RSL) gsern#_lane#_rx_idle_recal_cnt
11917  *
11918  * GSER Lane RX Idle Duration Count Before ReCalibration Register
11919  * Count used to specify the duration of time between idle offset recalibrations.
11920  */
11921 union bdk_gsernx_lanex_rx_idle_recal_cnt
11922 {
11923     uint64_t u;
11924     struct bdk_gsernx_lanex_rx_idle_recal_cnt_s
11925     {
11926 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
11927         uint64_t reserved_48_63        : 16;
11928         uint64_t idle_recal_duration_count : 48;/**< [ 47:  0](R/W) Number of svc_clk ticks to specify the delay between idle recalibration
11929                                                                  triggers.  Default is equal to
11930                                                                  1 min based on a 10ns svc_clk cycle time. */
11931 #else /* Word 0 - Little Endian */
11932         uint64_t idle_recal_duration_count : 48;/**< [ 47:  0](R/W) Number of svc_clk ticks to specify the delay between idle recalibration
11933                                                                  triggers.  Default is equal to
11934                                                                  1 min based on a 10ns svc_clk cycle time. */
11935         uint64_t reserved_48_63        : 16;
11936 #endif /* Word 0 - End */
11937     } s;
11938     /* struct bdk_gsernx_lanex_rx_idle_recal_cnt_s cn; */
11939 };
11940 typedef union bdk_gsernx_lanex_rx_idle_recal_cnt bdk_gsernx_lanex_rx_idle_recal_cnt_t;
11941 
11942 static inline uint64_t BDK_GSERNX_LANEX_RX_IDLE_RECAL_CNT(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_IDLE_RECAL_CNT(unsigned long a,unsigned long b)11943 static inline uint64_t BDK_GSERNX_LANEX_RX_IDLE_RECAL_CNT(unsigned long a, unsigned long b)
11944 {
11945     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
11946         return 0x87e090001540ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
11947     __bdk_csr_fatal("GSERNX_LANEX_RX_IDLE_RECAL_CNT", 2, a, b, 0, 0);
11948 }
11949 
11950 #define typedef_BDK_GSERNX_LANEX_RX_IDLE_RECAL_CNT(a,b) bdk_gsernx_lanex_rx_idle_recal_cnt_t
11951 #define bustype_BDK_GSERNX_LANEX_RX_IDLE_RECAL_CNT(a,b) BDK_CSR_TYPE_RSL
11952 #define basename_BDK_GSERNX_LANEX_RX_IDLE_RECAL_CNT(a,b) "GSERNX_LANEX_RX_IDLE_RECAL_CNT"
11953 #define device_bar_BDK_GSERNX_LANEX_RX_IDLE_RECAL_CNT(a,b) 0x0 /* PF_BAR0 */
11954 #define busnum_BDK_GSERNX_LANEX_RX_IDLE_RECAL_CNT(a,b) (a)
11955 #define arguments_BDK_GSERNX_LANEX_RX_IDLE_RECAL_CNT(a,b) (a),(b),-1,-1
11956 
11957 /**
11958  * Register (RSL) gsern#_lane#_rx_idledet_1_bcfg
11959  *
11960  * GSER Lane RX Idle Detection Filter Control Register 1
11961  * Parameters controlling the digital filter of the analog receiver's raw idle
11962  * signal. Setting all fields to 1, i.e., N0=N1=I0=I1=L0=L1=1, results in no filtering.
11963  */
11964 union bdk_gsernx_lanex_rx_idledet_1_bcfg
11965 {
11966     uint64_t u;
11967     struct bdk_gsernx_lanex_rx_idledet_1_bcfg_s
11968     {
11969 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
11970         uint64_t reset_filter          : 1;  /**< [ 63: 63](R/W) Reset for the digital filter of the analog receiver's raw idle signal. Set the
11971                                                                  other fields in this register as desired before releasing [RESET_FILTER]. Note
11972                                                                  that while the filter is in reset, the filter output will be high, indicating
11973                                                                  idle.
11974                                                                    0 = Allow filter to run.
11975                                                                    1 = Hold filter in reset. */
11976         uint64_t i1                    : 4;  /**< [ 62: 59](R/W) Ones count increment parameter. When a one in the raw idle signal from the custom
11977                                                                  macro is encountered, the ones count is incremented by this amount, saturating
11978                                                                  to a maximum of [N1]. */
11979         uint64_t i0                    : 4;  /**< [ 58: 55](R/W) Zeros count increment parameter. When a zero in the raw idle signal from the
11980                                                                  custom macro is encountered, the zeros count is incremented by this amount,
11981                                                                  saturating to a maximum count of [N0]. */
11982         uint64_t reserved_54           : 1;
11983         uint64_t n1                    : 27; /**< [ 53: 27](R/W) Threshold for the count of ones in the raw idle signal from the custom macro
11984                                                                  required to assert the idle filter output. */
11985         uint64_t n0                    : 27; /**< [ 26:  0](R/W) Threshold for the count of zeros in the raw idle signal from the custom macro
11986                                                                  required to deassert the idle filter output. */
11987 #else /* Word 0 - Little Endian */
11988         uint64_t n0                    : 27; /**< [ 26:  0](R/W) Threshold for the count of zeros in the raw idle signal from the custom macro
11989                                                                  required to deassert the idle filter output. */
11990         uint64_t n1                    : 27; /**< [ 53: 27](R/W) Threshold for the count of ones in the raw idle signal from the custom macro
11991                                                                  required to assert the idle filter output. */
11992         uint64_t reserved_54           : 1;
11993         uint64_t i0                    : 4;  /**< [ 58: 55](R/W) Zeros count increment parameter. When a zero in the raw idle signal from the
11994                                                                  custom macro is encountered, the zeros count is incremented by this amount,
11995                                                                  saturating to a maximum count of [N0]. */
11996         uint64_t i1                    : 4;  /**< [ 62: 59](R/W) Ones count increment parameter. When a one in the raw idle signal from the custom
11997                                                                  macro is encountered, the ones count is incremented by this amount, saturating
11998                                                                  to a maximum of [N1]. */
11999         uint64_t reset_filter          : 1;  /**< [ 63: 63](R/W) Reset for the digital filter of the analog receiver's raw idle signal. Set the
12000                                                                  other fields in this register as desired before releasing [RESET_FILTER]. Note
12001                                                                  that while the filter is in reset, the filter output will be high, indicating
12002                                                                  idle.
12003                                                                    0 = Allow filter to run.
12004                                                                    1 = Hold filter in reset. */
12005 #endif /* Word 0 - End */
12006     } s;
12007     /* struct bdk_gsernx_lanex_rx_idledet_1_bcfg_s cn; */
12008 };
12009 typedef union bdk_gsernx_lanex_rx_idledet_1_bcfg bdk_gsernx_lanex_rx_idledet_1_bcfg_t;
12010 
12011 static inline uint64_t BDK_GSERNX_LANEX_RX_IDLEDET_1_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_IDLEDET_1_BCFG(unsigned long a,unsigned long b)12012 static inline uint64_t BDK_GSERNX_LANEX_RX_IDLEDET_1_BCFG(unsigned long a, unsigned long b)
12013 {
12014     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
12015         return 0x87e090001100ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
12016     __bdk_csr_fatal("GSERNX_LANEX_RX_IDLEDET_1_BCFG", 2, a, b, 0, 0);
12017 }
12018 
12019 #define typedef_BDK_GSERNX_LANEX_RX_IDLEDET_1_BCFG(a,b) bdk_gsernx_lanex_rx_idledet_1_bcfg_t
12020 #define bustype_BDK_GSERNX_LANEX_RX_IDLEDET_1_BCFG(a,b) BDK_CSR_TYPE_RSL
12021 #define basename_BDK_GSERNX_LANEX_RX_IDLEDET_1_BCFG(a,b) "GSERNX_LANEX_RX_IDLEDET_1_BCFG"
12022 #define device_bar_BDK_GSERNX_LANEX_RX_IDLEDET_1_BCFG(a,b) 0x0 /* PF_BAR0 */
12023 #define busnum_BDK_GSERNX_LANEX_RX_IDLEDET_1_BCFG(a,b) (a)
12024 #define arguments_BDK_GSERNX_LANEX_RX_IDLEDET_1_BCFG(a,b) (a),(b),-1,-1
12025 
12026 /**
12027  * Register (RSL) gsern#_lane#_rx_idledet_2_bcfg
12028  *
12029  * GSER Lane RX Idle Detection Filter Control Register 2
12030  * Parameters controlling the digital filter of the analog receiver's raw idle
12031  * signal. Setting all fields to 1, i.e., N0=N1=I0=I1=L0=L1=1, results in no filtering.
12032  */
12033 union bdk_gsernx_lanex_rx_idledet_2_bcfg
12034 {
12035     uint64_t u;
12036     struct bdk_gsernx_lanex_rx_idledet_2_bcfg_s
12037     {
12038 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
12039         uint64_t reserved_56_63        : 8;
12040         uint64_t frc_en                : 1;  /**< [ 55: 55](R/W) Force enable.
12041                                                                  0 = Use the filter output based on the input from the analog idle detector.
12042                                                                  1 = Force the output of the digital idle filter to the value specified by
12043                                                                  [FRC_VAL]. */
12044         uint64_t frc_val               : 1;  /**< [ 54: 54](R/W) When [FRC_EN] is set to 1, this will be the value forced at the output of the
12045                                                                  digital idle filter. */
12046         uint64_t l1                    : 27; /**< [ 53: 27](R/W) Ones count leak parameter. When a zero in the raw idle signal from the custom
12047                                                                  macro is encountered, the ones count is decremented by this amount, saturating
12048                                                                  to a minimum count of zero. (Set L1=N1 and I1=1 for a simple run-of-N1 ones to
12049                                                                  assert the filter output.) The minimum setting for this field is 1. */
12050         uint64_t l0                    : 27; /**< [ 26:  0](R/W) Zeros count leak parameter. When a one in the raw idle signal from the custom
12051                                                                  macro is encountered, the zeros count is decremented by this amount, saturating
12052                                                                  to a minimum count of zero. (Set L0=N0 and I0=1 for a simple run-of-N0 zeros to
12053                                                                  deassert the filter output.) The minimum setting for this field is 1. */
12054 #else /* Word 0 - Little Endian */
12055         uint64_t l0                    : 27; /**< [ 26:  0](R/W) Zeros count leak parameter. When a one in the raw idle signal from the custom
12056                                                                  macro is encountered, the zeros count is decremented by this amount, saturating
12057                                                                  to a minimum count of zero. (Set L0=N0 and I0=1 for a simple run-of-N0 zeros to
12058                                                                  deassert the filter output.) The minimum setting for this field is 1. */
12059         uint64_t l1                    : 27; /**< [ 53: 27](R/W) Ones count leak parameter. When a zero in the raw idle signal from the custom
12060                                                                  macro is encountered, the ones count is decremented by this amount, saturating
12061                                                                  to a minimum count of zero. (Set L1=N1 and I1=1 for a simple run-of-N1 ones to
12062                                                                  assert the filter output.) The minimum setting for this field is 1. */
12063         uint64_t frc_val               : 1;  /**< [ 54: 54](R/W) When [FRC_EN] is set to 1, this will be the value forced at the output of the
12064                                                                  digital idle filter. */
12065         uint64_t frc_en                : 1;  /**< [ 55: 55](R/W) Force enable.
12066                                                                  0 = Use the filter output based on the input from the analog idle detector.
12067                                                                  1 = Force the output of the digital idle filter to the value specified by
12068                                                                  [FRC_VAL]. */
12069         uint64_t reserved_56_63        : 8;
12070 #endif /* Word 0 - End */
12071     } s;
12072     /* struct bdk_gsernx_lanex_rx_idledet_2_bcfg_s cn; */
12073 };
12074 typedef union bdk_gsernx_lanex_rx_idledet_2_bcfg bdk_gsernx_lanex_rx_idledet_2_bcfg_t;
12075 
12076 static inline uint64_t BDK_GSERNX_LANEX_RX_IDLEDET_2_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_IDLEDET_2_BCFG(unsigned long a,unsigned long b)12077 static inline uint64_t BDK_GSERNX_LANEX_RX_IDLEDET_2_BCFG(unsigned long a, unsigned long b)
12078 {
12079     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
12080         return 0x87e090001110ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
12081     __bdk_csr_fatal("GSERNX_LANEX_RX_IDLEDET_2_BCFG", 2, a, b, 0, 0);
12082 }
12083 
12084 #define typedef_BDK_GSERNX_LANEX_RX_IDLEDET_2_BCFG(a,b) bdk_gsernx_lanex_rx_idledet_2_bcfg_t
12085 #define bustype_BDK_GSERNX_LANEX_RX_IDLEDET_2_BCFG(a,b) BDK_CSR_TYPE_RSL
12086 #define basename_BDK_GSERNX_LANEX_RX_IDLEDET_2_BCFG(a,b) "GSERNX_LANEX_RX_IDLEDET_2_BCFG"
12087 #define device_bar_BDK_GSERNX_LANEX_RX_IDLEDET_2_BCFG(a,b) 0x0 /* PF_BAR0 */
12088 #define busnum_BDK_GSERNX_LANEX_RX_IDLEDET_2_BCFG(a,b) (a)
12089 #define arguments_BDK_GSERNX_LANEX_RX_IDLEDET_2_BCFG(a,b) (a),(b),-1,-1
12090 
12091 /**
12092  * Register (RSL) gsern#_lane#_rx_idledet_bsts
12093  *
12094  * GSER Lane RX Base Idle Status Register
12095  * Status register for receiver idle detection status.
12096  */
12097 union bdk_gsernx_lanex_rx_idledet_bsts
12098 {
12099     uint64_t u;
12100     struct bdk_gsernx_lanex_rx_idledet_bsts_s
12101     {
12102 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
12103         uint64_t reserved_1_63         : 63;
12104         uint64_t idle                  : 1;  /**< [  0:  0](RO/H) One indicates that the receiver idle detection circuit has detected no input
12105                                                                  data stream. Valid results can be expected anytime after the custom receiver
12106                                                                  power-up and reset-exit sequence is complete. This is the output of the digital
12107                                                                  idle detection filter. */
12108 #else /* Word 0 - Little Endian */
12109         uint64_t idle                  : 1;  /**< [  0:  0](RO/H) One indicates that the receiver idle detection circuit has detected no input
12110                                                                  data stream. Valid results can be expected anytime after the custom receiver
12111                                                                  power-up and reset-exit sequence is complete. This is the output of the digital
12112                                                                  idle detection filter. */
12113         uint64_t reserved_1_63         : 63;
12114 #endif /* Word 0 - End */
12115     } s;
12116     /* struct bdk_gsernx_lanex_rx_idledet_bsts_s cn; */
12117 };
12118 typedef union bdk_gsernx_lanex_rx_idledet_bsts bdk_gsernx_lanex_rx_idledet_bsts_t;
12119 
12120 static inline uint64_t BDK_GSERNX_LANEX_RX_IDLEDET_BSTS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_IDLEDET_BSTS(unsigned long a,unsigned long b)12121 static inline uint64_t BDK_GSERNX_LANEX_RX_IDLEDET_BSTS(unsigned long a, unsigned long b)
12122 {
12123     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
12124         return 0x87e090001120ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
12125     __bdk_csr_fatal("GSERNX_LANEX_RX_IDLEDET_BSTS", 2, a, b, 0, 0);
12126 }
12127 
12128 #define typedef_BDK_GSERNX_LANEX_RX_IDLEDET_BSTS(a,b) bdk_gsernx_lanex_rx_idledet_bsts_t
12129 #define bustype_BDK_GSERNX_LANEX_RX_IDLEDET_BSTS(a,b) BDK_CSR_TYPE_RSL
12130 #define basename_BDK_GSERNX_LANEX_RX_IDLEDET_BSTS(a,b) "GSERNX_LANEX_RX_IDLEDET_BSTS"
12131 #define device_bar_BDK_GSERNX_LANEX_RX_IDLEDET_BSTS(a,b) 0x0 /* PF_BAR0 */
12132 #define busnum_BDK_GSERNX_LANEX_RX_IDLEDET_BSTS(a,b) (a)
12133 #define arguments_BDK_GSERNX_LANEX_RX_IDLEDET_BSTS(a,b) (a),(b),-1,-1
12134 
12135 /**
12136  * Register (RSL) gsern#_lane#_rx_itrim_0_bcfg
12137  *
12138  * GSER Lane Receiver Ir25 Trim Override Value Settings Register 0
12139  * ir25_trim override settings are in groups of 4 bits. These only take
12140  * effect when the corresponding enable bit(s) are set.
12141  */
12142 union bdk_gsernx_lanex_rx_itrim_0_bcfg
12143 {
12144     uint64_t u;
12145     struct bdk_gsernx_lanex_rx_itrim_0_bcfg_s
12146     {
12147 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
12148         uint64_t trim15_ovrd           : 4;  /**< [ 63: 60](R/W) Override setting for bits 87..84 of 180b ir25_trim. */
12149         uint64_t trim14_ovrd           : 4;  /**< [ 59: 56](R/W) Override setting for bits 83..80 of 180b ir25_trim. */
12150         uint64_t trim13_ovrd           : 4;  /**< [ 55: 52](R/W) Override setting for bits 79..76 of 180b ir25_trim. */
12151         uint64_t trim12_ovrd           : 4;  /**< [ 51: 48](R/W) Override setting for bits 75..72 of 180b ir25_trim. */
12152         uint64_t trim11_ovrd           : 4;  /**< [ 47: 44](R/W) Override setting for bits 71..68 of 180b ir25_trim. */
12153         uint64_t trim10_ovrd           : 4;  /**< [ 43: 40](R/W) Override setting for bits 67..64 of 180b ir25_trim. */
12154         uint64_t trim9_ovrd            : 4;  /**< [ 39: 36](R/W) Override setting for bits 63..60 of 180b ir25_trim. */
12155         uint64_t trim8_ovrd            : 4;  /**< [ 35: 32](R/W) Override setting for bits 59..56 of 180b ir25_trim. */
12156         uint64_t trim7_ovrd            : 4;  /**< [ 31: 28](R/W) Override setting for bits 55..52 of 180b ir25_trim. */
12157         uint64_t trim6_ovrd            : 4;  /**< [ 27: 24](R/W) Override setting for bits 51..48 of 180b ir25_trim. */
12158         uint64_t trim5_ovrd            : 4;  /**< [ 23: 20](R/W) Override setting for bits 47..44 of 180b ir25_trim. */
12159         uint64_t trim4_ovrd            : 4;  /**< [ 19: 16](R/W) Override setting for bits 43..40 of 180b ir25_trim. */
12160         uint64_t trim3_ovrd            : 4;  /**< [ 15: 12](R/W) Override setting for bits 39..36 of 180b ir25_trim. */
12161         uint64_t trim2_ovrd            : 4;  /**< [ 11:  8](R/W) Override setting for bits 35..32 of 180b ir25_trim. */
12162         uint64_t trim1_ovrd            : 4;  /**< [  7:  4](R/W) Override setting for bits 31..28 of 180b ir25_trim. */
12163         uint64_t reserved_0_3          : 4;
12164 #else /* Word 0 - Little Endian */
12165         uint64_t reserved_0_3          : 4;
12166         uint64_t trim1_ovrd            : 4;  /**< [  7:  4](R/W) Override setting for bits 31..28 of 180b ir25_trim. */
12167         uint64_t trim2_ovrd            : 4;  /**< [ 11:  8](R/W) Override setting for bits 35..32 of 180b ir25_trim. */
12168         uint64_t trim3_ovrd            : 4;  /**< [ 15: 12](R/W) Override setting for bits 39..36 of 180b ir25_trim. */
12169         uint64_t trim4_ovrd            : 4;  /**< [ 19: 16](R/W) Override setting for bits 43..40 of 180b ir25_trim. */
12170         uint64_t trim5_ovrd            : 4;  /**< [ 23: 20](R/W) Override setting for bits 47..44 of 180b ir25_trim. */
12171         uint64_t trim6_ovrd            : 4;  /**< [ 27: 24](R/W) Override setting for bits 51..48 of 180b ir25_trim. */
12172         uint64_t trim7_ovrd            : 4;  /**< [ 31: 28](R/W) Override setting for bits 55..52 of 180b ir25_trim. */
12173         uint64_t trim8_ovrd            : 4;  /**< [ 35: 32](R/W) Override setting for bits 59..56 of 180b ir25_trim. */
12174         uint64_t trim9_ovrd            : 4;  /**< [ 39: 36](R/W) Override setting for bits 63..60 of 180b ir25_trim. */
12175         uint64_t trim10_ovrd           : 4;  /**< [ 43: 40](R/W) Override setting for bits 67..64 of 180b ir25_trim. */
12176         uint64_t trim11_ovrd           : 4;  /**< [ 47: 44](R/W) Override setting for bits 71..68 of 180b ir25_trim. */
12177         uint64_t trim12_ovrd           : 4;  /**< [ 51: 48](R/W) Override setting for bits 75..72 of 180b ir25_trim. */
12178         uint64_t trim13_ovrd           : 4;  /**< [ 55: 52](R/W) Override setting for bits 79..76 of 180b ir25_trim. */
12179         uint64_t trim14_ovrd           : 4;  /**< [ 59: 56](R/W) Override setting for bits 83..80 of 180b ir25_trim. */
12180         uint64_t trim15_ovrd           : 4;  /**< [ 63: 60](R/W) Override setting for bits 87..84 of 180b ir25_trim. */
12181 #endif /* Word 0 - End */
12182     } s;
12183     /* struct bdk_gsernx_lanex_rx_itrim_0_bcfg_s cn; */
12184 };
12185 typedef union bdk_gsernx_lanex_rx_itrim_0_bcfg bdk_gsernx_lanex_rx_itrim_0_bcfg_t;
12186 
12187 static inline uint64_t BDK_GSERNX_LANEX_RX_ITRIM_0_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_ITRIM_0_BCFG(unsigned long a,unsigned long b)12188 static inline uint64_t BDK_GSERNX_LANEX_RX_ITRIM_0_BCFG(unsigned long a, unsigned long b)
12189 {
12190     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
12191         return 0x87e090001a80ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
12192     __bdk_csr_fatal("GSERNX_LANEX_RX_ITRIM_0_BCFG", 2, a, b, 0, 0);
12193 }
12194 
12195 #define typedef_BDK_GSERNX_LANEX_RX_ITRIM_0_BCFG(a,b) bdk_gsernx_lanex_rx_itrim_0_bcfg_t
12196 #define bustype_BDK_GSERNX_LANEX_RX_ITRIM_0_BCFG(a,b) BDK_CSR_TYPE_RSL
12197 #define basename_BDK_GSERNX_LANEX_RX_ITRIM_0_BCFG(a,b) "GSERNX_LANEX_RX_ITRIM_0_BCFG"
12198 #define device_bar_BDK_GSERNX_LANEX_RX_ITRIM_0_BCFG(a,b) 0x0 /* PF_BAR0 */
12199 #define busnum_BDK_GSERNX_LANEX_RX_ITRIM_0_BCFG(a,b) (a)
12200 #define arguments_BDK_GSERNX_LANEX_RX_ITRIM_0_BCFG(a,b) (a),(b),-1,-1
12201 
12202 /**
12203  * Register (RSL) gsern#_lane#_rx_itrim_0_bsts
12204  *
12205  * GSER Lane Receiver Ir25 Trim Settings Register 0
12206  * These are the ir25_trim settings in use. ir25_trim settings are in groups of 4 bits.
12207  */
12208 union bdk_gsernx_lanex_rx_itrim_0_bsts
12209 {
12210     uint64_t u;
12211     struct bdk_gsernx_lanex_rx_itrim_0_bsts_s
12212     {
12213 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
12214         uint64_t trim15                : 4;  /**< [ 63: 60](RO/H) Setting for bits 87..84 of 180b ir25_trim. */
12215         uint64_t trim14                : 4;  /**< [ 59: 56](RO/H) Setting for bits 83..80 of 180b ir25_trim. */
12216         uint64_t trim13                : 4;  /**< [ 55: 52](RO/H) Setting for bits 79..76 of 180b ir25_trim. */
12217         uint64_t trim12                : 4;  /**< [ 51: 48](RO/H) Setting for bits 75..72 of 180b ir25_trim. */
12218         uint64_t trim11                : 4;  /**< [ 47: 44](RO/H) Setting for bits 71..68 of 180b ir25_trim. */
12219         uint64_t trim10                : 4;  /**< [ 43: 40](RO/H) Setting for bits 67..64 of 180b ir25_trim. */
12220         uint64_t trim9                 : 4;  /**< [ 39: 36](RO/H) Setting for bits 63..60 of 180b ir25_trim. */
12221         uint64_t trim8                 : 4;  /**< [ 35: 32](RO/H) Setting for bits 59..56 of 180b ir25_trim. */
12222         uint64_t trim7                 : 4;  /**< [ 31: 28](RO/H) Setting for bits 55..52 of 180b ir25_trim. */
12223         uint64_t trim6                 : 4;  /**< [ 27: 24](RO/H) Setting for bits 51..48 of 180b ir25_trim. */
12224         uint64_t trim5                 : 4;  /**< [ 23: 20](RO/H) Setting for bits 47..44 of 180b ir25_trim. */
12225         uint64_t trim4                 : 4;  /**< [ 19: 16](RO/H) Setting for bits 43..40 of 180b ir25_trim. */
12226         uint64_t trim3                 : 4;  /**< [ 15: 12](RO/H) Setting for bits 39..36 of 180b ir25_trim. */
12227         uint64_t trim2                 : 4;  /**< [ 11:  8](RO/H) Setting for bits 35..32 of 180b ir25_trim. */
12228         uint64_t trim1                 : 4;  /**< [  7:  4](RO/H) Setting for bits 31..28 of 180b ir25_trim. */
12229         uint64_t reserved_0_3          : 4;
12230 #else /* Word 0 - Little Endian */
12231         uint64_t reserved_0_3          : 4;
12232         uint64_t trim1                 : 4;  /**< [  7:  4](RO/H) Setting for bits 31..28 of 180b ir25_trim. */
12233         uint64_t trim2                 : 4;  /**< [ 11:  8](RO/H) Setting for bits 35..32 of 180b ir25_trim. */
12234         uint64_t trim3                 : 4;  /**< [ 15: 12](RO/H) Setting for bits 39..36 of 180b ir25_trim. */
12235         uint64_t trim4                 : 4;  /**< [ 19: 16](RO/H) Setting for bits 43..40 of 180b ir25_trim. */
12236         uint64_t trim5                 : 4;  /**< [ 23: 20](RO/H) Setting for bits 47..44 of 180b ir25_trim. */
12237         uint64_t trim6                 : 4;  /**< [ 27: 24](RO/H) Setting for bits 51..48 of 180b ir25_trim. */
12238         uint64_t trim7                 : 4;  /**< [ 31: 28](RO/H) Setting for bits 55..52 of 180b ir25_trim. */
12239         uint64_t trim8                 : 4;  /**< [ 35: 32](RO/H) Setting for bits 59..56 of 180b ir25_trim. */
12240         uint64_t trim9                 : 4;  /**< [ 39: 36](RO/H) Setting for bits 63..60 of 180b ir25_trim. */
12241         uint64_t trim10                : 4;  /**< [ 43: 40](RO/H) Setting for bits 67..64 of 180b ir25_trim. */
12242         uint64_t trim11                : 4;  /**< [ 47: 44](RO/H) Setting for bits 71..68 of 180b ir25_trim. */
12243         uint64_t trim12                : 4;  /**< [ 51: 48](RO/H) Setting for bits 75..72 of 180b ir25_trim. */
12244         uint64_t trim13                : 4;  /**< [ 55: 52](RO/H) Setting for bits 79..76 of 180b ir25_trim. */
12245         uint64_t trim14                : 4;  /**< [ 59: 56](RO/H) Setting for bits 83..80 of 180b ir25_trim. */
12246         uint64_t trim15                : 4;  /**< [ 63: 60](RO/H) Setting for bits 87..84 of 180b ir25_trim. */
12247 #endif /* Word 0 - End */
12248     } s;
12249     /* struct bdk_gsernx_lanex_rx_itrim_0_bsts_s cn; */
12250 };
12251 typedef union bdk_gsernx_lanex_rx_itrim_0_bsts bdk_gsernx_lanex_rx_itrim_0_bsts_t;
12252 
12253 static inline uint64_t BDK_GSERNX_LANEX_RX_ITRIM_0_BSTS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_ITRIM_0_BSTS(unsigned long a,unsigned long b)12254 static inline uint64_t BDK_GSERNX_LANEX_RX_ITRIM_0_BSTS(unsigned long a, unsigned long b)
12255 {
12256     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
12257         return 0x87e090001bd0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
12258     __bdk_csr_fatal("GSERNX_LANEX_RX_ITRIM_0_BSTS", 2, a, b, 0, 0);
12259 }
12260 
12261 #define typedef_BDK_GSERNX_LANEX_RX_ITRIM_0_BSTS(a,b) bdk_gsernx_lanex_rx_itrim_0_bsts_t
12262 #define bustype_BDK_GSERNX_LANEX_RX_ITRIM_0_BSTS(a,b) BDK_CSR_TYPE_RSL
12263 #define basename_BDK_GSERNX_LANEX_RX_ITRIM_0_BSTS(a,b) "GSERNX_LANEX_RX_ITRIM_0_BSTS"
12264 #define device_bar_BDK_GSERNX_LANEX_RX_ITRIM_0_BSTS(a,b) 0x0 /* PF_BAR0 */
12265 #define busnum_BDK_GSERNX_LANEX_RX_ITRIM_0_BSTS(a,b) (a)
12266 #define arguments_BDK_GSERNX_LANEX_RX_ITRIM_0_BSTS(a,b) (a),(b),-1,-1
12267 
12268 /**
12269  * Register (RSL) gsern#_lane#_rx_itrim_1_bcfg
12270  *
12271  * GSER Lane Receiver Ir25 Trim Override Value Settings Register 1
12272  * ir25_trim override settings are in groups of 4 bits. These only take
12273  * effect when the corresponding enable bit(s) are set.
12274  */
12275 union bdk_gsernx_lanex_rx_itrim_1_bcfg
12276 {
12277     uint64_t u;
12278     struct bdk_gsernx_lanex_rx_itrim_1_bcfg_s
12279     {
12280 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
12281         uint64_t trim31_ovrd           : 4;  /**< [ 63: 60](R/W) Override setting for bits 179..176 of 180b ir25_trim. */
12282         uint64_t trim30_ovrd           : 4;  /**< [ 59: 56](R/W) Override setting for bits 175..172 of 180b ir25_trim. */
12283         uint64_t trim29_ovrd           : 4;  /**< [ 55: 52](R/W) Override setting for bits 171..168 of 180b ir25_trim. */
12284         uint64_t trim28_ovrd           : 4;  /**< [ 51: 48](R/W) Override setting for bits 167..164 of 180b ir25_trim. */
12285         uint64_t trim27_ovrd           : 4;  /**< [ 47: 44](R/W) Override setting for bits 163..160 of 180b ir25_trim. */
12286         uint64_t trim26_ovrd           : 4;  /**< [ 43: 40](R/W) Override setting for bits 159..156 of 180b ir25_trim. */
12287         uint64_t trim25_ovrd           : 4;  /**< [ 39: 36](R/W) Override setting for bits 155..152 of 180b ir25_trim. */
12288         uint64_t trim24_ovrd           : 4;  /**< [ 35: 32](R/W) Override setting for bits 151..148 of 180b ir25_trim. */
12289         uint64_t trim23_ovrd           : 4;  /**< [ 31: 28](R/W) Override setting for bits 147..144 of 180b ir25_trim. */
12290         uint64_t trim22_ovrd           : 4;  /**< [ 27: 24](R/W) Override setting for bits 143..140 of 180b ir25_trim. */
12291         uint64_t trim21_ovrd           : 4;  /**< [ 23: 20](R/W) Override setting for bits 139..136 of 180b ir25_trim. */
12292         uint64_t trim20_ovrd           : 4;  /**< [ 19: 16](R/W) Override setting for bits 135..132 of 180b ir25_trim. */
12293         uint64_t trim19_ovrd           : 4;  /**< [ 15: 12](R/W) Override setting for bits 131..128 of 180b ir25_trim. */
12294         uint64_t trim18_ovrd           : 4;  /**< [ 11:  8](R/W) Override setting for bits 127..124 of 180b ir25_trim. */
12295         uint64_t trim17_ovrd           : 4;  /**< [  7:  4](R/W) Override setting for bits 123..120 of 180b ir25_trim. */
12296         uint64_t trim16_ovrd           : 4;  /**< [  3:  0](R/W) Override setting for bits 119..116 of 180b ir25_trim. */
12297 #else /* Word 0 - Little Endian */
12298         uint64_t trim16_ovrd           : 4;  /**< [  3:  0](R/W) Override setting for bits 119..116 of 180b ir25_trim. */
12299         uint64_t trim17_ovrd           : 4;  /**< [  7:  4](R/W) Override setting for bits 123..120 of 180b ir25_trim. */
12300         uint64_t trim18_ovrd           : 4;  /**< [ 11:  8](R/W) Override setting for bits 127..124 of 180b ir25_trim. */
12301         uint64_t trim19_ovrd           : 4;  /**< [ 15: 12](R/W) Override setting for bits 131..128 of 180b ir25_trim. */
12302         uint64_t trim20_ovrd           : 4;  /**< [ 19: 16](R/W) Override setting for bits 135..132 of 180b ir25_trim. */
12303         uint64_t trim21_ovrd           : 4;  /**< [ 23: 20](R/W) Override setting for bits 139..136 of 180b ir25_trim. */
12304         uint64_t trim22_ovrd           : 4;  /**< [ 27: 24](R/W) Override setting for bits 143..140 of 180b ir25_trim. */
12305         uint64_t trim23_ovrd           : 4;  /**< [ 31: 28](R/W) Override setting for bits 147..144 of 180b ir25_trim. */
12306         uint64_t trim24_ovrd           : 4;  /**< [ 35: 32](R/W) Override setting for bits 151..148 of 180b ir25_trim. */
12307         uint64_t trim25_ovrd           : 4;  /**< [ 39: 36](R/W) Override setting for bits 155..152 of 180b ir25_trim. */
12308         uint64_t trim26_ovrd           : 4;  /**< [ 43: 40](R/W) Override setting for bits 159..156 of 180b ir25_trim. */
12309         uint64_t trim27_ovrd           : 4;  /**< [ 47: 44](R/W) Override setting for bits 163..160 of 180b ir25_trim. */
12310         uint64_t trim28_ovrd           : 4;  /**< [ 51: 48](R/W) Override setting for bits 167..164 of 180b ir25_trim. */
12311         uint64_t trim29_ovrd           : 4;  /**< [ 55: 52](R/W) Override setting for bits 171..168 of 180b ir25_trim. */
12312         uint64_t trim30_ovrd           : 4;  /**< [ 59: 56](R/W) Override setting for bits 175..172 of 180b ir25_trim. */
12313         uint64_t trim31_ovrd           : 4;  /**< [ 63: 60](R/W) Override setting for bits 179..176 of 180b ir25_trim. */
12314 #endif /* Word 0 - End */
12315     } s;
12316     /* struct bdk_gsernx_lanex_rx_itrim_1_bcfg_s cn; */
12317 };
12318 typedef union bdk_gsernx_lanex_rx_itrim_1_bcfg bdk_gsernx_lanex_rx_itrim_1_bcfg_t;
12319 
12320 static inline uint64_t BDK_GSERNX_LANEX_RX_ITRIM_1_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_ITRIM_1_BCFG(unsigned long a,unsigned long b)12321 static inline uint64_t BDK_GSERNX_LANEX_RX_ITRIM_1_BCFG(unsigned long a, unsigned long b)
12322 {
12323     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
12324         return 0x87e090001a90ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
12325     __bdk_csr_fatal("GSERNX_LANEX_RX_ITRIM_1_BCFG", 2, a, b, 0, 0);
12326 }
12327 
12328 #define typedef_BDK_GSERNX_LANEX_RX_ITRIM_1_BCFG(a,b) bdk_gsernx_lanex_rx_itrim_1_bcfg_t
12329 #define bustype_BDK_GSERNX_LANEX_RX_ITRIM_1_BCFG(a,b) BDK_CSR_TYPE_RSL
12330 #define basename_BDK_GSERNX_LANEX_RX_ITRIM_1_BCFG(a,b) "GSERNX_LANEX_RX_ITRIM_1_BCFG"
12331 #define device_bar_BDK_GSERNX_LANEX_RX_ITRIM_1_BCFG(a,b) 0x0 /* PF_BAR0 */
12332 #define busnum_BDK_GSERNX_LANEX_RX_ITRIM_1_BCFG(a,b) (a)
12333 #define arguments_BDK_GSERNX_LANEX_RX_ITRIM_1_BCFG(a,b) (a),(b),-1,-1
12334 
12335 /**
12336  * Register (RSL) gsern#_lane#_rx_itrim_1_bsts
12337  *
12338  * GSER Lane Receiver Ir25 Trim Settings Register 1
12339  * These are the ir25_trim settings in use. ir25_trim settings are in groups of 4 bits.
12340  */
12341 union bdk_gsernx_lanex_rx_itrim_1_bsts
12342 {
12343     uint64_t u;
12344     struct bdk_gsernx_lanex_rx_itrim_1_bsts_s
12345     {
12346 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
12347         uint64_t trim31                : 4;  /**< [ 63: 60](RO/H) Setting for bits 179..176 of 180b ir25_trim. */
12348         uint64_t trim30                : 4;  /**< [ 59: 56](RO/H) Setting for bits 175..172 of 180b ir25_trim. */
12349         uint64_t trim29                : 4;  /**< [ 55: 52](RO/H) Setting for bits 171..168 of 180b ir25_trim. */
12350         uint64_t trim28                : 4;  /**< [ 51: 48](RO/H) Setting for bits 167..164 of 180b ir25_trim. */
12351         uint64_t trim27                : 4;  /**< [ 47: 44](RO/H) Setting for bits 163..160 of 180b ir25_trim. */
12352         uint64_t trim26                : 4;  /**< [ 43: 40](RO/H) Setting for bits 159..156 of 180b ir25_trim. */
12353         uint64_t trim25                : 4;  /**< [ 39: 36](RO/H) Setting for bits 155..152 of 180b ir25_trim. */
12354         uint64_t trim24                : 4;  /**< [ 35: 32](RO/H) Setting for bits 151..148 of 180b ir25_trim. */
12355         uint64_t trim23                : 4;  /**< [ 31: 28](RO/H) Setting for bits 147..144 of 180b ir25_trim. */
12356         uint64_t trim22                : 4;  /**< [ 27: 24](RO/H) Setting for bits 143..140 of 180b ir25_trim. */
12357         uint64_t trim21                : 4;  /**< [ 23: 20](RO/H) Setting for bits 139..136 of 180b ir25_trim. */
12358         uint64_t trim20                : 4;  /**< [ 19: 16](RO/H) Setting for bits 135..132 of 180b ir25_trim. */
12359         uint64_t trim19                : 4;  /**< [ 15: 12](RO/H) Setting for bits 131..128 of 180b ir25_trim. */
12360         uint64_t trim18                : 4;  /**< [ 11:  8](RO/H) Setting for bits 127..124 of 180b ir25_trim. */
12361         uint64_t trim17                : 4;  /**< [  7:  4](RO/H) Setting for bits 123..120 of 180b ir25_trim. */
12362         uint64_t trim16                : 4;  /**< [  3:  0](RO/H) Setting for bits 119..116 of 180b ir25_trim. */
12363 #else /* Word 0 - Little Endian */
12364         uint64_t trim16                : 4;  /**< [  3:  0](RO/H) Setting for bits 119..116 of 180b ir25_trim. */
12365         uint64_t trim17                : 4;  /**< [  7:  4](RO/H) Setting for bits 123..120 of 180b ir25_trim. */
12366         uint64_t trim18                : 4;  /**< [ 11:  8](RO/H) Setting for bits 127..124 of 180b ir25_trim. */
12367         uint64_t trim19                : 4;  /**< [ 15: 12](RO/H) Setting for bits 131..128 of 180b ir25_trim. */
12368         uint64_t trim20                : 4;  /**< [ 19: 16](RO/H) Setting for bits 135..132 of 180b ir25_trim. */
12369         uint64_t trim21                : 4;  /**< [ 23: 20](RO/H) Setting for bits 139..136 of 180b ir25_trim. */
12370         uint64_t trim22                : 4;  /**< [ 27: 24](RO/H) Setting for bits 143..140 of 180b ir25_trim. */
12371         uint64_t trim23                : 4;  /**< [ 31: 28](RO/H) Setting for bits 147..144 of 180b ir25_trim. */
12372         uint64_t trim24                : 4;  /**< [ 35: 32](RO/H) Setting for bits 151..148 of 180b ir25_trim. */
12373         uint64_t trim25                : 4;  /**< [ 39: 36](RO/H) Setting for bits 155..152 of 180b ir25_trim. */
12374         uint64_t trim26                : 4;  /**< [ 43: 40](RO/H) Setting for bits 159..156 of 180b ir25_trim. */
12375         uint64_t trim27                : 4;  /**< [ 47: 44](RO/H) Setting for bits 163..160 of 180b ir25_trim. */
12376         uint64_t trim28                : 4;  /**< [ 51: 48](RO/H) Setting for bits 167..164 of 180b ir25_trim. */
12377         uint64_t trim29                : 4;  /**< [ 55: 52](RO/H) Setting for bits 171..168 of 180b ir25_trim. */
12378         uint64_t trim30                : 4;  /**< [ 59: 56](RO/H) Setting for bits 175..172 of 180b ir25_trim. */
12379         uint64_t trim31                : 4;  /**< [ 63: 60](RO/H) Setting for bits 179..176 of 180b ir25_trim. */
12380 #endif /* Word 0 - End */
12381     } s;
12382     /* struct bdk_gsernx_lanex_rx_itrim_1_bsts_s cn; */
12383 };
12384 typedef union bdk_gsernx_lanex_rx_itrim_1_bsts bdk_gsernx_lanex_rx_itrim_1_bsts_t;
12385 
12386 static inline uint64_t BDK_GSERNX_LANEX_RX_ITRIM_1_BSTS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_ITRIM_1_BSTS(unsigned long a,unsigned long b)12387 static inline uint64_t BDK_GSERNX_LANEX_RX_ITRIM_1_BSTS(unsigned long a, unsigned long b)
12388 {
12389     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
12390         return 0x87e090001be0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
12391     __bdk_csr_fatal("GSERNX_LANEX_RX_ITRIM_1_BSTS", 2, a, b, 0, 0);
12392 }
12393 
12394 #define typedef_BDK_GSERNX_LANEX_RX_ITRIM_1_BSTS(a,b) bdk_gsernx_lanex_rx_itrim_1_bsts_t
12395 #define bustype_BDK_GSERNX_LANEX_RX_ITRIM_1_BSTS(a,b) BDK_CSR_TYPE_RSL
12396 #define basename_BDK_GSERNX_LANEX_RX_ITRIM_1_BSTS(a,b) "GSERNX_LANEX_RX_ITRIM_1_BSTS"
12397 #define device_bar_BDK_GSERNX_LANEX_RX_ITRIM_1_BSTS(a,b) 0x0 /* PF_BAR0 */
12398 #define busnum_BDK_GSERNX_LANEX_RX_ITRIM_1_BSTS(a,b) (a)
12399 #define arguments_BDK_GSERNX_LANEX_RX_ITRIM_1_BSTS(a,b) (a),(b),-1,-1
12400 
12401 /**
12402  * Register (RSL) gsern#_lane#_rx_itrim_2_bcfg
12403  *
12404  * GSER Lane Receiver Ir25 Trim Override Value Settings Register 2
12405  * ir25_trim override settings are in groups of 4 bits. These only take
12406  * effect when the corresponding enable bit(s) are set.
12407  */
12408 union bdk_gsernx_lanex_rx_itrim_2_bcfg
12409 {
12410     uint64_t u;
12411     struct bdk_gsernx_lanex_rx_itrim_2_bcfg_s
12412     {
12413 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
12414         uint64_t reserved_56_63        : 8;
12415         uint64_t trim45_ovrd           : 4;  /**< [ 55: 52](R/W) Override setting for bits 27..24 of 180b ir25_trim. */
12416         uint64_t trim44_ovrd           : 4;  /**< [ 51: 48](R/W) Override setting for bits 115..112 of 180b ir25_trim. */
12417         uint64_t trim43_ovrd           : 4;  /**< [ 47: 44](R/W) Override setting for bits 23..20 of 180b ir25_trim. */
12418         uint64_t trim42_ovrd           : 4;  /**< [ 43: 40](R/W) Override setting for bits 111..108 of 180b ir25_trim. */
12419         uint64_t trim41_ovrd           : 4;  /**< [ 39: 36](R/W) Override setting for bits 19..16 of 180b ir25_trim. */
12420         uint64_t trim40_ovrd           : 4;  /**< [ 35: 32](R/W) Override setting for bits 107..104 of 180b ir25_trim. */
12421         uint64_t trim39_ovrd           : 4;  /**< [ 31: 28](R/W) Override setting for bits 15..12 of 180b ir25_trim. */
12422         uint64_t trim38_ovrd           : 4;  /**< [ 27: 24](R/W) Override setting for bits 103..100 of 180b ir25_trim. */
12423         uint64_t trim37_ovrd           : 4;  /**< [ 23: 20](R/W) Override setting for bits 11..8 of 180b ir25_trim. */
12424         uint64_t trim36_ovrd           : 4;  /**< [ 19: 16](R/W) Override setting for bits 99..96 of 180b ir25_trim. */
12425         uint64_t trim35_ovrd           : 4;  /**< [ 15: 12](R/W) Override setting for bits 7..4 of 180b ir25_trim. */
12426         uint64_t trim34_ovrd           : 4;  /**< [ 11:  8](R/W) Override setting for bits 95..92 of 180b ir25_trim. */
12427         uint64_t trim33_ovrd           : 4;  /**< [  7:  4](R/W) Override setting for bits 3..0 of 180b ir25_trim. */
12428         uint64_t trim32_ovrd           : 4;  /**< [  3:  0](R/W) Override setting for bits 91..88 of 180b ir25_trim. */
12429 #else /* Word 0 - Little Endian */
12430         uint64_t trim32_ovrd           : 4;  /**< [  3:  0](R/W) Override setting for bits 91..88 of 180b ir25_trim. */
12431         uint64_t trim33_ovrd           : 4;  /**< [  7:  4](R/W) Override setting for bits 3..0 of 180b ir25_trim. */
12432         uint64_t trim34_ovrd           : 4;  /**< [ 11:  8](R/W) Override setting for bits 95..92 of 180b ir25_trim. */
12433         uint64_t trim35_ovrd           : 4;  /**< [ 15: 12](R/W) Override setting for bits 7..4 of 180b ir25_trim. */
12434         uint64_t trim36_ovrd           : 4;  /**< [ 19: 16](R/W) Override setting for bits 99..96 of 180b ir25_trim. */
12435         uint64_t trim37_ovrd           : 4;  /**< [ 23: 20](R/W) Override setting for bits 11..8 of 180b ir25_trim. */
12436         uint64_t trim38_ovrd           : 4;  /**< [ 27: 24](R/W) Override setting for bits 103..100 of 180b ir25_trim. */
12437         uint64_t trim39_ovrd           : 4;  /**< [ 31: 28](R/W) Override setting for bits 15..12 of 180b ir25_trim. */
12438         uint64_t trim40_ovrd           : 4;  /**< [ 35: 32](R/W) Override setting for bits 107..104 of 180b ir25_trim. */
12439         uint64_t trim41_ovrd           : 4;  /**< [ 39: 36](R/W) Override setting for bits 19..16 of 180b ir25_trim. */
12440         uint64_t trim42_ovrd           : 4;  /**< [ 43: 40](R/W) Override setting for bits 111..108 of 180b ir25_trim. */
12441         uint64_t trim43_ovrd           : 4;  /**< [ 47: 44](R/W) Override setting for bits 23..20 of 180b ir25_trim. */
12442         uint64_t trim44_ovrd           : 4;  /**< [ 51: 48](R/W) Override setting for bits 115..112 of 180b ir25_trim. */
12443         uint64_t trim45_ovrd           : 4;  /**< [ 55: 52](R/W) Override setting for bits 27..24 of 180b ir25_trim. */
12444         uint64_t reserved_56_63        : 8;
12445 #endif /* Word 0 - End */
12446     } s;
12447     /* struct bdk_gsernx_lanex_rx_itrim_2_bcfg_s cn; */
12448 };
12449 typedef union bdk_gsernx_lanex_rx_itrim_2_bcfg bdk_gsernx_lanex_rx_itrim_2_bcfg_t;
12450 
12451 static inline uint64_t BDK_GSERNX_LANEX_RX_ITRIM_2_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_ITRIM_2_BCFG(unsigned long a,unsigned long b)12452 static inline uint64_t BDK_GSERNX_LANEX_RX_ITRIM_2_BCFG(unsigned long a, unsigned long b)
12453 {
12454     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
12455         return 0x87e090001aa0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
12456     __bdk_csr_fatal("GSERNX_LANEX_RX_ITRIM_2_BCFG", 2, a, b, 0, 0);
12457 }
12458 
12459 #define typedef_BDK_GSERNX_LANEX_RX_ITRIM_2_BCFG(a,b) bdk_gsernx_lanex_rx_itrim_2_bcfg_t
12460 #define bustype_BDK_GSERNX_LANEX_RX_ITRIM_2_BCFG(a,b) BDK_CSR_TYPE_RSL
12461 #define basename_BDK_GSERNX_LANEX_RX_ITRIM_2_BCFG(a,b) "GSERNX_LANEX_RX_ITRIM_2_BCFG"
12462 #define device_bar_BDK_GSERNX_LANEX_RX_ITRIM_2_BCFG(a,b) 0x0 /* PF_BAR0 */
12463 #define busnum_BDK_GSERNX_LANEX_RX_ITRIM_2_BCFG(a,b) (a)
12464 #define arguments_BDK_GSERNX_LANEX_RX_ITRIM_2_BCFG(a,b) (a),(b),-1,-1
12465 
12466 /**
12467  * Register (RSL) gsern#_lane#_rx_itrim_2_bsts
12468  *
12469  * GSER Lane Receiver Ir25 Trim Settings Register 2
12470  * These are the ir25_trim settings in use. ir25_trim settings are in groups of 4 bits.
12471  */
12472 union bdk_gsernx_lanex_rx_itrim_2_bsts
12473 {
12474     uint64_t u;
12475     struct bdk_gsernx_lanex_rx_itrim_2_bsts_s
12476     {
12477 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
12478         uint64_t reserved_56_63        : 8;
12479         uint64_t trim45                : 4;  /**< [ 55: 52](RO/H) Setting for bits 27..24 of 180b ir25_trim. */
12480         uint64_t trim44                : 4;  /**< [ 51: 48](RO/H) Setting for bits 115..112 of 180b ir25_trim. */
12481         uint64_t trim43                : 4;  /**< [ 47: 44](RO/H) Setting for bits 23..20 of 180b ir25_trim. */
12482         uint64_t trim42                : 4;  /**< [ 43: 40](RO/H) Setting for bits 111..108 of 180b ir25_trim. */
12483         uint64_t trim41                : 4;  /**< [ 39: 36](RO/H) Setting for bits 19..16 of 180b ir25_trim. */
12484         uint64_t trim40                : 4;  /**< [ 35: 32](RO/H) Setting for bits 107..104 of 180b ir25_trim. */
12485         uint64_t trim39                : 4;  /**< [ 31: 28](RO/H) Setting for bits 15..12 of 180b ir25_trim. */
12486         uint64_t trim38                : 4;  /**< [ 27: 24](RO/H) Setting for bits 103..100 of 180b ir25_trim. */
12487         uint64_t trim37                : 4;  /**< [ 23: 20](RO/H) Setting for bits 11..8 of 180b ir25_trim. */
12488         uint64_t trim36                : 4;  /**< [ 19: 16](RO/H) Setting for bits 99..96 of 180b ir25_trim. */
12489         uint64_t trim35                : 4;  /**< [ 15: 12](RO/H) Setting for bits 7..4 of 180b ir25_trim. */
12490         uint64_t trim34                : 4;  /**< [ 11:  8](RO/H) Setting for bits 95..92 of 180b ir25_trim. */
12491         uint64_t trim33                : 4;  /**< [  7:  4](RO/H) Setting for bits 3..0 of 180b ir25_trim. */
12492         uint64_t trim32                : 4;  /**< [  3:  0](RO/H) Setting for bits 91..88 of 180b ir25_trim. */
12493 #else /* Word 0 - Little Endian */
12494         uint64_t trim32                : 4;  /**< [  3:  0](RO/H) Setting for bits 91..88 of 180b ir25_trim. */
12495         uint64_t trim33                : 4;  /**< [  7:  4](RO/H) Setting for bits 3..0 of 180b ir25_trim. */
12496         uint64_t trim34                : 4;  /**< [ 11:  8](RO/H) Setting for bits 95..92 of 180b ir25_trim. */
12497         uint64_t trim35                : 4;  /**< [ 15: 12](RO/H) Setting for bits 7..4 of 180b ir25_trim. */
12498         uint64_t trim36                : 4;  /**< [ 19: 16](RO/H) Setting for bits 99..96 of 180b ir25_trim. */
12499         uint64_t trim37                : 4;  /**< [ 23: 20](RO/H) Setting for bits 11..8 of 180b ir25_trim. */
12500         uint64_t trim38                : 4;  /**< [ 27: 24](RO/H) Setting for bits 103..100 of 180b ir25_trim. */
12501         uint64_t trim39                : 4;  /**< [ 31: 28](RO/H) Setting for bits 15..12 of 180b ir25_trim. */
12502         uint64_t trim40                : 4;  /**< [ 35: 32](RO/H) Setting for bits 107..104 of 180b ir25_trim. */
12503         uint64_t trim41                : 4;  /**< [ 39: 36](RO/H) Setting for bits 19..16 of 180b ir25_trim. */
12504         uint64_t trim42                : 4;  /**< [ 43: 40](RO/H) Setting for bits 111..108 of 180b ir25_trim. */
12505         uint64_t trim43                : 4;  /**< [ 47: 44](RO/H) Setting for bits 23..20 of 180b ir25_trim. */
12506         uint64_t trim44                : 4;  /**< [ 51: 48](RO/H) Setting for bits 115..112 of 180b ir25_trim. */
12507         uint64_t trim45                : 4;  /**< [ 55: 52](RO/H) Setting for bits 27..24 of 180b ir25_trim. */
12508         uint64_t reserved_56_63        : 8;
12509 #endif /* Word 0 - End */
12510     } s;
12511     /* struct bdk_gsernx_lanex_rx_itrim_2_bsts_s cn; */
12512 };
12513 typedef union bdk_gsernx_lanex_rx_itrim_2_bsts bdk_gsernx_lanex_rx_itrim_2_bsts_t;
12514 
12515 static inline uint64_t BDK_GSERNX_LANEX_RX_ITRIM_2_BSTS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_ITRIM_2_BSTS(unsigned long a,unsigned long b)12516 static inline uint64_t BDK_GSERNX_LANEX_RX_ITRIM_2_BSTS(unsigned long a, unsigned long b)
12517 {
12518     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
12519         return 0x87e090001bf0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
12520     __bdk_csr_fatal("GSERNX_LANEX_RX_ITRIM_2_BSTS", 2, a, b, 0, 0);
12521 }
12522 
12523 #define typedef_BDK_GSERNX_LANEX_RX_ITRIM_2_BSTS(a,b) bdk_gsernx_lanex_rx_itrim_2_bsts_t
12524 #define bustype_BDK_GSERNX_LANEX_RX_ITRIM_2_BSTS(a,b) BDK_CSR_TYPE_RSL
12525 #define basename_BDK_GSERNX_LANEX_RX_ITRIM_2_BSTS(a,b) "GSERNX_LANEX_RX_ITRIM_2_BSTS"
12526 #define device_bar_BDK_GSERNX_LANEX_RX_ITRIM_2_BSTS(a,b) 0x0 /* PF_BAR0 */
12527 #define busnum_BDK_GSERNX_LANEX_RX_ITRIM_2_BSTS(a,b) (a)
12528 #define arguments_BDK_GSERNX_LANEX_RX_ITRIM_2_BSTS(a,b) (a),(b),-1,-1
12529 
12530 /**
12531  * Register (RSL) gsern#_lane#_rx_itrim_3_bcfg
12532  *
12533  * GSER Lane Receiver Ir25 Trim Override Enables Register 0
12534  * Enables in this register allow the corresponding override value setting to take
12535  * effect.
12536  */
12537 union bdk_gsernx_lanex_rx_itrim_3_bcfg
12538 {
12539     uint64_t u;
12540     struct bdk_gsernx_lanex_rx_itrim_3_bcfg_s
12541     {
12542 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
12543         uint64_t reserved_61_63        : 3;
12544         uint64_t trim15_ovrd_en        : 1;  /**< [ 60: 60](R/W) Override enable for bits 87..84 of 180b ir25_trim. */
12545         uint64_t reserved_57_59        : 3;
12546         uint64_t trim14_ovrd_en        : 1;  /**< [ 56: 56](R/W) Override enable for bits 83..80 of 180b ir25_trim. */
12547         uint64_t reserved_53_55        : 3;
12548         uint64_t trim13_ovrd_en        : 1;  /**< [ 52: 52](R/W) Override enable for bits 79..76 of 180b ir25_trim. */
12549         uint64_t reserved_49_51        : 3;
12550         uint64_t trim12_ovrd_en        : 1;  /**< [ 48: 48](R/W) Override enable for bits 75..72 of 180b ir25_trim. */
12551         uint64_t reserved_45_47        : 3;
12552         uint64_t trim11_ovrd_en        : 1;  /**< [ 44: 44](R/W) Override enable for bits 71..68 of 180b ir25_trim. */
12553         uint64_t reserved_41_43        : 3;
12554         uint64_t trim10_ovrd_en        : 1;  /**< [ 40: 40](R/W) Override enable for bits 67..64 of 180b ir25_trim. */
12555         uint64_t reserved_37_39        : 3;
12556         uint64_t trim9_ovrd_en         : 1;  /**< [ 36: 36](R/W) Override enable for bits 63..60 of 180b ir25_trim. */
12557         uint64_t reserved_33_35        : 3;
12558         uint64_t trim8_ovrd_en         : 1;  /**< [ 32: 32](R/W) Override enable for bits 59..56 of 180b ir25_trim. */
12559         uint64_t reserved_29_31        : 3;
12560         uint64_t trim7_ovrd_en         : 1;  /**< [ 28: 28](R/W) Override enable for bits 55..52 of 180b ir25_trim. */
12561         uint64_t reserved_25_27        : 3;
12562         uint64_t trim6_ovrd_en         : 1;  /**< [ 24: 24](R/W) Override enable for bits 51..48 of 180b ir25_trim. */
12563         uint64_t reserved_21_23        : 3;
12564         uint64_t trim5_ovrd_en         : 1;  /**< [ 20: 20](R/W) Override enable for bits 47..44 of 180b ir25_trim. */
12565         uint64_t reserved_17_19        : 3;
12566         uint64_t trim4_ovrd_en         : 1;  /**< [ 16: 16](R/W) Override enable for bits 43..40 of 180b ir25_trim. */
12567         uint64_t reserved_13_15        : 3;
12568         uint64_t trim3_ovrd_en         : 1;  /**< [ 12: 12](R/W) Override enable for bits 39..36 of 180b ir25_trim. */
12569         uint64_t reserved_9_11         : 3;
12570         uint64_t trim2_ovrd_en         : 1;  /**< [  8:  8](R/W) Override enable for bits 35..32 of 180b ir25_trim. */
12571         uint64_t reserved_5_7          : 3;
12572         uint64_t trim1_ovrd_en         : 1;  /**< [  4:  4](R/W) Override enable for bits 31..28 of 180b ir25_trim. */
12573         uint64_t reserved_0_3          : 4;
12574 #else /* Word 0 - Little Endian */
12575         uint64_t reserved_0_3          : 4;
12576         uint64_t trim1_ovrd_en         : 1;  /**< [  4:  4](R/W) Override enable for bits 31..28 of 180b ir25_trim. */
12577         uint64_t reserved_5_7          : 3;
12578         uint64_t trim2_ovrd_en         : 1;  /**< [  8:  8](R/W) Override enable for bits 35..32 of 180b ir25_trim. */
12579         uint64_t reserved_9_11         : 3;
12580         uint64_t trim3_ovrd_en         : 1;  /**< [ 12: 12](R/W) Override enable for bits 39..36 of 180b ir25_trim. */
12581         uint64_t reserved_13_15        : 3;
12582         uint64_t trim4_ovrd_en         : 1;  /**< [ 16: 16](R/W) Override enable for bits 43..40 of 180b ir25_trim. */
12583         uint64_t reserved_17_19        : 3;
12584         uint64_t trim5_ovrd_en         : 1;  /**< [ 20: 20](R/W) Override enable for bits 47..44 of 180b ir25_trim. */
12585         uint64_t reserved_21_23        : 3;
12586         uint64_t trim6_ovrd_en         : 1;  /**< [ 24: 24](R/W) Override enable for bits 51..48 of 180b ir25_trim. */
12587         uint64_t reserved_25_27        : 3;
12588         uint64_t trim7_ovrd_en         : 1;  /**< [ 28: 28](R/W) Override enable for bits 55..52 of 180b ir25_trim. */
12589         uint64_t reserved_29_31        : 3;
12590         uint64_t trim8_ovrd_en         : 1;  /**< [ 32: 32](R/W) Override enable for bits 59..56 of 180b ir25_trim. */
12591         uint64_t reserved_33_35        : 3;
12592         uint64_t trim9_ovrd_en         : 1;  /**< [ 36: 36](R/W) Override enable for bits 63..60 of 180b ir25_trim. */
12593         uint64_t reserved_37_39        : 3;
12594         uint64_t trim10_ovrd_en        : 1;  /**< [ 40: 40](R/W) Override enable for bits 67..64 of 180b ir25_trim. */
12595         uint64_t reserved_41_43        : 3;
12596         uint64_t trim11_ovrd_en        : 1;  /**< [ 44: 44](R/W) Override enable for bits 71..68 of 180b ir25_trim. */
12597         uint64_t reserved_45_47        : 3;
12598         uint64_t trim12_ovrd_en        : 1;  /**< [ 48: 48](R/W) Override enable for bits 75..72 of 180b ir25_trim. */
12599         uint64_t reserved_49_51        : 3;
12600         uint64_t trim13_ovrd_en        : 1;  /**< [ 52: 52](R/W) Override enable for bits 79..76 of 180b ir25_trim. */
12601         uint64_t reserved_53_55        : 3;
12602         uint64_t trim14_ovrd_en        : 1;  /**< [ 56: 56](R/W) Override enable for bits 83..80 of 180b ir25_trim. */
12603         uint64_t reserved_57_59        : 3;
12604         uint64_t trim15_ovrd_en        : 1;  /**< [ 60: 60](R/W) Override enable for bits 87..84 of 180b ir25_trim. */
12605         uint64_t reserved_61_63        : 3;
12606 #endif /* Word 0 - End */
12607     } s;
12608     /* struct bdk_gsernx_lanex_rx_itrim_3_bcfg_s cn; */
12609 };
12610 typedef union bdk_gsernx_lanex_rx_itrim_3_bcfg bdk_gsernx_lanex_rx_itrim_3_bcfg_t;
12611 
12612 static inline uint64_t BDK_GSERNX_LANEX_RX_ITRIM_3_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_ITRIM_3_BCFG(unsigned long a,unsigned long b)12613 static inline uint64_t BDK_GSERNX_LANEX_RX_ITRIM_3_BCFG(unsigned long a, unsigned long b)
12614 {
12615     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
12616         return 0x87e090001ab0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
12617     __bdk_csr_fatal("GSERNX_LANEX_RX_ITRIM_3_BCFG", 2, a, b, 0, 0);
12618 }
12619 
12620 #define typedef_BDK_GSERNX_LANEX_RX_ITRIM_3_BCFG(a,b) bdk_gsernx_lanex_rx_itrim_3_bcfg_t
12621 #define bustype_BDK_GSERNX_LANEX_RX_ITRIM_3_BCFG(a,b) BDK_CSR_TYPE_RSL
12622 #define basename_BDK_GSERNX_LANEX_RX_ITRIM_3_BCFG(a,b) "GSERNX_LANEX_RX_ITRIM_3_BCFG"
12623 #define device_bar_BDK_GSERNX_LANEX_RX_ITRIM_3_BCFG(a,b) 0x0 /* PF_BAR0 */
12624 #define busnum_BDK_GSERNX_LANEX_RX_ITRIM_3_BCFG(a,b) (a)
12625 #define arguments_BDK_GSERNX_LANEX_RX_ITRIM_3_BCFG(a,b) (a),(b),-1,-1
12626 
12627 /**
12628  * Register (RSL) gsern#_lane#_rx_itrim_4_bcfg
12629  *
12630  * GSER Lane Receiver Ir25 Trim Override Enables Register 1
12631  * ir25_trim override settings are in groups of 4 bits. These only take
12632  * effect when the corresponding enable bit(s) are set.
12633  */
12634 union bdk_gsernx_lanex_rx_itrim_4_bcfg
12635 {
12636     uint64_t u;
12637     struct bdk_gsernx_lanex_rx_itrim_4_bcfg_s
12638     {
12639 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
12640         uint64_t reserved_61_63        : 3;
12641         uint64_t trim31_ovrd_en        : 1;  /**< [ 60: 60](R/W) Override enable for bits 179..176 of 180b ir25_trim. */
12642         uint64_t reserved_57_59        : 3;
12643         uint64_t trim30_ovrd_en        : 1;  /**< [ 56: 56](R/W) Override enable for bits 175..172 of 180b ir25_trim. */
12644         uint64_t reserved_53_55        : 3;
12645         uint64_t trim29_ovrd_en        : 1;  /**< [ 52: 52](R/W) Override enable for bits 171..168 of 180b ir25_trim. */
12646         uint64_t reserved_49_51        : 3;
12647         uint64_t trim28_ovrd_en        : 1;  /**< [ 48: 48](R/W) Override enable for bits 167..164 of 180b ir25_trim. */
12648         uint64_t reserved_45_47        : 3;
12649         uint64_t trim27_ovrd_en        : 1;  /**< [ 44: 44](R/W) Override enable for bits 163..160 of 180b ir25_trim. */
12650         uint64_t reserved_41_43        : 3;
12651         uint64_t trim26_ovrd_en        : 1;  /**< [ 40: 40](R/W) Override enable for bits 159..156 of 180b ir25_trim. */
12652         uint64_t reserved_37_39        : 3;
12653         uint64_t trim25_ovrd_en        : 1;  /**< [ 36: 36](R/W) Override enable for bits 155..152 of 180b ir25_trim. */
12654         uint64_t reserved_33_35        : 3;
12655         uint64_t trim24_ovrd_en        : 1;  /**< [ 32: 32](R/W) Override enable for bits 151..148 of 180b ir25_trim. */
12656         uint64_t reserved_29_31        : 3;
12657         uint64_t trim23_ovrd_en        : 1;  /**< [ 28: 28](R/W) Override enable for bits 147..144 of 180b ir25_trim. */
12658         uint64_t reserved_25_27        : 3;
12659         uint64_t trim22_ovrd_en        : 1;  /**< [ 24: 24](R/W) Override enable for bits 143..140 of 180b ir25_trim. */
12660         uint64_t reserved_21_23        : 3;
12661         uint64_t trim21_ovrd_en        : 1;  /**< [ 20: 20](R/W) Override enable for bits 139..136 of 180b ir25_trim. */
12662         uint64_t reserved_17_19        : 3;
12663         uint64_t trim20_ovrd_en        : 1;  /**< [ 16: 16](R/W) Override enable for bits 135..132 of 180b ir25_trim. */
12664         uint64_t reserved_13_15        : 3;
12665         uint64_t trim19_ovrd_en        : 1;  /**< [ 12: 12](R/W) Override enable for bits 131..128 of 180b ir25_trim. */
12666         uint64_t reserved_9_11         : 3;
12667         uint64_t trim18_ovrd_en        : 1;  /**< [  8:  8](R/W) Override enable for bits 127..124 of 180b ir25_trim. */
12668         uint64_t reserved_5_7          : 3;
12669         uint64_t trim17_ovrd_en        : 1;  /**< [  4:  4](R/W) Override enable for bits 123..120 of 180b ir25_trim. */
12670         uint64_t reserved_1_3          : 3;
12671         uint64_t trim16_ovrd_en        : 1;  /**< [  0:  0](R/W) Override enable for bits 119..116 of 180b ir25_trim. */
12672 #else /* Word 0 - Little Endian */
12673         uint64_t trim16_ovrd_en        : 1;  /**< [  0:  0](R/W) Override enable for bits 119..116 of 180b ir25_trim. */
12674         uint64_t reserved_1_3          : 3;
12675         uint64_t trim17_ovrd_en        : 1;  /**< [  4:  4](R/W) Override enable for bits 123..120 of 180b ir25_trim. */
12676         uint64_t reserved_5_7          : 3;
12677         uint64_t trim18_ovrd_en        : 1;  /**< [  8:  8](R/W) Override enable for bits 127..124 of 180b ir25_trim. */
12678         uint64_t reserved_9_11         : 3;
12679         uint64_t trim19_ovrd_en        : 1;  /**< [ 12: 12](R/W) Override enable for bits 131..128 of 180b ir25_trim. */
12680         uint64_t reserved_13_15        : 3;
12681         uint64_t trim20_ovrd_en        : 1;  /**< [ 16: 16](R/W) Override enable for bits 135..132 of 180b ir25_trim. */
12682         uint64_t reserved_17_19        : 3;
12683         uint64_t trim21_ovrd_en        : 1;  /**< [ 20: 20](R/W) Override enable for bits 139..136 of 180b ir25_trim. */
12684         uint64_t reserved_21_23        : 3;
12685         uint64_t trim22_ovrd_en        : 1;  /**< [ 24: 24](R/W) Override enable for bits 143..140 of 180b ir25_trim. */
12686         uint64_t reserved_25_27        : 3;
12687         uint64_t trim23_ovrd_en        : 1;  /**< [ 28: 28](R/W) Override enable for bits 147..144 of 180b ir25_trim. */
12688         uint64_t reserved_29_31        : 3;
12689         uint64_t trim24_ovrd_en        : 1;  /**< [ 32: 32](R/W) Override enable for bits 151..148 of 180b ir25_trim. */
12690         uint64_t reserved_33_35        : 3;
12691         uint64_t trim25_ovrd_en        : 1;  /**< [ 36: 36](R/W) Override enable for bits 155..152 of 180b ir25_trim. */
12692         uint64_t reserved_37_39        : 3;
12693         uint64_t trim26_ovrd_en        : 1;  /**< [ 40: 40](R/W) Override enable for bits 159..156 of 180b ir25_trim. */
12694         uint64_t reserved_41_43        : 3;
12695         uint64_t trim27_ovrd_en        : 1;  /**< [ 44: 44](R/W) Override enable for bits 163..160 of 180b ir25_trim. */
12696         uint64_t reserved_45_47        : 3;
12697         uint64_t trim28_ovrd_en        : 1;  /**< [ 48: 48](R/W) Override enable for bits 167..164 of 180b ir25_trim. */
12698         uint64_t reserved_49_51        : 3;
12699         uint64_t trim29_ovrd_en        : 1;  /**< [ 52: 52](R/W) Override enable for bits 171..168 of 180b ir25_trim. */
12700         uint64_t reserved_53_55        : 3;
12701         uint64_t trim30_ovrd_en        : 1;  /**< [ 56: 56](R/W) Override enable for bits 175..172 of 180b ir25_trim. */
12702         uint64_t reserved_57_59        : 3;
12703         uint64_t trim31_ovrd_en        : 1;  /**< [ 60: 60](R/W) Override enable for bits 179..176 of 180b ir25_trim. */
12704         uint64_t reserved_61_63        : 3;
12705 #endif /* Word 0 - End */
12706     } s;
12707     /* struct bdk_gsernx_lanex_rx_itrim_4_bcfg_s cn; */
12708 };
12709 typedef union bdk_gsernx_lanex_rx_itrim_4_bcfg bdk_gsernx_lanex_rx_itrim_4_bcfg_t;
12710 
12711 static inline uint64_t BDK_GSERNX_LANEX_RX_ITRIM_4_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_ITRIM_4_BCFG(unsigned long a,unsigned long b)12712 static inline uint64_t BDK_GSERNX_LANEX_RX_ITRIM_4_BCFG(unsigned long a, unsigned long b)
12713 {
12714     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
12715         return 0x87e090001ac0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
12716     __bdk_csr_fatal("GSERNX_LANEX_RX_ITRIM_4_BCFG", 2, a, b, 0, 0);
12717 }
12718 
12719 #define typedef_BDK_GSERNX_LANEX_RX_ITRIM_4_BCFG(a,b) bdk_gsernx_lanex_rx_itrim_4_bcfg_t
12720 #define bustype_BDK_GSERNX_LANEX_RX_ITRIM_4_BCFG(a,b) BDK_CSR_TYPE_RSL
12721 #define basename_BDK_GSERNX_LANEX_RX_ITRIM_4_BCFG(a,b) "GSERNX_LANEX_RX_ITRIM_4_BCFG"
12722 #define device_bar_BDK_GSERNX_LANEX_RX_ITRIM_4_BCFG(a,b) 0x0 /* PF_BAR0 */
12723 #define busnum_BDK_GSERNX_LANEX_RX_ITRIM_4_BCFG(a,b) (a)
12724 #define arguments_BDK_GSERNX_LANEX_RX_ITRIM_4_BCFG(a,b) (a),(b),-1,-1
12725 
12726 /**
12727  * Register (RSL) gsern#_lane#_rx_itrim_5_bcfg
12728  *
12729  * GSER Lane Receiver Ir25 Trim Override Enables Register 2
12730  * ir25_trim override settings are in groups of 4 bits. These only take
12731  * effect when the corresponding enable bit(s) are set.
12732  */
12733 union bdk_gsernx_lanex_rx_itrim_5_bcfg
12734 {
12735     uint64_t u;
12736     struct bdk_gsernx_lanex_rx_itrim_5_bcfg_s
12737     {
12738 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
12739         uint64_t reserved_53_63        : 11;
12740         uint64_t trim45_ovrd_en        : 1;  /**< [ 52: 52](R/W) Override enable for bits 27..24 of 180b ir25_trim. */
12741         uint64_t reserved_49_51        : 3;
12742         uint64_t trim44_ovrd_en        : 1;  /**< [ 48: 48](R/W) Override enable for bits 115..112 of 180b ir25_trim. */
12743         uint64_t reserved_45_47        : 3;
12744         uint64_t trim43_ovrd_en        : 1;  /**< [ 44: 44](R/W) Override enable for bits 23..20 of 180b ir25_trim. */
12745         uint64_t reserved_41_43        : 3;
12746         uint64_t trim42_ovrd_en        : 1;  /**< [ 40: 40](R/W) Override enable for bits 111..108 of 180b ir25_trim. */
12747         uint64_t reserved_37_39        : 3;
12748         uint64_t trim41_ovrd_en        : 1;  /**< [ 36: 36](R/W) Override enable for bits 19..16 of 180b ir25_trim. */
12749         uint64_t reserved_33_35        : 3;
12750         uint64_t trim40_ovrd_en        : 1;  /**< [ 32: 32](R/W) Override enable for bits 107..104 of 180b ir25_trim. */
12751         uint64_t reserved_29_31        : 3;
12752         uint64_t trim39_ovrd_en        : 1;  /**< [ 28: 28](R/W) Override enable for bits 15..12 of 180b ir25_trim. */
12753         uint64_t reserved_25_27        : 3;
12754         uint64_t trim38_ovrd_en        : 1;  /**< [ 24: 24](R/W) Override enable for bits 103..100 of 180b ir25_trim. */
12755         uint64_t reserved_21_23        : 3;
12756         uint64_t trim37_ovrd_en        : 1;  /**< [ 20: 20](R/W) Override enable for bits 11..8 of 180b ir25_trim. */
12757         uint64_t reserved_17_19        : 3;
12758         uint64_t trim36_ovrd_en        : 1;  /**< [ 16: 16](R/W) Override enable for bits 99..96 of 180b ir25_trim. */
12759         uint64_t reserved_13_15        : 3;
12760         uint64_t trim35_ovrd_en        : 1;  /**< [ 12: 12](R/W) Override enable for bits 7..4 of 180b ir25_trim. */
12761         uint64_t reserved_9_11         : 3;
12762         uint64_t trim34_ovrd_en        : 1;  /**< [  8:  8](R/W) Override enable for bits 95..92 of 180b ir25_trim. */
12763         uint64_t reserved_5_7          : 3;
12764         uint64_t trim33_ovrd_en        : 1;  /**< [  4:  4](R/W) Override enable for bits 3..0 of 180b ir25_trim. */
12765         uint64_t reserved_1_3          : 3;
12766         uint64_t trim32_ovrd_en        : 1;  /**< [  0:  0](R/W) Override enable for bits 91..88 of 180b ir25_trim. */
12767 #else /* Word 0 - Little Endian */
12768         uint64_t trim32_ovrd_en        : 1;  /**< [  0:  0](R/W) Override enable for bits 91..88 of 180b ir25_trim. */
12769         uint64_t reserved_1_3          : 3;
12770         uint64_t trim33_ovrd_en        : 1;  /**< [  4:  4](R/W) Override enable for bits 3..0 of 180b ir25_trim. */
12771         uint64_t reserved_5_7          : 3;
12772         uint64_t trim34_ovrd_en        : 1;  /**< [  8:  8](R/W) Override enable for bits 95..92 of 180b ir25_trim. */
12773         uint64_t reserved_9_11         : 3;
12774         uint64_t trim35_ovrd_en        : 1;  /**< [ 12: 12](R/W) Override enable for bits 7..4 of 180b ir25_trim. */
12775         uint64_t reserved_13_15        : 3;
12776         uint64_t trim36_ovrd_en        : 1;  /**< [ 16: 16](R/W) Override enable for bits 99..96 of 180b ir25_trim. */
12777         uint64_t reserved_17_19        : 3;
12778         uint64_t trim37_ovrd_en        : 1;  /**< [ 20: 20](R/W) Override enable for bits 11..8 of 180b ir25_trim. */
12779         uint64_t reserved_21_23        : 3;
12780         uint64_t trim38_ovrd_en        : 1;  /**< [ 24: 24](R/W) Override enable for bits 103..100 of 180b ir25_trim. */
12781         uint64_t reserved_25_27        : 3;
12782         uint64_t trim39_ovrd_en        : 1;  /**< [ 28: 28](R/W) Override enable for bits 15..12 of 180b ir25_trim. */
12783         uint64_t reserved_29_31        : 3;
12784         uint64_t trim40_ovrd_en        : 1;  /**< [ 32: 32](R/W) Override enable for bits 107..104 of 180b ir25_trim. */
12785         uint64_t reserved_33_35        : 3;
12786         uint64_t trim41_ovrd_en        : 1;  /**< [ 36: 36](R/W) Override enable for bits 19..16 of 180b ir25_trim. */
12787         uint64_t reserved_37_39        : 3;
12788         uint64_t trim42_ovrd_en        : 1;  /**< [ 40: 40](R/W) Override enable for bits 111..108 of 180b ir25_trim. */
12789         uint64_t reserved_41_43        : 3;
12790         uint64_t trim43_ovrd_en        : 1;  /**< [ 44: 44](R/W) Override enable for bits 23..20 of 180b ir25_trim. */
12791         uint64_t reserved_45_47        : 3;
12792         uint64_t trim44_ovrd_en        : 1;  /**< [ 48: 48](R/W) Override enable for bits 115..112 of 180b ir25_trim. */
12793         uint64_t reserved_49_51        : 3;
12794         uint64_t trim45_ovrd_en        : 1;  /**< [ 52: 52](R/W) Override enable for bits 27..24 of 180b ir25_trim. */
12795         uint64_t reserved_53_63        : 11;
12796 #endif /* Word 0 - End */
12797     } s;
12798     /* struct bdk_gsernx_lanex_rx_itrim_5_bcfg_s cn; */
12799 };
12800 typedef union bdk_gsernx_lanex_rx_itrim_5_bcfg bdk_gsernx_lanex_rx_itrim_5_bcfg_t;
12801 
12802 static inline uint64_t BDK_GSERNX_LANEX_RX_ITRIM_5_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_ITRIM_5_BCFG(unsigned long a,unsigned long b)12803 static inline uint64_t BDK_GSERNX_LANEX_RX_ITRIM_5_BCFG(unsigned long a, unsigned long b)
12804 {
12805     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
12806         return 0x87e090001ad0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
12807     __bdk_csr_fatal("GSERNX_LANEX_RX_ITRIM_5_BCFG", 2, a, b, 0, 0);
12808 }
12809 
12810 #define typedef_BDK_GSERNX_LANEX_RX_ITRIM_5_BCFG(a,b) bdk_gsernx_lanex_rx_itrim_5_bcfg_t
12811 #define bustype_BDK_GSERNX_LANEX_RX_ITRIM_5_BCFG(a,b) BDK_CSR_TYPE_RSL
12812 #define basename_BDK_GSERNX_LANEX_RX_ITRIM_5_BCFG(a,b) "GSERNX_LANEX_RX_ITRIM_5_BCFG"
12813 #define device_bar_BDK_GSERNX_LANEX_RX_ITRIM_5_BCFG(a,b) 0x0 /* PF_BAR0 */
12814 #define busnum_BDK_GSERNX_LANEX_RX_ITRIM_5_BCFG(a,b) (a)
12815 #define arguments_BDK_GSERNX_LANEX_RX_ITRIM_5_BCFG(a,b) (a),(b),-1,-1
12816 
12817 /**
12818  * Register (RSL) gsern#_lane#_rx_margin_dbg_cnt
12819  *
12820  * GSER Lane RX Margining Debug Control Register
12821  * CSR basec control of Phy initiated read/write operations to the PEM.  This is a
12822  * debug field that can be used to check the results of an RX Margining sequence.
12823  * The expecation is that the PEM FSM will initiate the transactions and the results
12824  * will be placed in MAC/PEM CSRs using the p2m_mesage_bus.  However, ability to
12825  * read/write these registers into the processor is not clear from Synopsys's MAC
12826  * spec.  As such, this feature was added to allow an RSL read/write of these registers.
12827  * Protocal is Ready & Done based.  A transaction is updated in the CSR registers and the
12828  * Ready bit is set high.  Once it is set high, the mbus_fsm will execute the transaction
12829  * and assert the Done bit when done or when results are available in
12830  * GSERN()_LANE()_RX_MARGIN_DBG_OBS.
12831  */
12832 union bdk_gsernx_lanex_rx_margin_dbg_cnt
12833 {
12834     uint64_t u;
12835     struct bdk_gsernx_lanex_rx_margin_dbg_cnt_s
12836     {
12837 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
12838         uint64_t ready                 : 1;  /**< [ 63: 63](R/W) Handshake bit to indicate there is a valid request from the RSL bus to transact
12839                                                                  on the mesage bus.  Setting this bit triggers the mbus_fsm to execute the
12840                                                                  transaction.  Once a transaction is done, this bit has to be cleared before
12841                                                                  another transaction is issued.
12842                                                                    0 = No mbus transactions are outstanding.
12843                                                                    1 = An mbus transaction is outstanding. */
12844         uint64_t write_commit          : 1;  /**< [ 62: 62](R/W) This bit will determin to the mbus transactor if the write operation is a
12845                                                                  commited write or an uncommited write.  When doing a read, this bit is a
12846                                                                  don't care.
12847                                                                    0 = If executing a write, this write operation is not-commited type.
12848                                                                    1 = If executing a write, this write operation is a commited type. */
12849         uint64_t read_writen           : 1;  /**< [ 61: 61](R/W) This bit indicates if we are doing a read or write operation.
12850                                                                    0 = Performing a write operation.
12851                                                                    1 = Performing a read operation. */
12852         uint64_t reserved_20_60        : 41;
12853         uint64_t address               : 12; /**< [ 19:  8](R/W) The 12-bit field of address to be send to the MAC/PEM if we are peforming either
12854                                                                  a read or write operation. */
12855         uint64_t data                  : 8;  /**< [  7:  0](R/W) The 8-bit field of Data to be send to the MAC/PEM if we are peforming a write operation. */
12856 #else /* Word 0 - Little Endian */
12857         uint64_t data                  : 8;  /**< [  7:  0](R/W) The 8-bit field of Data to be send to the MAC/PEM if we are peforming a write operation. */
12858         uint64_t address               : 12; /**< [ 19:  8](R/W) The 12-bit field of address to be send to the MAC/PEM if we are peforming either
12859                                                                  a read or write operation. */
12860         uint64_t reserved_20_60        : 41;
12861         uint64_t read_writen           : 1;  /**< [ 61: 61](R/W) This bit indicates if we are doing a read or write operation.
12862                                                                    0 = Performing a write operation.
12863                                                                    1 = Performing a read operation. */
12864         uint64_t write_commit          : 1;  /**< [ 62: 62](R/W) This bit will determin to the mbus transactor if the write operation is a
12865                                                                  commited write or an uncommited write.  When doing a read, this bit is a
12866                                                                  don't care.
12867                                                                    0 = If executing a write, this write operation is not-commited type.
12868                                                                    1 = If executing a write, this write operation is a commited type. */
12869         uint64_t ready                 : 1;  /**< [ 63: 63](R/W) Handshake bit to indicate there is a valid request from the RSL bus to transact
12870                                                                  on the mesage bus.  Setting this bit triggers the mbus_fsm to execute the
12871                                                                  transaction.  Once a transaction is done, this bit has to be cleared before
12872                                                                  another transaction is issued.
12873                                                                    0 = No mbus transactions are outstanding.
12874                                                                    1 = An mbus transaction is outstanding. */
12875 #endif /* Word 0 - End */
12876     } s;
12877     /* struct bdk_gsernx_lanex_rx_margin_dbg_cnt_s cn; */
12878 };
12879 typedef union bdk_gsernx_lanex_rx_margin_dbg_cnt bdk_gsernx_lanex_rx_margin_dbg_cnt_t;
12880 
12881 static inline uint64_t BDK_GSERNX_LANEX_RX_MARGIN_DBG_CNT(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_MARGIN_DBG_CNT(unsigned long a,unsigned long b)12882 static inline uint64_t BDK_GSERNX_LANEX_RX_MARGIN_DBG_CNT(unsigned long a, unsigned long b)
12883 {
12884     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
12885         return 0x87e090001220ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
12886     __bdk_csr_fatal("GSERNX_LANEX_RX_MARGIN_DBG_CNT", 2, a, b, 0, 0);
12887 }
12888 
12889 #define typedef_BDK_GSERNX_LANEX_RX_MARGIN_DBG_CNT(a,b) bdk_gsernx_lanex_rx_margin_dbg_cnt_t
12890 #define bustype_BDK_GSERNX_LANEX_RX_MARGIN_DBG_CNT(a,b) BDK_CSR_TYPE_RSL
12891 #define basename_BDK_GSERNX_LANEX_RX_MARGIN_DBG_CNT(a,b) "GSERNX_LANEX_RX_MARGIN_DBG_CNT"
12892 #define device_bar_BDK_GSERNX_LANEX_RX_MARGIN_DBG_CNT(a,b) 0x0 /* PF_BAR0 */
12893 #define busnum_BDK_GSERNX_LANEX_RX_MARGIN_DBG_CNT(a,b) (a)
12894 #define arguments_BDK_GSERNX_LANEX_RX_MARGIN_DBG_CNT(a,b) (a),(b),-1,-1
12895 
12896 /**
12897  * Register (RSL) gsern#_lane#_rx_margin_dbg_obs
12898  *
12899  * GSER Lane RX Margining Debug Result Register
12900  * Observes the results of an mbus_messaging transaction.  The results are expected to be
12901  * valid only when the Done bit is asserted.
12902  */
12903 union bdk_gsernx_lanex_rx_margin_dbg_obs
12904 {
12905     uint64_t u;
12906     struct bdk_gsernx_lanex_rx_margin_dbg_obs_s
12907     {
12908 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
12909         uint64_t done                  : 1;  /**< [ 63: 63](RO/H) Done bit indicating that the outstanding transaction on the mbus
12910                                                                  has finished and if there are results that are expected, they will
12911                                                                  be presented to this register.  The results are not sticky, so a copy
12912                                                                  needs to be moved out of this register to another location before
12913                                                                  de-asserting the READY bit in GSERN()_LANE()_RX_MARGIN_DBG_CNT.
12914                                                                  De-assertign the READY bit will force this bit low again and remove
12915                                                                  the data being presented to this CSR inputs. */
12916         uint64_t reserved_20_62        : 43;
12917         uint64_t address               : 12; /**< [ 19:  8](RO/H) Observed Address a read was completed against or location of the write operation being executed. */
12918         uint64_t data                  : 8;  /**< [  7:  0](RO/H) Observed Data read back from the MAC/PEM at the completion of the read operation */
12919 #else /* Word 0 - Little Endian */
12920         uint64_t data                  : 8;  /**< [  7:  0](RO/H) Observed Data read back from the MAC/PEM at the completion of the read operation */
12921         uint64_t address               : 12; /**< [ 19:  8](RO/H) Observed Address a read was completed against or location of the write operation being executed. */
12922         uint64_t reserved_20_62        : 43;
12923         uint64_t done                  : 1;  /**< [ 63: 63](RO/H) Done bit indicating that the outstanding transaction on the mbus
12924                                                                  has finished and if there are results that are expected, they will
12925                                                                  be presented to this register.  The results are not sticky, so a copy
12926                                                                  needs to be moved out of this register to another location before
12927                                                                  de-asserting the READY bit in GSERN()_LANE()_RX_MARGIN_DBG_CNT.
12928                                                                  De-assertign the READY bit will force this bit low again and remove
12929                                                                  the data being presented to this CSR inputs. */
12930 #endif /* Word 0 - End */
12931     } s;
12932     /* struct bdk_gsernx_lanex_rx_margin_dbg_obs_s cn; */
12933 };
12934 typedef union bdk_gsernx_lanex_rx_margin_dbg_obs bdk_gsernx_lanex_rx_margin_dbg_obs_t;
12935 
12936 static inline uint64_t BDK_GSERNX_LANEX_RX_MARGIN_DBG_OBS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_MARGIN_DBG_OBS(unsigned long a,unsigned long b)12937 static inline uint64_t BDK_GSERNX_LANEX_RX_MARGIN_DBG_OBS(unsigned long a, unsigned long b)
12938 {
12939     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
12940         return 0x87e090001230ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
12941     __bdk_csr_fatal("GSERNX_LANEX_RX_MARGIN_DBG_OBS", 2, a, b, 0, 0);
12942 }
12943 
12944 #define typedef_BDK_GSERNX_LANEX_RX_MARGIN_DBG_OBS(a,b) bdk_gsernx_lanex_rx_margin_dbg_obs_t
12945 #define bustype_BDK_GSERNX_LANEX_RX_MARGIN_DBG_OBS(a,b) BDK_CSR_TYPE_RSL
12946 #define basename_BDK_GSERNX_LANEX_RX_MARGIN_DBG_OBS(a,b) "GSERNX_LANEX_RX_MARGIN_DBG_OBS"
12947 #define device_bar_BDK_GSERNX_LANEX_RX_MARGIN_DBG_OBS(a,b) 0x0 /* PF_BAR0 */
12948 #define busnum_BDK_GSERNX_LANEX_RX_MARGIN_DBG_OBS(a,b) (a)
12949 #define arguments_BDK_GSERNX_LANEX_RX_MARGIN_DBG_OBS(a,b) (a),(b),-1,-1
12950 
12951 /**
12952  * Register (RSL) gsern#_lane#_rx_margin_phy_cnt
12953  *
12954  * GSER Lane RX Margining Overrides of Phy MBUS margining bits Register
12955  * Can override existing values generated by the RX Margining FSM.  This feature will
12956  * allow the RSL interface to provide its own values to the MAC/PEM Phy CSRs for the
12957  * mbus interface.  This is strictly a debug method for sending the mbus CSRs in the
12958  * phy to the MAC/PEM in a predictable method.
12959  */
12960 union bdk_gsernx_lanex_rx_margin_phy_cnt
12961 {
12962     uint64_t u;
12963     struct bdk_gsernx_lanex_rx_margin_phy_cnt_s
12964     {
12965 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
12966         uint64_t override_margining_fsm : 1; /**< [ 63: 63](R/W) The bit that when asserted to 1'b1, will enable the values of this register to
12967                                                                  replace the values generated by the RX Margining FSM. */
12968         uint64_t sample_count_reset    : 1;  /**< [ 62: 62](R/W) Resets the sample count register for the RX Margining FSM. */
12969         uint64_t error_count_reset     : 1;  /**< [ 61: 61](R/W) Resets the error count register for the RX Margining FSM. */
12970         uint64_t margin_voltage_timing : 1;  /**< [ 60: 60](R/W) Sets whitch type of margining to perfomr.  1'b0 for timing 1'b1 for voltage */
12971         uint64_t start_margining       : 1;  /**< [ 59: 59](R/W) Enables margining FSM to operate. */
12972         uint64_t margin_direction      : 1;  /**< [ 58: 58](R/W) Sets the direction of the margining.
12973                                                                  For timing, a 1'b0 steps to the left a 1'b1 steps to the right.
12974                                                                  For voltage, 1'b0 steps voltage up and 1'b1 steps voltage down. */
12975         uint64_t margin_offset         : 7;  /**< [ 57: 51](R/W) Margining offset for the sample point. */
12976         uint64_t reserved_48_50        : 3;
12977         uint64_t sample_count_ovr      : 40; /**< [ 47:  8](R/W) Margining sample count size.  Default is 1K samples, but can be updated to any
12978                                                                  value with in the 40-bit length. */
12979         uint64_t elastic_buffer_depth  : 8;  /**< [  7:  0](R/W) Sets the margining buffer depth.  Feature is not used */
12980 #else /* Word 0 - Little Endian */
12981         uint64_t elastic_buffer_depth  : 8;  /**< [  7:  0](R/W) Sets the margining buffer depth.  Feature is not used */
12982         uint64_t sample_count_ovr      : 40; /**< [ 47:  8](R/W) Margining sample count size.  Default is 1K samples, but can be updated to any
12983                                                                  value with in the 40-bit length. */
12984         uint64_t reserved_48_50        : 3;
12985         uint64_t margin_offset         : 7;  /**< [ 57: 51](R/W) Margining offset for the sample point. */
12986         uint64_t margin_direction      : 1;  /**< [ 58: 58](R/W) Sets the direction of the margining.
12987                                                                  For timing, a 1'b0 steps to the left a 1'b1 steps to the right.
12988                                                                  For voltage, 1'b0 steps voltage up and 1'b1 steps voltage down. */
12989         uint64_t start_margining       : 1;  /**< [ 59: 59](R/W) Enables margining FSM to operate. */
12990         uint64_t margin_voltage_timing : 1;  /**< [ 60: 60](R/W) Sets whitch type of margining to perfomr.  1'b0 for timing 1'b1 for voltage */
12991         uint64_t error_count_reset     : 1;  /**< [ 61: 61](R/W) Resets the error count register for the RX Margining FSM. */
12992         uint64_t sample_count_reset    : 1;  /**< [ 62: 62](R/W) Resets the sample count register for the RX Margining FSM. */
12993         uint64_t override_margining_fsm : 1; /**< [ 63: 63](R/W) The bit that when asserted to 1'b1, will enable the values of this register to
12994                                                                  replace the values generated by the RX Margining FSM. */
12995 #endif /* Word 0 - End */
12996     } s;
12997     /* struct bdk_gsernx_lanex_rx_margin_phy_cnt_s cn; */
12998 };
12999 typedef union bdk_gsernx_lanex_rx_margin_phy_cnt bdk_gsernx_lanex_rx_margin_phy_cnt_t;
13000 
13001 static inline uint64_t BDK_GSERNX_LANEX_RX_MARGIN_PHY_CNT(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_MARGIN_PHY_CNT(unsigned long a,unsigned long b)13002 static inline uint64_t BDK_GSERNX_LANEX_RX_MARGIN_PHY_CNT(unsigned long a, unsigned long b)
13003 {
13004     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
13005         return 0x87e090001330ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
13006     __bdk_csr_fatal("GSERNX_LANEX_RX_MARGIN_PHY_CNT", 2, a, b, 0, 0);
13007 }
13008 
13009 #define typedef_BDK_GSERNX_LANEX_RX_MARGIN_PHY_CNT(a,b) bdk_gsernx_lanex_rx_margin_phy_cnt_t
13010 #define bustype_BDK_GSERNX_LANEX_RX_MARGIN_PHY_CNT(a,b) BDK_CSR_TYPE_RSL
13011 #define basename_BDK_GSERNX_LANEX_RX_MARGIN_PHY_CNT(a,b) "GSERNX_LANEX_RX_MARGIN_PHY_CNT"
13012 #define device_bar_BDK_GSERNX_LANEX_RX_MARGIN_PHY_CNT(a,b) 0x0 /* PF_BAR0 */
13013 #define busnum_BDK_GSERNX_LANEX_RX_MARGIN_PHY_CNT(a,b) (a)
13014 #define arguments_BDK_GSERNX_LANEX_RX_MARGIN_PHY_CNT(a,b) (a),(b),-1,-1
13015 
13016 /**
13017  * Register (RSL) gsern#_lane#_rx_margin_phy_obs
13018  *
13019  * GSER Lane RX Margining Observe of Phy MBUS margining bits Register
13020  * Observes the status of phy mbus CSRs.  The results are expected to be changed by the
13021  * margining FSM.  This is strictly an observe path to the mbus CSRs in the phy.
13022  */
13023 union bdk_gsernx_lanex_rx_margin_phy_obs
13024 {
13025     uint64_t u;
13026     struct bdk_gsernx_lanex_rx_margin_phy_obs_s
13027     {
13028 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
13029         uint64_t margin_nak            : 1;  /**< [ 63: 63](RO/H) Asserted when the margining setup is out of range for the margining hardware to
13030                                                                  perform. */
13031         uint64_t margin_status         : 1;  /**< [ 62: 62](RO/H) Indicates the status of the margining FSM.  If asserted, then there is an open
13032                                                                  Reciever Margining transaction being executed. */
13033         uint64_t elastic_buffer_status : 1;  /**< [ 61: 61](RO/H) Indicates the status of the elastic buffer.  This feature is not supported and
13034                                                                  will always return 0. */
13035         uint64_t reserved_15_60        : 46;
13036         uint64_t sample_count          : 7;  /**< [ 14:  8](RO/H) Observed Address a read was completed against or location of the write operation being executed. */
13037         uint64_t reserved_6_7          : 2;
13038         uint64_t error_count           : 6;  /**< [  5:  0](RO/H) Observed Data read back from the MAC/PEM at the completion of the read operation */
13039 #else /* Word 0 - Little Endian */
13040         uint64_t error_count           : 6;  /**< [  5:  0](RO/H) Observed Data read back from the MAC/PEM at the completion of the read operation */
13041         uint64_t reserved_6_7          : 2;
13042         uint64_t sample_count          : 7;  /**< [ 14:  8](RO/H) Observed Address a read was completed against or location of the write operation being executed. */
13043         uint64_t reserved_15_60        : 46;
13044         uint64_t elastic_buffer_status : 1;  /**< [ 61: 61](RO/H) Indicates the status of the elastic buffer.  This feature is not supported and
13045                                                                  will always return 0. */
13046         uint64_t margin_status         : 1;  /**< [ 62: 62](RO/H) Indicates the status of the margining FSM.  If asserted, then there is an open
13047                                                                  Reciever Margining transaction being executed. */
13048         uint64_t margin_nak            : 1;  /**< [ 63: 63](RO/H) Asserted when the margining setup is out of range for the margining hardware to
13049                                                                  perform. */
13050 #endif /* Word 0 - End */
13051     } s;
13052     /* struct bdk_gsernx_lanex_rx_margin_phy_obs_s cn; */
13053 };
13054 typedef union bdk_gsernx_lanex_rx_margin_phy_obs bdk_gsernx_lanex_rx_margin_phy_obs_t;
13055 
13056 static inline uint64_t BDK_GSERNX_LANEX_RX_MARGIN_PHY_OBS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_MARGIN_PHY_OBS(unsigned long a,unsigned long b)13057 static inline uint64_t BDK_GSERNX_LANEX_RX_MARGIN_PHY_OBS(unsigned long a, unsigned long b)
13058 {
13059     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
13060         return 0x87e090001430ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
13061     __bdk_csr_fatal("GSERNX_LANEX_RX_MARGIN_PHY_OBS", 2, a, b, 0, 0);
13062 }
13063 
13064 #define typedef_BDK_GSERNX_LANEX_RX_MARGIN_PHY_OBS(a,b) bdk_gsernx_lanex_rx_margin_phy_obs_t
13065 #define bustype_BDK_GSERNX_LANEX_RX_MARGIN_PHY_OBS(a,b) BDK_CSR_TYPE_RSL
13066 #define basename_BDK_GSERNX_LANEX_RX_MARGIN_PHY_OBS(a,b) "GSERNX_LANEX_RX_MARGIN_PHY_OBS"
13067 #define device_bar_BDK_GSERNX_LANEX_RX_MARGIN_PHY_OBS(a,b) 0x0 /* PF_BAR0 */
13068 #define busnum_BDK_GSERNX_LANEX_RX_MARGIN_PHY_OBS(a,b) (a)
13069 #define arguments_BDK_GSERNX_LANEX_RX_MARGIN_PHY_OBS(a,b) (a),(b),-1,-1
13070 
13071 /**
13072  * Register (RSL) gsern#_lane#_rx_os_1_bcfg
13073  *
13074  * GSER Lane Receiver Offset Control Group 1 Register
13075  * Register controls for offset overrides from os0_0 through os3_1. Each
13076  * override setting has a corresponding enable bit which will cause the
13077  * calibration control logic to use the override register setting instead
13078  * of the calibration result.
13079  */
13080 union bdk_gsernx_lanex_rx_os_1_bcfg
13081 {
13082     uint64_t u;
13083     struct bdk_gsernx_lanex_rx_os_1_bcfg_s
13084     {
13085 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
13086         uint64_t os3_1_ovrd_en         : 1;  /**< [ 63: 63](R/W) Enable use of [OS3_1_OVRD]. */
13087         uint64_t reserved_62           : 1;
13088         uint64_t os3_1_ovrd            : 6;  /**< [ 61: 56](R/W) os3_1 offset compensation override bits. */
13089         uint64_t os3_0_ovrd_en         : 1;  /**< [ 55: 55](R/W) Enable use of [OS3_0_OVRD]. */
13090         uint64_t reserved_54           : 1;
13091         uint64_t os3_0_ovrd            : 6;  /**< [ 53: 48](R/W) os3_0 offset compensation override bits. */
13092         uint64_t os2_1_ovrd_en         : 1;  /**< [ 47: 47](R/W) Enable use of [OS2_1_OVRD]. */
13093         uint64_t reserved_46           : 1;
13094         uint64_t os2_1_ovrd            : 6;  /**< [ 45: 40](R/W) os2_1 offset compensation override bits. */
13095         uint64_t os2_0_ovrd_en         : 1;  /**< [ 39: 39](R/W) Enable use of [OS2_0_OVRD]. */
13096         uint64_t reserved_38           : 1;
13097         uint64_t os2_0_ovrd            : 6;  /**< [ 37: 32](R/W) os2_0 offset compensation override bits. */
13098         uint64_t os1_1_ovrd_en         : 1;  /**< [ 31: 31](R/W) Enable use of [OS1_1_OVRD]. */
13099         uint64_t reserved_30           : 1;
13100         uint64_t os1_1_ovrd            : 6;  /**< [ 29: 24](R/W) os1_1 offset compensation override bits. */
13101         uint64_t os1_0_ovrd_en         : 1;  /**< [ 23: 23](R/W) Enable use of [OS1_0_OVRD]. */
13102         uint64_t reserved_22           : 1;
13103         uint64_t os1_0_ovrd            : 6;  /**< [ 21: 16](R/W) os1_0 offset compensation override bits. */
13104         uint64_t os0_1_ovrd_en         : 1;  /**< [ 15: 15](R/W) Enable use of [OS0_1_OVRD]. */
13105         uint64_t reserved_14           : 1;
13106         uint64_t os0_1_ovrd            : 6;  /**< [ 13:  8](R/W) os0_1 offset compensation override bits. */
13107         uint64_t os0_0_ovrd_en         : 1;  /**< [  7:  7](R/W) Enable use of [OS0_0_OVRD]. */
13108         uint64_t reserved_6            : 1;
13109         uint64_t os0_0_ovrd            : 6;  /**< [  5:  0](R/W) os0_0 offset compensation override bits. */
13110 #else /* Word 0 - Little Endian */
13111         uint64_t os0_0_ovrd            : 6;  /**< [  5:  0](R/W) os0_0 offset compensation override bits. */
13112         uint64_t reserved_6            : 1;
13113         uint64_t os0_0_ovrd_en         : 1;  /**< [  7:  7](R/W) Enable use of [OS0_0_OVRD]. */
13114         uint64_t os0_1_ovrd            : 6;  /**< [ 13:  8](R/W) os0_1 offset compensation override bits. */
13115         uint64_t reserved_14           : 1;
13116         uint64_t os0_1_ovrd_en         : 1;  /**< [ 15: 15](R/W) Enable use of [OS0_1_OVRD]. */
13117         uint64_t os1_0_ovrd            : 6;  /**< [ 21: 16](R/W) os1_0 offset compensation override bits. */
13118         uint64_t reserved_22           : 1;
13119         uint64_t os1_0_ovrd_en         : 1;  /**< [ 23: 23](R/W) Enable use of [OS1_0_OVRD]. */
13120         uint64_t os1_1_ovrd            : 6;  /**< [ 29: 24](R/W) os1_1 offset compensation override bits. */
13121         uint64_t reserved_30           : 1;
13122         uint64_t os1_1_ovrd_en         : 1;  /**< [ 31: 31](R/W) Enable use of [OS1_1_OVRD]. */
13123         uint64_t os2_0_ovrd            : 6;  /**< [ 37: 32](R/W) os2_0 offset compensation override bits. */
13124         uint64_t reserved_38           : 1;
13125         uint64_t os2_0_ovrd_en         : 1;  /**< [ 39: 39](R/W) Enable use of [OS2_0_OVRD]. */
13126         uint64_t os2_1_ovrd            : 6;  /**< [ 45: 40](R/W) os2_1 offset compensation override bits. */
13127         uint64_t reserved_46           : 1;
13128         uint64_t os2_1_ovrd_en         : 1;  /**< [ 47: 47](R/W) Enable use of [OS2_1_OVRD]. */
13129         uint64_t os3_0_ovrd            : 6;  /**< [ 53: 48](R/W) os3_0 offset compensation override bits. */
13130         uint64_t reserved_54           : 1;
13131         uint64_t os3_0_ovrd_en         : 1;  /**< [ 55: 55](R/W) Enable use of [OS3_0_OVRD]. */
13132         uint64_t os3_1_ovrd            : 6;  /**< [ 61: 56](R/W) os3_1 offset compensation override bits. */
13133         uint64_t reserved_62           : 1;
13134         uint64_t os3_1_ovrd_en         : 1;  /**< [ 63: 63](R/W) Enable use of [OS3_1_OVRD]. */
13135 #endif /* Word 0 - End */
13136     } s;
13137     /* struct bdk_gsernx_lanex_rx_os_1_bcfg_s cn; */
13138 };
13139 typedef union bdk_gsernx_lanex_rx_os_1_bcfg bdk_gsernx_lanex_rx_os_1_bcfg_t;
13140 
13141 static inline uint64_t BDK_GSERNX_LANEX_RX_OS_1_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_OS_1_BCFG(unsigned long a,unsigned long b)13142 static inline uint64_t BDK_GSERNX_LANEX_RX_OS_1_BCFG(unsigned long a, unsigned long b)
13143 {
13144     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
13145         return 0x87e090001800ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
13146     __bdk_csr_fatal("GSERNX_LANEX_RX_OS_1_BCFG", 2, a, b, 0, 0);
13147 }
13148 
13149 #define typedef_BDK_GSERNX_LANEX_RX_OS_1_BCFG(a,b) bdk_gsernx_lanex_rx_os_1_bcfg_t
13150 #define bustype_BDK_GSERNX_LANEX_RX_OS_1_BCFG(a,b) BDK_CSR_TYPE_RSL
13151 #define basename_BDK_GSERNX_LANEX_RX_OS_1_BCFG(a,b) "GSERNX_LANEX_RX_OS_1_BCFG"
13152 #define device_bar_BDK_GSERNX_LANEX_RX_OS_1_BCFG(a,b) 0x0 /* PF_BAR0 */
13153 #define busnum_BDK_GSERNX_LANEX_RX_OS_1_BCFG(a,b) (a)
13154 #define arguments_BDK_GSERNX_LANEX_RX_OS_1_BCFG(a,b) (a),(b),-1,-1
13155 
13156 /**
13157  * Register (RSL) gsern#_lane#_rx_os_1_bsts
13158  *
13159  * GSER Lane Receiver Offset Status Group 1 Register
13160  * Status for offset settings actually in use (either calibration results
13161  * or overrides) from os0_0 through os3_1. Results in all fields of this
13162  * register are valid only if GSERN()_LANE()_RX_OS_5_BSTS[AFE_OFFSET_STATUS] and
13163  * GSERN()_LANE()_RX_OS_5_BSTS[DFE_OFFSET_STATUS] are asserted or if the corresponding
13164  * override enable bit is asserted.
13165  */
13166 union bdk_gsernx_lanex_rx_os_1_bsts
13167 {
13168     uint64_t u;
13169     struct bdk_gsernx_lanex_rx_os_1_bsts_s
13170     {
13171 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
13172         uint64_t reserved_62_63        : 2;
13173         uint64_t os3_1                 : 6;  /**< [ 61: 56](RO/H) os3_1 offset compensation override bits. */
13174         uint64_t reserved_54_55        : 2;
13175         uint64_t os3_0                 : 6;  /**< [ 53: 48](RO/H) os3_0 offset compensation override bits. */
13176         uint64_t reserved_46_47        : 2;
13177         uint64_t os2_1                 : 6;  /**< [ 45: 40](RO/H) os2_1 offset compensation override bits. */
13178         uint64_t reserved_38_39        : 2;
13179         uint64_t os2_0                 : 6;  /**< [ 37: 32](RO/H) os2_0 offset compensation override bits. */
13180         uint64_t reserved_30_31        : 2;
13181         uint64_t os1_1                 : 6;  /**< [ 29: 24](RO/H) os1_1 offset compensation override bits. */
13182         uint64_t reserved_22_23        : 2;
13183         uint64_t os1_0                 : 6;  /**< [ 21: 16](RO/H) os1_0 offset compensation override bits. */
13184         uint64_t reserved_14_15        : 2;
13185         uint64_t os0_1                 : 6;  /**< [ 13:  8](RO/H) os0_1 offset compensation override bits. */
13186         uint64_t reserved_6_7          : 2;
13187         uint64_t os0_0                 : 6;  /**< [  5:  0](RO/H) os0_0 offset compensation override bits. */
13188 #else /* Word 0 - Little Endian */
13189         uint64_t os0_0                 : 6;  /**< [  5:  0](RO/H) os0_0 offset compensation override bits. */
13190         uint64_t reserved_6_7          : 2;
13191         uint64_t os0_1                 : 6;  /**< [ 13:  8](RO/H) os0_1 offset compensation override bits. */
13192         uint64_t reserved_14_15        : 2;
13193         uint64_t os1_0                 : 6;  /**< [ 21: 16](RO/H) os1_0 offset compensation override bits. */
13194         uint64_t reserved_22_23        : 2;
13195         uint64_t os1_1                 : 6;  /**< [ 29: 24](RO/H) os1_1 offset compensation override bits. */
13196         uint64_t reserved_30_31        : 2;
13197         uint64_t os2_0                 : 6;  /**< [ 37: 32](RO/H) os2_0 offset compensation override bits. */
13198         uint64_t reserved_38_39        : 2;
13199         uint64_t os2_1                 : 6;  /**< [ 45: 40](RO/H) os2_1 offset compensation override bits. */
13200         uint64_t reserved_46_47        : 2;
13201         uint64_t os3_0                 : 6;  /**< [ 53: 48](RO/H) os3_0 offset compensation override bits. */
13202         uint64_t reserved_54_55        : 2;
13203         uint64_t os3_1                 : 6;  /**< [ 61: 56](RO/H) os3_1 offset compensation override bits. */
13204         uint64_t reserved_62_63        : 2;
13205 #endif /* Word 0 - End */
13206     } s;
13207     /* struct bdk_gsernx_lanex_rx_os_1_bsts_s cn; */
13208 };
13209 typedef union bdk_gsernx_lanex_rx_os_1_bsts bdk_gsernx_lanex_rx_os_1_bsts_t;
13210 
13211 static inline uint64_t BDK_GSERNX_LANEX_RX_OS_1_BSTS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_OS_1_BSTS(unsigned long a,unsigned long b)13212 static inline uint64_t BDK_GSERNX_LANEX_RX_OS_1_BSTS(unsigned long a, unsigned long b)
13213 {
13214     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
13215         return 0x87e090001940ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
13216     __bdk_csr_fatal("GSERNX_LANEX_RX_OS_1_BSTS", 2, a, b, 0, 0);
13217 }
13218 
13219 #define typedef_BDK_GSERNX_LANEX_RX_OS_1_BSTS(a,b) bdk_gsernx_lanex_rx_os_1_bsts_t
13220 #define bustype_BDK_GSERNX_LANEX_RX_OS_1_BSTS(a,b) BDK_CSR_TYPE_RSL
13221 #define basename_BDK_GSERNX_LANEX_RX_OS_1_BSTS(a,b) "GSERNX_LANEX_RX_OS_1_BSTS"
13222 #define device_bar_BDK_GSERNX_LANEX_RX_OS_1_BSTS(a,b) 0x0 /* PF_BAR0 */
13223 #define busnum_BDK_GSERNX_LANEX_RX_OS_1_BSTS(a,b) (a)
13224 #define arguments_BDK_GSERNX_LANEX_RX_OS_1_BSTS(a,b) (a),(b),-1,-1
13225 
13226 /**
13227  * Register (RSL) gsern#_lane#_rx_os_2_bcfg
13228  *
13229  * GSER Lane Receiver Offset Control Group 2 Register
13230  * Register controls for offset overrides from os4_0 through os7_1. Each
13231  * override setting has a corresponding enable bit which will cause the
13232  * calibration control logic to use the override register setting instead
13233  * of the calibration result.
13234  */
13235 union bdk_gsernx_lanex_rx_os_2_bcfg
13236 {
13237     uint64_t u;
13238     struct bdk_gsernx_lanex_rx_os_2_bcfg_s
13239     {
13240 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
13241         uint64_t os7_1_ovrd_en         : 1;  /**< [ 63: 63](R/W) Enable use of [OS7_1_OVRD]. */
13242         uint64_t reserved_62           : 1;
13243         uint64_t os7_1_ovrd            : 6;  /**< [ 61: 56](R/W) os7_1 offset compensation override bits. */
13244         uint64_t os7_0_ovrd_en         : 1;  /**< [ 55: 55](R/W) Enable use of [OS7_0_OVRD]. */
13245         uint64_t reserved_54           : 1;
13246         uint64_t os7_0_ovrd            : 6;  /**< [ 53: 48](R/W) os7_0 offset compensation override bits. */
13247         uint64_t os6_1_ovrd_en         : 1;  /**< [ 47: 47](R/W) Enable use of [OS6_1_OVRD]. */
13248         uint64_t reserved_46           : 1;
13249         uint64_t os6_1_ovrd            : 6;  /**< [ 45: 40](R/W) os6_1 offset compensation override bits. */
13250         uint64_t os6_0_ovrd_en         : 1;  /**< [ 39: 39](R/W) Enable use of [OS6_0_OVRD]. */
13251         uint64_t reserved_38           : 1;
13252         uint64_t os6_0_ovrd            : 6;  /**< [ 37: 32](R/W) os6_0 offset compensation override bits. */
13253         uint64_t os5_1_ovrd_en         : 1;  /**< [ 31: 31](R/W) Enable use of [OS5_1_OVRD]. */
13254         uint64_t reserved_30           : 1;
13255         uint64_t os5_1_ovrd            : 6;  /**< [ 29: 24](R/W) os5_1 offset compensation override bits. */
13256         uint64_t os5_0_ovrd_en         : 1;  /**< [ 23: 23](R/W) Enable use of [OS5_0_OVRD]. */
13257         uint64_t reserved_22           : 1;
13258         uint64_t os5_0_ovrd            : 6;  /**< [ 21: 16](R/W) os5_0 offset compensation override bits. */
13259         uint64_t os4_1_ovrd_en         : 1;  /**< [ 15: 15](R/W) Enable use of [OS4_1_OVRD]. */
13260         uint64_t reserved_14           : 1;
13261         uint64_t os4_1_ovrd            : 6;  /**< [ 13:  8](R/W) os4_1 offset compensation override bits. */
13262         uint64_t os4_0_ovrd_en         : 1;  /**< [  7:  7](R/W) Enable use of [OS4_0_OVRD]. */
13263         uint64_t reserved_6            : 1;
13264         uint64_t os4_0_ovrd            : 6;  /**< [  5:  0](R/W) os4_0 offset compensation override bits. */
13265 #else /* Word 0 - Little Endian */
13266         uint64_t os4_0_ovrd            : 6;  /**< [  5:  0](R/W) os4_0 offset compensation override bits. */
13267         uint64_t reserved_6            : 1;
13268         uint64_t os4_0_ovrd_en         : 1;  /**< [  7:  7](R/W) Enable use of [OS4_0_OVRD]. */
13269         uint64_t os4_1_ovrd            : 6;  /**< [ 13:  8](R/W) os4_1 offset compensation override bits. */
13270         uint64_t reserved_14           : 1;
13271         uint64_t os4_1_ovrd_en         : 1;  /**< [ 15: 15](R/W) Enable use of [OS4_1_OVRD]. */
13272         uint64_t os5_0_ovrd            : 6;  /**< [ 21: 16](R/W) os5_0 offset compensation override bits. */
13273         uint64_t reserved_22           : 1;
13274         uint64_t os5_0_ovrd_en         : 1;  /**< [ 23: 23](R/W) Enable use of [OS5_0_OVRD]. */
13275         uint64_t os5_1_ovrd            : 6;  /**< [ 29: 24](R/W) os5_1 offset compensation override bits. */
13276         uint64_t reserved_30           : 1;
13277         uint64_t os5_1_ovrd_en         : 1;  /**< [ 31: 31](R/W) Enable use of [OS5_1_OVRD]. */
13278         uint64_t os6_0_ovrd            : 6;  /**< [ 37: 32](R/W) os6_0 offset compensation override bits. */
13279         uint64_t reserved_38           : 1;
13280         uint64_t os6_0_ovrd_en         : 1;  /**< [ 39: 39](R/W) Enable use of [OS6_0_OVRD]. */
13281         uint64_t os6_1_ovrd            : 6;  /**< [ 45: 40](R/W) os6_1 offset compensation override bits. */
13282         uint64_t reserved_46           : 1;
13283         uint64_t os6_1_ovrd_en         : 1;  /**< [ 47: 47](R/W) Enable use of [OS6_1_OVRD]. */
13284         uint64_t os7_0_ovrd            : 6;  /**< [ 53: 48](R/W) os7_0 offset compensation override bits. */
13285         uint64_t reserved_54           : 1;
13286         uint64_t os7_0_ovrd_en         : 1;  /**< [ 55: 55](R/W) Enable use of [OS7_0_OVRD]. */
13287         uint64_t os7_1_ovrd            : 6;  /**< [ 61: 56](R/W) os7_1 offset compensation override bits. */
13288         uint64_t reserved_62           : 1;
13289         uint64_t os7_1_ovrd_en         : 1;  /**< [ 63: 63](R/W) Enable use of [OS7_1_OVRD]. */
13290 #endif /* Word 0 - End */
13291     } s;
13292     /* struct bdk_gsernx_lanex_rx_os_2_bcfg_s cn; */
13293 };
13294 typedef union bdk_gsernx_lanex_rx_os_2_bcfg bdk_gsernx_lanex_rx_os_2_bcfg_t;
13295 
13296 static inline uint64_t BDK_GSERNX_LANEX_RX_OS_2_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_OS_2_BCFG(unsigned long a,unsigned long b)13297 static inline uint64_t BDK_GSERNX_LANEX_RX_OS_2_BCFG(unsigned long a, unsigned long b)
13298 {
13299     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
13300         return 0x87e090001810ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
13301     __bdk_csr_fatal("GSERNX_LANEX_RX_OS_2_BCFG", 2, a, b, 0, 0);
13302 }
13303 
13304 #define typedef_BDK_GSERNX_LANEX_RX_OS_2_BCFG(a,b) bdk_gsernx_lanex_rx_os_2_bcfg_t
13305 #define bustype_BDK_GSERNX_LANEX_RX_OS_2_BCFG(a,b) BDK_CSR_TYPE_RSL
13306 #define basename_BDK_GSERNX_LANEX_RX_OS_2_BCFG(a,b) "GSERNX_LANEX_RX_OS_2_BCFG"
13307 #define device_bar_BDK_GSERNX_LANEX_RX_OS_2_BCFG(a,b) 0x0 /* PF_BAR0 */
13308 #define busnum_BDK_GSERNX_LANEX_RX_OS_2_BCFG(a,b) (a)
13309 #define arguments_BDK_GSERNX_LANEX_RX_OS_2_BCFG(a,b) (a),(b),-1,-1
13310 
13311 /**
13312  * Register (RSL) gsern#_lane#_rx_os_2_bsts
13313  *
13314  * GSER Lane Receiver Offset Status Group 2 Register
13315  * Status for offset settings actually in use (either calibration results
13316  * or overrides) from os4_0 through os7_1. Results in all fields of this
13317  * register are valid only if GSERN()_LANE()_RX_OS_5_BSTS[AFE_OFFSET_STATUS] and
13318  * GSERN()_LANE()_RX_OS_5_BSTS[DFE_OFFSET_STATUS] are asserted or if the corresponding
13319  * override enable bit is asserted.
13320  */
13321 union bdk_gsernx_lanex_rx_os_2_bsts
13322 {
13323     uint64_t u;
13324     struct bdk_gsernx_lanex_rx_os_2_bsts_s
13325     {
13326 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
13327         uint64_t reserved_62_63        : 2;
13328         uint64_t os7_1                 : 6;  /**< [ 61: 56](RO/H) os7_1 offset compensation override bits. */
13329         uint64_t reserved_54_55        : 2;
13330         uint64_t os7_0                 : 6;  /**< [ 53: 48](RO/H) os7_0 offset compensation override bits. */
13331         uint64_t reserved_46_47        : 2;
13332         uint64_t os6_1                 : 6;  /**< [ 45: 40](RO/H) os6_1 offset compensation override bits. */
13333         uint64_t reserved_38_39        : 2;
13334         uint64_t os6_0                 : 6;  /**< [ 37: 32](RO/H) os6_0 offset compensation override bits. */
13335         uint64_t reserved_30_31        : 2;
13336         uint64_t os5_1                 : 6;  /**< [ 29: 24](RO/H) os5_1 offset compensation override bits. */
13337         uint64_t reserved_22_23        : 2;
13338         uint64_t os5_0                 : 6;  /**< [ 21: 16](RO/H) os5_0 offset compensation override bits. */
13339         uint64_t reserved_14_15        : 2;
13340         uint64_t os4_1                 : 6;  /**< [ 13:  8](RO/H) os4_1 offset compensation override bits. */
13341         uint64_t reserved_6_7          : 2;
13342         uint64_t os4_0                 : 6;  /**< [  5:  0](RO/H) os4_0 offset compensation override bits. */
13343 #else /* Word 0 - Little Endian */
13344         uint64_t os4_0                 : 6;  /**< [  5:  0](RO/H) os4_0 offset compensation override bits. */
13345         uint64_t reserved_6_7          : 2;
13346         uint64_t os4_1                 : 6;  /**< [ 13:  8](RO/H) os4_1 offset compensation override bits. */
13347         uint64_t reserved_14_15        : 2;
13348         uint64_t os5_0                 : 6;  /**< [ 21: 16](RO/H) os5_0 offset compensation override bits. */
13349         uint64_t reserved_22_23        : 2;
13350         uint64_t os5_1                 : 6;  /**< [ 29: 24](RO/H) os5_1 offset compensation override bits. */
13351         uint64_t reserved_30_31        : 2;
13352         uint64_t os6_0                 : 6;  /**< [ 37: 32](RO/H) os6_0 offset compensation override bits. */
13353         uint64_t reserved_38_39        : 2;
13354         uint64_t os6_1                 : 6;  /**< [ 45: 40](RO/H) os6_1 offset compensation override bits. */
13355         uint64_t reserved_46_47        : 2;
13356         uint64_t os7_0                 : 6;  /**< [ 53: 48](RO/H) os7_0 offset compensation override bits. */
13357         uint64_t reserved_54_55        : 2;
13358         uint64_t os7_1                 : 6;  /**< [ 61: 56](RO/H) os7_1 offset compensation override bits. */
13359         uint64_t reserved_62_63        : 2;
13360 #endif /* Word 0 - End */
13361     } s;
13362     /* struct bdk_gsernx_lanex_rx_os_2_bsts_s cn; */
13363 };
13364 typedef union bdk_gsernx_lanex_rx_os_2_bsts bdk_gsernx_lanex_rx_os_2_bsts_t;
13365 
13366 static inline uint64_t BDK_GSERNX_LANEX_RX_OS_2_BSTS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_OS_2_BSTS(unsigned long a,unsigned long b)13367 static inline uint64_t BDK_GSERNX_LANEX_RX_OS_2_BSTS(unsigned long a, unsigned long b)
13368 {
13369     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
13370         return 0x87e090001950ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
13371     __bdk_csr_fatal("GSERNX_LANEX_RX_OS_2_BSTS", 2, a, b, 0, 0);
13372 }
13373 
13374 #define typedef_BDK_GSERNX_LANEX_RX_OS_2_BSTS(a,b) bdk_gsernx_lanex_rx_os_2_bsts_t
13375 #define bustype_BDK_GSERNX_LANEX_RX_OS_2_BSTS(a,b) BDK_CSR_TYPE_RSL
13376 #define basename_BDK_GSERNX_LANEX_RX_OS_2_BSTS(a,b) "GSERNX_LANEX_RX_OS_2_BSTS"
13377 #define device_bar_BDK_GSERNX_LANEX_RX_OS_2_BSTS(a,b) 0x0 /* PF_BAR0 */
13378 #define busnum_BDK_GSERNX_LANEX_RX_OS_2_BSTS(a,b) (a)
13379 #define arguments_BDK_GSERNX_LANEX_RX_OS_2_BSTS(a,b) (a),(b),-1,-1
13380 
13381 /**
13382  * Register (RSL) gsern#_lane#_rx_os_3_bcfg
13383  *
13384  * GSER Lane Receiver Offset Control Group 3 Register
13385  * Register controls for offset overrides from os8_0 through os11_1. Each
13386  * override setting has a corresponding enable bit which will cause the
13387  * calibration control logic to use the override register setting instead
13388  * of the calibration result.
13389  */
13390 union bdk_gsernx_lanex_rx_os_3_bcfg
13391 {
13392     uint64_t u;
13393     struct bdk_gsernx_lanex_rx_os_3_bcfg_s
13394     {
13395 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
13396         uint64_t os11_1_ovrd_en        : 1;  /**< [ 63: 63](R/W) Enable use of [OS11_1_OVRD]. */
13397         uint64_t reserved_62           : 1;
13398         uint64_t os11_1_ovrd           : 6;  /**< [ 61: 56](R/W) os11_1 offset compensation override bits. */
13399         uint64_t os11_0_ovrd_en        : 1;  /**< [ 55: 55](R/W) Enable use of [OS11_0_OVRD]. */
13400         uint64_t reserved_54           : 1;
13401         uint64_t os11_0_ovrd           : 6;  /**< [ 53: 48](R/W) os11_0 offset compensation override bits. */
13402         uint64_t os10_1_ovrd_en        : 1;  /**< [ 47: 47](R/W) Enable use of [OS10_1_OVRD]. */
13403         uint64_t reserved_46           : 1;
13404         uint64_t os10_1_ovrd           : 6;  /**< [ 45: 40](R/W) os10_1 offset compensation override bits. */
13405         uint64_t os10_0_ovrd_en        : 1;  /**< [ 39: 39](R/W) Enable use of [OS10_0_OVRD]. */
13406         uint64_t reserved_38           : 1;
13407         uint64_t os10_0_ovrd           : 6;  /**< [ 37: 32](R/W) os10_0 offset compensation override bits. */
13408         uint64_t os9_1_ovrd_en         : 1;  /**< [ 31: 31](R/W) Enable use of [OS9_1_OVRD]. */
13409         uint64_t reserved_30           : 1;
13410         uint64_t os9_1_ovrd            : 6;  /**< [ 29: 24](R/W) os9_1 offset compensation override bits. */
13411         uint64_t os9_0_ovrd_en         : 1;  /**< [ 23: 23](R/W) Enable use of [OS9_0_OVRD]. */
13412         uint64_t reserved_22           : 1;
13413         uint64_t os9_0_ovrd            : 6;  /**< [ 21: 16](R/W) os9_0 offset compensation override bits. */
13414         uint64_t os8_1_ovrd_en         : 1;  /**< [ 15: 15](R/W) Enable use of [OS8_1_OVRD]. */
13415         uint64_t reserved_14           : 1;
13416         uint64_t os8_1_ovrd            : 6;  /**< [ 13:  8](R/W) os8_1 offset compensation override bits. */
13417         uint64_t os8_0_ovrd_en         : 1;  /**< [  7:  7](R/W) Enable use of [OS8_0_OVRD]. */
13418         uint64_t reserved_6            : 1;
13419         uint64_t os8_0_ovrd            : 6;  /**< [  5:  0](R/W) os8_0 offset compensation override bits. */
13420 #else /* Word 0 - Little Endian */
13421         uint64_t os8_0_ovrd            : 6;  /**< [  5:  0](R/W) os8_0 offset compensation override bits. */
13422         uint64_t reserved_6            : 1;
13423         uint64_t os8_0_ovrd_en         : 1;  /**< [  7:  7](R/W) Enable use of [OS8_0_OVRD]. */
13424         uint64_t os8_1_ovrd            : 6;  /**< [ 13:  8](R/W) os8_1 offset compensation override bits. */
13425         uint64_t reserved_14           : 1;
13426         uint64_t os8_1_ovrd_en         : 1;  /**< [ 15: 15](R/W) Enable use of [OS8_1_OVRD]. */
13427         uint64_t os9_0_ovrd            : 6;  /**< [ 21: 16](R/W) os9_0 offset compensation override bits. */
13428         uint64_t reserved_22           : 1;
13429         uint64_t os9_0_ovrd_en         : 1;  /**< [ 23: 23](R/W) Enable use of [OS9_0_OVRD]. */
13430         uint64_t os9_1_ovrd            : 6;  /**< [ 29: 24](R/W) os9_1 offset compensation override bits. */
13431         uint64_t reserved_30           : 1;
13432         uint64_t os9_1_ovrd_en         : 1;  /**< [ 31: 31](R/W) Enable use of [OS9_1_OVRD]. */
13433         uint64_t os10_0_ovrd           : 6;  /**< [ 37: 32](R/W) os10_0 offset compensation override bits. */
13434         uint64_t reserved_38           : 1;
13435         uint64_t os10_0_ovrd_en        : 1;  /**< [ 39: 39](R/W) Enable use of [OS10_0_OVRD]. */
13436         uint64_t os10_1_ovrd           : 6;  /**< [ 45: 40](R/W) os10_1 offset compensation override bits. */
13437         uint64_t reserved_46           : 1;
13438         uint64_t os10_1_ovrd_en        : 1;  /**< [ 47: 47](R/W) Enable use of [OS10_1_OVRD]. */
13439         uint64_t os11_0_ovrd           : 6;  /**< [ 53: 48](R/W) os11_0 offset compensation override bits. */
13440         uint64_t reserved_54           : 1;
13441         uint64_t os11_0_ovrd_en        : 1;  /**< [ 55: 55](R/W) Enable use of [OS11_0_OVRD]. */
13442         uint64_t os11_1_ovrd           : 6;  /**< [ 61: 56](R/W) os11_1 offset compensation override bits. */
13443         uint64_t reserved_62           : 1;
13444         uint64_t os11_1_ovrd_en        : 1;  /**< [ 63: 63](R/W) Enable use of [OS11_1_OVRD]. */
13445 #endif /* Word 0 - End */
13446     } s;
13447     /* struct bdk_gsernx_lanex_rx_os_3_bcfg_s cn; */
13448 };
13449 typedef union bdk_gsernx_lanex_rx_os_3_bcfg bdk_gsernx_lanex_rx_os_3_bcfg_t;
13450 
13451 static inline uint64_t BDK_GSERNX_LANEX_RX_OS_3_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_OS_3_BCFG(unsigned long a,unsigned long b)13452 static inline uint64_t BDK_GSERNX_LANEX_RX_OS_3_BCFG(unsigned long a, unsigned long b)
13453 {
13454     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
13455         return 0x87e090001820ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
13456     __bdk_csr_fatal("GSERNX_LANEX_RX_OS_3_BCFG", 2, a, b, 0, 0);
13457 }
13458 
13459 #define typedef_BDK_GSERNX_LANEX_RX_OS_3_BCFG(a,b) bdk_gsernx_lanex_rx_os_3_bcfg_t
13460 #define bustype_BDK_GSERNX_LANEX_RX_OS_3_BCFG(a,b) BDK_CSR_TYPE_RSL
13461 #define basename_BDK_GSERNX_LANEX_RX_OS_3_BCFG(a,b) "GSERNX_LANEX_RX_OS_3_BCFG"
13462 #define device_bar_BDK_GSERNX_LANEX_RX_OS_3_BCFG(a,b) 0x0 /* PF_BAR0 */
13463 #define busnum_BDK_GSERNX_LANEX_RX_OS_3_BCFG(a,b) (a)
13464 #define arguments_BDK_GSERNX_LANEX_RX_OS_3_BCFG(a,b) (a),(b),-1,-1
13465 
13466 /**
13467  * Register (RSL) gsern#_lane#_rx_os_3_bsts
13468  *
13469  * GSER Lane Receiver Offset Status Group 3 Register
13470  * Status for offset settings actually in use (either calibration results
13471  * or overrides) from os8_0 through os11_1. Results in all fields of this
13472  * register are valid only if GSERN()_LANE()_RX_OS_5_BSTS[AFE_OFFSET_STATUS] and
13473  * GSERN()_LANE()_RX_OS_5_BSTS[DFE_OFFSET_STATUS] are asserted or if the corresponding
13474  * override enable bit is asserted.
13475  */
13476 union bdk_gsernx_lanex_rx_os_3_bsts
13477 {
13478     uint64_t u;
13479     struct bdk_gsernx_lanex_rx_os_3_bsts_s
13480     {
13481 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
13482         uint64_t reserved_62_63        : 2;
13483         uint64_t os11_1                : 6;  /**< [ 61: 56](RO/H) os11_1 offset compensation override bits. */
13484         uint64_t reserved_54_55        : 2;
13485         uint64_t os11_0                : 6;  /**< [ 53: 48](RO/H) os11_0 offset compensation override bits. */
13486         uint64_t reserved_46_47        : 2;
13487         uint64_t os10_1                : 6;  /**< [ 45: 40](RO/H) os10_1 offset compensation override bits. */
13488         uint64_t reserved_38_39        : 2;
13489         uint64_t os10_0                : 6;  /**< [ 37: 32](RO/H) os10_0 offset compensation override bits. */
13490         uint64_t reserved_30_31        : 2;
13491         uint64_t os9_1                 : 6;  /**< [ 29: 24](RO/H) os9_1 offset compensation override bits. */
13492         uint64_t reserved_22_23        : 2;
13493         uint64_t os9_0                 : 6;  /**< [ 21: 16](RO/H) os9_0 offset compensation override bits. */
13494         uint64_t reserved_14_15        : 2;
13495         uint64_t os8_1                 : 6;  /**< [ 13:  8](RO/H) os8_1 offset compensation override bits. */
13496         uint64_t reserved_6_7          : 2;
13497         uint64_t os8_0                 : 6;  /**< [  5:  0](RO/H) os8_0 offset compensation override bits. */
13498 #else /* Word 0 - Little Endian */
13499         uint64_t os8_0                 : 6;  /**< [  5:  0](RO/H) os8_0 offset compensation override bits. */
13500         uint64_t reserved_6_7          : 2;
13501         uint64_t os8_1                 : 6;  /**< [ 13:  8](RO/H) os8_1 offset compensation override bits. */
13502         uint64_t reserved_14_15        : 2;
13503         uint64_t os9_0                 : 6;  /**< [ 21: 16](RO/H) os9_0 offset compensation override bits. */
13504         uint64_t reserved_22_23        : 2;
13505         uint64_t os9_1                 : 6;  /**< [ 29: 24](RO/H) os9_1 offset compensation override bits. */
13506         uint64_t reserved_30_31        : 2;
13507         uint64_t os10_0                : 6;  /**< [ 37: 32](RO/H) os10_0 offset compensation override bits. */
13508         uint64_t reserved_38_39        : 2;
13509         uint64_t os10_1                : 6;  /**< [ 45: 40](RO/H) os10_1 offset compensation override bits. */
13510         uint64_t reserved_46_47        : 2;
13511         uint64_t os11_0                : 6;  /**< [ 53: 48](RO/H) os11_0 offset compensation override bits. */
13512         uint64_t reserved_54_55        : 2;
13513         uint64_t os11_1                : 6;  /**< [ 61: 56](RO/H) os11_1 offset compensation override bits. */
13514         uint64_t reserved_62_63        : 2;
13515 #endif /* Word 0 - End */
13516     } s;
13517     /* struct bdk_gsernx_lanex_rx_os_3_bsts_s cn; */
13518 };
13519 typedef union bdk_gsernx_lanex_rx_os_3_bsts bdk_gsernx_lanex_rx_os_3_bsts_t;
13520 
13521 static inline uint64_t BDK_GSERNX_LANEX_RX_OS_3_BSTS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_OS_3_BSTS(unsigned long a,unsigned long b)13522 static inline uint64_t BDK_GSERNX_LANEX_RX_OS_3_BSTS(unsigned long a, unsigned long b)
13523 {
13524     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
13525         return 0x87e090001960ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
13526     __bdk_csr_fatal("GSERNX_LANEX_RX_OS_3_BSTS", 2, a, b, 0, 0);
13527 }
13528 
13529 #define typedef_BDK_GSERNX_LANEX_RX_OS_3_BSTS(a,b) bdk_gsernx_lanex_rx_os_3_bsts_t
13530 #define bustype_BDK_GSERNX_LANEX_RX_OS_3_BSTS(a,b) BDK_CSR_TYPE_RSL
13531 #define basename_BDK_GSERNX_LANEX_RX_OS_3_BSTS(a,b) "GSERNX_LANEX_RX_OS_3_BSTS"
13532 #define device_bar_BDK_GSERNX_LANEX_RX_OS_3_BSTS(a,b) 0x0 /* PF_BAR0 */
13533 #define busnum_BDK_GSERNX_LANEX_RX_OS_3_BSTS(a,b) (a)
13534 #define arguments_BDK_GSERNX_LANEX_RX_OS_3_BSTS(a,b) (a),(b),-1,-1
13535 
13536 /**
13537  * Register (RSL) gsern#_lane#_rx_os_4_bcfg
13538  *
13539  * GSER Lane Receiver Offset Control Group 4 Register
13540  * Register controls for offset overrides from os12_0 through os15_1. Each
13541  * override setting has a corresponding enable bit which will cause the
13542  * calibration control logic to use the override register setting instead
13543  * of the calibration result.
13544  */
13545 union bdk_gsernx_lanex_rx_os_4_bcfg
13546 {
13547     uint64_t u;
13548     struct bdk_gsernx_lanex_rx_os_4_bcfg_s
13549     {
13550 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
13551         uint64_t os15_1_ovrd_en        : 1;  /**< [ 63: 63](R/W) Enable use of [OS15_1_OVRD]. */
13552         uint64_t reserved_62           : 1;
13553         uint64_t os15_1_ovrd           : 6;  /**< [ 61: 56](R/W) os15_1 offset compensation override bits. */
13554         uint64_t os15_0_ovrd_en        : 1;  /**< [ 55: 55](R/W) Enable use of [OS15_0_OVRD]. */
13555         uint64_t reserved_54           : 1;
13556         uint64_t os15_0_ovrd           : 6;  /**< [ 53: 48](R/W) os15_0 offset compensation override bits. */
13557         uint64_t os14_1_ovrd_en        : 1;  /**< [ 47: 47](R/W) Enable use of [OS14_1_OVRD]. */
13558         uint64_t reserved_46           : 1;
13559         uint64_t os14_1_ovrd           : 6;  /**< [ 45: 40](R/W) os10_1 offset compensation override bits. */
13560         uint64_t os14_0_ovrd_en        : 1;  /**< [ 39: 39](R/W) Enable use of [OS14_0_OVRD]. */
13561         uint64_t reserved_38           : 1;
13562         uint64_t os14_0_ovrd           : 6;  /**< [ 37: 32](R/W) os14_0 offset compensation override bits. */
13563         uint64_t os13_1_ovrd_en        : 1;  /**< [ 31: 31](R/W) Enable use of [OS13_1_OVRD]. */
13564         uint64_t reserved_30           : 1;
13565         uint64_t os13_1_ovrd           : 6;  /**< [ 29: 24](R/W) os13_1 offset compensation override bits. */
13566         uint64_t os13_0_ovrd_en        : 1;  /**< [ 23: 23](R/W) Enable use of [OS13_0_OVRD]. */
13567         uint64_t reserved_22           : 1;
13568         uint64_t os13_0_ovrd           : 6;  /**< [ 21: 16](R/W) os13_0 offset compensation override bits. */
13569         uint64_t os12_1_ovrd_en        : 1;  /**< [ 15: 15](R/W) Enable use of [OS12_1_OVRD]. */
13570         uint64_t reserved_14           : 1;
13571         uint64_t os12_1_ovrd           : 6;  /**< [ 13:  8](R/W) os12_1 offset compensation override bits. */
13572         uint64_t os12_0_ovrd_en        : 1;  /**< [  7:  7](R/W) Enable use of [OS12_0_OVRD]. */
13573         uint64_t reserved_6            : 1;
13574         uint64_t os12_0_ovrd           : 6;  /**< [  5:  0](R/W) os12_0 offset compensation override bits. */
13575 #else /* Word 0 - Little Endian */
13576         uint64_t os12_0_ovrd           : 6;  /**< [  5:  0](R/W) os12_0 offset compensation override bits. */
13577         uint64_t reserved_6            : 1;
13578         uint64_t os12_0_ovrd_en        : 1;  /**< [  7:  7](R/W) Enable use of [OS12_0_OVRD]. */
13579         uint64_t os12_1_ovrd           : 6;  /**< [ 13:  8](R/W) os12_1 offset compensation override bits. */
13580         uint64_t reserved_14           : 1;
13581         uint64_t os12_1_ovrd_en        : 1;  /**< [ 15: 15](R/W) Enable use of [OS12_1_OVRD]. */
13582         uint64_t os13_0_ovrd           : 6;  /**< [ 21: 16](R/W) os13_0 offset compensation override bits. */
13583         uint64_t reserved_22           : 1;
13584         uint64_t os13_0_ovrd_en        : 1;  /**< [ 23: 23](R/W) Enable use of [OS13_0_OVRD]. */
13585         uint64_t os13_1_ovrd           : 6;  /**< [ 29: 24](R/W) os13_1 offset compensation override bits. */
13586         uint64_t reserved_30           : 1;
13587         uint64_t os13_1_ovrd_en        : 1;  /**< [ 31: 31](R/W) Enable use of [OS13_1_OVRD]. */
13588         uint64_t os14_0_ovrd           : 6;  /**< [ 37: 32](R/W) os14_0 offset compensation override bits. */
13589         uint64_t reserved_38           : 1;
13590         uint64_t os14_0_ovrd_en        : 1;  /**< [ 39: 39](R/W) Enable use of [OS14_0_OVRD]. */
13591         uint64_t os14_1_ovrd           : 6;  /**< [ 45: 40](R/W) os10_1 offset compensation override bits. */
13592         uint64_t reserved_46           : 1;
13593         uint64_t os14_1_ovrd_en        : 1;  /**< [ 47: 47](R/W) Enable use of [OS14_1_OVRD]. */
13594         uint64_t os15_0_ovrd           : 6;  /**< [ 53: 48](R/W) os15_0 offset compensation override bits. */
13595         uint64_t reserved_54           : 1;
13596         uint64_t os15_0_ovrd_en        : 1;  /**< [ 55: 55](R/W) Enable use of [OS15_0_OVRD]. */
13597         uint64_t os15_1_ovrd           : 6;  /**< [ 61: 56](R/W) os15_1 offset compensation override bits. */
13598         uint64_t reserved_62           : 1;
13599         uint64_t os15_1_ovrd_en        : 1;  /**< [ 63: 63](R/W) Enable use of [OS15_1_OVRD]. */
13600 #endif /* Word 0 - End */
13601     } s;
13602     /* struct bdk_gsernx_lanex_rx_os_4_bcfg_s cn; */
13603 };
13604 typedef union bdk_gsernx_lanex_rx_os_4_bcfg bdk_gsernx_lanex_rx_os_4_bcfg_t;
13605 
13606 static inline uint64_t BDK_GSERNX_LANEX_RX_OS_4_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_OS_4_BCFG(unsigned long a,unsigned long b)13607 static inline uint64_t BDK_GSERNX_LANEX_RX_OS_4_BCFG(unsigned long a, unsigned long b)
13608 {
13609     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
13610         return 0x87e090001830ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
13611     __bdk_csr_fatal("GSERNX_LANEX_RX_OS_4_BCFG", 2, a, b, 0, 0);
13612 }
13613 
13614 #define typedef_BDK_GSERNX_LANEX_RX_OS_4_BCFG(a,b) bdk_gsernx_lanex_rx_os_4_bcfg_t
13615 #define bustype_BDK_GSERNX_LANEX_RX_OS_4_BCFG(a,b) BDK_CSR_TYPE_RSL
13616 #define basename_BDK_GSERNX_LANEX_RX_OS_4_BCFG(a,b) "GSERNX_LANEX_RX_OS_4_BCFG"
13617 #define device_bar_BDK_GSERNX_LANEX_RX_OS_4_BCFG(a,b) 0x0 /* PF_BAR0 */
13618 #define busnum_BDK_GSERNX_LANEX_RX_OS_4_BCFG(a,b) (a)
13619 #define arguments_BDK_GSERNX_LANEX_RX_OS_4_BCFG(a,b) (a),(b),-1,-1
13620 
13621 /**
13622  * Register (RSL) gsern#_lane#_rx_os_4_bsts
13623  *
13624  * GSER Lane Receiver Offset Status Group 4 Register
13625  * Status for offset settings actually in use (either calibration results
13626  * or overrides) from os12_0 through os15_1. Results in all fields of this
13627  * register are valid only if GSERN()_LANE()_RX_OS_5_BSTS[AFE_OFFSET_STATUS] and
13628  * GSERN()_LANE()_RX_OS_5_BSTS[DFE_OFFSET_STATUS] are asserted or if the corresponding
13629  * override enable bit is asserted.
13630  */
13631 union bdk_gsernx_lanex_rx_os_4_bsts
13632 {
13633     uint64_t u;
13634     struct bdk_gsernx_lanex_rx_os_4_bsts_s
13635     {
13636 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
13637         uint64_t reserved_62_63        : 2;
13638         uint64_t os15_1                : 6;  /**< [ 61: 56](RO/H) os15_1 offset compensation override bits. */
13639         uint64_t reserved_54_55        : 2;
13640         uint64_t os15_0                : 6;  /**< [ 53: 48](RO/H) os15_0 offset compensation override bits. */
13641         uint64_t reserved_46_47        : 2;
13642         uint64_t os14_1                : 6;  /**< [ 45: 40](RO/H) os10_1 offset compensation override bits. */
13643         uint64_t reserved_38_39        : 2;
13644         uint64_t os14_0                : 6;  /**< [ 37: 32](RO/H) os14_0 offset compensation override bits. */
13645         uint64_t reserved_30_31        : 2;
13646         uint64_t os13_1                : 6;  /**< [ 29: 24](RO/H) os13_1 offset compensation override bits. */
13647         uint64_t reserved_22_23        : 2;
13648         uint64_t os13_0                : 6;  /**< [ 21: 16](RO/H) os13_0 offset compensation override bits. */
13649         uint64_t reserved_14_15        : 2;
13650         uint64_t os12_1                : 6;  /**< [ 13:  8](RO/H) os12_1 offset compensation override bits. */
13651         uint64_t reserved_6_7          : 2;
13652         uint64_t os12_0                : 6;  /**< [  5:  0](RO/H) os12_0 offset compensation override bits. */
13653 #else /* Word 0 - Little Endian */
13654         uint64_t os12_0                : 6;  /**< [  5:  0](RO/H) os12_0 offset compensation override bits. */
13655         uint64_t reserved_6_7          : 2;
13656         uint64_t os12_1                : 6;  /**< [ 13:  8](RO/H) os12_1 offset compensation override bits. */
13657         uint64_t reserved_14_15        : 2;
13658         uint64_t os13_0                : 6;  /**< [ 21: 16](RO/H) os13_0 offset compensation override bits. */
13659         uint64_t reserved_22_23        : 2;
13660         uint64_t os13_1                : 6;  /**< [ 29: 24](RO/H) os13_1 offset compensation override bits. */
13661         uint64_t reserved_30_31        : 2;
13662         uint64_t os14_0                : 6;  /**< [ 37: 32](RO/H) os14_0 offset compensation override bits. */
13663         uint64_t reserved_38_39        : 2;
13664         uint64_t os14_1                : 6;  /**< [ 45: 40](RO/H) os10_1 offset compensation override bits. */
13665         uint64_t reserved_46_47        : 2;
13666         uint64_t os15_0                : 6;  /**< [ 53: 48](RO/H) os15_0 offset compensation override bits. */
13667         uint64_t reserved_54_55        : 2;
13668         uint64_t os15_1                : 6;  /**< [ 61: 56](RO/H) os15_1 offset compensation override bits. */
13669         uint64_t reserved_62_63        : 2;
13670 #endif /* Word 0 - End */
13671     } s;
13672     /* struct bdk_gsernx_lanex_rx_os_4_bsts_s cn; */
13673 };
13674 typedef union bdk_gsernx_lanex_rx_os_4_bsts bdk_gsernx_lanex_rx_os_4_bsts_t;
13675 
13676 static inline uint64_t BDK_GSERNX_LANEX_RX_OS_4_BSTS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_OS_4_BSTS(unsigned long a,unsigned long b)13677 static inline uint64_t BDK_GSERNX_LANEX_RX_OS_4_BSTS(unsigned long a, unsigned long b)
13678 {
13679     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
13680         return 0x87e090001970ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
13681     __bdk_csr_fatal("GSERNX_LANEX_RX_OS_4_BSTS", 2, a, b, 0, 0);
13682 }
13683 
13684 #define typedef_BDK_GSERNX_LANEX_RX_OS_4_BSTS(a,b) bdk_gsernx_lanex_rx_os_4_bsts_t
13685 #define bustype_BDK_GSERNX_LANEX_RX_OS_4_BSTS(a,b) BDK_CSR_TYPE_RSL
13686 #define basename_BDK_GSERNX_LANEX_RX_OS_4_BSTS(a,b) "GSERNX_LANEX_RX_OS_4_BSTS"
13687 #define device_bar_BDK_GSERNX_LANEX_RX_OS_4_BSTS(a,b) 0x0 /* PF_BAR0 */
13688 #define busnum_BDK_GSERNX_LANEX_RX_OS_4_BSTS(a,b) (a)
13689 #define arguments_BDK_GSERNX_LANEX_RX_OS_4_BSTS(a,b) (a),(b),-1,-1
13690 
13691 /**
13692  * Register (RSL) gsern#_lane#_rx_os_5_bcfg
13693  *
13694  * GSER Lane Receiver Offset Control Group 5 Register
13695  * This register controls for triggering RX offset compensation state machines.
13696  */
13697 union bdk_gsernx_lanex_rx_os_5_bcfg
13698 {
13699     uint64_t u;
13700     struct bdk_gsernx_lanex_rx_os_5_bcfg_s
13701     {
13702 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
13703         uint64_t reserved_55_63        : 9;
13704         uint64_t run_eye_oscal         : 1;  /**< [ 54: 54](R/W) Enables eye (doute) DFE offset compensation to run at the correct
13705                                                                  point in the hardware-driven reset sequence if asserted when the eye data path
13706                                                                  bringup sequence begins. If deasserted when the eye data path bringup sequence
13707                                                                  is run, this bit may be asserted later under software control prior to
13708                                                                  performing eye measurements. */
13709         uint64_t reserved_53           : 1;
13710         uint64_t c1_e_adjust           : 5;  /**< [ 52: 48](R/W) Adjust value magnitude for the error slice in the E path. */
13711         uint64_t reserved_45_47        : 3;
13712         uint64_t c1_i_adjust           : 5;  /**< [ 44: 40](R/W) Adjust value magnitude for the error slice in the I path. */
13713         uint64_t reserved_37_39        : 3;
13714         uint64_t c1_q_adjust           : 5;  /**< [ 36: 32](R/W) Adjust value magnitude for the error slice in the Q path. */
13715         uint64_t offset_comp_en        : 1;  /**< [ 31: 31](R/W) Enable AFE and DFE offset compensation to run at the
13716                                                                  correct point in the hardware-driven reset sequence if asserted when
13717                                                                  the reset sequence begins. If deasserted when the hardware-driven
13718                                                                  reset sequence is run, this bit should be asserted later, once,
13719                                                                  under software control to initiate AFE and DFE offset compensation
13720                                                                  in a pure software-driven bringup. This bit field affects both AFE
13721                                                                  and DFE offset compensation training. */
13722         uint64_t binsrch_margin        : 3;  /**< [ 30: 28](R/W) Binary Search Noise Margin. This value is added to the binary search difference
13723                                                                  count value. This bit field affects the binary search engine for IR TRIM.
13724                                                                    0x0 = 13'h000
13725                                                                    0x1 = 13'h020
13726                                                                    0x2 = 13'h040
13727                                                                    0x3 = 13'h080
13728                                                                    0x4 = 13'h100
13729                                                                    0x5 = 13'h200
13730                                                                    0x6 = 13'h400
13731                                                                    0x7 = 13'h800  (use with caution, may cause difference count overflow) */
13732         uint64_t binsrch_wait          : 10; /**< [ 27: 18](R/W) Number of clock cycles to wait after changing the offset code.
13733                                                                  It is used to allow adjustments in wait time due to changes in the service clock
13734                                                                  frequency.
13735                                                                  This bit field affects the binary seach engines for DFE/AFE offset and IR TRIM. */
13736         uint64_t binsrch_acclen        : 2;  /**< [ 17: 16](R/W) Number of words to include in the binary search accumulation. This bit field
13737                                                                  affects the binary seach engines for DFE/AFE offset and IR TRIM.
13738                                                                    0x0 = 16 words.
13739                                                                    0x1 = 32 words.
13740                                                                    0x2 = 64 words.
13741                                                                    0x3 = 128 words. */
13742         uint64_t settle_wait           : 4;  /**< [ 15: 12](R/W) Number of clock cycles for the DFE adaptation to wait after changing the
13743                                                                  adjusted C1 values before resuming accumulation. */
13744         uint64_t reserved_10_11        : 2;
13745         uint64_t ir_trim_early_iter_max : 5; /**< [  9:  5](R/W) Early IR TRIM Iteration Count Max. Controls the number of iterations
13746                                                                  to perform during the Early IR trim. If set to 0, no iterations are done
13747                                                                  and Early IR TRIM is skipped. Valid range 0 to 31. Note that
13748                                                                  GSERN()_LANE()_RST_CNT4_BCFG[DFE_AFE_OSCAL_WAIT] must be increased to allow for
13749                                                                  iterations. */
13750         uint64_t ir_trim_comp_en       : 1;  /**< [  4:  4](R/W) Enable IR TRIM compensation to run at the correct
13751                                                                  point in the hardware-driven reset sequence if asserted when the
13752                                                                  reset sequence begins. This bit field affects only IR trim compensation. */
13753         uint64_t ir_trim_trigger       : 1;  /**< [  3:  3](R/W) Writing this bit to a logic 1 when the previous value was logic 0
13754                                                                  will cause the IR trim compensation FSM to run. Note that this is
13755                                                                  a debug-only feature. */
13756         uint64_t idle_offset_trigger   : 1;  /**< [  2:  2](R/W) Writing this bit to a logic 1 when the previous value was logic 0
13757                                                                  will cause the IDLE offset compensation training FSM to run. Note
13758                                                                  that this is a debug-only feature. */
13759         uint64_t afe_offset_trigger    : 1;  /**< [  1:  1](R/W) Writing this bit to a logic 1 when the previous value was logic 0
13760                                                                  will cause the AFE offset compensation training FSM to run. Note
13761                                                                  that this is a debug-only feature and should not be performed while
13762                                                                  transferring data on the serial link. Note also that only one of the
13763                                                                  offset compensation training engines can be run at a time. To
13764                                                                  trigger both DFE offset compensation and AFE offset compensation,
13765                                                                  they must be run sequentially with the CSR write to trigger the
13766                                                                  second in the sequence waiting until the first has completed
13767                                                                  (indicated in GSERN()_LANE()_RX_OS_5_BSTS[DFE_OFFSET_STATUS] or
13768                                                                  GSERN()_LANE()_RX_OS_5_BSTS[AFE_OFFSET_STATUS]). */
13769         uint64_t dfe_offset_trigger    : 1;  /**< [  0:  0](R/W) Writing this bit to a logic 1 when the previous value was logic 0
13770                                                                  will cause the DFE offset compensation training FSM to run. Note
13771                                                                  that only one of the offset compensation training engines can be run
13772                                                                  at a time. To trigger both DFE offset compensation and AFE offset
13773                                                                  compensation, they must be run sequentially with the CSR write to
13774                                                                  the second in the sequence waiting until the first has completed
13775                                                                  (indicated in GSERN()_LANE()_RX_OS_5_BSTS[DFE_OFFSET_STATUS] or
13776                                                                  GSERN()_LANE()_RX_OS_5_BSTS[AFE_OFFSET_STATUS]). */
13777 #else /* Word 0 - Little Endian */
13778         uint64_t dfe_offset_trigger    : 1;  /**< [  0:  0](R/W) Writing this bit to a logic 1 when the previous value was logic 0
13779                                                                  will cause the DFE offset compensation training FSM to run. Note
13780                                                                  that only one of the offset compensation training engines can be run
13781                                                                  at a time. To trigger both DFE offset compensation and AFE offset
13782                                                                  compensation, they must be run sequentially with the CSR write to
13783                                                                  the second in the sequence waiting until the first has completed
13784                                                                  (indicated in GSERN()_LANE()_RX_OS_5_BSTS[DFE_OFFSET_STATUS] or
13785                                                                  GSERN()_LANE()_RX_OS_5_BSTS[AFE_OFFSET_STATUS]). */
13786         uint64_t afe_offset_trigger    : 1;  /**< [  1:  1](R/W) Writing this bit to a logic 1 when the previous value was logic 0
13787                                                                  will cause the AFE offset compensation training FSM to run. Note
13788                                                                  that this is a debug-only feature and should not be performed while
13789                                                                  transferring data on the serial link. Note also that only one of the
13790                                                                  offset compensation training engines can be run at a time. To
13791                                                                  trigger both DFE offset compensation and AFE offset compensation,
13792                                                                  they must be run sequentially with the CSR write to trigger the
13793                                                                  second in the sequence waiting until the first has completed
13794                                                                  (indicated in GSERN()_LANE()_RX_OS_5_BSTS[DFE_OFFSET_STATUS] or
13795                                                                  GSERN()_LANE()_RX_OS_5_BSTS[AFE_OFFSET_STATUS]). */
13796         uint64_t idle_offset_trigger   : 1;  /**< [  2:  2](R/W) Writing this bit to a logic 1 when the previous value was logic 0
13797                                                                  will cause the IDLE offset compensation training FSM to run. Note
13798                                                                  that this is a debug-only feature. */
13799         uint64_t ir_trim_trigger       : 1;  /**< [  3:  3](R/W) Writing this bit to a logic 1 when the previous value was logic 0
13800                                                                  will cause the IR trim compensation FSM to run. Note that this is
13801                                                                  a debug-only feature. */
13802         uint64_t ir_trim_comp_en       : 1;  /**< [  4:  4](R/W) Enable IR TRIM compensation to run at the correct
13803                                                                  point in the hardware-driven reset sequence if asserted when the
13804                                                                  reset sequence begins. This bit field affects only IR trim compensation. */
13805         uint64_t ir_trim_early_iter_max : 5; /**< [  9:  5](R/W) Early IR TRIM Iteration Count Max. Controls the number of iterations
13806                                                                  to perform during the Early IR trim. If set to 0, no iterations are done
13807                                                                  and Early IR TRIM is skipped. Valid range 0 to 31. Note that
13808                                                                  GSERN()_LANE()_RST_CNT4_BCFG[DFE_AFE_OSCAL_WAIT] must be increased to allow for
13809                                                                  iterations. */
13810         uint64_t reserved_10_11        : 2;
13811         uint64_t settle_wait           : 4;  /**< [ 15: 12](R/W) Number of clock cycles for the DFE adaptation to wait after changing the
13812                                                                  adjusted C1 values before resuming accumulation. */
13813         uint64_t binsrch_acclen        : 2;  /**< [ 17: 16](R/W) Number of words to include in the binary search accumulation. This bit field
13814                                                                  affects the binary seach engines for DFE/AFE offset and IR TRIM.
13815                                                                    0x0 = 16 words.
13816                                                                    0x1 = 32 words.
13817                                                                    0x2 = 64 words.
13818                                                                    0x3 = 128 words. */
13819         uint64_t binsrch_wait          : 10; /**< [ 27: 18](R/W) Number of clock cycles to wait after changing the offset code.
13820                                                                  It is used to allow adjustments in wait time due to changes in the service clock
13821                                                                  frequency.
13822                                                                  This bit field affects the binary seach engines for DFE/AFE offset and IR TRIM. */
13823         uint64_t binsrch_margin        : 3;  /**< [ 30: 28](R/W) Binary Search Noise Margin. This value is added to the binary search difference
13824                                                                  count value. This bit field affects the binary search engine for IR TRIM.
13825                                                                    0x0 = 13'h000
13826                                                                    0x1 = 13'h020
13827                                                                    0x2 = 13'h040
13828                                                                    0x3 = 13'h080
13829                                                                    0x4 = 13'h100
13830                                                                    0x5 = 13'h200
13831                                                                    0x6 = 13'h400
13832                                                                    0x7 = 13'h800  (use with caution, may cause difference count overflow) */
13833         uint64_t offset_comp_en        : 1;  /**< [ 31: 31](R/W) Enable AFE and DFE offset compensation to run at the
13834                                                                  correct point in the hardware-driven reset sequence if asserted when
13835                                                                  the reset sequence begins. If deasserted when the hardware-driven
13836                                                                  reset sequence is run, this bit should be asserted later, once,
13837                                                                  under software control to initiate AFE and DFE offset compensation
13838                                                                  in a pure software-driven bringup. This bit field affects both AFE
13839                                                                  and DFE offset compensation training. */
13840         uint64_t c1_q_adjust           : 5;  /**< [ 36: 32](R/W) Adjust value magnitude for the error slice in the Q path. */
13841         uint64_t reserved_37_39        : 3;
13842         uint64_t c1_i_adjust           : 5;  /**< [ 44: 40](R/W) Adjust value magnitude for the error slice in the I path. */
13843         uint64_t reserved_45_47        : 3;
13844         uint64_t c1_e_adjust           : 5;  /**< [ 52: 48](R/W) Adjust value magnitude for the error slice in the E path. */
13845         uint64_t reserved_53           : 1;
13846         uint64_t run_eye_oscal         : 1;  /**< [ 54: 54](R/W) Enables eye (doute) DFE offset compensation to run at the correct
13847                                                                  point in the hardware-driven reset sequence if asserted when the eye data path
13848                                                                  bringup sequence begins. If deasserted when the eye data path bringup sequence
13849                                                                  is run, this bit may be asserted later under software control prior to
13850                                                                  performing eye measurements. */
13851         uint64_t reserved_55_63        : 9;
13852 #endif /* Word 0 - End */
13853     } s;
13854     /* struct bdk_gsernx_lanex_rx_os_5_bcfg_s cn; */
13855 };
13856 typedef union bdk_gsernx_lanex_rx_os_5_bcfg bdk_gsernx_lanex_rx_os_5_bcfg_t;
13857 
13858 static inline uint64_t BDK_GSERNX_LANEX_RX_OS_5_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_OS_5_BCFG(unsigned long a,unsigned long b)13859 static inline uint64_t BDK_GSERNX_LANEX_RX_OS_5_BCFG(unsigned long a, unsigned long b)
13860 {
13861     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
13862         return 0x87e090001840ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
13863     __bdk_csr_fatal("GSERNX_LANEX_RX_OS_5_BCFG", 2, a, b, 0, 0);
13864 }
13865 
13866 #define typedef_BDK_GSERNX_LANEX_RX_OS_5_BCFG(a,b) bdk_gsernx_lanex_rx_os_5_bcfg_t
13867 #define bustype_BDK_GSERNX_LANEX_RX_OS_5_BCFG(a,b) BDK_CSR_TYPE_RSL
13868 #define basename_BDK_GSERNX_LANEX_RX_OS_5_BCFG(a,b) "GSERNX_LANEX_RX_OS_5_BCFG"
13869 #define device_bar_BDK_GSERNX_LANEX_RX_OS_5_BCFG(a,b) 0x0 /* PF_BAR0 */
13870 #define busnum_BDK_GSERNX_LANEX_RX_OS_5_BCFG(a,b) (a)
13871 #define arguments_BDK_GSERNX_LANEX_RX_OS_5_BCFG(a,b) (a),(b),-1,-1
13872 
13873 /**
13874  * Register (RSL) gsern#_lane#_rx_os_5_bsts
13875  *
13876  * GSER Lane Receiver Offset Status Group 5 Register
13877  * This register controls for triggering RX offset compensation state machines.
13878  */
13879 union bdk_gsernx_lanex_rx_os_5_bsts
13880 {
13881     uint64_t u;
13882     struct bdk_gsernx_lanex_rx_os_5_bsts_s
13883     {
13884 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
13885         uint64_t reserved_25_63        : 39;
13886         uint64_t idle                  : 1;  /**< [ 24: 24](RO/H) For diagnostic use only.
13887                                                                  Internal:
13888                                                                  A copy of GSERN()_LANE()_RX_IDLEDET_BSTS[IDLE] for verification convenience. */
13889         uint64_t reserved_18_23        : 6;
13890         uint64_t idle_offset_valid     : 1;  /**< [ 17: 17](R/W1C/H) Valid indicator for the DFE Offset calibration values. This bit gets set when
13891                                                                  DFE offset calibration
13892                                                                  completes, and may be cleared by software write to 1. */
13893         uint64_t dfe_offsets_valid     : 1;  /**< [ 16: 16](R/W1C/H) Valid indicator for the DFE Offset calibration values. This bit gets set when
13894                                                                  DFE offset calibration
13895                                                                  completes, and may be cleared by software write to 1. */
13896         uint64_t idle_os               : 6;  /**< [ 15: 10](RO/H) Value for the IDLE detect offset currently in use. This field may differ from
13897                                                                  [IDLE_OS_CAL] if idle hysteresis is enabled. This field is only valid when the
13898                                                                  idle detect offset calibration is not running. */
13899         uint64_t idle_os_cal           : 6;  /**< [  9:  4](RO/H) Result of IDLE detect offset calibration. This field is only valid when the idle
13900                                                                  detect offset calibration is not running. */
13901         uint64_t ir_trim_status        : 1;  /**< [  3:  3](RO/H) When 1, indicates that the IR TRIM compensation FSM has completed operations.
13902                                                                  Cleared to 0 by hardware when the IR TRIM compensation training FSM is triggered by software
13903                                                                  or state machines. */
13904         uint64_t idle_offset_status    : 1;  /**< [  2:  2](RO/H) When 1, indicates that the IDLE offset compensation training FSM has completed operations.
13905                                                                  Cleared to 0 by hardware when the IDLE offset compensation training FSM is triggered by software,
13906                                                                  hardware timers, or state machines. */
13907         uint64_t afe_offset_status     : 1;  /**< [  1:  1](RO/H) When 1, indicates that the AFE offset compensation training FSM has completed operations.
13908                                                                  Cleared to 0 by hardware when the AFE offset compensation training FSM is triggered by software,
13909                                                                  hardware timers, or state machines. */
13910         uint64_t dfe_offset_status     : 1;  /**< [  0:  0](RO/H) When 1, indicates that the DFE offset compensation training FSM has completed operations.
13911                                                                  Cleared to 0 by hardware when the DFE offset compensation training FSM is triggered by software,
13912                                                                  hardware timers, or state machines. */
13913 #else /* Word 0 - Little Endian */
13914         uint64_t dfe_offset_status     : 1;  /**< [  0:  0](RO/H) When 1, indicates that the DFE offset compensation training FSM has completed operations.
13915                                                                  Cleared to 0 by hardware when the DFE offset compensation training FSM is triggered by software,
13916                                                                  hardware timers, or state machines. */
13917         uint64_t afe_offset_status     : 1;  /**< [  1:  1](RO/H) When 1, indicates that the AFE offset compensation training FSM has completed operations.
13918                                                                  Cleared to 0 by hardware when the AFE offset compensation training FSM is triggered by software,
13919                                                                  hardware timers, or state machines. */
13920         uint64_t idle_offset_status    : 1;  /**< [  2:  2](RO/H) When 1, indicates that the IDLE offset compensation training FSM has completed operations.
13921                                                                  Cleared to 0 by hardware when the IDLE offset compensation training FSM is triggered by software,
13922                                                                  hardware timers, or state machines. */
13923         uint64_t ir_trim_status        : 1;  /**< [  3:  3](RO/H) When 1, indicates that the IR TRIM compensation FSM has completed operations.
13924                                                                  Cleared to 0 by hardware when the IR TRIM compensation training FSM is triggered by software
13925                                                                  or state machines. */
13926         uint64_t idle_os_cal           : 6;  /**< [  9:  4](RO/H) Result of IDLE detect offset calibration. This field is only valid when the idle
13927                                                                  detect offset calibration is not running. */
13928         uint64_t idle_os               : 6;  /**< [ 15: 10](RO/H) Value for the IDLE detect offset currently in use. This field may differ from
13929                                                                  [IDLE_OS_CAL] if idle hysteresis is enabled. This field is only valid when the
13930                                                                  idle detect offset calibration is not running. */
13931         uint64_t dfe_offsets_valid     : 1;  /**< [ 16: 16](R/W1C/H) Valid indicator for the DFE Offset calibration values. This bit gets set when
13932                                                                  DFE offset calibration
13933                                                                  completes, and may be cleared by software write to 1. */
13934         uint64_t idle_offset_valid     : 1;  /**< [ 17: 17](R/W1C/H) Valid indicator for the DFE Offset calibration values. This bit gets set when
13935                                                                  DFE offset calibration
13936                                                                  completes, and may be cleared by software write to 1. */
13937         uint64_t reserved_18_23        : 6;
13938         uint64_t idle                  : 1;  /**< [ 24: 24](RO/H) For diagnostic use only.
13939                                                                  Internal:
13940                                                                  A copy of GSERN()_LANE()_RX_IDLEDET_BSTS[IDLE] for verification convenience. */
13941         uint64_t reserved_25_63        : 39;
13942 #endif /* Word 0 - End */
13943     } s;
13944     /* struct bdk_gsernx_lanex_rx_os_5_bsts_s cn; */
13945 };
13946 typedef union bdk_gsernx_lanex_rx_os_5_bsts bdk_gsernx_lanex_rx_os_5_bsts_t;
13947 
13948 static inline uint64_t BDK_GSERNX_LANEX_RX_OS_5_BSTS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_OS_5_BSTS(unsigned long a,unsigned long b)13949 static inline uint64_t BDK_GSERNX_LANEX_RX_OS_5_BSTS(unsigned long a, unsigned long b)
13950 {
13951     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
13952         return 0x87e090001980ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
13953     __bdk_csr_fatal("GSERNX_LANEX_RX_OS_5_BSTS", 2, a, b, 0, 0);
13954 }
13955 
13956 #define typedef_BDK_GSERNX_LANEX_RX_OS_5_BSTS(a,b) bdk_gsernx_lanex_rx_os_5_bsts_t
13957 #define bustype_BDK_GSERNX_LANEX_RX_OS_5_BSTS(a,b) BDK_CSR_TYPE_RSL
13958 #define basename_BDK_GSERNX_LANEX_RX_OS_5_BSTS(a,b) "GSERNX_LANEX_RX_OS_5_BSTS"
13959 #define device_bar_BDK_GSERNX_LANEX_RX_OS_5_BSTS(a,b) 0x0 /* PF_BAR0 */
13960 #define busnum_BDK_GSERNX_LANEX_RX_OS_5_BSTS(a,b) (a)
13961 #define arguments_BDK_GSERNX_LANEX_RX_OS_5_BSTS(a,b) (a),(b),-1,-1
13962 
13963 /**
13964  * Register (RSL) gsern#_lane#_rx_qac_bcfg
13965  *
13966  * GSER Lane RX Quadrature Corrector Base Configuration Register
13967  * Static controls for the quadrature corrector in the receiver. All fields
13968  * must be set prior to exiting reset.
13969  */
13970 union bdk_gsernx_lanex_rx_qac_bcfg
13971 {
13972     uint64_t u;
13973     struct bdk_gsernx_lanex_rx_qac_bcfg_s
13974     {
13975 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
13976         uint64_t reserved_42_63        : 22;
13977         uint64_t cdr_qac_selq          : 1;  /**< [ 41: 41](R/W) Enable use of the QAC corrector for the q-path when the reset state
13978                                                                  machine timing allows it. */
13979         uint64_t cdr_qac_sele          : 1;  /**< [ 40: 40](R/W) Enable use of the QAC corrector for the e-path when the reset state
13980                                                                  machine timing allows it. */
13981         uint64_t reserved_35_39        : 5;
13982         uint64_t qac_cntset_q          : 3;  /**< [ 34: 32](R/W) Programmable counter depth for QAC corrector value for the doutq
13983                                                                  path. The 3-bit encoding represents a integration time with 12-7 bit
13984                                                                  counter. The counter stops counting until it saturates or reaches
13985                                                                  0. If [EN_QAC_Q] is clear, this register is not used. If
13986                                                                  [EN_QAC_Q] is set, this correction value will be output to the
13987                                                                  CDR loop. Set this field prior to exiting reset. */
13988         uint64_t reserved_27_31        : 5;
13989         uint64_t qac_cntset_e          : 3;  /**< [ 26: 24](R/W) Programmable counter depth for QAC corrector value for the doute
13990                                                                  path. The 3-bit encoding represents a integration time with 12-7 bit
13991                                                                  counter. The counter stops counting until it saturates or reaches
13992                                                                  0. If [EN_QAC_E] is clear, this register is not used. If
13993                                                                  [EN_QAC_E] is set, this correction value will be output to the
13994                                                                  CDR loop. Set this field prior to exiting reset. */
13995         uint64_t reserved_22_23        : 2;
13996         uint64_t qac_ref_qoffs         : 6;  /**< [ 21: 16](R/W) Target value for the phase relationship between the i-path (leading)
13997                                                                  and the q-path (trailing). The range is zero to 180 degrees in 64
13998                                                                  steps, i.e., 2.8571 degrees per step. Used only when the QAC filter
13999                                                                  is enabled and selected. */
14000         uint64_t reserved_14_15        : 2;
14001         uint64_t qac_ref_eoffs         : 6;  /**< [ 13:  8](R/W) Target value for the phase relationship between the i-path (leading)
14002                                                                  and the e-path (trailing). The range is zero to 180 degrees in 64
14003                                                                  steps, i.e., 2.8571 degrees per step. Used only when the QAC filter
14004                                                                  is enabled and selected. */
14005         uint64_t reserved_2_7          : 6;
14006         uint64_t en_qac_e              : 1;  /**< [  1:  1](R/W) Enable use of QAC digital filter in the doute datapath. If the
14007                                                                  enable is deasserted, the filter will output the [QAC_REFSET]
14008                                                                  value. If its asserted, it will determine the current phase and use
14009                                                                  [QAC_REFSET] & [QAC_CNTSET] to output a correction value. Set prior to
14010                                                                  exiting reset. */
14011         uint64_t en_qac_q              : 1;  /**< [  0:  0](R/W) Enable use of QAC digital filter in the doutq datapath. If the
14012                                                                  enable is deasserted, the filter will output the [QAC_REFSET]
14013                                                                  value. If its asserted, it will determine the current phase and use
14014                                                                  [QAC_REFSET] & [QAC_CNTSET] to output a correction value. Set prior to
14015                                                                  exiting reset. */
14016 #else /* Word 0 - Little Endian */
14017         uint64_t en_qac_q              : 1;  /**< [  0:  0](R/W) Enable use of QAC digital filter in the doutq datapath. If the
14018                                                                  enable is deasserted, the filter will output the [QAC_REFSET]
14019                                                                  value. If its asserted, it will determine the current phase and use
14020                                                                  [QAC_REFSET] & [QAC_CNTSET] to output a correction value. Set prior to
14021                                                                  exiting reset. */
14022         uint64_t en_qac_e              : 1;  /**< [  1:  1](R/W) Enable use of QAC digital filter in the doute datapath. If the
14023                                                                  enable is deasserted, the filter will output the [QAC_REFSET]
14024                                                                  value. If its asserted, it will determine the current phase and use
14025                                                                  [QAC_REFSET] & [QAC_CNTSET] to output a correction value. Set prior to
14026                                                                  exiting reset. */
14027         uint64_t reserved_2_7          : 6;
14028         uint64_t qac_ref_eoffs         : 6;  /**< [ 13:  8](R/W) Target value for the phase relationship between the i-path (leading)
14029                                                                  and the e-path (trailing). The range is zero to 180 degrees in 64
14030                                                                  steps, i.e., 2.8571 degrees per step. Used only when the QAC filter
14031                                                                  is enabled and selected. */
14032         uint64_t reserved_14_15        : 2;
14033         uint64_t qac_ref_qoffs         : 6;  /**< [ 21: 16](R/W) Target value for the phase relationship between the i-path (leading)
14034                                                                  and the q-path (trailing). The range is zero to 180 degrees in 64
14035                                                                  steps, i.e., 2.8571 degrees per step. Used only when the QAC filter
14036                                                                  is enabled and selected. */
14037         uint64_t reserved_22_23        : 2;
14038         uint64_t qac_cntset_e          : 3;  /**< [ 26: 24](R/W) Programmable counter depth for QAC corrector value for the doute
14039                                                                  path. The 3-bit encoding represents a integration time with 12-7 bit
14040                                                                  counter. The counter stops counting until it saturates or reaches
14041                                                                  0. If [EN_QAC_E] is clear, this register is not used. If
14042                                                                  [EN_QAC_E] is set, this correction value will be output to the
14043                                                                  CDR loop. Set this field prior to exiting reset. */
14044         uint64_t reserved_27_31        : 5;
14045         uint64_t qac_cntset_q          : 3;  /**< [ 34: 32](R/W) Programmable counter depth for QAC corrector value for the doutq
14046                                                                  path. The 3-bit encoding represents a integration time with 12-7 bit
14047                                                                  counter. The counter stops counting until it saturates or reaches
14048                                                                  0. If [EN_QAC_Q] is clear, this register is not used. If
14049                                                                  [EN_QAC_Q] is set, this correction value will be output to the
14050                                                                  CDR loop. Set this field prior to exiting reset. */
14051         uint64_t reserved_35_39        : 5;
14052         uint64_t cdr_qac_sele          : 1;  /**< [ 40: 40](R/W) Enable use of the QAC corrector for the e-path when the reset state
14053                                                                  machine timing allows it. */
14054         uint64_t cdr_qac_selq          : 1;  /**< [ 41: 41](R/W) Enable use of the QAC corrector for the q-path when the reset state
14055                                                                  machine timing allows it. */
14056         uint64_t reserved_42_63        : 22;
14057 #endif /* Word 0 - End */
14058     } s;
14059     /* struct bdk_gsernx_lanex_rx_qac_bcfg_s cn; */
14060 };
14061 typedef union bdk_gsernx_lanex_rx_qac_bcfg bdk_gsernx_lanex_rx_qac_bcfg_t;
14062 
14063 static inline uint64_t BDK_GSERNX_LANEX_RX_QAC_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_QAC_BCFG(unsigned long a,unsigned long b)14064 static inline uint64_t BDK_GSERNX_LANEX_RX_QAC_BCFG(unsigned long a, unsigned long b)
14065 {
14066     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
14067         return 0x87e090000ee0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
14068     __bdk_csr_fatal("GSERNX_LANEX_RX_QAC_BCFG", 2, a, b, 0, 0);
14069 }
14070 
14071 #define typedef_BDK_GSERNX_LANEX_RX_QAC_BCFG(a,b) bdk_gsernx_lanex_rx_qac_bcfg_t
14072 #define bustype_BDK_GSERNX_LANEX_RX_QAC_BCFG(a,b) BDK_CSR_TYPE_RSL
14073 #define basename_BDK_GSERNX_LANEX_RX_QAC_BCFG(a,b) "GSERNX_LANEX_RX_QAC_BCFG"
14074 #define device_bar_BDK_GSERNX_LANEX_RX_QAC_BCFG(a,b) 0x0 /* PF_BAR0 */
14075 #define busnum_BDK_GSERNX_LANEX_RX_QAC_BCFG(a,b) (a)
14076 #define arguments_BDK_GSERNX_LANEX_RX_QAC_BCFG(a,b) (a),(b),-1,-1
14077 
14078 /**
14079  * Register (RSL) gsern#_lane#_rx_qac_bsts
14080  *
14081  * GSER Lane RX Quadrature Corrector Base Status Register
14082  * Quadrature corrector outputs captured in a CSR register; results should be close to
14083  * GSERN()_LANE()_RX_QAC_BCFG[QAC_REF_EOFFS] and
14084  * GSERN()_LANE()_RX_QAC_BCFG[QAC_REF_QOFFS] when the QAC is in use and stable.
14085  */
14086 union bdk_gsernx_lanex_rx_qac_bsts
14087 {
14088     uint64_t u;
14089     struct bdk_gsernx_lanex_rx_qac_bsts_s
14090     {
14091 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
14092         uint64_t reserved_22_63        : 42;
14093         uint64_t qac_qoffs             : 6;  /**< [ 21: 16](RO/H) Quadrature filter control output for the phase relationship between
14094                                                                  the i-path (leading) and the q-path (trailing). The range is zero
14095                                                                  to 180 degrees in 64 steps, i.e., 2.8571 degrees per step. Valid only
14096                                                                  when the QAC filter is enabled and selected. */
14097         uint64_t reserved_14_15        : 2;
14098         uint64_t qac_eoffs             : 6;  /**< [ 13:  8](RO/H) Quadrature filter control output for the phase relationship between
14099                                                                  the i-path (leading) and the e-path (trailing). The range is zero
14100                                                                  to 180 degrees in 64 steps, i.e., 2.8571 degrees per step. Valid only
14101                                                                  when the QAC filter is enabled and selected. */
14102         uint64_t reserved_0_7          : 8;
14103 #else /* Word 0 - Little Endian */
14104         uint64_t reserved_0_7          : 8;
14105         uint64_t qac_eoffs             : 6;  /**< [ 13:  8](RO/H) Quadrature filter control output for the phase relationship between
14106                                                                  the i-path (leading) and the e-path (trailing). The range is zero
14107                                                                  to 180 degrees in 64 steps, i.e., 2.8571 degrees per step. Valid only
14108                                                                  when the QAC filter is enabled and selected. */
14109         uint64_t reserved_14_15        : 2;
14110         uint64_t qac_qoffs             : 6;  /**< [ 21: 16](RO/H) Quadrature filter control output for the phase relationship between
14111                                                                  the i-path (leading) and the q-path (trailing). The range is zero
14112                                                                  to 180 degrees in 64 steps, i.e., 2.8571 degrees per step. Valid only
14113                                                                  when the QAC filter is enabled and selected. */
14114         uint64_t reserved_22_63        : 42;
14115 #endif /* Word 0 - End */
14116     } s;
14117     /* struct bdk_gsernx_lanex_rx_qac_bsts_s cn; */
14118 };
14119 typedef union bdk_gsernx_lanex_rx_qac_bsts bdk_gsernx_lanex_rx_qac_bsts_t;
14120 
14121 static inline uint64_t BDK_GSERNX_LANEX_RX_QAC_BSTS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_QAC_BSTS(unsigned long a,unsigned long b)14122 static inline uint64_t BDK_GSERNX_LANEX_RX_QAC_BSTS(unsigned long a, unsigned long b)
14123 {
14124     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
14125         return 0x87e090000ef0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
14126     __bdk_csr_fatal("GSERNX_LANEX_RX_QAC_BSTS", 2, a, b, 0, 0);
14127 }
14128 
14129 #define typedef_BDK_GSERNX_LANEX_RX_QAC_BSTS(a,b) bdk_gsernx_lanex_rx_qac_bsts_t
14130 #define bustype_BDK_GSERNX_LANEX_RX_QAC_BSTS(a,b) BDK_CSR_TYPE_RSL
14131 #define basename_BDK_GSERNX_LANEX_RX_QAC_BSTS(a,b) "GSERNX_LANEX_RX_QAC_BSTS"
14132 #define device_bar_BDK_GSERNX_LANEX_RX_QAC_BSTS(a,b) 0x0 /* PF_BAR0 */
14133 #define busnum_BDK_GSERNX_LANEX_RX_QAC_BSTS(a,b) (a)
14134 #define arguments_BDK_GSERNX_LANEX_RX_QAC_BSTS(a,b) (a),(b),-1,-1
14135 
14136 /**
14137  * Register (RSL) gsern#_lane#_rx_st_bcfg
14138  *
14139  * GSER Lane RX Static Base Configuration Register
14140  * This register controls for static RX settings that do not need FSM overrides.
14141  */
14142 union bdk_gsernx_lanex_rx_st_bcfg
14143 {
14144     uint64_t u;
14145     struct bdk_gsernx_lanex_rx_st_bcfg_s
14146     {
14147 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
14148         uint64_t reserved_49_63        : 15;
14149         uint64_t rxcdrfsmi             : 1;  /**< [ 48: 48](R/W) Set to provide the RX interpolator with the RX CDR load I
14150                                                                  clock (rxcdrldi). deassert (low) to provide the interpolator with
14151                                                                  the RX CDR load Q clock (rxcdrldq). This bit is ignored when
14152                                                                  txcdrdfsm is asserted (high), which set the RX interpolator
14153                                                                  and CDR FSM to use the TX clock (txcdrld).
14154 
14155                                                                  Internal:
14156                                                                  (For initial testing, assert rxcdrfsmi, but if we have trouble
14157                                                                  meeting timing, we can deassert this signal to provide some
14158                                                                  additional timing margin from the last flops in the RX CDR FSM to
14159                                                                  the flops interpolator.) */
14160         uint64_t reserved_42_47        : 6;
14161         uint64_t rx_dcc_iboost         : 1;  /**< [ 41: 41](R/W) Set to assert the iboost control bit of the
14162                                                                  receiver duty cycle correcter. Should be programmed as desired before
14163                                                                  sequencing the receiver reset state machine. Differs
14164                                                                  from [RX_DCC_LOWF] in the data rate range that it is set at. */
14165         uint64_t rx_dcc_lowf           : 1;  /**< [ 40: 40](R/W) Set to put the RX duty-cycle corrector (DCC) into low frequency mode. Set to 1
14166                                                                  when operating at data rates below 4 Gbaud. */
14167         uint64_t reserved_35_39        : 5;
14168         uint64_t bstuff                : 1;  /**< [ 34: 34](R/W) Set to place custom receive pipe in bit-stuffing
14169                                                                  mode. Only the odd bits in the half-rate DFE outputs are passed to
14170                                                                  the cdrout* and dout* pipe outputs; the odd bits are duplicated to
14171                                                                  fill up the expected data path width. */
14172         uint64_t rx_idle_lowf          : 2;  /**< [ 33: 32](R/W) Control for the receiver's idle detector analog filter
14173                                                                  bandwidth. The two bits apply at different times.
14174                                                                  \<0\> = Set to 1 for low bandwidth during normal operation.
14175                                                                  \<1\> = Set to 1 for low bandwidth during idle offset calibration.
14176                                                                  The default is 1 during normal operation for large filter capacitance and low
14177                                                                  bandwidth, and 0 during idle offset calibration to provide faster response. */
14178         uint64_t idle_os_bitlen        : 2;  /**< [ 31: 30](R/W) Number of bits to accumulate for IDLE detect offset calibration, measured in
14179                                                                  cycles of the 100 MHz system service clock.
14180                                                                  0x0 = 5 cycles.
14181                                                                  0x1 = 30 cycles.
14182                                                                  0x2 = 60 cycles.
14183                                                                  0x3 = 250 cycles. */
14184         uint64_t idle_os_ovrd_en       : 1;  /**< [ 29: 29](R/W) Enable use of [IDLE_OS_OVRD]. */
14185         uint64_t refset                : 5;  /**< [ 28: 24](R/W) Sets the reference voltage swing for idle detection. A voltage swing
14186                                                                  at the input of the RX less than this amount is defined as
14187                                                                  idle.
14188                                                                    0x0  = Threshold (refp-refn) is 23 mV.
14189                                                                    0x1  = Threshold (refp-refn) is 27.4 mV.
14190                                                                    0x2  = Threshold (refp-refn) is 31.8 mV.
14191                                                                    0x3  = Threshold (refp-refn) is 36.2 mV.
14192                                                                    0x4  = Threshold (refp-refn) is 40.6 mV.
14193                                                                    0x5  = Threshold (refp-refn) is 45 mV.
14194                                                                    0x6  = Threshold (refp-refn) is 49.4 mV.
14195                                                                    0x7  = Threshold (refp-refn) is 53.8 mV.
14196                                                                    0x8  = Threshold (refp-refn) is 58.2 mV.
14197                                                                    0x9  = Threshold (refp-refn) is 62.6 mV.
14198                                                                    0xA  = Threshold (refp-refn) is 67 mV.
14199                                                                    0xB  = Threshold (refp-refn) is 71.4 mV.
14200                                                                    0xC  = Threshold (refp-refn) is 75.8 mV.
14201                                                                    0xD  = Threshold (refp-refn) is 80.2 mV.
14202                                                                    0xE  = Threshold (refp-refn) is 84.6 mV.
14203                                                                    0xF  = Threshold (refp-refn) is 89 mV.
14204                                                                    0x10 = Threshold (refp-refn) is 55 mV.
14205                                                                    0x11 = Threshold (refp-refn) is 62.9 mV.
14206                                                                    0x12 = Threshold (refp-refn) is 70.8 mV.
14207                                                                    0x13 = Threshold (refp-refn) is 78.7 mV.
14208                                                                    0x14 = Threshold (refp-refn) is 86.6 mV.
14209                                                                    0x15 = Threshold (refp-refn) is 94.5 mV.
14210                                                                    0x16 = Threshold (refp-refn) is 102.4 mV.
14211                                                                    0x17 = Threshold (refp-refn) is 110.3 mV.
14212                                                                    0x18 = Threshold (refp-refn) is 118.2 mV.
14213                                                                    0x19 = Threshold (refp-refn) is 126.1 mV.
14214                                                                    0x1A = Threshold (refp-refn) is 134 mV.
14215                                                                    0x1B = Threshold (refp-refn) is 141.9 mV.
14216                                                                    0x1C = Threshold (refp-refn) is 149.8 mV.
14217                                                                    0x1D = Threshold (refp-refn) is 157.7 mV.
14218                                                                    0x1E = Threshold (refp-refn) is 165.6 mV.
14219                                                                    0x1F = Threshold (refp-refn) is 173.5 mV. */
14220         uint64_t idle_os_ovrd          : 6;  /**< [ 23: 18](R/W) Override value for the IDLE detect offset calibration. As with the
14221                                                                  other offset DACs in the RX, the MSB sets the sign, and the 5 LSBs
14222                                                                  are binary-encoded magnitudes. */
14223         uint64_t en_idle_cal           : 1;  /**< [ 17: 17](R/W) Set to put the idle detector into calibration mode. */
14224         uint64_t rxelecidle            : 1;  /**< [ 16: 16](R/W) Set to place the CDR finite state machine into a reset state so it does not try
14225                                                                  to track clock or data and starts from a reset state when the CDR finite state
14226                                                                  machine begins or resumes operation. deassert (low) to allow the CDR FSM to run. */
14227         uint64_t rxcdrhold             : 1;  /**< [ 15: 15](R/W) Set to place the CDR finite state machine (FSM) into a hold state so it does not
14228                                                                  try to track clock or data, which would not normally be present during
14229                                                                  electrical idle. The CDR FSM state is preserved, provided [RXELECIDLE] is not
14230                                                                  asserted, so the CDR FSM resumes operation with the same settings in effect
14231                                                                  prior to entering the hold state. deassert (low) to allow the CDR FSM to run. */
14232         uint64_t rxcdrramp             : 1;  /**< [ 14: 14](R/W) For diagnostic use only.
14233                                                                  Internal:
14234                                                                  For lab characterization use only. Set to 1 to cause the CDR FSM to ramp the 1st
14235                                                                  order state by [INC1], independent of voter, & hold the 2nd order state. */
14236         uint64_t reserved_13           : 1;
14237         uint64_t en_sh_lb              : 1;  /**< [ 12: 12](R/W) Enable for shallow loopback mode within RX. Used when in shallow loopback
14238                                                                  mode to mux the CDR receive clock onto the transmit data path clock
14239                                                                  to ensure that the clock frequencies are matched (to prevent data overrun).
14240                                                                  This signal should be enabled along with GSERN()_LANE()_PLL_2_BCFG[SHLB_EN] for
14241                                                                  the PLL. */
14242         uint64_t erc                   : 4;  /**< [ 11:  8](R/W) Interpolator edge-rate control. This control is shared between all
14243                                                                  interpolators in the lane.  Set as follows:
14244                                                                    \<pre\>
14245                                                                    if      (data_period \>= 500ps)  erc = 4'h1;
14246                                                                    else if (data_period \>= 407ps)  erc = 4'h2;
14247                                                                    else if (data_period \>= 333ps)  erc = 4'h3;
14248                                                                    else if (data_period \>= 167ps)  erc = 4'h4;
14249                                                                    else if (data_period \>= 166ps)  erc = 4'h5;
14250                                                                    else if (data_period \>= 100ps)  erc = 4'h7;
14251                                                                    else if (data_period \>=  85ps)  erc = 4'h8;
14252                                                                    else if (data_period \>=  80ps)  erc = 4'h9;
14253                                                                    else if (data_period \>=  62ps)  erc = 4'hA;
14254                                                                    else if (data_period \>=  55ps)  erc = 4'hB;
14255                                                                    else if (data_period \>=  50ps)  erc = 4'hC;
14256                                                                    else if (data_period \>=  45ps)  erc = 4'hD;
14257                                                                    else if (data_period \>=  38ps)  erc = 4'hE;
14258                                                                    else                            erc = 4'hF;
14259                                                                    \</pre\> */
14260         uint64_t term                  : 2;  /**< [  7:  6](R/W) Termination voltage control. Setting to 0x1 (VDSSA) is typically appropriate for
14261                                                                  PCIe channels. For channels without a series board capacitor the typical setting
14262                                                                  would be 0x0 (floating).
14263                                                                  0x0 = Floating.
14264                                                                  0x1 = VSSA.
14265                                                                  0x2 = VDDA.
14266                                                                  0x3 = VSSA. */
14267         uint64_t en_rt85               : 1;  /**< [  5:  5](R/W) Enable 85 Ohm termination in the receiver. */
14268         uint64_t en_lb                 : 1;  /**< [  4:  4](R/W) Enable for near-end TX loopback path. */
14269         uint64_t en_rterm              : 1;  /**< [  3:  3](R/W) For debug use only. Set to one to enable the receiver's termination circuit
14270                                                                  during bringup. Setting to zero will turn off receiver termination. */
14271         uint64_t reserved_0_2          : 3;
14272 #else /* Word 0 - Little Endian */
14273         uint64_t reserved_0_2          : 3;
14274         uint64_t en_rterm              : 1;  /**< [  3:  3](R/W) For debug use only. Set to one to enable the receiver's termination circuit
14275                                                                  during bringup. Setting to zero will turn off receiver termination. */
14276         uint64_t en_lb                 : 1;  /**< [  4:  4](R/W) Enable for near-end TX loopback path. */
14277         uint64_t en_rt85               : 1;  /**< [  5:  5](R/W) Enable 85 Ohm termination in the receiver. */
14278         uint64_t term                  : 2;  /**< [  7:  6](R/W) Termination voltage control. Setting to 0x1 (VDSSA) is typically appropriate for
14279                                                                  PCIe channels. For channels without a series board capacitor the typical setting
14280                                                                  would be 0x0 (floating).
14281                                                                  0x0 = Floating.
14282                                                                  0x1 = VSSA.
14283                                                                  0x2 = VDDA.
14284                                                                  0x3 = VSSA. */
14285         uint64_t erc                   : 4;  /**< [ 11:  8](R/W) Interpolator edge-rate control. This control is shared between all
14286                                                                  interpolators in the lane.  Set as follows:
14287                                                                    \<pre\>
14288                                                                    if      (data_period \>= 500ps)  erc = 4'h1;
14289                                                                    else if (data_period \>= 407ps)  erc = 4'h2;
14290                                                                    else if (data_period \>= 333ps)  erc = 4'h3;
14291                                                                    else if (data_period \>= 167ps)  erc = 4'h4;
14292                                                                    else if (data_period \>= 166ps)  erc = 4'h5;
14293                                                                    else if (data_period \>= 100ps)  erc = 4'h7;
14294                                                                    else if (data_period \>=  85ps)  erc = 4'h8;
14295                                                                    else if (data_period \>=  80ps)  erc = 4'h9;
14296                                                                    else if (data_period \>=  62ps)  erc = 4'hA;
14297                                                                    else if (data_period \>=  55ps)  erc = 4'hB;
14298                                                                    else if (data_period \>=  50ps)  erc = 4'hC;
14299                                                                    else if (data_period \>=  45ps)  erc = 4'hD;
14300                                                                    else if (data_period \>=  38ps)  erc = 4'hE;
14301                                                                    else                            erc = 4'hF;
14302                                                                    \</pre\> */
14303         uint64_t en_sh_lb              : 1;  /**< [ 12: 12](R/W) Enable for shallow loopback mode within RX. Used when in shallow loopback
14304                                                                  mode to mux the CDR receive clock onto the transmit data path clock
14305                                                                  to ensure that the clock frequencies are matched (to prevent data overrun).
14306                                                                  This signal should be enabled along with GSERN()_LANE()_PLL_2_BCFG[SHLB_EN] for
14307                                                                  the PLL. */
14308         uint64_t reserved_13           : 1;
14309         uint64_t rxcdrramp             : 1;  /**< [ 14: 14](R/W) For diagnostic use only.
14310                                                                  Internal:
14311                                                                  For lab characterization use only. Set to 1 to cause the CDR FSM to ramp the 1st
14312                                                                  order state by [INC1], independent of voter, & hold the 2nd order state. */
14313         uint64_t rxcdrhold             : 1;  /**< [ 15: 15](R/W) Set to place the CDR finite state machine (FSM) into a hold state so it does not
14314                                                                  try to track clock or data, which would not normally be present during
14315                                                                  electrical idle. The CDR FSM state is preserved, provided [RXELECIDLE] is not
14316                                                                  asserted, so the CDR FSM resumes operation with the same settings in effect
14317                                                                  prior to entering the hold state. deassert (low) to allow the CDR FSM to run. */
14318         uint64_t rxelecidle            : 1;  /**< [ 16: 16](R/W) Set to place the CDR finite state machine into a reset state so it does not try
14319                                                                  to track clock or data and starts from a reset state when the CDR finite state
14320                                                                  machine begins or resumes operation. deassert (low) to allow the CDR FSM to run. */
14321         uint64_t en_idle_cal           : 1;  /**< [ 17: 17](R/W) Set to put the idle detector into calibration mode. */
14322         uint64_t idle_os_ovrd          : 6;  /**< [ 23: 18](R/W) Override value for the IDLE detect offset calibration. As with the
14323                                                                  other offset DACs in the RX, the MSB sets the sign, and the 5 LSBs
14324                                                                  are binary-encoded magnitudes. */
14325         uint64_t refset                : 5;  /**< [ 28: 24](R/W) Sets the reference voltage swing for idle detection. A voltage swing
14326                                                                  at the input of the RX less than this amount is defined as
14327                                                                  idle.
14328                                                                    0x0  = Threshold (refp-refn) is 23 mV.
14329                                                                    0x1  = Threshold (refp-refn) is 27.4 mV.
14330                                                                    0x2  = Threshold (refp-refn) is 31.8 mV.
14331                                                                    0x3  = Threshold (refp-refn) is 36.2 mV.
14332                                                                    0x4  = Threshold (refp-refn) is 40.6 mV.
14333                                                                    0x5  = Threshold (refp-refn) is 45 mV.
14334                                                                    0x6  = Threshold (refp-refn) is 49.4 mV.
14335                                                                    0x7  = Threshold (refp-refn) is 53.8 mV.
14336                                                                    0x8  = Threshold (refp-refn) is 58.2 mV.
14337                                                                    0x9  = Threshold (refp-refn) is 62.6 mV.
14338                                                                    0xA  = Threshold (refp-refn) is 67 mV.
14339                                                                    0xB  = Threshold (refp-refn) is 71.4 mV.
14340                                                                    0xC  = Threshold (refp-refn) is 75.8 mV.
14341                                                                    0xD  = Threshold (refp-refn) is 80.2 mV.
14342                                                                    0xE  = Threshold (refp-refn) is 84.6 mV.
14343                                                                    0xF  = Threshold (refp-refn) is 89 mV.
14344                                                                    0x10 = Threshold (refp-refn) is 55 mV.
14345                                                                    0x11 = Threshold (refp-refn) is 62.9 mV.
14346                                                                    0x12 = Threshold (refp-refn) is 70.8 mV.
14347                                                                    0x13 = Threshold (refp-refn) is 78.7 mV.
14348                                                                    0x14 = Threshold (refp-refn) is 86.6 mV.
14349                                                                    0x15 = Threshold (refp-refn) is 94.5 mV.
14350                                                                    0x16 = Threshold (refp-refn) is 102.4 mV.
14351                                                                    0x17 = Threshold (refp-refn) is 110.3 mV.
14352                                                                    0x18 = Threshold (refp-refn) is 118.2 mV.
14353                                                                    0x19 = Threshold (refp-refn) is 126.1 mV.
14354                                                                    0x1A = Threshold (refp-refn) is 134 mV.
14355                                                                    0x1B = Threshold (refp-refn) is 141.9 mV.
14356                                                                    0x1C = Threshold (refp-refn) is 149.8 mV.
14357                                                                    0x1D = Threshold (refp-refn) is 157.7 mV.
14358                                                                    0x1E = Threshold (refp-refn) is 165.6 mV.
14359                                                                    0x1F = Threshold (refp-refn) is 173.5 mV. */
14360         uint64_t idle_os_ovrd_en       : 1;  /**< [ 29: 29](R/W) Enable use of [IDLE_OS_OVRD]. */
14361         uint64_t idle_os_bitlen        : 2;  /**< [ 31: 30](R/W) Number of bits to accumulate for IDLE detect offset calibration, measured in
14362                                                                  cycles of the 100 MHz system service clock.
14363                                                                  0x0 = 5 cycles.
14364                                                                  0x1 = 30 cycles.
14365                                                                  0x2 = 60 cycles.
14366                                                                  0x3 = 250 cycles. */
14367         uint64_t rx_idle_lowf          : 2;  /**< [ 33: 32](R/W) Control for the receiver's idle detector analog filter
14368                                                                  bandwidth. The two bits apply at different times.
14369                                                                  \<0\> = Set to 1 for low bandwidth during normal operation.
14370                                                                  \<1\> = Set to 1 for low bandwidth during idle offset calibration.
14371                                                                  The default is 1 during normal operation for large filter capacitance and low
14372                                                                  bandwidth, and 0 during idle offset calibration to provide faster response. */
14373         uint64_t bstuff                : 1;  /**< [ 34: 34](R/W) Set to place custom receive pipe in bit-stuffing
14374                                                                  mode. Only the odd bits in the half-rate DFE outputs are passed to
14375                                                                  the cdrout* and dout* pipe outputs; the odd bits are duplicated to
14376                                                                  fill up the expected data path width. */
14377         uint64_t reserved_35_39        : 5;
14378         uint64_t rx_dcc_lowf           : 1;  /**< [ 40: 40](R/W) Set to put the RX duty-cycle corrector (DCC) into low frequency mode. Set to 1
14379                                                                  when operating at data rates below 4 Gbaud. */
14380         uint64_t rx_dcc_iboost         : 1;  /**< [ 41: 41](R/W) Set to assert the iboost control bit of the
14381                                                                  receiver duty cycle correcter. Should be programmed as desired before
14382                                                                  sequencing the receiver reset state machine. Differs
14383                                                                  from [RX_DCC_LOWF] in the data rate range that it is set at. */
14384         uint64_t reserved_42_47        : 6;
14385         uint64_t rxcdrfsmi             : 1;  /**< [ 48: 48](R/W) Set to provide the RX interpolator with the RX CDR load I
14386                                                                  clock (rxcdrldi). deassert (low) to provide the interpolator with
14387                                                                  the RX CDR load Q clock (rxcdrldq). This bit is ignored when
14388                                                                  txcdrdfsm is asserted (high), which set the RX interpolator
14389                                                                  and CDR FSM to use the TX clock (txcdrld).
14390 
14391                                                                  Internal:
14392                                                                  (For initial testing, assert rxcdrfsmi, but if we have trouble
14393                                                                  meeting timing, we can deassert this signal to provide some
14394                                                                  additional timing margin from the last flops in the RX CDR FSM to
14395                                                                  the flops interpolator.) */
14396         uint64_t reserved_49_63        : 15;
14397 #endif /* Word 0 - End */
14398     } s;
14399     /* struct bdk_gsernx_lanex_rx_st_bcfg_s cn; */
14400 };
14401 typedef union bdk_gsernx_lanex_rx_st_bcfg bdk_gsernx_lanex_rx_st_bcfg_t;
14402 
14403 static inline uint64_t BDK_GSERNX_LANEX_RX_ST_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_RX_ST_BCFG(unsigned long a,unsigned long b)14404 static inline uint64_t BDK_GSERNX_LANEX_RX_ST_BCFG(unsigned long a, unsigned long b)
14405 {
14406     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
14407         return 0x87e090000ff0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
14408     __bdk_csr_fatal("GSERNX_LANEX_RX_ST_BCFG", 2, a, b, 0, 0);
14409 }
14410 
14411 #define typedef_BDK_GSERNX_LANEX_RX_ST_BCFG(a,b) bdk_gsernx_lanex_rx_st_bcfg_t
14412 #define bustype_BDK_GSERNX_LANEX_RX_ST_BCFG(a,b) BDK_CSR_TYPE_RSL
14413 #define basename_BDK_GSERNX_LANEX_RX_ST_BCFG(a,b) "GSERNX_LANEX_RX_ST_BCFG"
14414 #define device_bar_BDK_GSERNX_LANEX_RX_ST_BCFG(a,b) 0x0 /* PF_BAR0 */
14415 #define busnum_BDK_GSERNX_LANEX_RX_ST_BCFG(a,b) (a)
14416 #define arguments_BDK_GSERNX_LANEX_RX_ST_BCFG(a,b) (a),(b),-1,-1
14417 
14418 /**
14419  * Register (RSL) gsern#_lane#_sata_phy2_bcfg
14420  *
14421  * GSER Lane SATA Control 2 Register
14422  * Control settings for SATA PHY functionality.
14423  */
14424 union bdk_gsernx_lanex_sata_phy2_bcfg
14425 {
14426     uint64_t u;
14427     struct bdk_gsernx_lanex_sata_phy2_bcfg_s
14428     {
14429 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
14430         uint64_t dev_align_count       : 16; /**< [ 63: 48](R/W) Count in service clock cycles representing the duration of ALIGNp primitives
14431                                                                  received at each speed from the far end Device during the rate negotiation
14432                                                                  process.
14433                                                                  Reset value is set to yield a 54.61ns duration. */
14434         uint64_t reserved_43_47        : 5;
14435         uint64_t cdr_lock_wait         : 11; /**< [ 42: 32](R/W) Maximum wait count in service clock cycles required after detecting a received
14436                                                                  signal or after completing a Receiver reset before the SATA aligner begins to
14437                                                                  scan for 8B10B symbol alignment.
14438                                                                  Reset value is set to 5us based on analysis of worst case SSC scenarios. */
14439         uint64_t do_afeos_final        : 4;  /**< [ 31: 28](R/W) Set to one to allow AFEOS adaptation to keep running continuously during the final
14440                                                                  phase of adaptation when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted,
14441                                                                  GSERN()_LANE()_SATA_PHY_BCFG[DO_AFEOS_ADPT] is set and the SATA lane is operating
14442                                                                  at the corresponding rate. The individual bits are mapped as follows:
14443                                                                  \<0\> = SATA Gen1.
14444                                                                  \<1\> = SATA Gen2.
14445                                                                  \<2\> = SATA Gen3.
14446                                                                  \<3\> = Reserved. */
14447         uint64_t do_ctlelte_final      : 4;  /**< [ 27: 24](R/W) Set to one to allow CTLELTE adaptation to keep running continuously during the final
14448                                                                  phase of adaptation when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted,
14449                                                                  GSERN()_LANE()_SATA_PHY_BCFG[DO_CTLELTE_ADPT] is set and the SATA lane is operating
14450                                                                  at the corresponding rate. The individual bits are mapped as follows:
14451                                                                  \<0\> = SATA Gen1.
14452                                                                  \<1\> = SATA Gen2.
14453                                                                  \<2\> = SATA Gen3.
14454                                                                  \<3\> = Reserved. */
14455         uint64_t do_ctlez_final        : 4;  /**< [ 23: 20](R/W) Set to one to allow CTLEZ adaptation to keep running continuously during the final
14456                                                                  phase of adaptation when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted,
14457                                                                  GSERN()_LANE()_SATA_PHY_BCFG[DO_CTLEZ_ADPT] is set and the SATA lane is operating
14458                                                                  at the corresponding rate. The individual bits are mapped as follows:
14459                                                                  \<0\> = SATA Gen1.
14460                                                                  \<1\> = SATA Gen2.
14461                                                                  \<2\> = SATA Gen3.
14462                                                                  \<3\> = Reserved. */
14463         uint64_t do_ctle_final         : 4;  /**< [ 19: 16](R/W) Set to one to allow CTLE adaptation to keep running continuously during the final
14464                                                                  phase of adaptation when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted,
14465                                                                  GSERN()_LANE()_SATA_PHY_BCFG[DO_CTLE_ADPT] is set and the SATA lane is operating
14466                                                                  at the corresponding rate. The individual bits are mapped as follows:
14467                                                                  \<0\> = SATA Gen1.
14468                                                                  \<1\> = SATA Gen2.
14469                                                                  \<2\> = SATA Gen3.
14470                                                                  \<3\> = Reserved. */
14471         uint64_t do_dfe_final          : 4;  /**< [ 15: 12](R/W) Set to one to allow DFE adaptation to keep running continuously during the final
14472                                                                  phase of adaptation when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted,
14473                                                                  GSERN()_LANE()_SATA_PHY_BCFG[DO_DFE_ADPT] is set and the SATA lane is operating
14474                                                                  at the corresponding rate. The individual bits are mapped as follows:
14475                                                                  \<0\> = SATA Gen1.
14476                                                                  \<1\> = SATA Gen2.
14477                                                                  \<2\> = SATA Gen3.
14478                                                                  \<3\> = Reserved. */
14479         uint64_t do_vga_final          : 4;  /**< [ 11:  8](R/W) Set to one to allow VGA adaptation to keep running continuously during the final
14480                                                                  phase of adaptation when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted,
14481                                                                  GSERN()_LANE()_SATA_PHY_BCFG[DO_VGA_ADPT] is set and the SATA lane is operating
14482                                                                  at the corresponding rate. The individual bits are mapped as follows:
14483                                                                  \<0\> = SATA Gen1.
14484                                                                  \<1\> = SATA Gen2.
14485                                                                  \<2\> = SATA Gen3.
14486                                                                  \<3\> = Reserved. */
14487         uint64_t do_blwc_final         : 4;  /**< [  7:  4](R/W) Set to one to allow BLWC adaptation to keep running continuously during the final
14488                                                                  phase of adaptation when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted,
14489                                                                  GSERN()_LANE()_SATA_PHY_BCFG[DO_BLWC_ADPT] is set and the SATA lane is operating
14490                                                                  at the corresponding rate. The individual bits are mapped as follows:
14491                                                                  \<0\> = SATA Gen1.
14492                                                                  \<1\> = SATA Gen2.
14493                                                                  \<2\> = SATA Gen3.
14494                                                                  \<3\> = Reserved. */
14495         uint64_t do_prevga_gn_final    : 4;  /**< [  3:  0](R/W) Set to one to allow PREVGA_GN adaptation to keep running continuously during the final
14496                                                                  phase of adaptation when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted,
14497                                                                  GSERN()_LANE()_SATA_PHY_BCFG[DO_PREVGA_GN_ADPT] is set and the SATA lane is operating
14498                                                                  at the corresponding rate. The individual bits are mapped as follows:
14499                                                                  \<0\> = SATA Gen1.
14500                                                                  \<1\> = SATA Gen2.
14501                                                                  \<2\> = SATA Gen3.
14502                                                                  \<3\> = Reserved. */
14503 #else /* Word 0 - Little Endian */
14504         uint64_t do_prevga_gn_final    : 4;  /**< [  3:  0](R/W) Set to one to allow PREVGA_GN adaptation to keep running continuously during the final
14505                                                                  phase of adaptation when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted,
14506                                                                  GSERN()_LANE()_SATA_PHY_BCFG[DO_PREVGA_GN_ADPT] is set and the SATA lane is operating
14507                                                                  at the corresponding rate. The individual bits are mapped as follows:
14508                                                                  \<0\> = SATA Gen1.
14509                                                                  \<1\> = SATA Gen2.
14510                                                                  \<2\> = SATA Gen3.
14511                                                                  \<3\> = Reserved. */
14512         uint64_t do_blwc_final         : 4;  /**< [  7:  4](R/W) Set to one to allow BLWC adaptation to keep running continuously during the final
14513                                                                  phase of adaptation when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted,
14514                                                                  GSERN()_LANE()_SATA_PHY_BCFG[DO_BLWC_ADPT] is set and the SATA lane is operating
14515                                                                  at the corresponding rate. The individual bits are mapped as follows:
14516                                                                  \<0\> = SATA Gen1.
14517                                                                  \<1\> = SATA Gen2.
14518                                                                  \<2\> = SATA Gen3.
14519                                                                  \<3\> = Reserved. */
14520         uint64_t do_vga_final          : 4;  /**< [ 11:  8](R/W) Set to one to allow VGA adaptation to keep running continuously during the final
14521                                                                  phase of adaptation when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted,
14522                                                                  GSERN()_LANE()_SATA_PHY_BCFG[DO_VGA_ADPT] is set and the SATA lane is operating
14523                                                                  at the corresponding rate. The individual bits are mapped as follows:
14524                                                                  \<0\> = SATA Gen1.
14525                                                                  \<1\> = SATA Gen2.
14526                                                                  \<2\> = SATA Gen3.
14527                                                                  \<3\> = Reserved. */
14528         uint64_t do_dfe_final          : 4;  /**< [ 15: 12](R/W) Set to one to allow DFE adaptation to keep running continuously during the final
14529                                                                  phase of adaptation when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted,
14530                                                                  GSERN()_LANE()_SATA_PHY_BCFG[DO_DFE_ADPT] is set and the SATA lane is operating
14531                                                                  at the corresponding rate. The individual bits are mapped as follows:
14532                                                                  \<0\> = SATA Gen1.
14533                                                                  \<1\> = SATA Gen2.
14534                                                                  \<2\> = SATA Gen3.
14535                                                                  \<3\> = Reserved. */
14536         uint64_t do_ctle_final         : 4;  /**< [ 19: 16](R/W) Set to one to allow CTLE adaptation to keep running continuously during the final
14537                                                                  phase of adaptation when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted,
14538                                                                  GSERN()_LANE()_SATA_PHY_BCFG[DO_CTLE_ADPT] is set and the SATA lane is operating
14539                                                                  at the corresponding rate. The individual bits are mapped as follows:
14540                                                                  \<0\> = SATA Gen1.
14541                                                                  \<1\> = SATA Gen2.
14542                                                                  \<2\> = SATA Gen3.
14543                                                                  \<3\> = Reserved. */
14544         uint64_t do_ctlez_final        : 4;  /**< [ 23: 20](R/W) Set to one to allow CTLEZ adaptation to keep running continuously during the final
14545                                                                  phase of adaptation when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted,
14546                                                                  GSERN()_LANE()_SATA_PHY_BCFG[DO_CTLEZ_ADPT] is set and the SATA lane is operating
14547                                                                  at the corresponding rate. The individual bits are mapped as follows:
14548                                                                  \<0\> = SATA Gen1.
14549                                                                  \<1\> = SATA Gen2.
14550                                                                  \<2\> = SATA Gen3.
14551                                                                  \<3\> = Reserved. */
14552         uint64_t do_ctlelte_final      : 4;  /**< [ 27: 24](R/W) Set to one to allow CTLELTE adaptation to keep running continuously during the final
14553                                                                  phase of adaptation when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted,
14554                                                                  GSERN()_LANE()_SATA_PHY_BCFG[DO_CTLELTE_ADPT] is set and the SATA lane is operating
14555                                                                  at the corresponding rate. The individual bits are mapped as follows:
14556                                                                  \<0\> = SATA Gen1.
14557                                                                  \<1\> = SATA Gen2.
14558                                                                  \<2\> = SATA Gen3.
14559                                                                  \<3\> = Reserved. */
14560         uint64_t do_afeos_final        : 4;  /**< [ 31: 28](R/W) Set to one to allow AFEOS adaptation to keep running continuously during the final
14561                                                                  phase of adaptation when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted,
14562                                                                  GSERN()_LANE()_SATA_PHY_BCFG[DO_AFEOS_ADPT] is set and the SATA lane is operating
14563                                                                  at the corresponding rate. The individual bits are mapped as follows:
14564                                                                  \<0\> = SATA Gen1.
14565                                                                  \<1\> = SATA Gen2.
14566                                                                  \<2\> = SATA Gen3.
14567                                                                  \<3\> = Reserved. */
14568         uint64_t cdr_lock_wait         : 11; /**< [ 42: 32](R/W) Maximum wait count in service clock cycles required after detecting a received
14569                                                                  signal or after completing a Receiver reset before the SATA aligner begins to
14570                                                                  scan for 8B10B symbol alignment.
14571                                                                  Reset value is set to 5us based on analysis of worst case SSC scenarios. */
14572         uint64_t reserved_43_47        : 5;
14573         uint64_t dev_align_count       : 16; /**< [ 63: 48](R/W) Count in service clock cycles representing the duration of ALIGNp primitives
14574                                                                  received at each speed from the far end Device during the rate negotiation
14575                                                                  process.
14576                                                                  Reset value is set to yield a 54.61ns duration. */
14577 #endif /* Word 0 - End */
14578     } s;
14579     /* struct bdk_gsernx_lanex_sata_phy2_bcfg_s cn; */
14580 };
14581 typedef union bdk_gsernx_lanex_sata_phy2_bcfg bdk_gsernx_lanex_sata_phy2_bcfg_t;
14582 
14583 static inline uint64_t BDK_GSERNX_LANEX_SATA_PHY2_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_SATA_PHY2_BCFG(unsigned long a,unsigned long b)14584 static inline uint64_t BDK_GSERNX_LANEX_SATA_PHY2_BCFG(unsigned long a, unsigned long b)
14585 {
14586     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
14587         return 0x87e090002bb0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
14588     __bdk_csr_fatal("GSERNX_LANEX_SATA_PHY2_BCFG", 2, a, b, 0, 0);
14589 }
14590 
14591 #define typedef_BDK_GSERNX_LANEX_SATA_PHY2_BCFG(a,b) bdk_gsernx_lanex_sata_phy2_bcfg_t
14592 #define bustype_BDK_GSERNX_LANEX_SATA_PHY2_BCFG(a,b) BDK_CSR_TYPE_RSL
14593 #define basename_BDK_GSERNX_LANEX_SATA_PHY2_BCFG(a,b) "GSERNX_LANEX_SATA_PHY2_BCFG"
14594 #define device_bar_BDK_GSERNX_LANEX_SATA_PHY2_BCFG(a,b) 0x0 /* PF_BAR0 */
14595 #define busnum_BDK_GSERNX_LANEX_SATA_PHY2_BCFG(a,b) (a)
14596 #define arguments_BDK_GSERNX_LANEX_SATA_PHY2_BCFG(a,b) (a),(b),-1,-1
14597 
14598 /**
14599  * Register (RSL) gsern#_lane#_sata_phy_bcfg
14600  *
14601  * GSER Lane SATA Control Register
14602  * Control settings for SATA PHY functionality.
14603  */
14604 union bdk_gsernx_lanex_sata_phy_bcfg
14605 {
14606     uint64_t u;
14607     struct bdk_gsernx_lanex_sata_phy_bcfg_s
14608     {
14609 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
14610         uint64_t do_afeos_adpt         : 4;  /**< [ 63: 60](R/W) Set to one to allow the adaptation reset state machine to trigger AFEOS adaptation
14611                                                                  when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted and the SATA lane is
14612                                                                  operating at the corresponding rate. The individual bits are mapped as follows:
14613                                                                  \<0\> = SATA gen1.
14614                                                                  \<1\> = SATA gen2.
14615                                                                  \<2\> = SATA gen3.
14616                                                                  \<3\> = Reserved. */
14617         uint64_t do_ctlelte_adpt       : 4;  /**< [ 59: 56](R/W) Set to one to allow the adaptation reset state machine to trigger CTLELTE adaptation
14618                                                                  when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted and the SATA lane is
14619                                                                  operating at the corresponding rate. The individual bits are mapped as follows:
14620                                                                  \<0\> = SATA gen1.
14621                                                                  \<1\> = SATA gen2.
14622                                                                  \<2\> = SATA gen3.
14623                                                                  \<3\> = Reserved. */
14624         uint64_t do_ctlez_adpt         : 4;  /**< [ 55: 52](R/W) Set to one to allow the adaptation reset state machine to trigger CTLEZ adaptation
14625                                                                  when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted and the SATA lane is
14626                                                                  operating at the corresponding rate. The individual bits are mapped as follows:
14627                                                                  \<0\> = SATA gen1.
14628                                                                  \<1\> = SATA gen2.
14629                                                                  \<2\> = SATA gen3.
14630                                                                  \<3\> = Reserved. */
14631         uint64_t do_ctle_adpt          : 4;  /**< [ 51: 48](R/W) Set to one to allow the adaptation reset state machine to trigger CTLE adaptation
14632                                                                  when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted and the SATA lane is
14633                                                                  operating at the corresponding rate. The individual bits are mapped as follows:
14634                                                                  \<0\> = SATA gen1.
14635                                                                  \<1\> = SATA gen2.
14636                                                                  \<2\> = SATA gen3.
14637                                                                  \<3\> = Reserved. */
14638         uint64_t do_dfe_adpt           : 4;  /**< [ 47: 44](R/W) Set to one to allow the adaptation reset state machine to trigger DFE adaptation
14639                                                                  when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted and the SATA lane is
14640                                                                  operating at the corresponding rate. The individual bits are mapped as follows:
14641                                                                  \<0\> = SATA gen1.
14642                                                                  \<1\> = SATA gen2.
14643                                                                  \<2\> = SATA gen3.
14644                                                                  \<3\> = Reserved. */
14645         uint64_t do_vga_adpt           : 4;  /**< [ 43: 40](R/W) Set to one to allow the adaptation reset state machine to trigger VGA adaptation
14646                                                                  when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted and the SATA lane is
14647                                                                  operating at the corresponding rate. The individual bits are mapped as follows:
14648                                                                  \<0\> = SATA gen1.
14649                                                                  \<1\> = SATA gen2.
14650                                                                  \<2\> = SATA gen3.
14651                                                                  \<3\> = Reserved. */
14652         uint64_t do_blwc_adpt          : 4;  /**< [ 39: 36](R/W) Set to one to allow the adaptation reset state machine to trigger BLWC adaptation
14653                                                                  when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted and the SATA lane is
14654                                                                  operating at the corresponding rate. The individual bits are mapped as follows:
14655                                                                  \<0\> = SATA gen1.
14656                                                                  \<1\> = SATA gen2.
14657                                                                  \<2\> = SATA gen3.
14658                                                                  \<3\> = Reserved. */
14659         uint64_t do_prevga_gn_adpt     : 4;  /**< [ 35: 32](R/W) Set to one to allow the adaptation reset state machine to trigger PREVGA_GN adaptation
14660                                                                  when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted and the SATA lane is
14661                                                                  operating at the corresponding rate. The individual bits are mapped as follows:
14662                                                                  \<0\> = SATA gen1.
14663                                                                  \<1\> = SATA gen2.
14664                                                                  \<2\> = SATA gen3.
14665                                                                  \<3\> = Reserved. */
14666         uint64_t sata_dp_width_sel     : 4;  /**< [ 31: 28](R/W) Cleared to select a 20 bit and set to select a 40 bit Rx and Tx Data Path Width
14667                                                                  in the PCS Lite Layer.
14668                                                                  This value must only be changed while lite layer is in reset.
14669                                                                  \<0\> = SATA gen1 (default 40 bits).
14670                                                                  \<1\> = SATA gen2 (default 20 bits).
14671                                                                  \<2\> = SATA gen3 (default 20 bits).
14672                                                                  \<3\> = Reserved. */
14673         uint64_t reserved_26_27        : 2;
14674         uint64_t inhibit_power_change  : 1;  /**< [ 25: 25](R/W) Inhibit SATA power state changes in response to pX_partial, pX_slumber and
14675                                                                  pX_phy_devslp inputs. */
14676         uint64_t frc_unalgn_rxelecidle : 1;  /**< [ 24: 24](R/W) Enables use of negated pX_sig_det to force the RX PHY into unalign state. */
14677         uint64_t sata_bitstuff_tx_en   : 4;  /**< [ 23: 20](R/W) Set to duplicate the first 20 bits of TX data before
14678                                                                  alignment & ordering for lower data rates. This could be PCS TX
14679                                                                  data, PRBS data, or shallow-loopback RX data depending on mode.
14680                                                                  This value must only be changed while lite layer is in reset.
14681                                                                  \<0\> = SATA gen1.
14682                                                                  \<1\> = SATA gen2.
14683                                                                  \<2\> = SATA gen3.
14684                                                                  \<3\> = Reserved. */
14685         uint64_t sata_bitstuff_rx_drop_even : 4;/**< [ 19: 16](R/W) Tells the PCS lite receive datapath to drop even bits
14686                                                                  in the vector of received data from the PMA when [SATA_BITSTUFF_RX_EN] is
14687                                                                  set:
14688                                                                    0 = Drop bits 1, 3, 5, 7, ...
14689                                                                    1 = Drop bits 0, 2, 4, 6, ...
14690 
14691                                                                  This bit is also used in the eye monitor to mask out the dropped
14692                                                                  bits when counting mismatches.
14693                                                                  This value must only be changed while lite layer is in reset.
14694                                                                  \<0\> = SATA gen1.
14695                                                                  \<1\> = SATA gen2.
14696                                                                  \<2\> = SATA gen3.
14697                                                                  \<3\> = Reserved. */
14698         uint64_t sata_bitstuff_rx_en   : 4;  /**< [ 15: 12](R/W) Set to expect duplicates on the PMA RX data and drop bits after
14699                                                                  alignment & ordering for PCS layer to consume. The drop ordering is
14700                                                                  determined by [SATA_BITSTUFF_RX_DROP_EVEN]. This value must only be changed
14701                                                                  while lite layer is in reset.
14702                                                                  \<0\> = SATA gen1.
14703                                                                  \<1\> = SATA gen2.
14704                                                                  \<2\> = SATA gen3.
14705                                                                  \<3\> = Reserved. */
14706         uint64_t rx_squelch_on_idle    : 1;  /**< [ 11: 11](R/W) Receive data squelch on idle.  When idle detection is signaled
14707                                                                  to the SATA control with the negation of phy_sig_det, the parallel
14708                                                                  receive data will be set to all 0's regardless of the output of the
14709                                                                  CDR. */
14710         uint64_t comma_thr             : 7;  /**< [ 10:  4](R/W) COMMA detection threshold. The receive aligner must see this many
14711                                                                  COMMA characters at the same rotation before declaring symbol
14712                                                                  alignment. */
14713         uint64_t error_thr             : 4;  /**< [  3:  0](R/W) Error threshold. The receive aligner must see this many COMMA
14714                                                                  characters at a different rotation than currently in use before
14715                                                                  declaring loss of symbol alignment. */
14716 #else /* Word 0 - Little Endian */
14717         uint64_t error_thr             : 4;  /**< [  3:  0](R/W) Error threshold. The receive aligner must see this many COMMA
14718                                                                  characters at a different rotation than currently in use before
14719                                                                  declaring loss of symbol alignment. */
14720         uint64_t comma_thr             : 7;  /**< [ 10:  4](R/W) COMMA detection threshold. The receive aligner must see this many
14721                                                                  COMMA characters at the same rotation before declaring symbol
14722                                                                  alignment. */
14723         uint64_t rx_squelch_on_idle    : 1;  /**< [ 11: 11](R/W) Receive data squelch on idle.  When idle detection is signaled
14724                                                                  to the SATA control with the negation of phy_sig_det, the parallel
14725                                                                  receive data will be set to all 0's regardless of the output of the
14726                                                                  CDR. */
14727         uint64_t sata_bitstuff_rx_en   : 4;  /**< [ 15: 12](R/W) Set to expect duplicates on the PMA RX data and drop bits after
14728                                                                  alignment & ordering for PCS layer to consume. The drop ordering is
14729                                                                  determined by [SATA_BITSTUFF_RX_DROP_EVEN]. This value must only be changed
14730                                                                  while lite layer is in reset.
14731                                                                  \<0\> = SATA gen1.
14732                                                                  \<1\> = SATA gen2.
14733                                                                  \<2\> = SATA gen3.
14734                                                                  \<3\> = Reserved. */
14735         uint64_t sata_bitstuff_rx_drop_even : 4;/**< [ 19: 16](R/W) Tells the PCS lite receive datapath to drop even bits
14736                                                                  in the vector of received data from the PMA when [SATA_BITSTUFF_RX_EN] is
14737                                                                  set:
14738                                                                    0 = Drop bits 1, 3, 5, 7, ...
14739                                                                    1 = Drop bits 0, 2, 4, 6, ...
14740 
14741                                                                  This bit is also used in the eye monitor to mask out the dropped
14742                                                                  bits when counting mismatches.
14743                                                                  This value must only be changed while lite layer is in reset.
14744                                                                  \<0\> = SATA gen1.
14745                                                                  \<1\> = SATA gen2.
14746                                                                  \<2\> = SATA gen3.
14747                                                                  \<3\> = Reserved. */
14748         uint64_t sata_bitstuff_tx_en   : 4;  /**< [ 23: 20](R/W) Set to duplicate the first 20 bits of TX data before
14749                                                                  alignment & ordering for lower data rates. This could be PCS TX
14750                                                                  data, PRBS data, or shallow-loopback RX data depending on mode.
14751                                                                  This value must only be changed while lite layer is in reset.
14752                                                                  \<0\> = SATA gen1.
14753                                                                  \<1\> = SATA gen2.
14754                                                                  \<2\> = SATA gen3.
14755                                                                  \<3\> = Reserved. */
14756         uint64_t frc_unalgn_rxelecidle : 1;  /**< [ 24: 24](R/W) Enables use of negated pX_sig_det to force the RX PHY into unalign state. */
14757         uint64_t inhibit_power_change  : 1;  /**< [ 25: 25](R/W) Inhibit SATA power state changes in response to pX_partial, pX_slumber and
14758                                                                  pX_phy_devslp inputs. */
14759         uint64_t reserved_26_27        : 2;
14760         uint64_t sata_dp_width_sel     : 4;  /**< [ 31: 28](R/W) Cleared to select a 20 bit and set to select a 40 bit Rx and Tx Data Path Width
14761                                                                  in the PCS Lite Layer.
14762                                                                  This value must only be changed while lite layer is in reset.
14763                                                                  \<0\> = SATA gen1 (default 40 bits).
14764                                                                  \<1\> = SATA gen2 (default 20 bits).
14765                                                                  \<2\> = SATA gen3 (default 20 bits).
14766                                                                  \<3\> = Reserved. */
14767         uint64_t do_prevga_gn_adpt     : 4;  /**< [ 35: 32](R/W) Set to one to allow the adaptation reset state machine to trigger PREVGA_GN adaptation
14768                                                                  when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted and the SATA lane is
14769                                                                  operating at the corresponding rate. The individual bits are mapped as follows:
14770                                                                  \<0\> = SATA gen1.
14771                                                                  \<1\> = SATA gen2.
14772                                                                  \<2\> = SATA gen3.
14773                                                                  \<3\> = Reserved. */
14774         uint64_t do_blwc_adpt          : 4;  /**< [ 39: 36](R/W) Set to one to allow the adaptation reset state machine to trigger BLWC adaptation
14775                                                                  when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted and the SATA lane is
14776                                                                  operating at the corresponding rate. The individual bits are mapped as follows:
14777                                                                  \<0\> = SATA gen1.
14778                                                                  \<1\> = SATA gen2.
14779                                                                  \<2\> = SATA gen3.
14780                                                                  \<3\> = Reserved. */
14781         uint64_t do_vga_adpt           : 4;  /**< [ 43: 40](R/W) Set to one to allow the adaptation reset state machine to trigger VGA adaptation
14782                                                                  when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted and the SATA lane is
14783                                                                  operating at the corresponding rate. The individual bits are mapped as follows:
14784                                                                  \<0\> = SATA gen1.
14785                                                                  \<1\> = SATA gen2.
14786                                                                  \<2\> = SATA gen3.
14787                                                                  \<3\> = Reserved. */
14788         uint64_t do_dfe_adpt           : 4;  /**< [ 47: 44](R/W) Set to one to allow the adaptation reset state machine to trigger DFE adaptation
14789                                                                  when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted and the SATA lane is
14790                                                                  operating at the corresponding rate. The individual bits are mapped as follows:
14791                                                                  \<0\> = SATA gen1.
14792                                                                  \<1\> = SATA gen2.
14793                                                                  \<2\> = SATA gen3.
14794                                                                  \<3\> = Reserved. */
14795         uint64_t do_ctle_adpt          : 4;  /**< [ 51: 48](R/W) Set to one to allow the adaptation reset state machine to trigger CTLE adaptation
14796                                                                  when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted and the SATA lane is
14797                                                                  operating at the corresponding rate. The individual bits are mapped as follows:
14798                                                                  \<0\> = SATA gen1.
14799                                                                  \<1\> = SATA gen2.
14800                                                                  \<2\> = SATA gen3.
14801                                                                  \<3\> = Reserved. */
14802         uint64_t do_ctlez_adpt         : 4;  /**< [ 55: 52](R/W) Set to one to allow the adaptation reset state machine to trigger CTLEZ adaptation
14803                                                                  when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted and the SATA lane is
14804                                                                  operating at the corresponding rate. The individual bits are mapped as follows:
14805                                                                  \<0\> = SATA gen1.
14806                                                                  \<1\> = SATA gen2.
14807                                                                  \<2\> = SATA gen3.
14808                                                                  \<3\> = Reserved. */
14809         uint64_t do_ctlelte_adpt       : 4;  /**< [ 59: 56](R/W) Set to one to allow the adaptation reset state machine to trigger CTLELTE adaptation
14810                                                                  when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted and the SATA lane is
14811                                                                  operating at the corresponding rate. The individual bits are mapped as follows:
14812                                                                  \<0\> = SATA gen1.
14813                                                                  \<1\> = SATA gen2.
14814                                                                  \<2\> = SATA gen3.
14815                                                                  \<3\> = Reserved. */
14816         uint64_t do_afeos_adpt         : 4;  /**< [ 63: 60](R/W) Set to one to allow the adaptation reset state machine to trigger AFEOS adaptation
14817                                                                  when GSERN()_LANE()_RST2_BCFG[RST_ADPT_RST_SM] is deasserted and the SATA lane is
14818                                                                  operating at the corresponding rate. The individual bits are mapped as follows:
14819                                                                  \<0\> = SATA gen1.
14820                                                                  \<1\> = SATA gen2.
14821                                                                  \<2\> = SATA gen3.
14822                                                                  \<3\> = Reserved. */
14823 #endif /* Word 0 - End */
14824     } s;
14825     /* struct bdk_gsernx_lanex_sata_phy_bcfg_s cn; */
14826 };
14827 typedef union bdk_gsernx_lanex_sata_phy_bcfg bdk_gsernx_lanex_sata_phy_bcfg_t;
14828 
14829 static inline uint64_t BDK_GSERNX_LANEX_SATA_PHY_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_SATA_PHY_BCFG(unsigned long a,unsigned long b)14830 static inline uint64_t BDK_GSERNX_LANEX_SATA_PHY_BCFG(unsigned long a, unsigned long b)
14831 {
14832     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
14833         return 0x87e090002b30ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
14834     __bdk_csr_fatal("GSERNX_LANEX_SATA_PHY_BCFG", 2, a, b, 0, 0);
14835 }
14836 
14837 #define typedef_BDK_GSERNX_LANEX_SATA_PHY_BCFG(a,b) bdk_gsernx_lanex_sata_phy_bcfg_t
14838 #define bustype_BDK_GSERNX_LANEX_SATA_PHY_BCFG(a,b) BDK_CSR_TYPE_RSL
14839 #define basename_BDK_GSERNX_LANEX_SATA_PHY_BCFG(a,b) "GSERNX_LANEX_SATA_PHY_BCFG"
14840 #define device_bar_BDK_GSERNX_LANEX_SATA_PHY_BCFG(a,b) 0x0 /* PF_BAR0 */
14841 #define busnum_BDK_GSERNX_LANEX_SATA_PHY_BCFG(a,b) (a)
14842 #define arguments_BDK_GSERNX_LANEX_SATA_PHY_BCFG(a,b) (a),(b),-1,-1
14843 
14844 /**
14845  * Register (RSL) gsern#_lane#_sata_phy_bsts
14846  *
14847  * GSER Lane SATA PCS Status Register
14848  * Error Status for SATA PHY functionality.
14849  */
14850 union bdk_gsernx_lanex_sata_phy_bsts
14851 {
14852     uint64_t u;
14853     struct bdk_gsernx_lanex_sata_phy_bsts_s
14854     {
14855 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
14856         uint64_t reserved_1_63         : 63;
14857         uint64_t align_error           : 1;  /**< [  0:  0](R/W1C/H) Alignment error.
14858                                                                  The receive 8B10B aligner has detected an error. An error is
14859                                                                  declared if GSERN()_LANE()_SATA_PHY_BCFG[ERROR_THR]
14860                                                                  COMMA characters are detected at a 10 bit rotation that does not match
14861                                                                  the active rotation. The COMMAs do not have to all be at the same rotation. */
14862 #else /* Word 0 - Little Endian */
14863         uint64_t align_error           : 1;  /**< [  0:  0](R/W1C/H) Alignment error.
14864                                                                  The receive 8B10B aligner has detected an error. An error is
14865                                                                  declared if GSERN()_LANE()_SATA_PHY_BCFG[ERROR_THR]
14866                                                                  COMMA characters are detected at a 10 bit rotation that does not match
14867                                                                  the active rotation. The COMMAs do not have to all be at the same rotation. */
14868         uint64_t reserved_1_63         : 63;
14869 #endif /* Word 0 - End */
14870     } s;
14871     /* struct bdk_gsernx_lanex_sata_phy_bsts_s cn; */
14872 };
14873 typedef union bdk_gsernx_lanex_sata_phy_bsts bdk_gsernx_lanex_sata_phy_bsts_t;
14874 
14875 static inline uint64_t BDK_GSERNX_LANEX_SATA_PHY_BSTS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_SATA_PHY_BSTS(unsigned long a,unsigned long b)14876 static inline uint64_t BDK_GSERNX_LANEX_SATA_PHY_BSTS(unsigned long a, unsigned long b)
14877 {
14878     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
14879         return 0x87e090002fb0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
14880     __bdk_csr_fatal("GSERNX_LANEX_SATA_PHY_BSTS", 2, a, b, 0, 0);
14881 }
14882 
14883 #define typedef_BDK_GSERNX_LANEX_SATA_PHY_BSTS(a,b) bdk_gsernx_lanex_sata_phy_bsts_t
14884 #define bustype_BDK_GSERNX_LANEX_SATA_PHY_BSTS(a,b) BDK_CSR_TYPE_RSL
14885 #define basename_BDK_GSERNX_LANEX_SATA_PHY_BSTS(a,b) "GSERNX_LANEX_SATA_PHY_BSTS"
14886 #define device_bar_BDK_GSERNX_LANEX_SATA_PHY_BSTS(a,b) 0x0 /* PF_BAR0 */
14887 #define busnum_BDK_GSERNX_LANEX_SATA_PHY_BSTS(a,b) (a)
14888 #define arguments_BDK_GSERNX_LANEX_SATA_PHY_BSTS(a,b) (a),(b),-1,-1
14889 
14890 /**
14891  * Register (RSL) gsern#_lane#_sata_rxeq1_1_bcfg
14892  *
14893  * GSER Lane SATA Gen1 RX Equalizer Control Register 1
14894  * Parameters controlling the custom receiver equalization during SATA gen1 operation.
14895  * These fields will drive the associated control signal when
14896  * GSERN()_LANE()_SRCMX_BCFG[TX_CTRL_SEL]
14897  * is set to 'SATA'.
14898  */
14899 union bdk_gsernx_lanex_sata_rxeq1_1_bcfg
14900 {
14901     uint64_t u;
14902     struct bdk_gsernx_lanex_sata_rxeq1_1_bcfg_s
14903     {
14904 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
14905         uint64_t reserved_61_63        : 3;
14906         uint64_t sata_g1_blwc_deadband : 12; /**< [ 60: 49](R/W) BLWC adaptation deadband settings.
14907                                                                  12-bit field to match accumulator, but typically a value less than 0x0FF is used. */
14908         uint64_t sata_g1_en_qac_e      : 1;  /**< [ 48: 48](R/W) Enable use of QAC digital filter in the doute datapath. If the
14909                                                                  enable is deasserted, the filter will output the [QAC_REFSET]
14910                                                                  value. If its asserted, it will determine the current phase and use
14911                                                                  [QAC_REFSET] & [QAC_CNTSET] to output a correction value. Set prior to
14912                                                                  exiting reset. */
14913         uint64_t sata_g1_en_qac_q      : 1;  /**< [ 47: 47](R/W) Enable use of QAC digital filter in the doutq datapath. If the
14914                                                                  enable is deasserted, the filter will output the [QAC_REFSET]
14915                                                                  value. If its asserted, it will determine the current phase and use
14916                                                                  [QAC_REFSET] & [QAC_CNTSET] to output a correction value. Set prior to
14917                                                                  exiting reset. */
14918         uint64_t sata_g1_cdr_qac_selq  : 1;  /**< [ 46: 46](R/W) Enable use of the QAC corrector for the q-path when the reset state
14919                                                                  machine timing allows it. */
14920         uint64_t sata_g1_cdr_qac_sele  : 1;  /**< [ 45: 45](R/W) Enable use of the QAC corrector for the e-path when the reset state
14921                                                                  machine timing allows it. */
14922         uint64_t sata_g1_eoffs         : 7;  /**< [ 44: 38](R/W) E interp state offset. */
14923         uint64_t sata_g1_qoffs         : 7;  /**< [ 37: 31](R/W) Q interp state offset. */
14924         uint64_t sata_g1_inc2          : 6;  /**< [ 30: 25](R/W) 2nd order loop inc. */
14925         uint64_t sata_g1_inc1          : 6;  /**< [ 24: 19](R/W) 1st order loop inc. */
14926         uint64_t sata_g1_erc           : 4;  /**< [ 18: 15](R/W) Interpolator edge-rate control. This control is shared between all
14927                                                                  interpolators in the lane. */
14928         uint64_t sata_g1_rx_dcc_lowf   : 1;  /**< [ 14: 14](R/W) Set to put the RX duty-cycle corrector (DCC) into low frequency mode. Set to 1
14929                                                                  when operating at data rates below 4 Gbaud. */
14930         uint64_t sata_g1_ctle_lte_zero_ovrd_en : 1;/**< [ 13: 13](R/W) CTLE LTE zero frequency override enable.
14931                                                                  By default, the override should be enabled; otherwise, CTLE_LTE_ZERO
14932                                                                  will be set equal to CTLE_ZERO within the RX adaptation FSM. */
14933         uint64_t sata_g1_ctle_lte_zero_ovrd : 4;/**< [ 12:  9](R/W) CTLE LTE zero frequency override value. */
14934         uint64_t reserved_0_8          : 9;
14935 #else /* Word 0 - Little Endian */
14936         uint64_t reserved_0_8          : 9;
14937         uint64_t sata_g1_ctle_lte_zero_ovrd : 4;/**< [ 12:  9](R/W) CTLE LTE zero frequency override value. */
14938         uint64_t sata_g1_ctle_lte_zero_ovrd_en : 1;/**< [ 13: 13](R/W) CTLE LTE zero frequency override enable.
14939                                                                  By default, the override should be enabled; otherwise, CTLE_LTE_ZERO
14940                                                                  will be set equal to CTLE_ZERO within the RX adaptation FSM. */
14941         uint64_t sata_g1_rx_dcc_lowf   : 1;  /**< [ 14: 14](R/W) Set to put the RX duty-cycle corrector (DCC) into low frequency mode. Set to 1
14942                                                                  when operating at data rates below 4 Gbaud. */
14943         uint64_t sata_g1_erc           : 4;  /**< [ 18: 15](R/W) Interpolator edge-rate control. This control is shared between all
14944                                                                  interpolators in the lane. */
14945         uint64_t sata_g1_inc1          : 6;  /**< [ 24: 19](R/W) 1st order loop inc. */
14946         uint64_t sata_g1_inc2          : 6;  /**< [ 30: 25](R/W) 2nd order loop inc. */
14947         uint64_t sata_g1_qoffs         : 7;  /**< [ 37: 31](R/W) Q interp state offset. */
14948         uint64_t sata_g1_eoffs         : 7;  /**< [ 44: 38](R/W) E interp state offset. */
14949         uint64_t sata_g1_cdr_qac_sele  : 1;  /**< [ 45: 45](R/W) Enable use of the QAC corrector for the e-path when the reset state
14950                                                                  machine timing allows it. */
14951         uint64_t sata_g1_cdr_qac_selq  : 1;  /**< [ 46: 46](R/W) Enable use of the QAC corrector for the q-path when the reset state
14952                                                                  machine timing allows it. */
14953         uint64_t sata_g1_en_qac_q      : 1;  /**< [ 47: 47](R/W) Enable use of QAC digital filter in the doutq datapath. If the
14954                                                                  enable is deasserted, the filter will output the [QAC_REFSET]
14955                                                                  value. If its asserted, it will determine the current phase and use
14956                                                                  [QAC_REFSET] & [QAC_CNTSET] to output a correction value. Set prior to
14957                                                                  exiting reset. */
14958         uint64_t sata_g1_en_qac_e      : 1;  /**< [ 48: 48](R/W) Enable use of QAC digital filter in the doute datapath. If the
14959                                                                  enable is deasserted, the filter will output the [QAC_REFSET]
14960                                                                  value. If its asserted, it will determine the current phase and use
14961                                                                  [QAC_REFSET] & [QAC_CNTSET] to output a correction value. Set prior to
14962                                                                  exiting reset. */
14963         uint64_t sata_g1_blwc_deadband : 12; /**< [ 60: 49](R/W) BLWC adaptation deadband settings.
14964                                                                  12-bit field to match accumulator, but typically a value less than 0x0FF is used. */
14965         uint64_t reserved_61_63        : 3;
14966 #endif /* Word 0 - End */
14967     } s;
14968     /* struct bdk_gsernx_lanex_sata_rxeq1_1_bcfg_s cn; */
14969 };
14970 typedef union bdk_gsernx_lanex_sata_rxeq1_1_bcfg bdk_gsernx_lanex_sata_rxeq1_1_bcfg_t;
14971 
14972 static inline uint64_t BDK_GSERNX_LANEX_SATA_RXEQ1_1_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_SATA_RXEQ1_1_BCFG(unsigned long a,unsigned long b)14973 static inline uint64_t BDK_GSERNX_LANEX_SATA_RXEQ1_1_BCFG(unsigned long a, unsigned long b)
14974 {
14975     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
14976         return 0x87e090002e00ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
14977     __bdk_csr_fatal("GSERNX_LANEX_SATA_RXEQ1_1_BCFG", 2, a, b, 0, 0);
14978 }
14979 
14980 #define typedef_BDK_GSERNX_LANEX_SATA_RXEQ1_1_BCFG(a,b) bdk_gsernx_lanex_sata_rxeq1_1_bcfg_t
14981 #define bustype_BDK_GSERNX_LANEX_SATA_RXEQ1_1_BCFG(a,b) BDK_CSR_TYPE_RSL
14982 #define basename_BDK_GSERNX_LANEX_SATA_RXEQ1_1_BCFG(a,b) "GSERNX_LANEX_SATA_RXEQ1_1_BCFG"
14983 #define device_bar_BDK_GSERNX_LANEX_SATA_RXEQ1_1_BCFG(a,b) 0x0 /* PF_BAR0 */
14984 #define busnum_BDK_GSERNX_LANEX_SATA_RXEQ1_1_BCFG(a,b) (a)
14985 #define arguments_BDK_GSERNX_LANEX_SATA_RXEQ1_1_BCFG(a,b) (a),(b),-1,-1
14986 
14987 /**
14988  * Register (RSL) gsern#_lane#_sata_rxeq1_2_bcfg
14989  *
14990  * GSER Lane SATA Gen1 RX Equalizer Control Register 2
14991  * Parameters controlling the custom receiver equalization during SATA gen1 operation.
14992  * These fields will drive the associated control signal when
14993  * GSERN()_LANE()_SRCMX_BCFG[TX_CTRL_SEL]
14994  * is set to 'SATA'.
14995  */
14996 union bdk_gsernx_lanex_sata_rxeq1_2_bcfg
14997 {
14998     uint64_t u;
14999     struct bdk_gsernx_lanex_sata_rxeq1_2_bcfg_s
15000     {
15001 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
15002         uint64_t sata_g1_prevga_gn_subrate_fin : 16;/**< [ 63: 48](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
15003                                                                  if subrate gearshifting is enabled.
15004                                                                  Set SUBRATE_INIT = SUBRATE_FIN if subrate gearshifting is not enabled. */
15005         uint64_t sata_g1_prevga_gn_subrate_init : 16;/**< [ 47: 32](R/W) Subrate counter initial value. Sets the starting value for the LMS update
15006                                                                  interval, if subrate gearshifting is enabled.
15007                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
15008         uint64_t sata_g1_blwc_subrate_init : 16;/**< [ 31: 16](R/W) Subrate counter initial value. Sets the initial value for the LMS update interval, if
15009                                                                  subrate gearshifting is enabled.
15010                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
15011         uint64_t sata_g1_blwc_subrate_final : 16;/**< [ 15:  0](R/W) Subrate counter final value. Sets the ending value for the LMS update interval, if subrate
15012                                                                  gearshifting is enabled.
15013                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled.
15014                                                                  Subrate counter final value. */
15015 #else /* Word 0 - Little Endian */
15016         uint64_t sata_g1_blwc_subrate_final : 16;/**< [ 15:  0](R/W) Subrate counter final value. Sets the ending value for the LMS update interval, if subrate
15017                                                                  gearshifting is enabled.
15018                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled.
15019                                                                  Subrate counter final value. */
15020         uint64_t sata_g1_blwc_subrate_init : 16;/**< [ 31: 16](R/W) Subrate counter initial value. Sets the initial value for the LMS update interval, if
15021                                                                  subrate gearshifting is enabled.
15022                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
15023         uint64_t sata_g1_prevga_gn_subrate_init : 16;/**< [ 47: 32](R/W) Subrate counter initial value. Sets the starting value for the LMS update
15024                                                                  interval, if subrate gearshifting is enabled.
15025                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
15026         uint64_t sata_g1_prevga_gn_subrate_fin : 16;/**< [ 63: 48](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
15027                                                                  if subrate gearshifting is enabled.
15028                                                                  Set SUBRATE_INIT = SUBRATE_FIN if subrate gearshifting is not enabled. */
15029 #endif /* Word 0 - End */
15030     } s;
15031     /* struct bdk_gsernx_lanex_sata_rxeq1_2_bcfg_s cn; */
15032 };
15033 typedef union bdk_gsernx_lanex_sata_rxeq1_2_bcfg bdk_gsernx_lanex_sata_rxeq1_2_bcfg_t;
15034 
15035 static inline uint64_t BDK_GSERNX_LANEX_SATA_RXEQ1_2_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_SATA_RXEQ1_2_BCFG(unsigned long a,unsigned long b)15036 static inline uint64_t BDK_GSERNX_LANEX_SATA_RXEQ1_2_BCFG(unsigned long a, unsigned long b)
15037 {
15038     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
15039         return 0x87e090002e10ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
15040     __bdk_csr_fatal("GSERNX_LANEX_SATA_RXEQ1_2_BCFG", 2, a, b, 0, 0);
15041 }
15042 
15043 #define typedef_BDK_GSERNX_LANEX_SATA_RXEQ1_2_BCFG(a,b) bdk_gsernx_lanex_sata_rxeq1_2_bcfg_t
15044 #define bustype_BDK_GSERNX_LANEX_SATA_RXEQ1_2_BCFG(a,b) BDK_CSR_TYPE_RSL
15045 #define basename_BDK_GSERNX_LANEX_SATA_RXEQ1_2_BCFG(a,b) "GSERNX_LANEX_SATA_RXEQ1_2_BCFG"
15046 #define device_bar_BDK_GSERNX_LANEX_SATA_RXEQ1_2_BCFG(a,b) 0x0 /* PF_BAR0 */
15047 #define busnum_BDK_GSERNX_LANEX_SATA_RXEQ1_2_BCFG(a,b) (a)
15048 #define arguments_BDK_GSERNX_LANEX_SATA_RXEQ1_2_BCFG(a,b) (a),(b),-1,-1
15049 
15050 /**
15051  * Register (RSL) gsern#_lane#_sata_rxeq1_3_bcfg
15052  *
15053  * GSER Lane SATA Gen1 RX Equalizer Control Register 3
15054  * Parameters controlling the custom receiver equalization during SATA Gen1 operation.
15055  * These fields will drive the associated control signal when
15056  * GSERN()_LANE()_SRCMX_BCFG[TX_CTRL_SEL]
15057  * is set to 'SATA'.
15058  */
15059 union bdk_gsernx_lanex_sata_rxeq1_3_bcfg
15060 {
15061     uint64_t u;
15062     struct bdk_gsernx_lanex_sata_rxeq1_3_bcfg_s
15063     {
15064 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
15065         uint64_t sata_g1_afeos_subrate_final : 16;/**< [ 63: 48](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
15066                                                                  if subrate gearshifting is enabled.
15067                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
15068         uint64_t sata_g1_afeos_subrate_init : 16;/**< [ 47: 32](R/W) Subrate counter initial value. Sets the starting value for the LMS update
15069                                                                  interval, if subrate gearshifting is enabled.
15070                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
15071         uint64_t sata_g1_subrate_final : 16; /**< [ 31: 16](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
15072                                                                  if subrate gearshifting is enabled.
15073                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
15074         uint64_t sata_g1_subrate_init  : 16; /**< [ 15:  0](R/W) Subrate counter initial value. Sets the starting value for the LMS update
15075                                                                  interval, if subrate gearshifting is enabled.
15076                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
15077 #else /* Word 0 - Little Endian */
15078         uint64_t sata_g1_subrate_init  : 16; /**< [ 15:  0](R/W) Subrate counter initial value. Sets the starting value for the LMS update
15079                                                                  interval, if subrate gearshifting is enabled.
15080                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
15081         uint64_t sata_g1_subrate_final : 16; /**< [ 31: 16](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
15082                                                                  if subrate gearshifting is enabled.
15083                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
15084         uint64_t sata_g1_afeos_subrate_init : 16;/**< [ 47: 32](R/W) Subrate counter initial value. Sets the starting value for the LMS update
15085                                                                  interval, if subrate gearshifting is enabled.
15086                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
15087         uint64_t sata_g1_afeos_subrate_final : 16;/**< [ 63: 48](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
15088                                                                  if subrate gearshifting is enabled.
15089                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
15090 #endif /* Word 0 - End */
15091     } s;
15092     /* struct bdk_gsernx_lanex_sata_rxeq1_3_bcfg_s cn; */
15093 };
15094 typedef union bdk_gsernx_lanex_sata_rxeq1_3_bcfg bdk_gsernx_lanex_sata_rxeq1_3_bcfg_t;
15095 
15096 static inline uint64_t BDK_GSERNX_LANEX_SATA_RXEQ1_3_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_SATA_RXEQ1_3_BCFG(unsigned long a,unsigned long b)15097 static inline uint64_t BDK_GSERNX_LANEX_SATA_RXEQ1_3_BCFG(unsigned long a, unsigned long b)
15098 {
15099     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
15100         return 0x87e090002e20ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
15101     __bdk_csr_fatal("GSERNX_LANEX_SATA_RXEQ1_3_BCFG", 2, a, b, 0, 0);
15102 }
15103 
15104 #define typedef_BDK_GSERNX_LANEX_SATA_RXEQ1_3_BCFG(a,b) bdk_gsernx_lanex_sata_rxeq1_3_bcfg_t
15105 #define bustype_BDK_GSERNX_LANEX_SATA_RXEQ1_3_BCFG(a,b) BDK_CSR_TYPE_RSL
15106 #define basename_BDK_GSERNX_LANEX_SATA_RXEQ1_3_BCFG(a,b) "GSERNX_LANEX_SATA_RXEQ1_3_BCFG"
15107 #define device_bar_BDK_GSERNX_LANEX_SATA_RXEQ1_3_BCFG(a,b) 0x0 /* PF_BAR0 */
15108 #define busnum_BDK_GSERNX_LANEX_SATA_RXEQ1_3_BCFG(a,b) (a)
15109 #define arguments_BDK_GSERNX_LANEX_SATA_RXEQ1_3_BCFG(a,b) (a),(b),-1,-1
15110 
15111 /**
15112  * Register (RSL) gsern#_lane#_sata_rxeq2_1_bcfg
15113  *
15114  * GSER Lane SATA Gen2 RX Equalizer Control Register 1
15115  * Parameters controlling the custom receiver equalization during SATA gen2 operation.
15116  * These fields will drive the associated control signal when
15117  * GSERN()_LANE()_SRCMX_BCFG[TX_CTRL_SEL]
15118  * is set to 'SATA'.
15119  */
15120 union bdk_gsernx_lanex_sata_rxeq2_1_bcfg
15121 {
15122     uint64_t u;
15123     struct bdk_gsernx_lanex_sata_rxeq2_1_bcfg_s
15124     {
15125 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
15126         uint64_t reserved_61_63        : 3;
15127         uint64_t sata_g2_blwc_deadband : 12; /**< [ 60: 49](R/W) BLWC adaptation deadband settings.
15128                                                                  12-bit field to match accumulator, but typically a value less than 0x0FF is used. */
15129         uint64_t sata_g2_en_qac_e      : 1;  /**< [ 48: 48](R/W) Enable use of QAC digital filter in the doute datapath. If the
15130                                                                  enable is deasserted, the filter will output the [QAC_REFSET]
15131                                                                  value. If its asserted, it will determine the current phase and use
15132                                                                  [QAC_REFSET] & [QAC_CNTSET] to output a correction value. Set prior to
15133                                                                  exiting reset. */
15134         uint64_t sata_g2_en_qac_q      : 1;  /**< [ 47: 47](R/W) Enable use of QAC digital filter in the doutq datapath. If the
15135                                                                  enable is deasserted, the filter will output the [QAC_REFSET]
15136                                                                  value. If its asserted, it will determine the current phase and use
15137                                                                  [QAC_REFSET] & [QAC_CNTSET] to output a correction value. Set prior to
15138                                                                  exiting reset. */
15139         uint64_t sata_g2_cdr_qac_selq  : 1;  /**< [ 46: 46](R/W) Enable use of the QAC corrector for the q-path when the reset state
15140                                                                  machine timing allows it. */
15141         uint64_t sata_g2_cdr_qac_sele  : 1;  /**< [ 45: 45](R/W) Enable use of the QAC corrector for the e-path when the reset state
15142                                                                  machine timing allows it. */
15143         uint64_t sata_g2_eoffs         : 7;  /**< [ 44: 38](R/W) E interp state offset. */
15144         uint64_t sata_g2_qoffs         : 7;  /**< [ 37: 31](R/W) Q interp state offset. */
15145         uint64_t sata_g2_inc2          : 6;  /**< [ 30: 25](R/W) 2nd order loop inc. */
15146         uint64_t sata_g2_inc1          : 6;  /**< [ 24: 19](R/W) 1st order loop inc. */
15147         uint64_t sata_g2_erc           : 4;  /**< [ 18: 15](R/W) Interpolator edge-rate control. This control is shared between all
15148                                                                  interpolators in the lane. */
15149         uint64_t sata_g2_rx_dcc_lowf   : 1;  /**< [ 14: 14](R/W) Set to put the RX duty-cycle corrector (DCC) into low frequency mode. Set to 1
15150                                                                  when operating at data rates below 4 Gbaud. */
15151         uint64_t sata_g2_ctle_lte_zero_ovrd_en : 1;/**< [ 13: 13](R/W) CTLE LTE zero frequency override enable.
15152                                                                  By default, the override should be enabled; otherwise, CTLE_LTE_ZERO
15153                                                                  will be set equal to CTLE_ZERO within the RX adaptation FSM. */
15154         uint64_t sata_g2_ctle_lte_zero_ovrd : 4;/**< [ 12:  9](R/W) CTLE LTE zero frequency override value. */
15155         uint64_t reserved_0_8          : 9;
15156 #else /* Word 0 - Little Endian */
15157         uint64_t reserved_0_8          : 9;
15158         uint64_t sata_g2_ctle_lte_zero_ovrd : 4;/**< [ 12:  9](R/W) CTLE LTE zero frequency override value. */
15159         uint64_t sata_g2_ctle_lte_zero_ovrd_en : 1;/**< [ 13: 13](R/W) CTLE LTE zero frequency override enable.
15160                                                                  By default, the override should be enabled; otherwise, CTLE_LTE_ZERO
15161                                                                  will be set equal to CTLE_ZERO within the RX adaptation FSM. */
15162         uint64_t sata_g2_rx_dcc_lowf   : 1;  /**< [ 14: 14](R/W) Set to put the RX duty-cycle corrector (DCC) into low frequency mode. Set to 1
15163                                                                  when operating at data rates below 4 Gbaud. */
15164         uint64_t sata_g2_erc           : 4;  /**< [ 18: 15](R/W) Interpolator edge-rate control. This control is shared between all
15165                                                                  interpolators in the lane. */
15166         uint64_t sata_g2_inc1          : 6;  /**< [ 24: 19](R/W) 1st order loop inc. */
15167         uint64_t sata_g2_inc2          : 6;  /**< [ 30: 25](R/W) 2nd order loop inc. */
15168         uint64_t sata_g2_qoffs         : 7;  /**< [ 37: 31](R/W) Q interp state offset. */
15169         uint64_t sata_g2_eoffs         : 7;  /**< [ 44: 38](R/W) E interp state offset. */
15170         uint64_t sata_g2_cdr_qac_sele  : 1;  /**< [ 45: 45](R/W) Enable use of the QAC corrector for the e-path when the reset state
15171                                                                  machine timing allows it. */
15172         uint64_t sata_g2_cdr_qac_selq  : 1;  /**< [ 46: 46](R/W) Enable use of the QAC corrector for the q-path when the reset state
15173                                                                  machine timing allows it. */
15174         uint64_t sata_g2_en_qac_q      : 1;  /**< [ 47: 47](R/W) Enable use of QAC digital filter in the doutq datapath. If the
15175                                                                  enable is deasserted, the filter will output the [QAC_REFSET]
15176                                                                  value. If its asserted, it will determine the current phase and use
15177                                                                  [QAC_REFSET] & [QAC_CNTSET] to output a correction value. Set prior to
15178                                                                  exiting reset. */
15179         uint64_t sata_g2_en_qac_e      : 1;  /**< [ 48: 48](R/W) Enable use of QAC digital filter in the doute datapath. If the
15180                                                                  enable is deasserted, the filter will output the [QAC_REFSET]
15181                                                                  value. If its asserted, it will determine the current phase and use
15182                                                                  [QAC_REFSET] & [QAC_CNTSET] to output a correction value. Set prior to
15183                                                                  exiting reset. */
15184         uint64_t sata_g2_blwc_deadband : 12; /**< [ 60: 49](R/W) BLWC adaptation deadband settings.
15185                                                                  12-bit field to match accumulator, but typically a value less than 0x0FF is used. */
15186         uint64_t reserved_61_63        : 3;
15187 #endif /* Word 0 - End */
15188     } s;
15189     /* struct bdk_gsernx_lanex_sata_rxeq2_1_bcfg_s cn; */
15190 };
15191 typedef union bdk_gsernx_lanex_sata_rxeq2_1_bcfg bdk_gsernx_lanex_sata_rxeq2_1_bcfg_t;
15192 
15193 static inline uint64_t BDK_GSERNX_LANEX_SATA_RXEQ2_1_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_SATA_RXEQ2_1_BCFG(unsigned long a,unsigned long b)15194 static inline uint64_t BDK_GSERNX_LANEX_SATA_RXEQ2_1_BCFG(unsigned long a, unsigned long b)
15195 {
15196     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
15197         return 0x87e090002e30ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
15198     __bdk_csr_fatal("GSERNX_LANEX_SATA_RXEQ2_1_BCFG", 2, a, b, 0, 0);
15199 }
15200 
15201 #define typedef_BDK_GSERNX_LANEX_SATA_RXEQ2_1_BCFG(a,b) bdk_gsernx_lanex_sata_rxeq2_1_bcfg_t
15202 #define bustype_BDK_GSERNX_LANEX_SATA_RXEQ2_1_BCFG(a,b) BDK_CSR_TYPE_RSL
15203 #define basename_BDK_GSERNX_LANEX_SATA_RXEQ2_1_BCFG(a,b) "GSERNX_LANEX_SATA_RXEQ2_1_BCFG"
15204 #define device_bar_BDK_GSERNX_LANEX_SATA_RXEQ2_1_BCFG(a,b) 0x0 /* PF_BAR0 */
15205 #define busnum_BDK_GSERNX_LANEX_SATA_RXEQ2_1_BCFG(a,b) (a)
15206 #define arguments_BDK_GSERNX_LANEX_SATA_RXEQ2_1_BCFG(a,b) (a),(b),-1,-1
15207 
15208 /**
15209  * Register (RSL) gsern#_lane#_sata_rxeq2_2_bcfg
15210  *
15211  * GSER Lane SATA Gen2 RX Equalizer Control Register 2
15212  * Parameters controlling the custom receiver equalization during SATA gen2 operation.
15213  * These fields will drive the associated control signal when
15214  * GSERN()_LANE()_SRCMX_BCFG[TX_CTRL_SEL]
15215  * is set to 'SATA'.
15216  */
15217 union bdk_gsernx_lanex_sata_rxeq2_2_bcfg
15218 {
15219     uint64_t u;
15220     struct bdk_gsernx_lanex_sata_rxeq2_2_bcfg_s
15221     {
15222 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
15223         uint64_t sata_g2_prevga_gn_subrate_fin : 16;/**< [ 63: 48](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
15224                                                                  if subrate gearshifting is enabled.
15225                                                                  Set SUBRATE_INIT = SUBRATE_FIN if subrate gearshifting is not enabled. */
15226         uint64_t sata_g2_prevga_gn_subrate_init : 16;/**< [ 47: 32](R/W) Subrate counter initial value. Sets the starting value for the LMS update
15227                                                                  interval, if subrate gearshifting is enabled.
15228                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
15229         uint64_t sata_g2_blwc_subrate_init : 16;/**< [ 31: 16](R/W) Subrate counter initial value. Sets the initial value for the LMS update interval, if
15230                                                                  subrate gearshifting is enabled.
15231                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
15232         uint64_t sata_g2_blwc_subrate_final : 16;/**< [ 15:  0](R/W) Subrate counter final value. Sets the ending value for the LMS update interval, if subrate
15233                                                                  gearshifting is enabled.
15234                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled.
15235                                                                  Subrate counter final value. */
15236 #else /* Word 0 - Little Endian */
15237         uint64_t sata_g2_blwc_subrate_final : 16;/**< [ 15:  0](R/W) Subrate counter final value. Sets the ending value for the LMS update interval, if subrate
15238                                                                  gearshifting is enabled.
15239                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled.
15240                                                                  Subrate counter final value. */
15241         uint64_t sata_g2_blwc_subrate_init : 16;/**< [ 31: 16](R/W) Subrate counter initial value. Sets the initial value for the LMS update interval, if
15242                                                                  subrate gearshifting is enabled.
15243                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
15244         uint64_t sata_g2_prevga_gn_subrate_init : 16;/**< [ 47: 32](R/W) Subrate counter initial value. Sets the starting value for the LMS update
15245                                                                  interval, if subrate gearshifting is enabled.
15246                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
15247         uint64_t sata_g2_prevga_gn_subrate_fin : 16;/**< [ 63: 48](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
15248                                                                  if subrate gearshifting is enabled.
15249                                                                  Set SUBRATE_INIT = SUBRATE_FIN if subrate gearshifting is not enabled. */
15250 #endif /* Word 0 - End */
15251     } s;
15252     /* struct bdk_gsernx_lanex_sata_rxeq2_2_bcfg_s cn; */
15253 };
15254 typedef union bdk_gsernx_lanex_sata_rxeq2_2_bcfg bdk_gsernx_lanex_sata_rxeq2_2_bcfg_t;
15255 
15256 static inline uint64_t BDK_GSERNX_LANEX_SATA_RXEQ2_2_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_SATA_RXEQ2_2_BCFG(unsigned long a,unsigned long b)15257 static inline uint64_t BDK_GSERNX_LANEX_SATA_RXEQ2_2_BCFG(unsigned long a, unsigned long b)
15258 {
15259     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
15260         return 0x87e090002e40ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
15261     __bdk_csr_fatal("GSERNX_LANEX_SATA_RXEQ2_2_BCFG", 2, a, b, 0, 0);
15262 }
15263 
15264 #define typedef_BDK_GSERNX_LANEX_SATA_RXEQ2_2_BCFG(a,b) bdk_gsernx_lanex_sata_rxeq2_2_bcfg_t
15265 #define bustype_BDK_GSERNX_LANEX_SATA_RXEQ2_2_BCFG(a,b) BDK_CSR_TYPE_RSL
15266 #define basename_BDK_GSERNX_LANEX_SATA_RXEQ2_2_BCFG(a,b) "GSERNX_LANEX_SATA_RXEQ2_2_BCFG"
15267 #define device_bar_BDK_GSERNX_LANEX_SATA_RXEQ2_2_BCFG(a,b) 0x0 /* PF_BAR0 */
15268 #define busnum_BDK_GSERNX_LANEX_SATA_RXEQ2_2_BCFG(a,b) (a)
15269 #define arguments_BDK_GSERNX_LANEX_SATA_RXEQ2_2_BCFG(a,b) (a),(b),-1,-1
15270 
15271 /**
15272  * Register (RSL) gsern#_lane#_sata_rxeq2_3_bcfg
15273  *
15274  * GSER Lane SATA Gen2 RX Equalizer Control Register 3
15275  * Parameters controlling the custom receiver equalization during SATA Gen2 operation.
15276  * These fields will drive the associated control signal when
15277  * GSERN()_LANE()_SRCMX_BCFG[TX_CTRL_SEL]
15278  * is set to 'SATA'.
15279  */
15280 union bdk_gsernx_lanex_sata_rxeq2_3_bcfg
15281 {
15282     uint64_t u;
15283     struct bdk_gsernx_lanex_sata_rxeq2_3_bcfg_s
15284     {
15285 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
15286         uint64_t sata_g2_afeos_subrate_final : 16;/**< [ 63: 48](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
15287                                                                  if subrate gearshifting is enabled.
15288                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
15289         uint64_t sata_g2_afeos_subrate_init : 16;/**< [ 47: 32](R/W) Subrate counter initial value. Sets the starting value for the LMS update
15290                                                                  interval, if subrate gearshifting is enabled.
15291                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
15292         uint64_t sata_g2_subrate_final : 16; /**< [ 31: 16](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
15293                                                                  if subrate gearshifting is enabled.
15294                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
15295         uint64_t sata_g2_subrate_init  : 16; /**< [ 15:  0](R/W) Subrate counter initial value. Sets the starting value for the LMS update
15296                                                                  interval, if subrate gearshifting is enabled.
15297                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
15298 #else /* Word 0 - Little Endian */
15299         uint64_t sata_g2_subrate_init  : 16; /**< [ 15:  0](R/W) Subrate counter initial value. Sets the starting value for the LMS update
15300                                                                  interval, if subrate gearshifting is enabled.
15301                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
15302         uint64_t sata_g2_subrate_final : 16; /**< [ 31: 16](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
15303                                                                  if subrate gearshifting is enabled.
15304                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
15305         uint64_t sata_g2_afeos_subrate_init : 16;/**< [ 47: 32](R/W) Subrate counter initial value. Sets the starting value for the LMS update
15306                                                                  interval, if subrate gearshifting is enabled.
15307                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
15308         uint64_t sata_g2_afeos_subrate_final : 16;/**< [ 63: 48](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
15309                                                                  if subrate gearshifting is enabled.
15310                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
15311 #endif /* Word 0 - End */
15312     } s;
15313     /* struct bdk_gsernx_lanex_sata_rxeq2_3_bcfg_s cn; */
15314 };
15315 typedef union bdk_gsernx_lanex_sata_rxeq2_3_bcfg bdk_gsernx_lanex_sata_rxeq2_3_bcfg_t;
15316 
15317 static inline uint64_t BDK_GSERNX_LANEX_SATA_RXEQ2_3_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_SATA_RXEQ2_3_BCFG(unsigned long a,unsigned long b)15318 static inline uint64_t BDK_GSERNX_LANEX_SATA_RXEQ2_3_BCFG(unsigned long a, unsigned long b)
15319 {
15320     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
15321         return 0x87e090002e50ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
15322     __bdk_csr_fatal("GSERNX_LANEX_SATA_RXEQ2_3_BCFG", 2, a, b, 0, 0);
15323 }
15324 
15325 #define typedef_BDK_GSERNX_LANEX_SATA_RXEQ2_3_BCFG(a,b) bdk_gsernx_lanex_sata_rxeq2_3_bcfg_t
15326 #define bustype_BDK_GSERNX_LANEX_SATA_RXEQ2_3_BCFG(a,b) BDK_CSR_TYPE_RSL
15327 #define basename_BDK_GSERNX_LANEX_SATA_RXEQ2_3_BCFG(a,b) "GSERNX_LANEX_SATA_RXEQ2_3_BCFG"
15328 #define device_bar_BDK_GSERNX_LANEX_SATA_RXEQ2_3_BCFG(a,b) 0x0 /* PF_BAR0 */
15329 #define busnum_BDK_GSERNX_LANEX_SATA_RXEQ2_3_BCFG(a,b) (a)
15330 #define arguments_BDK_GSERNX_LANEX_SATA_RXEQ2_3_BCFG(a,b) (a),(b),-1,-1
15331 
15332 /**
15333  * Register (RSL) gsern#_lane#_sata_rxeq3_1_bcfg
15334  *
15335  * GSER Lane SATA Gen3 RX Equalizer Control Register 1
15336  * Parameters controlling the custom receiver equalization during SATA gen3 operation.
15337  * These fields will drive the associated control signal when
15338  * GSERN()_LANE()_SRCMX_BCFG[TX_CTRL_SEL]
15339  * is set to 'SATA'.
15340  */
15341 union bdk_gsernx_lanex_sata_rxeq3_1_bcfg
15342 {
15343     uint64_t u;
15344     struct bdk_gsernx_lanex_sata_rxeq3_1_bcfg_s
15345     {
15346 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
15347         uint64_t reserved_61_63        : 3;
15348         uint64_t sata_g3_blwc_deadband : 12; /**< [ 60: 49](R/W) BLWC adaptation deadband settings.
15349                                                                  12-bit field to match accumulator, but typically a value less than 0x0FF is used. */
15350         uint64_t sata_g3_en_qac_e      : 1;  /**< [ 48: 48](R/W) Enable use of QAC digital filter in the doute datapath. If the
15351                                                                  enable is deasserted, the filter will output the [QAC_REFSET]
15352                                                                  value. If its asserted, it will determine the current phase and use
15353                                                                  [QAC_REFSET] & [QAC_CNTSET] to output a correction value. Set prior to
15354                                                                  exiting reset. */
15355         uint64_t sata_g3_en_qac_q      : 1;  /**< [ 47: 47](R/W) Enable use of QAC digital filter in the doutq datapath. If the
15356                                                                  enable is deasserted, the filter will output the [QAC_REFSET]
15357                                                                  value. If its asserted, it will determine the current phase and use
15358                                                                  [QAC_REFSET] & [QAC_CNTSET] to output a correction value. Set prior to
15359                                                                  exiting reset. */
15360         uint64_t sata_g3_cdr_qac_selq  : 1;  /**< [ 46: 46](R/W) Enable use of the QAC corrector for the q-path when the reset state
15361                                                                  machine timing allows it. */
15362         uint64_t sata_g3_cdr_qac_sele  : 1;  /**< [ 45: 45](R/W) Enable use of the QAC corrector for the e-path when the reset state
15363                                                                  machine timing allows it. */
15364         uint64_t sata_g3_eoffs         : 7;  /**< [ 44: 38](R/W) E interp state offset. */
15365         uint64_t sata_g3_qoffs         : 7;  /**< [ 37: 31](R/W) Q interp state offset. */
15366         uint64_t sata_g3_inc2          : 6;  /**< [ 30: 25](R/W) 2nd order loop inc. */
15367         uint64_t sata_g3_inc1          : 6;  /**< [ 24: 19](R/W) 1st order loop inc. */
15368         uint64_t sata_g3_erc           : 4;  /**< [ 18: 15](R/W) Interpolator edge-rate control. This control is shared between all
15369                                                                  interpolators in the lane. */
15370         uint64_t sata_g3_rx_dcc_lowf   : 1;  /**< [ 14: 14](R/W) Set to put the RX duty-cycle corrector (DCC) into low frequency mode. Set to 1
15371                                                                  when operating at data rates below 4 Gbaud. */
15372         uint64_t sata_g3_ctle_lte_zero_ovrd_en : 1;/**< [ 13: 13](R/W) CTLE LTE zero frequency override enable.
15373                                                                  By default, the override should be enabled; otherwise, CTLE_LTE_ZERO
15374                                                                  will be set equal to CTLE_ZERO within the RX adaptation FSM. */
15375         uint64_t sata_g3_ctle_lte_zero_ovrd : 4;/**< [ 12:  9](R/W) CTLE LTE zero frequency override value. */
15376         uint64_t reserved_0_8          : 9;
15377 #else /* Word 0 - Little Endian */
15378         uint64_t reserved_0_8          : 9;
15379         uint64_t sata_g3_ctle_lte_zero_ovrd : 4;/**< [ 12:  9](R/W) CTLE LTE zero frequency override value. */
15380         uint64_t sata_g3_ctle_lte_zero_ovrd_en : 1;/**< [ 13: 13](R/W) CTLE LTE zero frequency override enable.
15381                                                                  By default, the override should be enabled; otherwise, CTLE_LTE_ZERO
15382                                                                  will be set equal to CTLE_ZERO within the RX adaptation FSM. */
15383         uint64_t sata_g3_rx_dcc_lowf   : 1;  /**< [ 14: 14](R/W) Set to put the RX duty-cycle corrector (DCC) into low frequency mode. Set to 1
15384                                                                  when operating at data rates below 4 Gbaud. */
15385         uint64_t sata_g3_erc           : 4;  /**< [ 18: 15](R/W) Interpolator edge-rate control. This control is shared between all
15386                                                                  interpolators in the lane. */
15387         uint64_t sata_g3_inc1          : 6;  /**< [ 24: 19](R/W) 1st order loop inc. */
15388         uint64_t sata_g3_inc2          : 6;  /**< [ 30: 25](R/W) 2nd order loop inc. */
15389         uint64_t sata_g3_qoffs         : 7;  /**< [ 37: 31](R/W) Q interp state offset. */
15390         uint64_t sata_g3_eoffs         : 7;  /**< [ 44: 38](R/W) E interp state offset. */
15391         uint64_t sata_g3_cdr_qac_sele  : 1;  /**< [ 45: 45](R/W) Enable use of the QAC corrector for the e-path when the reset state
15392                                                                  machine timing allows it. */
15393         uint64_t sata_g3_cdr_qac_selq  : 1;  /**< [ 46: 46](R/W) Enable use of the QAC corrector for the q-path when the reset state
15394                                                                  machine timing allows it. */
15395         uint64_t sata_g3_en_qac_q      : 1;  /**< [ 47: 47](R/W) Enable use of QAC digital filter in the doutq datapath. If the
15396                                                                  enable is deasserted, the filter will output the [QAC_REFSET]
15397                                                                  value. If its asserted, it will determine the current phase and use
15398                                                                  [QAC_REFSET] & [QAC_CNTSET] to output a correction value. Set prior to
15399                                                                  exiting reset. */
15400         uint64_t sata_g3_en_qac_e      : 1;  /**< [ 48: 48](R/W) Enable use of QAC digital filter in the doute datapath. If the
15401                                                                  enable is deasserted, the filter will output the [QAC_REFSET]
15402                                                                  value. If its asserted, it will determine the current phase and use
15403                                                                  [QAC_REFSET] & [QAC_CNTSET] to output a correction value. Set prior to
15404                                                                  exiting reset. */
15405         uint64_t sata_g3_blwc_deadband : 12; /**< [ 60: 49](R/W) BLWC adaptation deadband settings.
15406                                                                  12-bit field to match accumulator, but typically a value less than 0x0FF is used. */
15407         uint64_t reserved_61_63        : 3;
15408 #endif /* Word 0 - End */
15409     } s;
15410     /* struct bdk_gsernx_lanex_sata_rxeq3_1_bcfg_s cn; */
15411 };
15412 typedef union bdk_gsernx_lanex_sata_rxeq3_1_bcfg bdk_gsernx_lanex_sata_rxeq3_1_bcfg_t;
15413 
15414 static inline uint64_t BDK_GSERNX_LANEX_SATA_RXEQ3_1_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_SATA_RXEQ3_1_BCFG(unsigned long a,unsigned long b)15415 static inline uint64_t BDK_GSERNX_LANEX_SATA_RXEQ3_1_BCFG(unsigned long a, unsigned long b)
15416 {
15417     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
15418         return 0x87e090002e60ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
15419     __bdk_csr_fatal("GSERNX_LANEX_SATA_RXEQ3_1_BCFG", 2, a, b, 0, 0);
15420 }
15421 
15422 #define typedef_BDK_GSERNX_LANEX_SATA_RXEQ3_1_BCFG(a,b) bdk_gsernx_lanex_sata_rxeq3_1_bcfg_t
15423 #define bustype_BDK_GSERNX_LANEX_SATA_RXEQ3_1_BCFG(a,b) BDK_CSR_TYPE_RSL
15424 #define basename_BDK_GSERNX_LANEX_SATA_RXEQ3_1_BCFG(a,b) "GSERNX_LANEX_SATA_RXEQ3_1_BCFG"
15425 #define device_bar_BDK_GSERNX_LANEX_SATA_RXEQ3_1_BCFG(a,b) 0x0 /* PF_BAR0 */
15426 #define busnum_BDK_GSERNX_LANEX_SATA_RXEQ3_1_BCFG(a,b) (a)
15427 #define arguments_BDK_GSERNX_LANEX_SATA_RXEQ3_1_BCFG(a,b) (a),(b),-1,-1
15428 
15429 /**
15430  * Register (RSL) gsern#_lane#_sata_rxeq3_2_bcfg
15431  *
15432  * GSER Lane SATA Gen3 RX Equalizer Control Register 2
15433  * Parameters controlling the custom receiver equalization during SATA gen3 operation.
15434  * These fields will drive the associated control signal when
15435  * GSERN()_LANE()_SRCMX_BCFG[TX_CTRL_SEL]
15436  * is set to 'SATA'.
15437  */
15438 union bdk_gsernx_lanex_sata_rxeq3_2_bcfg
15439 {
15440     uint64_t u;
15441     struct bdk_gsernx_lanex_sata_rxeq3_2_bcfg_s
15442     {
15443 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
15444         uint64_t sata_g3_prevga_gn_subrate_fin : 16;/**< [ 63: 48](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
15445                                                                  if subrate gearshifting is enabled.
15446                                                                  Set SUBRATE_INIT = SUBRATE_FIN if subrate gearshifting is not enabled. */
15447         uint64_t sata_g3_prevga_gn_subrate_init : 16;/**< [ 47: 32](R/W) Subrate counter initial value. Sets the starting value for the LMS update
15448                                                                  interval, if subrate gearshifting is enabled.
15449                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
15450         uint64_t sata_g3_blwc_subrate_init : 16;/**< [ 31: 16](R/W) Subrate counter initial value. Sets the initial value for the LMS update interval, if
15451                                                                  subrate gearshifting is enabled.
15452                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
15453         uint64_t sata_g3_blwc_subrate_final : 16;/**< [ 15:  0](R/W) Subrate counter final value. Sets the ending value for the LMS update interval, if subrate
15454                                                                  gearshifting is enabled.
15455                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled.
15456                                                                  Subrate counter final value. */
15457 #else /* Word 0 - Little Endian */
15458         uint64_t sata_g3_blwc_subrate_final : 16;/**< [ 15:  0](R/W) Subrate counter final value. Sets the ending value for the LMS update interval, if subrate
15459                                                                  gearshifting is enabled.
15460                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled.
15461                                                                  Subrate counter final value. */
15462         uint64_t sata_g3_blwc_subrate_init : 16;/**< [ 31: 16](R/W) Subrate counter initial value. Sets the initial value for the LMS update interval, if
15463                                                                  subrate gearshifting is enabled.
15464                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
15465         uint64_t sata_g3_prevga_gn_subrate_init : 16;/**< [ 47: 32](R/W) Subrate counter initial value. Sets the starting value for the LMS update
15466                                                                  interval, if subrate gearshifting is enabled.
15467                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
15468         uint64_t sata_g3_prevga_gn_subrate_fin : 16;/**< [ 63: 48](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
15469                                                                  if subrate gearshifting is enabled.
15470                                                                  Set SUBRATE_INIT = SUBRATE_FIN if subrate gearshifting is not enabled. */
15471 #endif /* Word 0 - End */
15472     } s;
15473     /* struct bdk_gsernx_lanex_sata_rxeq3_2_bcfg_s cn; */
15474 };
15475 typedef union bdk_gsernx_lanex_sata_rxeq3_2_bcfg bdk_gsernx_lanex_sata_rxeq3_2_bcfg_t;
15476 
15477 static inline uint64_t BDK_GSERNX_LANEX_SATA_RXEQ3_2_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_SATA_RXEQ3_2_BCFG(unsigned long a,unsigned long b)15478 static inline uint64_t BDK_GSERNX_LANEX_SATA_RXEQ3_2_BCFG(unsigned long a, unsigned long b)
15479 {
15480     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
15481         return 0x87e090002e70ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
15482     __bdk_csr_fatal("GSERNX_LANEX_SATA_RXEQ3_2_BCFG", 2, a, b, 0, 0);
15483 }
15484 
15485 #define typedef_BDK_GSERNX_LANEX_SATA_RXEQ3_2_BCFG(a,b) bdk_gsernx_lanex_sata_rxeq3_2_bcfg_t
15486 #define bustype_BDK_GSERNX_LANEX_SATA_RXEQ3_2_BCFG(a,b) BDK_CSR_TYPE_RSL
15487 #define basename_BDK_GSERNX_LANEX_SATA_RXEQ3_2_BCFG(a,b) "GSERNX_LANEX_SATA_RXEQ3_2_BCFG"
15488 #define device_bar_BDK_GSERNX_LANEX_SATA_RXEQ3_2_BCFG(a,b) 0x0 /* PF_BAR0 */
15489 #define busnum_BDK_GSERNX_LANEX_SATA_RXEQ3_2_BCFG(a,b) (a)
15490 #define arguments_BDK_GSERNX_LANEX_SATA_RXEQ3_2_BCFG(a,b) (a),(b),-1,-1
15491 
15492 /**
15493  * Register (RSL) gsern#_lane#_sata_rxeq3_3_bcfg
15494  *
15495  * GSER Lane SATA Gen3 RX Equalizer Control Register 3
15496  * Parameters controlling the custom receiver equalization during SATA Gen3 operation.
15497  * These fields will drive the associated control signal when
15498  * GSERN()_LANE()_SRCMX_BCFG[TX_CTRL_SEL]
15499  * is set to 'SATA'.
15500  */
15501 union bdk_gsernx_lanex_sata_rxeq3_3_bcfg
15502 {
15503     uint64_t u;
15504     struct bdk_gsernx_lanex_sata_rxeq3_3_bcfg_s
15505     {
15506 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
15507         uint64_t sata_g3_afeos_subrate_final : 16;/**< [ 63: 48](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
15508                                                                  if subrate gearshifting is enabled.
15509                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
15510         uint64_t sata_g3_afeos_subrate_init : 16;/**< [ 47: 32](R/W) Subrate counter initial value. Sets the starting value for the LMS update
15511                                                                  interval, if subrate gearshifting is enabled.
15512                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
15513         uint64_t sata_g3_subrate_final : 16; /**< [ 31: 16](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
15514                                                                  if subrate gearshifting is enabled.
15515                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
15516         uint64_t sata_g3_subrate_init  : 16; /**< [ 15:  0](R/W) Subrate counter initial value. Sets the starting value for the LMS update
15517                                                                  interval, if subrate gearshifting is enabled.
15518                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
15519 #else /* Word 0 - Little Endian */
15520         uint64_t sata_g3_subrate_init  : 16; /**< [ 15:  0](R/W) Subrate counter initial value. Sets the starting value for the LMS update
15521                                                                  interval, if subrate gearshifting is enabled.
15522                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
15523         uint64_t sata_g3_subrate_final : 16; /**< [ 31: 16](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
15524                                                                  if subrate gearshifting is enabled.
15525                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
15526         uint64_t sata_g3_afeos_subrate_init : 16;/**< [ 47: 32](R/W) Subrate counter initial value. Sets the starting value for the LMS update
15527                                                                  interval, if subrate gearshifting is enabled.
15528                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
15529         uint64_t sata_g3_afeos_subrate_final : 16;/**< [ 63: 48](R/W) Subrate counter final value. Sets the final value for the LMS update interval,
15530                                                                  if subrate gearshifting is enabled.
15531                                                                  Set SUBRATE_INIT = SUBRATE_FINAL if subrate gearshifting is not enabled. */
15532 #endif /* Word 0 - End */
15533     } s;
15534     /* struct bdk_gsernx_lanex_sata_rxeq3_3_bcfg_s cn; */
15535 };
15536 typedef union bdk_gsernx_lanex_sata_rxeq3_3_bcfg bdk_gsernx_lanex_sata_rxeq3_3_bcfg_t;
15537 
15538 static inline uint64_t BDK_GSERNX_LANEX_SATA_RXEQ3_3_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_SATA_RXEQ3_3_BCFG(unsigned long a,unsigned long b)15539 static inline uint64_t BDK_GSERNX_LANEX_SATA_RXEQ3_3_BCFG(unsigned long a, unsigned long b)
15540 {
15541     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
15542         return 0x87e090002e80ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
15543     __bdk_csr_fatal("GSERNX_LANEX_SATA_RXEQ3_3_BCFG", 2, a, b, 0, 0);
15544 }
15545 
15546 #define typedef_BDK_GSERNX_LANEX_SATA_RXEQ3_3_BCFG(a,b) bdk_gsernx_lanex_sata_rxeq3_3_bcfg_t
15547 #define bustype_BDK_GSERNX_LANEX_SATA_RXEQ3_3_BCFG(a,b) BDK_CSR_TYPE_RSL
15548 #define basename_BDK_GSERNX_LANEX_SATA_RXEQ3_3_BCFG(a,b) "GSERNX_LANEX_SATA_RXEQ3_3_BCFG"
15549 #define device_bar_BDK_GSERNX_LANEX_SATA_RXEQ3_3_BCFG(a,b) 0x0 /* PF_BAR0 */
15550 #define busnum_BDK_GSERNX_LANEX_SATA_RXEQ3_3_BCFG(a,b) (a)
15551 #define arguments_BDK_GSERNX_LANEX_SATA_RXEQ3_3_BCFG(a,b) (a),(b),-1,-1
15552 
15553 /**
15554  * Register (RSL) gsern#_lane#_sata_rxidl1a_bcfg
15555  *
15556  * GSER Lane SATA Gen1 RX Idle Detection Filter Control Register 2
15557  * Parameters controlling the analog detection and digital filtering of the receiver's
15558  * idle detection logic for SATA GEN1. For the digital filtering, setting all fields to 1,
15559  * i.e., N0=N1=I0=I1=L0=L1=1, results in no filtering.
15560  */
15561 union bdk_gsernx_lanex_sata_rxidl1a_bcfg
15562 {
15563     uint64_t u;
15564     struct bdk_gsernx_lanex_sata_rxidl1a_bcfg_s
15565     {
15566 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
15567         uint64_t rx_idle_lowf          : 2;  /**< [ 63: 62](R/W) Control for the receiver's idle detector analog filter
15568                                                                  bandwidth. The two bits apply at different times.
15569                                                                  \<0\> = Set to 1 for low bandwidth during normal operation.
15570                                                                  \<1\> = Set to 1 for low bandwidth during idle offset calibration.
15571                                                                  The default is 1 during normal operation for large filter capacitance and low
15572                                                                  bandwidth, and 0 during idle offset calibration to provide faster response. */
15573         uint64_t reserved_61           : 1;
15574         uint64_t refset                : 5;  /**< [ 60: 56](R/W) Sets the reference voltage swing for idle detection. A voltage swing
15575                                                                  at the input of the RX less than this amount is defined as idle.
15576                                                                  (See GSERN()_LANE()_RX_ST_BCFG[REFSET] for bit mapping.) */
15577         uint64_t reserved_54_55        : 2;
15578         uint64_t l1                    : 27; /**< [ 53: 27](R/W) Ones count leak parameter. When a zero in the raw idle signal from the custom
15579                                                                  macro is encountered, the ones count is decremented by this amount, saturating
15580                                                                  to a minimum count of zero. (Set L1=N1 and I1=1 for a simple run-of-N1 ones to
15581                                                                  assert the filter output.) The minimum setting for this field is 0x1. */
15582         uint64_t l0                    : 27; /**< [ 26:  0](R/W) Zeros count leak parameter. When a one in the raw idle signal from the custom
15583                                                                  macro is encountered, the zeros count is decremented by this amount, saturating
15584                                                                  to a minimum count of zero. (Set L0=N0 and I0=1 for a simple run-of-N0 zeros to
15585                                                                  deassert the filter output.) The minimum setting for this field is 0x1. */
15586 #else /* Word 0 - Little Endian */
15587         uint64_t l0                    : 27; /**< [ 26:  0](R/W) Zeros count leak parameter. When a one in the raw idle signal from the custom
15588                                                                  macro is encountered, the zeros count is decremented by this amount, saturating
15589                                                                  to a minimum count of zero. (Set L0=N0 and I0=1 for a simple run-of-N0 zeros to
15590                                                                  deassert the filter output.) The minimum setting for this field is 0x1. */
15591         uint64_t l1                    : 27; /**< [ 53: 27](R/W) Ones count leak parameter. When a zero in the raw idle signal from the custom
15592                                                                  macro is encountered, the ones count is decremented by this amount, saturating
15593                                                                  to a minimum count of zero. (Set L1=N1 and I1=1 for a simple run-of-N1 ones to
15594                                                                  assert the filter output.) The minimum setting for this field is 0x1. */
15595         uint64_t reserved_54_55        : 2;
15596         uint64_t refset                : 5;  /**< [ 60: 56](R/W) Sets the reference voltage swing for idle detection. A voltage swing
15597                                                                  at the input of the RX less than this amount is defined as idle.
15598                                                                  (See GSERN()_LANE()_RX_ST_BCFG[REFSET] for bit mapping.) */
15599         uint64_t reserved_61           : 1;
15600         uint64_t rx_idle_lowf          : 2;  /**< [ 63: 62](R/W) Control for the receiver's idle detector analog filter
15601                                                                  bandwidth. The two bits apply at different times.
15602                                                                  \<0\> = Set to 1 for low bandwidth during normal operation.
15603                                                                  \<1\> = Set to 1 for low bandwidth during idle offset calibration.
15604                                                                  The default is 1 during normal operation for large filter capacitance and low
15605                                                                  bandwidth, and 0 during idle offset calibration to provide faster response. */
15606 #endif /* Word 0 - End */
15607     } s;
15608     /* struct bdk_gsernx_lanex_sata_rxidl1a_bcfg_s cn; */
15609 };
15610 typedef union bdk_gsernx_lanex_sata_rxidl1a_bcfg bdk_gsernx_lanex_sata_rxidl1a_bcfg_t;
15611 
15612 static inline uint64_t BDK_GSERNX_LANEX_SATA_RXIDL1A_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_SATA_RXIDL1A_BCFG(unsigned long a,unsigned long b)15613 static inline uint64_t BDK_GSERNX_LANEX_SATA_RXIDL1A_BCFG(unsigned long a, unsigned long b)
15614 {
15615     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
15616         return 0x87e090002cc0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
15617     __bdk_csr_fatal("GSERNX_LANEX_SATA_RXIDL1A_BCFG", 2, a, b, 0, 0);
15618 }
15619 
15620 #define typedef_BDK_GSERNX_LANEX_SATA_RXIDL1A_BCFG(a,b) bdk_gsernx_lanex_sata_rxidl1a_bcfg_t
15621 #define bustype_BDK_GSERNX_LANEX_SATA_RXIDL1A_BCFG(a,b) BDK_CSR_TYPE_RSL
15622 #define basename_BDK_GSERNX_LANEX_SATA_RXIDL1A_BCFG(a,b) "GSERNX_LANEX_SATA_RXIDL1A_BCFG"
15623 #define device_bar_BDK_GSERNX_LANEX_SATA_RXIDL1A_BCFG(a,b) 0x0 /* PF_BAR0 */
15624 #define busnum_BDK_GSERNX_LANEX_SATA_RXIDL1A_BCFG(a,b) (a)
15625 #define arguments_BDK_GSERNX_LANEX_SATA_RXIDL1A_BCFG(a,b) (a),(b),-1,-1
15626 
15627 /**
15628  * Register (RSL) gsern#_lane#_sata_rxidl2a_bcfg
15629  *
15630  * GSER Lane SATA Gen2 RX Idle Detection Filter Control Register 2
15631  * Parameters controlling the analog detection and digital filtering of the receiver's
15632  * idle detection logic for SATA GEN2. For the digital filtering, setting all fields to 1,
15633  * i.e., N0=N1=I0=I1=L0=L1=1, results in no filtering.
15634  */
15635 union bdk_gsernx_lanex_sata_rxidl2a_bcfg
15636 {
15637     uint64_t u;
15638     struct bdk_gsernx_lanex_sata_rxidl2a_bcfg_s
15639     {
15640 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
15641         uint64_t rx_idle_lowf          : 2;  /**< [ 63: 62](R/W) Control for the receiver's idle detector analog filter
15642                                                                  bandwidth. The two bits apply at different times.
15643                                                                  \<0\> = Set to 1 for low bandwidth during normal operation.
15644                                                                  \<1\> = Set to 1 for low bandwidth during idle offset calibration.
15645                                                                  The default is 1 during normal operation for large filter capacitance and low
15646                                                                  bandwidth, and 0 during idle offset calibration to provide faster response. */
15647         uint64_t reserved_61           : 1;
15648         uint64_t refset                : 5;  /**< [ 60: 56](R/W) Sets the reference voltage swing for idle detection. A voltage swing
15649                                                                  at the input of the RX less than this amount is defined as idle.
15650                                                                  (See GSERN()_LANE()_RX_ST_BCFG[REFSET] for bit mapping.) */
15651         uint64_t reserved_54_55        : 2;
15652         uint64_t l1                    : 27; /**< [ 53: 27](R/W) Ones count leak parameter. When a zero in the raw idle signal from the custom
15653                                                                  macro is encountered, the ones count is decremented by this amount, saturating
15654                                                                  to a minimum count of zero. (Set L1=N1 and I1=1 for a simple run-of-N1 ones to
15655                                                                  assert the filter output.) The minimum setting for this field is 0x1. */
15656         uint64_t l0                    : 27; /**< [ 26:  0](R/W) Zeros count leak parameter. When a one in the raw idle signal from the custom
15657                                                                  macro is encountered, the zeros count is decremented by this amount, saturating
15658                                                                  to a minimum count of zero. (Set L0=N0 and I0=1 for a simple run-of-N0 zeros to
15659                                                                  deassert the filter output.) The minimum setting for this field is 0x1. */
15660 #else /* Word 0 - Little Endian */
15661         uint64_t l0                    : 27; /**< [ 26:  0](R/W) Zeros count leak parameter. When a one in the raw idle signal from the custom
15662                                                                  macro is encountered, the zeros count is decremented by this amount, saturating
15663                                                                  to a minimum count of zero. (Set L0=N0 and I0=1 for a simple run-of-N0 zeros to
15664                                                                  deassert the filter output.) The minimum setting for this field is 0x1. */
15665         uint64_t l1                    : 27; /**< [ 53: 27](R/W) Ones count leak parameter. When a zero in the raw idle signal from the custom
15666                                                                  macro is encountered, the ones count is decremented by this amount, saturating
15667                                                                  to a minimum count of zero. (Set L1=N1 and I1=1 for a simple run-of-N1 ones to
15668                                                                  assert the filter output.) The minimum setting for this field is 0x1. */
15669         uint64_t reserved_54_55        : 2;
15670         uint64_t refset                : 5;  /**< [ 60: 56](R/W) Sets the reference voltage swing for idle detection. A voltage swing
15671                                                                  at the input of the RX less than this amount is defined as idle.
15672                                                                  (See GSERN()_LANE()_RX_ST_BCFG[REFSET] for bit mapping.) */
15673         uint64_t reserved_61           : 1;
15674         uint64_t rx_idle_lowf          : 2;  /**< [ 63: 62](R/W) Control for the receiver's idle detector analog filter
15675                                                                  bandwidth. The two bits apply at different times.
15676                                                                  \<0\> = Set to 1 for low bandwidth during normal operation.
15677                                                                  \<1\> = Set to 1 for low bandwidth during idle offset calibration.
15678                                                                  The default is 1 during normal operation for large filter capacitance and low
15679                                                                  bandwidth, and 0 during idle offset calibration to provide faster response. */
15680 #endif /* Word 0 - End */
15681     } s;
15682     /* struct bdk_gsernx_lanex_sata_rxidl2a_bcfg_s cn; */
15683 };
15684 typedef union bdk_gsernx_lanex_sata_rxidl2a_bcfg bdk_gsernx_lanex_sata_rxidl2a_bcfg_t;
15685 
15686 static inline uint64_t BDK_GSERNX_LANEX_SATA_RXIDL2A_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_SATA_RXIDL2A_BCFG(unsigned long a,unsigned long b)15687 static inline uint64_t BDK_GSERNX_LANEX_SATA_RXIDL2A_BCFG(unsigned long a, unsigned long b)
15688 {
15689     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
15690         return 0x87e090002ce0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
15691     __bdk_csr_fatal("GSERNX_LANEX_SATA_RXIDL2A_BCFG", 2, a, b, 0, 0);
15692 }
15693 
15694 #define typedef_BDK_GSERNX_LANEX_SATA_RXIDL2A_BCFG(a,b) bdk_gsernx_lanex_sata_rxidl2a_bcfg_t
15695 #define bustype_BDK_GSERNX_LANEX_SATA_RXIDL2A_BCFG(a,b) BDK_CSR_TYPE_RSL
15696 #define basename_BDK_GSERNX_LANEX_SATA_RXIDL2A_BCFG(a,b) "GSERNX_LANEX_SATA_RXIDL2A_BCFG"
15697 #define device_bar_BDK_GSERNX_LANEX_SATA_RXIDL2A_BCFG(a,b) 0x0 /* PF_BAR0 */
15698 #define busnum_BDK_GSERNX_LANEX_SATA_RXIDL2A_BCFG(a,b) (a)
15699 #define arguments_BDK_GSERNX_LANEX_SATA_RXIDL2A_BCFG(a,b) (a),(b),-1,-1
15700 
15701 /**
15702  * Register (RSL) gsern#_lane#_sata_rxidl3a_bcfg
15703  *
15704  * GSER Lane SATA Gen3 RX Idle Detection Filter Control Register 2
15705  * Parameters controlling the analog detection and digital filtering of the receiver's
15706  * idle detection logic for SATA GEN3. For the digital filtering, setting all fields to 1,
15707  * i.e., N0=N1=I0=I1=L0=L1=1, results in no filtering.
15708  */
15709 union bdk_gsernx_lanex_sata_rxidl3a_bcfg
15710 {
15711     uint64_t u;
15712     struct bdk_gsernx_lanex_sata_rxidl3a_bcfg_s
15713     {
15714 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
15715         uint64_t rx_idle_lowf          : 2;  /**< [ 63: 62](R/W) Control for the receiver's idle detector analog filter
15716                                                                  bandwidth. The two bits apply at different times.
15717                                                                  \<0\> = Set to 1 for low bandwidth during normal operation.
15718                                                                  \<1\> = Set to 1 for low bandwidth during idle offset calibration.
15719                                                                  The default is 1 during normal operation for large filter capacitance and low
15720                                                                  bandwidth, and 0 during idle offset calibration to provide faster response. */
15721         uint64_t reserved_61           : 1;
15722         uint64_t refset                : 5;  /**< [ 60: 56](R/W) Sets the reference voltage swing for idle detection. A voltage swing
15723                                                                  at the input of the RX less than this amount is defined as idle.
15724                                                                  (See GSERN()_LANE()_RX_ST_BCFG[REFSET] for bit mapping.) */
15725         uint64_t reserved_54_55        : 2;
15726         uint64_t l1                    : 27; /**< [ 53: 27](R/W) Ones count leak parameter. When a zero in the raw idle signal from the custom
15727                                                                  macro is encountered, the ones count is decremented by this amount, saturating
15728                                                                  to a minimum count of zero. (Set L1=N1 and I1=1 for a simple run-of-N1 ones to
15729                                                                  assert the filter output.) The minimum setting for this field is 0x1. */
15730         uint64_t l0                    : 27; /**< [ 26:  0](R/W) Zeros count leak parameter. When a one in the raw idle signal from the custom
15731                                                                  macro is encountered, the zeros count is decremented by this amount, saturating
15732                                                                  to a minimum count of zero. (Set L0=N0 and I0=1 for a simple run-of-N0 zeros to
15733                                                                  deassert the filter output.) The minimum setting for this field is 0x1. */
15734 #else /* Word 0 - Little Endian */
15735         uint64_t l0                    : 27; /**< [ 26:  0](R/W) Zeros count leak parameter. When a one in the raw idle signal from the custom
15736                                                                  macro is encountered, the zeros count is decremented by this amount, saturating
15737                                                                  to a minimum count of zero. (Set L0=N0 and I0=1 for a simple run-of-N0 zeros to
15738                                                                  deassert the filter output.) The minimum setting for this field is 0x1. */
15739         uint64_t l1                    : 27; /**< [ 53: 27](R/W) Ones count leak parameter. When a zero in the raw idle signal from the custom
15740                                                                  macro is encountered, the ones count is decremented by this amount, saturating
15741                                                                  to a minimum count of zero. (Set L1=N1 and I1=1 for a simple run-of-N1 ones to
15742                                                                  assert the filter output.) The minimum setting for this field is 0x1. */
15743         uint64_t reserved_54_55        : 2;
15744         uint64_t refset                : 5;  /**< [ 60: 56](R/W) Sets the reference voltage swing for idle detection. A voltage swing
15745                                                                  at the input of the RX less than this amount is defined as idle.
15746                                                                  (See GSERN()_LANE()_RX_ST_BCFG[REFSET] for bit mapping.) */
15747         uint64_t reserved_61           : 1;
15748         uint64_t rx_idle_lowf          : 2;  /**< [ 63: 62](R/W) Control for the receiver's idle detector analog filter
15749                                                                  bandwidth. The two bits apply at different times.
15750                                                                  \<0\> = Set to 1 for low bandwidth during normal operation.
15751                                                                  \<1\> = Set to 1 for low bandwidth during idle offset calibration.
15752                                                                  The default is 1 during normal operation for large filter capacitance and low
15753                                                                  bandwidth, and 0 during idle offset calibration to provide faster response. */
15754 #endif /* Word 0 - End */
15755     } s;
15756     /* struct bdk_gsernx_lanex_sata_rxidl3a_bcfg_s cn; */
15757 };
15758 typedef union bdk_gsernx_lanex_sata_rxidl3a_bcfg bdk_gsernx_lanex_sata_rxidl3a_bcfg_t;
15759 
15760 static inline uint64_t BDK_GSERNX_LANEX_SATA_RXIDL3A_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_SATA_RXIDL3A_BCFG(unsigned long a,unsigned long b)15761 static inline uint64_t BDK_GSERNX_LANEX_SATA_RXIDL3A_BCFG(unsigned long a, unsigned long b)
15762 {
15763     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
15764         return 0x87e090002d00ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
15765     __bdk_csr_fatal("GSERNX_LANEX_SATA_RXIDL3A_BCFG", 2, a, b, 0, 0);
15766 }
15767 
15768 #define typedef_BDK_GSERNX_LANEX_SATA_RXIDL3A_BCFG(a,b) bdk_gsernx_lanex_sata_rxidl3a_bcfg_t
15769 #define bustype_BDK_GSERNX_LANEX_SATA_RXIDL3A_BCFG(a,b) BDK_CSR_TYPE_RSL
15770 #define basename_BDK_GSERNX_LANEX_SATA_RXIDL3A_BCFG(a,b) "GSERNX_LANEX_SATA_RXIDL3A_BCFG"
15771 #define device_bar_BDK_GSERNX_LANEX_SATA_RXIDL3A_BCFG(a,b) 0x0 /* PF_BAR0 */
15772 #define busnum_BDK_GSERNX_LANEX_SATA_RXIDL3A_BCFG(a,b) (a)
15773 #define arguments_BDK_GSERNX_LANEX_SATA_RXIDL3A_BCFG(a,b) (a),(b),-1,-1
15774 
15775 /**
15776  * Register (RSL) gsern#_lane#_sata_rxidle1_bcfg
15777  *
15778  * GSER Lane SATA Gen1 RX Idle Detection Filter Control Register
15779  * Parameters controlling the analog detection and digital filtering of the receiver's
15780  * idle detection logic for SATA GEN1. For the digital filtering, setting all fields to 1,
15781  * i.e., N0=N1=I0=I1=L0=L1=1, results in no filtering.
15782  */
15783 union bdk_gsernx_lanex_sata_rxidle1_bcfg
15784 {
15785     uint64_t u;
15786     struct bdk_gsernx_lanex_sata_rxidle1_bcfg_s
15787     {
15788 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
15789         uint64_t reserved_63           : 1;
15790         uint64_t i1                    : 4;  /**< [ 62: 59](R/W) Ones count increment parameter. When a one in the raw idle signal from the custom
15791                                                                  macro is encountered, the ones count is incremented by this amount, saturating
15792                                                                  to a maximum of [N1]. */
15793         uint64_t i0                    : 4;  /**< [ 58: 55](R/W) Zeros count increment parameter. When a zero in the raw idle signal from the
15794                                                                  custom macro is encountered, the zeros count is incremented by this amount,
15795                                                                  saturating to a maximum count of [N0]. */
15796         uint64_t reserved_54           : 1;
15797         uint64_t n1                    : 27; /**< [ 53: 27](R/W) Threshold for the count of ones in the raw idle signal from the custom macro
15798                                                                  required to assert the idle filter output. */
15799         uint64_t n0                    : 27; /**< [ 26:  0](R/W) Threshold for the count of zeros in the raw idle signal from the custom macro
15800                                                                  required to deassert the idle filter output. */
15801 #else /* Word 0 - Little Endian */
15802         uint64_t n0                    : 27; /**< [ 26:  0](R/W) Threshold for the count of zeros in the raw idle signal from the custom macro
15803                                                                  required to deassert the idle filter output. */
15804         uint64_t n1                    : 27; /**< [ 53: 27](R/W) Threshold for the count of ones in the raw idle signal from the custom macro
15805                                                                  required to assert the idle filter output. */
15806         uint64_t reserved_54           : 1;
15807         uint64_t i0                    : 4;  /**< [ 58: 55](R/W) Zeros count increment parameter. When a zero in the raw idle signal from the
15808                                                                  custom macro is encountered, the zeros count is incremented by this amount,
15809                                                                  saturating to a maximum count of [N0]. */
15810         uint64_t i1                    : 4;  /**< [ 62: 59](R/W) Ones count increment parameter. When a one in the raw idle signal from the custom
15811                                                                  macro is encountered, the ones count is incremented by this amount, saturating
15812                                                                  to a maximum of [N1]. */
15813         uint64_t reserved_63           : 1;
15814 #endif /* Word 0 - End */
15815     } s;
15816     /* struct bdk_gsernx_lanex_sata_rxidle1_bcfg_s cn; */
15817 };
15818 typedef union bdk_gsernx_lanex_sata_rxidle1_bcfg bdk_gsernx_lanex_sata_rxidle1_bcfg_t;
15819 
15820 static inline uint64_t BDK_GSERNX_LANEX_SATA_RXIDLE1_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_SATA_RXIDLE1_BCFG(unsigned long a,unsigned long b)15821 static inline uint64_t BDK_GSERNX_LANEX_SATA_RXIDLE1_BCFG(unsigned long a, unsigned long b)
15822 {
15823     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
15824         return 0x87e090002cb0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
15825     __bdk_csr_fatal("GSERNX_LANEX_SATA_RXIDLE1_BCFG", 2, a, b, 0, 0);
15826 }
15827 
15828 #define typedef_BDK_GSERNX_LANEX_SATA_RXIDLE1_BCFG(a,b) bdk_gsernx_lanex_sata_rxidle1_bcfg_t
15829 #define bustype_BDK_GSERNX_LANEX_SATA_RXIDLE1_BCFG(a,b) BDK_CSR_TYPE_RSL
15830 #define basename_BDK_GSERNX_LANEX_SATA_RXIDLE1_BCFG(a,b) "GSERNX_LANEX_SATA_RXIDLE1_BCFG"
15831 #define device_bar_BDK_GSERNX_LANEX_SATA_RXIDLE1_BCFG(a,b) 0x0 /* PF_BAR0 */
15832 #define busnum_BDK_GSERNX_LANEX_SATA_RXIDLE1_BCFG(a,b) (a)
15833 #define arguments_BDK_GSERNX_LANEX_SATA_RXIDLE1_BCFG(a,b) (a),(b),-1,-1
15834 
15835 /**
15836  * Register (RSL) gsern#_lane#_sata_rxidle2_bcfg
15837  *
15838  * GSER Lane SATA Gen1 RX Idle Detection Filter Control Register
15839  * Parameters controlling the analog detection and digital filtering of the receiver's
15840  * idle detection logic for SATA GEN2. For the digital filtering, setting all fields to 1,
15841  * i.e., N0=N1=I0=I1=L0=L1=1, results in no filtering.
15842  */
15843 union bdk_gsernx_lanex_sata_rxidle2_bcfg
15844 {
15845     uint64_t u;
15846     struct bdk_gsernx_lanex_sata_rxidle2_bcfg_s
15847     {
15848 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
15849         uint64_t reserved_63           : 1;
15850         uint64_t i1                    : 4;  /**< [ 62: 59](R/W) Ones count increment parameter. When a one in the raw idle signal from the custom
15851                                                                  macro is encountered, the ones count is incremented by this amount, saturating
15852                                                                  to a maximum of [N1]. */
15853         uint64_t i0                    : 4;  /**< [ 58: 55](R/W) Zeros count increment parameter. When a zero in the raw idle signal from the
15854                                                                  custom macro is encountered, the zeros count is incremented by this amount,
15855                                                                  saturating to a maximum count of [N0]. */
15856         uint64_t reserved_54           : 1;
15857         uint64_t n1                    : 27; /**< [ 53: 27](R/W) Threshold for the count of ones in the raw idle signal from the custom macro
15858                                                                  required to assert the idle filter output. */
15859         uint64_t n0                    : 27; /**< [ 26:  0](R/W) Threshold for the count of zeros in the raw idle signal from the custom macro
15860                                                                  required to deassert the idle filter output. */
15861 #else /* Word 0 - Little Endian */
15862         uint64_t n0                    : 27; /**< [ 26:  0](R/W) Threshold for the count of zeros in the raw idle signal from the custom macro
15863                                                                  required to deassert the idle filter output. */
15864         uint64_t n1                    : 27; /**< [ 53: 27](R/W) Threshold for the count of ones in the raw idle signal from the custom macro
15865                                                                  required to assert the idle filter output. */
15866         uint64_t reserved_54           : 1;
15867         uint64_t i0                    : 4;  /**< [ 58: 55](R/W) Zeros count increment parameter. When a zero in the raw idle signal from the
15868                                                                  custom macro is encountered, the zeros count is incremented by this amount,
15869                                                                  saturating to a maximum count of [N0]. */
15870         uint64_t i1                    : 4;  /**< [ 62: 59](R/W) Ones count increment parameter. When a one in the raw idle signal from the custom
15871                                                                  macro is encountered, the ones count is incremented by this amount, saturating
15872                                                                  to a maximum of [N1]. */
15873         uint64_t reserved_63           : 1;
15874 #endif /* Word 0 - End */
15875     } s;
15876     /* struct bdk_gsernx_lanex_sata_rxidle2_bcfg_s cn; */
15877 };
15878 typedef union bdk_gsernx_lanex_sata_rxidle2_bcfg bdk_gsernx_lanex_sata_rxidle2_bcfg_t;
15879 
15880 static inline uint64_t BDK_GSERNX_LANEX_SATA_RXIDLE2_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_SATA_RXIDLE2_BCFG(unsigned long a,unsigned long b)15881 static inline uint64_t BDK_GSERNX_LANEX_SATA_RXIDLE2_BCFG(unsigned long a, unsigned long b)
15882 {
15883     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
15884         return 0x87e090002cd0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
15885     __bdk_csr_fatal("GSERNX_LANEX_SATA_RXIDLE2_BCFG", 2, a, b, 0, 0);
15886 }
15887 
15888 #define typedef_BDK_GSERNX_LANEX_SATA_RXIDLE2_BCFG(a,b) bdk_gsernx_lanex_sata_rxidle2_bcfg_t
15889 #define bustype_BDK_GSERNX_LANEX_SATA_RXIDLE2_BCFG(a,b) BDK_CSR_TYPE_RSL
15890 #define basename_BDK_GSERNX_LANEX_SATA_RXIDLE2_BCFG(a,b) "GSERNX_LANEX_SATA_RXIDLE2_BCFG"
15891 #define device_bar_BDK_GSERNX_LANEX_SATA_RXIDLE2_BCFG(a,b) 0x0 /* PF_BAR0 */
15892 #define busnum_BDK_GSERNX_LANEX_SATA_RXIDLE2_BCFG(a,b) (a)
15893 #define arguments_BDK_GSERNX_LANEX_SATA_RXIDLE2_BCFG(a,b) (a),(b),-1,-1
15894 
15895 /**
15896  * Register (RSL) gsern#_lane#_sata_rxidle3_bcfg
15897  *
15898  * GSER Lane SATA Gen1 RX Idle Detection Filter Control Register
15899  * Parameters controlling the analog detection and digital filtering of the receiver's
15900  * idle detection logic for SATA GEN3. For the digital filtering, setting all fields to 1,
15901  * i.e., N0=N1=I0=I1=L0=L1=1, results in no filtering.
15902  */
15903 union bdk_gsernx_lanex_sata_rxidle3_bcfg
15904 {
15905     uint64_t u;
15906     struct bdk_gsernx_lanex_sata_rxidle3_bcfg_s
15907     {
15908 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
15909         uint64_t reserved_63           : 1;
15910         uint64_t i1                    : 4;  /**< [ 62: 59](R/W) Ones count increment parameter. When a one in the raw idle signal from the custom
15911                                                                  macro is encountered, the ones count is incremented by this amount, saturating
15912                                                                  to a maximum of [N1]. */
15913         uint64_t i0                    : 4;  /**< [ 58: 55](R/W) Zeros count increment parameter. When a zero in the raw idle signal from the
15914                                                                  custom macro is encountered, the zeros count is incremented by this amount,
15915                                                                  saturating to a maximum count of [N0]. */
15916         uint64_t reserved_54           : 1;
15917         uint64_t n1                    : 27; /**< [ 53: 27](R/W) Threshold for the count of ones in the raw idle signal from the custom macro
15918                                                                  required to assert the idle filter output. */
15919         uint64_t n0                    : 27; /**< [ 26:  0](R/W) Threshold for the count of zeros in the raw idle signal from the custom macro
15920                                                                  required to deassert the idle filter output. */
15921 #else /* Word 0 - Little Endian */
15922         uint64_t n0                    : 27; /**< [ 26:  0](R/W) Threshold for the count of zeros in the raw idle signal from the custom macro
15923                                                                  required to deassert the idle filter output. */
15924         uint64_t n1                    : 27; /**< [ 53: 27](R/W) Threshold for the count of ones in the raw idle signal from the custom macro
15925                                                                  required to assert the idle filter output. */
15926         uint64_t reserved_54           : 1;
15927         uint64_t i0                    : 4;  /**< [ 58: 55](R/W) Zeros count increment parameter. When a zero in the raw idle signal from the
15928                                                                  custom macro is encountered, the zeros count is incremented by this amount,
15929                                                                  saturating to a maximum count of [N0]. */
15930         uint64_t i1                    : 4;  /**< [ 62: 59](R/W) Ones count increment parameter. When a one in the raw idle signal from the custom
15931                                                                  macro is encountered, the ones count is incremented by this amount, saturating
15932                                                                  to a maximum of [N1]. */
15933         uint64_t reserved_63           : 1;
15934 #endif /* Word 0 - End */
15935     } s;
15936     /* struct bdk_gsernx_lanex_sata_rxidle3_bcfg_s cn; */
15937 };
15938 typedef union bdk_gsernx_lanex_sata_rxidle3_bcfg bdk_gsernx_lanex_sata_rxidle3_bcfg_t;
15939 
15940 static inline uint64_t BDK_GSERNX_LANEX_SATA_RXIDLE3_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_SATA_RXIDLE3_BCFG(unsigned long a,unsigned long b)15941 static inline uint64_t BDK_GSERNX_LANEX_SATA_RXIDLE3_BCFG(unsigned long a, unsigned long b)
15942 {
15943     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
15944         return 0x87e090002cf0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
15945     __bdk_csr_fatal("GSERNX_LANEX_SATA_RXIDLE3_BCFG", 2, a, b, 0, 0);
15946 }
15947 
15948 #define typedef_BDK_GSERNX_LANEX_SATA_RXIDLE3_BCFG(a,b) bdk_gsernx_lanex_sata_rxidle3_bcfg_t
15949 #define bustype_BDK_GSERNX_LANEX_SATA_RXIDLE3_BCFG(a,b) BDK_CSR_TYPE_RSL
15950 #define basename_BDK_GSERNX_LANEX_SATA_RXIDLE3_BCFG(a,b) "GSERNX_LANEX_SATA_RXIDLE3_BCFG"
15951 #define device_bar_BDK_GSERNX_LANEX_SATA_RXIDLE3_BCFG(a,b) 0x0 /* PF_BAR0 */
15952 #define busnum_BDK_GSERNX_LANEX_SATA_RXIDLE3_BCFG(a,b) (a)
15953 #define arguments_BDK_GSERNX_LANEX_SATA_RXIDLE3_BCFG(a,b) (a),(b),-1,-1
15954 
15955 /**
15956  * Register (RSL) gsern#_lane#_sata_txdrv1_bcfg
15957  *
15958  * GSER Lane SATA TX Drive Control Register
15959  * TX drive Cpre, Cpost and Cmain Coefficient values and TX bias/swing for SATA GEN1.
15960  */
15961 union bdk_gsernx_lanex_sata_txdrv1_bcfg
15962 {
15963     uint64_t u;
15964     struct bdk_gsernx_lanex_sata_txdrv1_bcfg_s
15965     {
15966 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
15967         uint64_t reserved_30_63        : 34;
15968         uint64_t sata_g1_tx_bias       : 6;  /**< [ 29: 24](R/W) TX bias/swing selection for SATA GEN1.
15969                                                                  Typical values would be:
15970                                                                    42 = Nominal 1.0V p-p transmit amplitude.
15971                                                                    52 = Nominal 1.2V p-p transmit amplitude. */
15972         uint64_t reserved_21_23        : 3;
15973         uint64_t sata_g1_cpost         : 5;  /**< [ 20: 16](R/W) SATA GEN1 Cpost value.  Combined with the reset values of [SATA_G1_CMAIN] and
15974                                                                  [SATA_G1_CPRE] this yields 3.5 dB TX deemphasis. */
15975         uint64_t reserved_14_15        : 2;
15976         uint64_t sata_g1_cmain         : 6;  /**< [ 13:  8](R/W) SATA GEN1 Cmain value.  Combined with the reset values of [SATA_G1_CPOST] and
15977                                                                  [SATA_G1_CPRE] this yields 3.5 dB TX deemphasis. */
15978         uint64_t reserved_5_7          : 3;
15979         uint64_t sata_g1_cpre          : 5;  /**< [  4:  0](R/W) SATA GEN1 Cpre value.  Combined with the reset values of [SATA_G1_CPOST] and
15980                                                                  [SATA_G1_CMAIN] this yields 3.5 dB TX deemphasis. */
15981 #else /* Word 0 - Little Endian */
15982         uint64_t sata_g1_cpre          : 5;  /**< [  4:  0](R/W) SATA GEN1 Cpre value.  Combined with the reset values of [SATA_G1_CPOST] and
15983                                                                  [SATA_G1_CMAIN] this yields 3.5 dB TX deemphasis. */
15984         uint64_t reserved_5_7          : 3;
15985         uint64_t sata_g1_cmain         : 6;  /**< [ 13:  8](R/W) SATA GEN1 Cmain value.  Combined with the reset values of [SATA_G1_CPOST] and
15986                                                                  [SATA_G1_CPRE] this yields 3.5 dB TX deemphasis. */
15987         uint64_t reserved_14_15        : 2;
15988         uint64_t sata_g1_cpost         : 5;  /**< [ 20: 16](R/W) SATA GEN1 Cpost value.  Combined with the reset values of [SATA_G1_CMAIN] and
15989                                                                  [SATA_G1_CPRE] this yields 3.5 dB TX deemphasis. */
15990         uint64_t reserved_21_23        : 3;
15991         uint64_t sata_g1_tx_bias       : 6;  /**< [ 29: 24](R/W) TX bias/swing selection for SATA GEN1.
15992                                                                  Typical values would be:
15993                                                                    42 = Nominal 1.0V p-p transmit amplitude.
15994                                                                    52 = Nominal 1.2V p-p transmit amplitude. */
15995         uint64_t reserved_30_63        : 34;
15996 #endif /* Word 0 - End */
15997     } s;
15998     /* struct bdk_gsernx_lanex_sata_txdrv1_bcfg_s cn; */
15999 };
16000 typedef union bdk_gsernx_lanex_sata_txdrv1_bcfg bdk_gsernx_lanex_sata_txdrv1_bcfg_t;
16001 
16002 static inline uint64_t BDK_GSERNX_LANEX_SATA_TXDRV1_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_SATA_TXDRV1_BCFG(unsigned long a,unsigned long b)16003 static inline uint64_t BDK_GSERNX_LANEX_SATA_TXDRV1_BCFG(unsigned long a, unsigned long b)
16004 {
16005     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
16006         return 0x87e090002f80ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
16007     __bdk_csr_fatal("GSERNX_LANEX_SATA_TXDRV1_BCFG", 2, a, b, 0, 0);
16008 }
16009 
16010 #define typedef_BDK_GSERNX_LANEX_SATA_TXDRV1_BCFG(a,b) bdk_gsernx_lanex_sata_txdrv1_bcfg_t
16011 #define bustype_BDK_GSERNX_LANEX_SATA_TXDRV1_BCFG(a,b) BDK_CSR_TYPE_RSL
16012 #define basename_BDK_GSERNX_LANEX_SATA_TXDRV1_BCFG(a,b) "GSERNX_LANEX_SATA_TXDRV1_BCFG"
16013 #define device_bar_BDK_GSERNX_LANEX_SATA_TXDRV1_BCFG(a,b) 0x0 /* PF_BAR0 */
16014 #define busnum_BDK_GSERNX_LANEX_SATA_TXDRV1_BCFG(a,b) (a)
16015 #define arguments_BDK_GSERNX_LANEX_SATA_TXDRV1_BCFG(a,b) (a),(b),-1,-1
16016 
16017 /**
16018  * Register (RSL) gsern#_lane#_sata_txdrv2_bcfg
16019  *
16020  * GSER Lane SATA TX Drive Control Register
16021  * TX drive Cpre, Cpost and Cmain Coefficient values and TX bias/swing for SATA GEN2.
16022  */
16023 union bdk_gsernx_lanex_sata_txdrv2_bcfg
16024 {
16025     uint64_t u;
16026     struct bdk_gsernx_lanex_sata_txdrv2_bcfg_s
16027     {
16028 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
16029         uint64_t reserved_30_63        : 34;
16030         uint64_t sata_g2_tx_bias       : 6;  /**< [ 29: 24](R/W) TX bias/swing selection for SATA GEN2.
16031                                                                  Typical values would be:
16032                                                                    42 = Nominal 1.0V p-p transmit amplitude.
16033                                                                    52 = Nominal 1.2V p-p transmit amplitude. */
16034         uint64_t reserved_21_23        : 3;
16035         uint64_t sata_g2_cpost         : 5;  /**< [ 20: 16](R/W) SATA GEN2 Cpost value.  Combined with the reset values of [SATA_G2_CMAIN] and
16036                                                                  [SATA_G2_CPRE] this yields 3.5 dB TX deemphasis. */
16037         uint64_t reserved_14_15        : 2;
16038         uint64_t sata_g2_cmain         : 6;  /**< [ 13:  8](R/W) SATA GEN2 Cmain value.  Combined with the reset values of [SATA_G2_CPOST] and
16039                                                                  [SATA_G2_CPRE] this yields 3.5 dB TX deemphasis. */
16040         uint64_t reserved_5_7          : 3;
16041         uint64_t sata_g2_cpre          : 5;  /**< [  4:  0](R/W) SATA GEN2 Cpre value.  Combined with the reset values of [SATA_G2_CPOST] and
16042                                                                  [SATA_G2_CMAIN] this yields 3.5 dB TX deemphasis. */
16043 #else /* Word 0 - Little Endian */
16044         uint64_t sata_g2_cpre          : 5;  /**< [  4:  0](R/W) SATA GEN2 Cpre value.  Combined with the reset values of [SATA_G2_CPOST] and
16045                                                                  [SATA_G2_CMAIN] this yields 3.5 dB TX deemphasis. */
16046         uint64_t reserved_5_7          : 3;
16047         uint64_t sata_g2_cmain         : 6;  /**< [ 13:  8](R/W) SATA GEN2 Cmain value.  Combined with the reset values of [SATA_G2_CPOST] and
16048                                                                  [SATA_G2_CPRE] this yields 3.5 dB TX deemphasis. */
16049         uint64_t reserved_14_15        : 2;
16050         uint64_t sata_g2_cpost         : 5;  /**< [ 20: 16](R/W) SATA GEN2 Cpost value.  Combined with the reset values of [SATA_G2_CMAIN] and
16051                                                                  [SATA_G2_CPRE] this yields 3.5 dB TX deemphasis. */
16052         uint64_t reserved_21_23        : 3;
16053         uint64_t sata_g2_tx_bias       : 6;  /**< [ 29: 24](R/W) TX bias/swing selection for SATA GEN2.
16054                                                                  Typical values would be:
16055                                                                    42 = Nominal 1.0V p-p transmit amplitude.
16056                                                                    52 = Nominal 1.2V p-p transmit amplitude. */
16057         uint64_t reserved_30_63        : 34;
16058 #endif /* Word 0 - End */
16059     } s;
16060     /* struct bdk_gsernx_lanex_sata_txdrv2_bcfg_s cn; */
16061 };
16062 typedef union bdk_gsernx_lanex_sata_txdrv2_bcfg bdk_gsernx_lanex_sata_txdrv2_bcfg_t;
16063 
16064 static inline uint64_t BDK_GSERNX_LANEX_SATA_TXDRV2_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_SATA_TXDRV2_BCFG(unsigned long a,unsigned long b)16065 static inline uint64_t BDK_GSERNX_LANEX_SATA_TXDRV2_BCFG(unsigned long a, unsigned long b)
16066 {
16067     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
16068         return 0x87e090002f90ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
16069     __bdk_csr_fatal("GSERNX_LANEX_SATA_TXDRV2_BCFG", 2, a, b, 0, 0);
16070 }
16071 
16072 #define typedef_BDK_GSERNX_LANEX_SATA_TXDRV2_BCFG(a,b) bdk_gsernx_lanex_sata_txdrv2_bcfg_t
16073 #define bustype_BDK_GSERNX_LANEX_SATA_TXDRV2_BCFG(a,b) BDK_CSR_TYPE_RSL
16074 #define basename_BDK_GSERNX_LANEX_SATA_TXDRV2_BCFG(a,b) "GSERNX_LANEX_SATA_TXDRV2_BCFG"
16075 #define device_bar_BDK_GSERNX_LANEX_SATA_TXDRV2_BCFG(a,b) 0x0 /* PF_BAR0 */
16076 #define busnum_BDK_GSERNX_LANEX_SATA_TXDRV2_BCFG(a,b) (a)
16077 #define arguments_BDK_GSERNX_LANEX_SATA_TXDRV2_BCFG(a,b) (a),(b),-1,-1
16078 
16079 /**
16080  * Register (RSL) gsern#_lane#_sata_txdrv3_bcfg
16081  *
16082  * GSER Lane SATA TX Drive Control Register
16083  * TX drive Cpre, Cpost and Cmain Coefficient values and TX bias/swing for SATA GEN3.
16084  */
16085 union bdk_gsernx_lanex_sata_txdrv3_bcfg
16086 {
16087     uint64_t u;
16088     struct bdk_gsernx_lanex_sata_txdrv3_bcfg_s
16089     {
16090 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
16091         uint64_t reserved_30_63        : 34;
16092         uint64_t sata_g3_tx_bias       : 6;  /**< [ 29: 24](R/W) TX bias/swing selection for SATA GEN3.
16093                                                                  Typical values would be:
16094                                                                    42 = Nominal 1.0V p-p transmit amplitude.
16095                                                                    52 = Nominal 1.2V p-p transmit amplitude. */
16096         uint64_t reserved_21_23        : 3;
16097         uint64_t sata_g3_cpost         : 5;  /**< [ 20: 16](R/W) SATA GEN3 Cpost value.  Combined with the reset values of [SATA_G3_CMAIN] and
16098                                                                  [SATA_G3_CPRE] this yields 6 dB TX deemphasis. */
16099         uint64_t reserved_14_15        : 2;
16100         uint64_t sata_g3_cmain         : 6;  /**< [ 13:  8](R/W) SATA GEN3 Cmain value.  Combined with the reset values of [SATA_G3_CPOST] and
16101                                                                  [SATA_G3_CPRE] this yields 6 dB TX deemphasis. */
16102         uint64_t reserved_5_7          : 3;
16103         uint64_t sata_g3_cpre          : 5;  /**< [  4:  0](R/W) SATA GEN3 Cpre value.  Combined with the reset values of [SATA_G3_CPOST] and
16104                                                                  [SATA_G3_CMAIN] this yields 6 dB TX deemphasis. */
16105 #else /* Word 0 - Little Endian */
16106         uint64_t sata_g3_cpre          : 5;  /**< [  4:  0](R/W) SATA GEN3 Cpre value.  Combined with the reset values of [SATA_G3_CPOST] and
16107                                                                  [SATA_G3_CMAIN] this yields 6 dB TX deemphasis. */
16108         uint64_t reserved_5_7          : 3;
16109         uint64_t sata_g3_cmain         : 6;  /**< [ 13:  8](R/W) SATA GEN3 Cmain value.  Combined with the reset values of [SATA_G3_CPOST] and
16110                                                                  [SATA_G3_CPRE] this yields 6 dB TX deemphasis. */
16111         uint64_t reserved_14_15        : 2;
16112         uint64_t sata_g3_cpost         : 5;  /**< [ 20: 16](R/W) SATA GEN3 Cpost value.  Combined with the reset values of [SATA_G3_CMAIN] and
16113                                                                  [SATA_G3_CPRE] this yields 6 dB TX deemphasis. */
16114         uint64_t reserved_21_23        : 3;
16115         uint64_t sata_g3_tx_bias       : 6;  /**< [ 29: 24](R/W) TX bias/swing selection for SATA GEN3.
16116                                                                  Typical values would be:
16117                                                                    42 = Nominal 1.0V p-p transmit amplitude.
16118                                                                    52 = Nominal 1.2V p-p transmit amplitude. */
16119         uint64_t reserved_30_63        : 34;
16120 #endif /* Word 0 - End */
16121     } s;
16122     /* struct bdk_gsernx_lanex_sata_txdrv3_bcfg_s cn; */
16123 };
16124 typedef union bdk_gsernx_lanex_sata_txdrv3_bcfg bdk_gsernx_lanex_sata_txdrv3_bcfg_t;
16125 
16126 static inline uint64_t BDK_GSERNX_LANEX_SATA_TXDRV3_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_SATA_TXDRV3_BCFG(unsigned long a,unsigned long b)16127 static inline uint64_t BDK_GSERNX_LANEX_SATA_TXDRV3_BCFG(unsigned long a, unsigned long b)
16128 {
16129     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
16130         return 0x87e090002fa0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
16131     __bdk_csr_fatal("GSERNX_LANEX_SATA_TXDRV3_BCFG", 2, a, b, 0, 0);
16132 }
16133 
16134 #define typedef_BDK_GSERNX_LANEX_SATA_TXDRV3_BCFG(a,b) bdk_gsernx_lanex_sata_txdrv3_bcfg_t
16135 #define bustype_BDK_GSERNX_LANEX_SATA_TXDRV3_BCFG(a,b) BDK_CSR_TYPE_RSL
16136 #define basename_BDK_GSERNX_LANEX_SATA_TXDRV3_BCFG(a,b) "GSERNX_LANEX_SATA_TXDRV3_BCFG"
16137 #define device_bar_BDK_GSERNX_LANEX_SATA_TXDRV3_BCFG(a,b) 0x0 /* PF_BAR0 */
16138 #define busnum_BDK_GSERNX_LANEX_SATA_TXDRV3_BCFG(a,b) (a)
16139 #define arguments_BDK_GSERNX_LANEX_SATA_TXDRV3_BCFG(a,b) (a),(b),-1,-1
16140 
16141 /**
16142  * Register (RSL) gsern#_lane#_scope_0_dat
16143  *
16144  * GSER Lane PCS Lite Scope Data Gathering Result Register 0
16145  */
16146 union bdk_gsernx_lanex_scope_0_dat
16147 {
16148     uint64_t u;
16149     struct bdk_gsernx_lanex_scope_0_dat_s
16150     {
16151 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
16152         uint64_t reserved_41_63        : 23;
16153         uint64_t cnt_done              : 1;  /**< [ 40: 40](RO/H) Indicates when the match counter has counted down from
16154                                                                  GSERN()_LANE()_SCOPE_CTL[CNT_LIMIT] to 0x0. The error vector will no longer
16155                                                                  be updated once the counter is done. To clear the flag a new
16156                                                                  GSERN()_LANE()_SCOPE_CTL[DOUTQ_LD] or GSERN()_LANE()_SCOPE_CTL[CNT_RST_N] toggle
16157                                                                  needs to happen. */
16158         uint64_t ref_vec               : 40; /**< [ 39:  0](RO/H) Stored doutq that will be used to compare against incoming
16159                                                                  doutq. Its value is changed by toggling GSERN()_LANE()_SCOPE_CTL[DOUTQ_LD]
16160                                                                  low then high, which will save the next doutq received in the PCS
16161                                                                  layer as the new reference vector, or by setting
16162                                                                  GSERN()_LANE()_SCOPE_CTL_2[REF_VEC_OVRRIDE] and
16163                                                                  GSERN()_LANE()_SCOPE_CTL_2[REF_VEC_OVRRIDE_EN].
16164                                                                  This field is only valid when GSERN()_LANE()_SCOPE_0_DAT[CNT_DONE] is asserted. */
16165 #else /* Word 0 - Little Endian */
16166         uint64_t ref_vec               : 40; /**< [ 39:  0](RO/H) Stored doutq that will be used to compare against incoming
16167                                                                  doutq. Its value is changed by toggling GSERN()_LANE()_SCOPE_CTL[DOUTQ_LD]
16168                                                                  low then high, which will save the next doutq received in the PCS
16169                                                                  layer as the new reference vector, or by setting
16170                                                                  GSERN()_LANE()_SCOPE_CTL_2[REF_VEC_OVRRIDE] and
16171                                                                  GSERN()_LANE()_SCOPE_CTL_2[REF_VEC_OVRRIDE_EN].
16172                                                                  This field is only valid when GSERN()_LANE()_SCOPE_0_DAT[CNT_DONE] is asserted. */
16173         uint64_t cnt_done              : 1;  /**< [ 40: 40](RO/H) Indicates when the match counter has counted down from
16174                                                                  GSERN()_LANE()_SCOPE_CTL[CNT_LIMIT] to 0x0. The error vector will no longer
16175                                                                  be updated once the counter is done. To clear the flag a new
16176                                                                  GSERN()_LANE()_SCOPE_CTL[DOUTQ_LD] or GSERN()_LANE()_SCOPE_CTL[CNT_RST_N] toggle
16177                                                                  needs to happen. */
16178         uint64_t reserved_41_63        : 23;
16179 #endif /* Word 0 - End */
16180     } s;
16181     /* struct bdk_gsernx_lanex_scope_0_dat_s cn; */
16182 };
16183 typedef union bdk_gsernx_lanex_scope_0_dat bdk_gsernx_lanex_scope_0_dat_t;
16184 
16185 static inline uint64_t BDK_GSERNX_LANEX_SCOPE_0_DAT(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_SCOPE_0_DAT(unsigned long a,unsigned long b)16186 static inline uint64_t BDK_GSERNX_LANEX_SCOPE_0_DAT(unsigned long a, unsigned long b)
16187 {
16188     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
16189         return 0x87e090000900ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
16190     __bdk_csr_fatal("GSERNX_LANEX_SCOPE_0_DAT", 2, a, b, 0, 0);
16191 }
16192 
16193 #define typedef_BDK_GSERNX_LANEX_SCOPE_0_DAT(a,b) bdk_gsernx_lanex_scope_0_dat_t
16194 #define bustype_BDK_GSERNX_LANEX_SCOPE_0_DAT(a,b) BDK_CSR_TYPE_RSL
16195 #define basename_BDK_GSERNX_LANEX_SCOPE_0_DAT(a,b) "GSERNX_LANEX_SCOPE_0_DAT"
16196 #define device_bar_BDK_GSERNX_LANEX_SCOPE_0_DAT(a,b) 0x0 /* PF_BAR0 */
16197 #define busnum_BDK_GSERNX_LANEX_SCOPE_0_DAT(a,b) (a)
16198 #define arguments_BDK_GSERNX_LANEX_SCOPE_0_DAT(a,b) (a),(b),-1,-1
16199 
16200 /**
16201  * Register (RSL) gsern#_lane#_scope_1_dat
16202  *
16203  * GSER Lane PCS Lite Scope Data Gathering Result Register 1
16204  */
16205 union bdk_gsernx_lanex_scope_1_dat
16206 {
16207     uint64_t u;
16208     struct bdk_gsernx_lanex_scope_1_dat_s
16209     {
16210 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
16211         uint64_t reserved_40_63        : 24;
16212         uint64_t err_vec               : 40; /**< [ 39:  0](RO/H) Error vector that maintains status of mismatches between doutq &
16213                                                                  doute. It updates every time there is a match between doutq & the
16214                                                                  captured GSERN()_LANE()_SCOPE_0_DAT[REF_VEC]. To clear it a toggle to
16215                                                                  GSERN()_LANE()_SCOPE_CTL[DOUTQ_LD] or GSERN()_LANE()_SCOPE_CTL[CNT_EN] is
16216                                                                  needed. This field is only valid when GSERN()_LANE()_SCOPE_0_DAT[CNT_DONE] is
16217                                                                  set. */
16218 #else /* Word 0 - Little Endian */
16219         uint64_t err_vec               : 40; /**< [ 39:  0](RO/H) Error vector that maintains status of mismatches between doutq &
16220                                                                  doute. It updates every time there is a match between doutq & the
16221                                                                  captured GSERN()_LANE()_SCOPE_0_DAT[REF_VEC]. To clear it a toggle to
16222                                                                  GSERN()_LANE()_SCOPE_CTL[DOUTQ_LD] or GSERN()_LANE()_SCOPE_CTL[CNT_EN] is
16223                                                                  needed. This field is only valid when GSERN()_LANE()_SCOPE_0_DAT[CNT_DONE] is
16224                                                                  set. */
16225         uint64_t reserved_40_63        : 24;
16226 #endif /* Word 0 - End */
16227     } s;
16228     /* struct bdk_gsernx_lanex_scope_1_dat_s cn; */
16229 };
16230 typedef union bdk_gsernx_lanex_scope_1_dat bdk_gsernx_lanex_scope_1_dat_t;
16231 
16232 static inline uint64_t BDK_GSERNX_LANEX_SCOPE_1_DAT(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_SCOPE_1_DAT(unsigned long a,unsigned long b)16233 static inline uint64_t BDK_GSERNX_LANEX_SCOPE_1_DAT(unsigned long a, unsigned long b)
16234 {
16235     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
16236         return 0x87e090000910ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
16237     __bdk_csr_fatal("GSERNX_LANEX_SCOPE_1_DAT", 2, a, b, 0, 0);
16238 }
16239 
16240 #define typedef_BDK_GSERNX_LANEX_SCOPE_1_DAT(a,b) bdk_gsernx_lanex_scope_1_dat_t
16241 #define bustype_BDK_GSERNX_LANEX_SCOPE_1_DAT(a,b) BDK_CSR_TYPE_RSL
16242 #define basename_BDK_GSERNX_LANEX_SCOPE_1_DAT(a,b) "GSERNX_LANEX_SCOPE_1_DAT"
16243 #define device_bar_BDK_GSERNX_LANEX_SCOPE_1_DAT(a,b) 0x0 /* PF_BAR0 */
16244 #define busnum_BDK_GSERNX_LANEX_SCOPE_1_DAT(a,b) (a)
16245 #define arguments_BDK_GSERNX_LANEX_SCOPE_1_DAT(a,b) (a),(b),-1,-1
16246 
16247 /**
16248  * Register (RSL) gsern#_lane#_scope_ctl
16249  *
16250  * GSER Lane PCS Lite Scope Data Gathering Control Register
16251  * Register controls for the PCS layer scope function. Use of this function
16252  * requires enabling the doute eye data path in the analog macro, i.e.,
16253  * GSERN()_LANE()_RST2_BCFG[LN_RESET_USE_EYE] should be asserted when the lane
16254  * reset state machines bring the lane out of reset.
16255  */
16256 union bdk_gsernx_lanex_scope_ctl
16257 {
16258     uint64_t u;
16259     struct bdk_gsernx_lanex_scope_ctl_s
16260     {
16261 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
16262         uint64_t reserved_57_63        : 7;
16263         uint64_t doutq_ld              : 1;  /**< [ 56: 56](R/W) Set to a doutq value for comparison against incoming
16264                                                                  doutq. The incoming stream should guarantee a recurring doutq
16265                                                                  pattern to capture valid error vector. This works only on a
16266                                                                  positive-edge trigger which means a new value won't be stored until
16267                                                                  a 0-\>1 transition happens. Assertion of GSERN()_LANE()_SCOPE_CTL[DOUTQ_LD]
16268                                                                  also resets the match counter, GSERN()_LANE()_SCOPE_0_DAT[CNT_DONE] and
16269                                                                  GSERN()_LANE()_SCOPE_1_DAT[ERR_VEC]. Deassert [DOUTQ_LD] to
16270                                                                  enable the match counter to count down and to enable collection of
16271                                                                  new data in the error vector (also requires that
16272                                                                  GSERN()_LANE()_SCOPE_CTL[CNT_RST_N] is clear).
16273 
16274                                                                  For diagnostic use only. */
16275         uint64_t reserved_50_55        : 6;
16276         uint64_t scope_en              : 1;  /**< [ 49: 49](R/W) Set to enable collection of GSERN()_LANE()_SCOPE_1_DAT[ERR_VEC]
16277                                                                  data. Deassertion stops collection of new mismatch bits, but does
16278                                                                  not reset GSERN()_LANE()_SCOPE_1_DAT[ERR_VEC]. If
16279                                                                  GSERN()_LANE()_SCOPE_CTL[CNT_EN] is also asserted, collection will stop
16280                                                                  when the GSERN()_LANE()_SCOPE_CTL[CNT_LIMIT] is reached. If not using
16281                                                                  GSERN()_LANE()_SCOPE_CTL[CNT_LIMIT], software can control duration of
16282                                                                  GSERN()_LANE()_SCOPE_1_DAT[ERR_VEC] data collection through
16283                                                                  [SCOPE_EN]. All scope logic is conditionally clocked with the
16284                                                                  condition being GSERN()_LANE()_SCOPE_CTL[SCOPE_EN], so deassert this bit
16285                                                                  when not used to save power.
16286 
16287                                                                  For diagnostic use only. */
16288         uint64_t cnt_rst_n             : 1;  /**< [ 48: 48](R/W) Set low to reset the match counter, the done indicator, and the error
16289                                                                  vector. The reset value for the counter is set by
16290                                                                  GSERN()_LANE()_SCOPE_CTL[CNT_LIMIT]. GSERN()_LANE()_SCOPE_0_DAT[CNT_DONE] and
16291                                                                  the error vector, GSERN()_LANE()_SCOPE_1_DAT[ERR_VEC], reset to all zeros. Set
16292                                                                  this bit high to enable the match counter to count down and to enable collection
16293                                                                  of new data in the error vector (also requires that
16294                                                                  GSERN()_LANE()_SCOPE_CTL[DOUTQ_LD] is not set high). Cycle
16295                                                                  GSERN()_LANE()_SCOPE_CTL[CNT_RST_N] (low then high) to clear the counter and the
16296                                                                  error vector, leaving GSERN()_LANE()_SCOPE_0_DAT[REF_VEC] unchanged, enabling
16297                                                                  collection of a new error vector under updated receiver settings using the same
16298                                                                  reference vector match pattern.
16299 
16300                                                                  For diagnostic use only. */
16301         uint64_t reserved_41_47        : 7;
16302         uint64_t cnt_en                : 1;  /**< [ 40: 40](R/W) Enable use of the match counter to limit the number of doutq to
16303                                                                  ref_vec matches over which the doutq to doute mismatch vector is
16304                                                                  accumulated. If this bit is not asserted,
16305                                                                  GSERN()_LANE()_SCOPE_1_DAT[ERR_VEC] accumulation is limited by
16306                                                                  GSERN()_LANE()_SCOPE_CTL[SCOPE_EN] and/or GSERN()_LANE()_SCOPE_CTL[CNT_RST_N].
16307 
16308                                                                  For diagnostic use only. */
16309         uint64_t cnt_limit             : 40; /**< [ 39:  0](R/W) Limit value the match counter starts decrementing
16310                                                                  from. It gets loaded every time a new doutq load happens or a
16311                                                                  counter reset happens.
16312 
16313                                                                  For diagnostic use only. */
16314 #else /* Word 0 - Little Endian */
16315         uint64_t cnt_limit             : 40; /**< [ 39:  0](R/W) Limit value the match counter starts decrementing
16316                                                                  from. It gets loaded every time a new doutq load happens or a
16317                                                                  counter reset happens.
16318 
16319                                                                  For diagnostic use only. */
16320         uint64_t cnt_en                : 1;  /**< [ 40: 40](R/W) Enable use of the match counter to limit the number of doutq to
16321                                                                  ref_vec matches over which the doutq to doute mismatch vector is
16322                                                                  accumulated. If this bit is not asserted,
16323                                                                  GSERN()_LANE()_SCOPE_1_DAT[ERR_VEC] accumulation is limited by
16324                                                                  GSERN()_LANE()_SCOPE_CTL[SCOPE_EN] and/or GSERN()_LANE()_SCOPE_CTL[CNT_RST_N].
16325 
16326                                                                  For diagnostic use only. */
16327         uint64_t reserved_41_47        : 7;
16328         uint64_t cnt_rst_n             : 1;  /**< [ 48: 48](R/W) Set low to reset the match counter, the done indicator, and the error
16329                                                                  vector. The reset value for the counter is set by
16330                                                                  GSERN()_LANE()_SCOPE_CTL[CNT_LIMIT]. GSERN()_LANE()_SCOPE_0_DAT[CNT_DONE] and
16331                                                                  the error vector, GSERN()_LANE()_SCOPE_1_DAT[ERR_VEC], reset to all zeros. Set
16332                                                                  this bit high to enable the match counter to count down and to enable collection
16333                                                                  of new data in the error vector (also requires that
16334                                                                  GSERN()_LANE()_SCOPE_CTL[DOUTQ_LD] is not set high). Cycle
16335                                                                  GSERN()_LANE()_SCOPE_CTL[CNT_RST_N] (low then high) to clear the counter and the
16336                                                                  error vector, leaving GSERN()_LANE()_SCOPE_0_DAT[REF_VEC] unchanged, enabling
16337                                                                  collection of a new error vector under updated receiver settings using the same
16338                                                                  reference vector match pattern.
16339 
16340                                                                  For diagnostic use only. */
16341         uint64_t scope_en              : 1;  /**< [ 49: 49](R/W) Set to enable collection of GSERN()_LANE()_SCOPE_1_DAT[ERR_VEC]
16342                                                                  data. Deassertion stops collection of new mismatch bits, but does
16343                                                                  not reset GSERN()_LANE()_SCOPE_1_DAT[ERR_VEC]. If
16344                                                                  GSERN()_LANE()_SCOPE_CTL[CNT_EN] is also asserted, collection will stop
16345                                                                  when the GSERN()_LANE()_SCOPE_CTL[CNT_LIMIT] is reached. If not using
16346                                                                  GSERN()_LANE()_SCOPE_CTL[CNT_LIMIT], software can control duration of
16347                                                                  GSERN()_LANE()_SCOPE_1_DAT[ERR_VEC] data collection through
16348                                                                  [SCOPE_EN]. All scope logic is conditionally clocked with the
16349                                                                  condition being GSERN()_LANE()_SCOPE_CTL[SCOPE_EN], so deassert this bit
16350                                                                  when not used to save power.
16351 
16352                                                                  For diagnostic use only. */
16353         uint64_t reserved_50_55        : 6;
16354         uint64_t doutq_ld              : 1;  /**< [ 56: 56](R/W) Set to a doutq value for comparison against incoming
16355                                                                  doutq. The incoming stream should guarantee a recurring doutq
16356                                                                  pattern to capture valid error vector. This works only on a
16357                                                                  positive-edge trigger which means a new value won't be stored until
16358                                                                  a 0-\>1 transition happens. Assertion of GSERN()_LANE()_SCOPE_CTL[DOUTQ_LD]
16359                                                                  also resets the match counter, GSERN()_LANE()_SCOPE_0_DAT[CNT_DONE] and
16360                                                                  GSERN()_LANE()_SCOPE_1_DAT[ERR_VEC]. Deassert [DOUTQ_LD] to
16361                                                                  enable the match counter to count down and to enable collection of
16362                                                                  new data in the error vector (also requires that
16363                                                                  GSERN()_LANE()_SCOPE_CTL[CNT_RST_N] is clear).
16364 
16365                                                                  For diagnostic use only. */
16366         uint64_t reserved_57_63        : 7;
16367 #endif /* Word 0 - End */
16368     } s;
16369     /* struct bdk_gsernx_lanex_scope_ctl_s cn; */
16370 };
16371 typedef union bdk_gsernx_lanex_scope_ctl bdk_gsernx_lanex_scope_ctl_t;
16372 
16373 static inline uint64_t BDK_GSERNX_LANEX_SCOPE_CTL(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_SCOPE_CTL(unsigned long a,unsigned long b)16374 static inline uint64_t BDK_GSERNX_LANEX_SCOPE_CTL(unsigned long a, unsigned long b)
16375 {
16376     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
16377         return 0x87e0900008d0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
16378     __bdk_csr_fatal("GSERNX_LANEX_SCOPE_CTL", 2, a, b, 0, 0);
16379 }
16380 
16381 #define typedef_BDK_GSERNX_LANEX_SCOPE_CTL(a,b) bdk_gsernx_lanex_scope_ctl_t
16382 #define bustype_BDK_GSERNX_LANEX_SCOPE_CTL(a,b) BDK_CSR_TYPE_RSL
16383 #define basename_BDK_GSERNX_LANEX_SCOPE_CTL(a,b) "GSERNX_LANEX_SCOPE_CTL"
16384 #define device_bar_BDK_GSERNX_LANEX_SCOPE_CTL(a,b) 0x0 /* PF_BAR0 */
16385 #define busnum_BDK_GSERNX_LANEX_SCOPE_CTL(a,b) (a)
16386 #define arguments_BDK_GSERNX_LANEX_SCOPE_CTL(a,b) (a),(b),-1,-1
16387 
16388 /**
16389  * Register (RSL) gsern#_lane#_scope_ctl_2
16390  *
16391  * GSER Lane PCS Lite Scope Data Gathering Control Register 2
16392  * This register contains control signals to allow loading a specific reference vector
16393  * for use in the scope logic instead of capturing the reference vector from the input
16394  * data stream. For diagnostic use only.
16395  */
16396 union bdk_gsernx_lanex_scope_ctl_2
16397 {
16398     uint64_t u;
16399     struct bdk_gsernx_lanex_scope_ctl_2_s
16400     {
16401 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
16402         uint64_t reserved_42_63        : 22;
16403         uint64_t use_doute_cal         : 1;  /**< [ 41: 41](R/W) Set to select doute_cal data (receiver eye calibration path) for
16404                                                                  scope comparisons with doutq (receiver normal quadrature path). If
16405                                                                  clear, the default will be to use doute (receiver eye path) to
16406                                                                  compare with doutq. The bit should be programmed as desired before
16407                                                                  writing GSERN()_LANE()_SCOPE_CTL[SCOPE_EN] to one.
16408 
16409                                                                  For diagnostic use only. */
16410         uint64_t ref_vec_ovrride_en    : 1;  /**< [ 40: 40](R/W) Enable use of [REF_VEC_OVRRIDE] for the scope logic instead
16411                                                                  of capturing the reference vector from the input data stream. This
16412                                                                  control has priority over
16413                                                                  GSERN()_LANE()_SCOPE_CTL[DOUTQ_LD]. This field should be
16414                                                                  deasserted when the override value, [REF_VEC_OVRRIDE], is
16415                                                                  changed. [REF_VEC_OVRRIDE_EN] may be asserted in the same register
16416                                                                  write that changes [REF_VEC_OVRRIDE].
16417 
16418                                                                  For diagnostic use only. */
16419         uint64_t ref_vec_ovrride       : 40; /**< [ 39:  0](R/W) Selectable reference vector to use for comparison with doutq and doute for the
16420                                                                  scope logic as an alternative to capturing the reference vector from the
16421                                                                  incoming data stream. When used, this pattern should be recurring in the
16422                                                                  incoming data stream to capture valid error vector data, since errors will only
16423                                                                  be accumulated in the error vector when doutq matches the reference
16424                                                                  vector. [REF_VEC_OVRRIDE_EN] should be deasserted when [REF_VEC_OVRRIDE] is
16425                                                                  changed. [REF_VEC_OVRRIDE_EN] may be written to a one in the same register write
16426                                                                  that changes [REF_VEC_OVRRIDE]. Note that the bit pattern in [REF_VEC_OVRRIDE]
16427                                                                  must match the format produced by the receiver's deserializer for the data path
16428                                                                  width in use.
16429 
16430                                                                  For diagnostic use only. */
16431 #else /* Word 0 - Little Endian */
16432         uint64_t ref_vec_ovrride       : 40; /**< [ 39:  0](R/W) Selectable reference vector to use for comparison with doutq and doute for the
16433                                                                  scope logic as an alternative to capturing the reference vector from the
16434                                                                  incoming data stream. When used, this pattern should be recurring in the
16435                                                                  incoming data stream to capture valid error vector data, since errors will only
16436                                                                  be accumulated in the error vector when doutq matches the reference
16437                                                                  vector. [REF_VEC_OVRRIDE_EN] should be deasserted when [REF_VEC_OVRRIDE] is
16438                                                                  changed. [REF_VEC_OVRRIDE_EN] may be written to a one in the same register write
16439                                                                  that changes [REF_VEC_OVRRIDE]. Note that the bit pattern in [REF_VEC_OVRRIDE]
16440                                                                  must match the format produced by the receiver's deserializer for the data path
16441                                                                  width in use.
16442 
16443                                                                  For diagnostic use only. */
16444         uint64_t ref_vec_ovrride_en    : 1;  /**< [ 40: 40](R/W) Enable use of [REF_VEC_OVRRIDE] for the scope logic instead
16445                                                                  of capturing the reference vector from the input data stream. This
16446                                                                  control has priority over
16447                                                                  GSERN()_LANE()_SCOPE_CTL[DOUTQ_LD]. This field should be
16448                                                                  deasserted when the override value, [REF_VEC_OVRRIDE], is
16449                                                                  changed. [REF_VEC_OVRRIDE_EN] may be asserted in the same register
16450                                                                  write that changes [REF_VEC_OVRRIDE].
16451 
16452                                                                  For diagnostic use only. */
16453         uint64_t use_doute_cal         : 1;  /**< [ 41: 41](R/W) Set to select doute_cal data (receiver eye calibration path) for
16454                                                                  scope comparisons with doutq (receiver normal quadrature path). If
16455                                                                  clear, the default will be to use doute (receiver eye path) to
16456                                                                  compare with doutq. The bit should be programmed as desired before
16457                                                                  writing GSERN()_LANE()_SCOPE_CTL[SCOPE_EN] to one.
16458 
16459                                                                  For diagnostic use only. */
16460         uint64_t reserved_42_63        : 22;
16461 #endif /* Word 0 - End */
16462     } s;
16463     /* struct bdk_gsernx_lanex_scope_ctl_2_s cn; */
16464 };
16465 typedef union bdk_gsernx_lanex_scope_ctl_2 bdk_gsernx_lanex_scope_ctl_2_t;
16466 
16467 static inline uint64_t BDK_GSERNX_LANEX_SCOPE_CTL_2(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_SCOPE_CTL_2(unsigned long a,unsigned long b)16468 static inline uint64_t BDK_GSERNX_LANEX_SCOPE_CTL_2(unsigned long a, unsigned long b)
16469 {
16470     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
16471         return 0x87e0900008e0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
16472     __bdk_csr_fatal("GSERNX_LANEX_SCOPE_CTL_2", 2, a, b, 0, 0);
16473 }
16474 
16475 #define typedef_BDK_GSERNX_LANEX_SCOPE_CTL_2(a,b) bdk_gsernx_lanex_scope_ctl_2_t
16476 #define bustype_BDK_GSERNX_LANEX_SCOPE_CTL_2(a,b) BDK_CSR_TYPE_RSL
16477 #define basename_BDK_GSERNX_LANEX_SCOPE_CTL_2(a,b) "GSERNX_LANEX_SCOPE_CTL_2"
16478 #define device_bar_BDK_GSERNX_LANEX_SCOPE_CTL_2(a,b) 0x0 /* PF_BAR0 */
16479 #define busnum_BDK_GSERNX_LANEX_SCOPE_CTL_2(a,b) (a)
16480 #define arguments_BDK_GSERNX_LANEX_SCOPE_CTL_2(a,b) (a),(b),-1,-1
16481 
16482 /**
16483  * Register (RSL) gsern#_lane#_scope_ctl_3
16484  *
16485  * GSER Lane PCS Lite Scope Data Gathering Control Register 3
16486  * The four bits in this register allow for shifting either the doutq or
16487  * doute_cal data by 1 or 2 UI to allow for an offset in the framing of the
16488  * deserialized data between these two data paths in the receiver. Software
16489  * will need to iterate eye or scope measurement with identical settings
16490  * for the quadurature and eye datapaths, adjusting the shift bits in this
16491  * register until no differences are accumulated. (Note that shifting both
16492  * doutq and doute_cal would typically not be useful, since the resulting
16493  * alignment would be the same as if neither were shifted.)
16494  */
16495 union bdk_gsernx_lanex_scope_ctl_3
16496 {
16497     uint64_t u;
16498     struct bdk_gsernx_lanex_scope_ctl_3_s
16499     {
16500 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
16501         uint64_t reserved_10_63        : 54;
16502         uint64_t dbl_shift_doute       : 1;  /**< [  9:  9](R/W) Assert to shift the doute_cal (receiver eye calibration path) data
16503                                                                  by 2 UI earlier to align with doutq for eye and scope comparison
16504                                                                  logic. Only data captured in the eye or scope logic is impacted by
16505                                                                  this setting. When asserted, the double shift control has priority
16506                                                                  over the (single) shift control. Program as desired before enabling eye
16507                                                                  data capture. */
16508         uint64_t shift_doute           : 1;  /**< [  8:  8](R/W) Assert to shift the doute_cal (receiver eye path) data by 1 UI
16509                                                                  earlier to align with doutq for eye and scope comparison logic. Only
16510                                                                  data captured in the eye or scope logic is impacted by this
16511                                                                  setting. Program as desired before enabling eye data capture. */
16512         uint64_t reserved_2_7          : 6;
16513         uint64_t dbl_shift_doutq       : 1;  /**< [  1:  1](R/W) Assert to shift the doutq (receiver normal quadrature path) data by
16514                                                                  2 UI earlier to align with doute_cal for eye and scope comparison
16515                                                                  logic. Only data captured in the eye or scope logic is impacted by
16516                                                                  this setting. When asserted, the double shift control has priority
16517                                                                  over the (single) shift control. Program as desired before enabling eye
16518                                                                  data capture. */
16519         uint64_t shift_doutq           : 1;  /**< [  0:  0](R/W) Assert to shift the doutq (receiver normal quadrature path) data by
16520                                                                  1 UI earlier to align with doute_cal for eye and scope comparison
16521                                                                  logic. Only data captured in the eye or scope logic is impacted by
16522                                                                  this setting. Program as desired before enabling eye data capture. */
16523 #else /* Word 0 - Little Endian */
16524         uint64_t shift_doutq           : 1;  /**< [  0:  0](R/W) Assert to shift the doutq (receiver normal quadrature path) data by
16525                                                                  1 UI earlier to align with doute_cal for eye and scope comparison
16526                                                                  logic. Only data captured in the eye or scope logic is impacted by
16527                                                                  this setting. Program as desired before enabling eye data capture. */
16528         uint64_t dbl_shift_doutq       : 1;  /**< [  1:  1](R/W) Assert to shift the doutq (receiver normal quadrature path) data by
16529                                                                  2 UI earlier to align with doute_cal for eye and scope comparison
16530                                                                  logic. Only data captured in the eye or scope logic is impacted by
16531                                                                  this setting. When asserted, the double shift control has priority
16532                                                                  over the (single) shift control. Program as desired before enabling eye
16533                                                                  data capture. */
16534         uint64_t reserved_2_7          : 6;
16535         uint64_t shift_doute           : 1;  /**< [  8:  8](R/W) Assert to shift the doute_cal (receiver eye path) data by 1 UI
16536                                                                  earlier to align with doutq for eye and scope comparison logic. Only
16537                                                                  data captured in the eye or scope logic is impacted by this
16538                                                                  setting. Program as desired before enabling eye data capture. */
16539         uint64_t dbl_shift_doute       : 1;  /**< [  9:  9](R/W) Assert to shift the doute_cal (receiver eye calibration path) data
16540                                                                  by 2 UI earlier to align with doutq for eye and scope comparison
16541                                                                  logic. Only data captured in the eye or scope logic is impacted by
16542                                                                  this setting. When asserted, the double shift control has priority
16543                                                                  over the (single) shift control. Program as desired before enabling eye
16544                                                                  data capture. */
16545         uint64_t reserved_10_63        : 54;
16546 #endif /* Word 0 - End */
16547     } s;
16548     /* struct bdk_gsernx_lanex_scope_ctl_3_s cn; */
16549 };
16550 typedef union bdk_gsernx_lanex_scope_ctl_3 bdk_gsernx_lanex_scope_ctl_3_t;
16551 
16552 static inline uint64_t BDK_GSERNX_LANEX_SCOPE_CTL_3(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_SCOPE_CTL_3(unsigned long a,unsigned long b)16553 static inline uint64_t BDK_GSERNX_LANEX_SCOPE_CTL_3(unsigned long a, unsigned long b)
16554 {
16555     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
16556         return 0x87e0900008f0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
16557     __bdk_csr_fatal("GSERNX_LANEX_SCOPE_CTL_3", 2, a, b, 0, 0);
16558 }
16559 
16560 #define typedef_BDK_GSERNX_LANEX_SCOPE_CTL_3(a,b) bdk_gsernx_lanex_scope_ctl_3_t
16561 #define bustype_BDK_GSERNX_LANEX_SCOPE_CTL_3(a,b) BDK_CSR_TYPE_RSL
16562 #define basename_BDK_GSERNX_LANEX_SCOPE_CTL_3(a,b) "GSERNX_LANEX_SCOPE_CTL_3"
16563 #define device_bar_BDK_GSERNX_LANEX_SCOPE_CTL_3(a,b) 0x0 /* PF_BAR0 */
16564 #define busnum_BDK_GSERNX_LANEX_SCOPE_CTL_3(a,b) (a)
16565 #define arguments_BDK_GSERNX_LANEX_SCOPE_CTL_3(a,b) (a),(b),-1,-1
16566 
16567 /**
16568  * Register (RSL) gsern#_lane#_srcmx_bcfg
16569  *
16570  * GSER Lane PCS Source Mux Control Register
16571  */
16572 union bdk_gsernx_lanex_srcmx_bcfg
16573 {
16574     uint64_t u;
16575     struct bdk_gsernx_lanex_srcmx_bcfg_s
16576     {
16577 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
16578         uint64_t reserved_50_63        : 14;
16579         uint64_t en_hldcdrfsm_on_idle  : 1;  /**< [ 49: 49](R/W) Enable holding the CSR finite state machine when the receiver idle filter
16580                                                                  detects idle.
16581                                                                  For diagnostic use only. */
16582         uint64_t en_pauseadpt_on_idle  : 1;  /**< [ 48: 48](R/W) Enable pausing adaptation when the receiver idle filter detects idle.
16583                                                                  For diagnostic use only. */
16584         uint64_t reserved_44_47        : 4;
16585         uint64_t trn_tx_cgt_on         : 1;  /**< [ 43: 43](R/W) Force the clock gate for the training transmit data path clock on.
16586                                                                  For diagnostic use only. */
16587         uint64_t trn_rx_cgt_on         : 1;  /**< [ 42: 42](R/W) Force the clock gate for the training receive data path clock on.
16588                                                                  For diagnostic use only. */
16589         uint64_t ocx_tx_cgt_on         : 1;  /**< [ 41: 41](R/W) Force on the clock gate for the OCX interface.
16590                                                                  For diagnostic use only. */
16591         uint64_t ocx_rx_cgt_on         : 1;  /**< [ 40: 40](R/W) Force on the clock gate for the OCX interface.
16592                                                                  For diagnostic use only. */
16593         uint64_t sata_tx_cgt_on        : 1;  /**< [ 39: 39](R/W) Force the clock gate for the SATA transmit data path clock on.
16594                                                                  For diagnostic use only. */
16595         uint64_t sata_rx_cgt_on        : 1;  /**< [ 38: 38](R/W) Force the clock gate for the SATA receive data path clock on.
16596                                                                  For diagnostic use only. */
16597         uint64_t pcie_tx_cgt_on        : 1;  /**< [ 37: 37](R/W) Force the clock gate for the PCIe transmit data path clock on.
16598                                                                  For diagnostic use only. */
16599         uint64_t pcie_rx_cgt_on        : 1;  /**< [ 36: 36](R/W) Force the clock gate for the PCIe receive data path clock on.
16600                                                                  For diagnostic use only. */
16601         uint64_t pat_tx_cgt_on         : 1;  /**< [ 35: 35](R/W) Force the clock gate for the pattern transmit data path clock on.
16602                                                                  For diagnostic use only. */
16603         uint64_t pat_rx_cgt_on         : 1;  /**< [ 34: 34](R/W) Force the clock gate for the pattern receive data path clock on.
16604                                                                  For diagnostic use only. */
16605         uint64_t cgx_tx_cgt_on         : 1;  /**< [ 33: 33](R/W) Force the clock gate for the CGX transmit data path clock on.
16606                                                                  For diagnostic use only. */
16607         uint64_t cgx_rx_cgt_on         : 1;  /**< [ 32: 32](R/W) Force the clock gate for the CGX receive data path clock on.
16608                                                                  For diagnostic use only. */
16609         uint64_t reserved_24_31        : 8;
16610         uint64_t txdivclk_mux_sel_ovrride_en : 1;/**< [ 23: 23](R/W) Mux selection override enable for lane txdivclk mux; enables use of
16611                                                                  [TXDIVCLK_MUX_SEL_OVRRIDE]. This must be set to 1 for all lanes in a multi-lane
16612                                                                  link.
16613                                                                  0 = Use the lane's local txdivclk.
16614                                                                  1 = Use [TXDIVCLK_MUX_SEL_OVRRIDE] instead of other sources for control of the
16615                                                                  lane txdivclk mux. */
16616         uint64_t reserved_19_22        : 4;
16617         uint64_t txdivclk_mux_sel_ovrride : 3;/**< [ 18: 16](R/W) Mux selection override control for lane txdivclk mux, when enabled by
16618                                                                  [TXDIVCLK_MUX_SEL_OVRRIDE_EN], the following values apply:
16619                                                                    0x0 = Use lane internal txdivclk (e.g. for single-lane links).
16620                                                                    0x1 = Use txdivclkx2 (e.g. for 2-lane links).
16621                                                                    0x2 = Use txdivclkx4 (e.g. for 4-lane links).
16622                                                                    0x3 = Use txdivclkx8 (e.g. for 8-lane links).
16623                                                                    0x4 = Use txdivclkx16 (e.g. for 16-lane links).
16624                                                                    _ else = Reserved. */
16625         uint64_t reserved_13_15        : 3;
16626         uint64_t tx_ctrl_sel           : 5;  /**< [ 12:  8](R/W) Lite layer transmit control-settings mux control:
16627                                                                    0x0 = no source selected; defaults to idle termination unless CSR overrides are
16628                                                                        enabled by setting GSERN()_LANE()_TX_DRV_BCFG[EN_TX_DRV].
16629                                                                    0x1 = PCIe.
16630                                                                    0x2 = CGX.
16631                                                                    0x4 = SATA.
16632                                                                    0x8 = OCX.
16633                                                                    0x10 = Pattern memory generator.
16634                                                                    _ else = reserved. */
16635         uint64_t reserved_5_7          : 3;
16636         uint64_t tx_data_sel           : 5;  /**< [  4:  0](R/W) Lite layer transmit data mux control:
16637                                                                    0x0 = No source selected, e.g., for PRBS testing.
16638                                                                    0x1 = PCIe.
16639                                                                    0x2 = CGX.
16640                                                                    0x4 = SATA.
16641                                                                    0x8 = OCX.
16642                                                                    0x10 = Pattern memory generator.
16643                                                                    _ else = reserved.  (This is a 1-hot vector.) */
16644 #else /* Word 0 - Little Endian */
16645         uint64_t tx_data_sel           : 5;  /**< [  4:  0](R/W) Lite layer transmit data mux control:
16646                                                                    0x0 = No source selected, e.g., for PRBS testing.
16647                                                                    0x1 = PCIe.
16648                                                                    0x2 = CGX.
16649                                                                    0x4 = SATA.
16650                                                                    0x8 = OCX.
16651                                                                    0x10 = Pattern memory generator.
16652                                                                    _ else = reserved.  (This is a 1-hot vector.) */
16653         uint64_t reserved_5_7          : 3;
16654         uint64_t tx_ctrl_sel           : 5;  /**< [ 12:  8](R/W) Lite layer transmit control-settings mux control:
16655                                                                    0x0 = no source selected; defaults to idle termination unless CSR overrides are
16656                                                                        enabled by setting GSERN()_LANE()_TX_DRV_BCFG[EN_TX_DRV].
16657                                                                    0x1 = PCIe.
16658                                                                    0x2 = CGX.
16659                                                                    0x4 = SATA.
16660                                                                    0x8 = OCX.
16661                                                                    0x10 = Pattern memory generator.
16662                                                                    _ else = reserved. */
16663         uint64_t reserved_13_15        : 3;
16664         uint64_t txdivclk_mux_sel_ovrride : 3;/**< [ 18: 16](R/W) Mux selection override control for lane txdivclk mux, when enabled by
16665                                                                  [TXDIVCLK_MUX_SEL_OVRRIDE_EN], the following values apply:
16666                                                                    0x0 = Use lane internal txdivclk (e.g. for single-lane links).
16667                                                                    0x1 = Use txdivclkx2 (e.g. for 2-lane links).
16668                                                                    0x2 = Use txdivclkx4 (e.g. for 4-lane links).
16669                                                                    0x3 = Use txdivclkx8 (e.g. for 8-lane links).
16670                                                                    0x4 = Use txdivclkx16 (e.g. for 16-lane links).
16671                                                                    _ else = Reserved. */
16672         uint64_t reserved_19_22        : 4;
16673         uint64_t txdivclk_mux_sel_ovrride_en : 1;/**< [ 23: 23](R/W) Mux selection override enable for lane txdivclk mux; enables use of
16674                                                                  [TXDIVCLK_MUX_SEL_OVRRIDE]. This must be set to 1 for all lanes in a multi-lane
16675                                                                  link.
16676                                                                  0 = Use the lane's local txdivclk.
16677                                                                  1 = Use [TXDIVCLK_MUX_SEL_OVRRIDE] instead of other sources for control of the
16678                                                                  lane txdivclk mux. */
16679         uint64_t reserved_24_31        : 8;
16680         uint64_t cgx_rx_cgt_on         : 1;  /**< [ 32: 32](R/W) Force the clock gate for the CGX receive data path clock on.
16681                                                                  For diagnostic use only. */
16682         uint64_t cgx_tx_cgt_on         : 1;  /**< [ 33: 33](R/W) Force the clock gate for the CGX transmit data path clock on.
16683                                                                  For diagnostic use only. */
16684         uint64_t pat_rx_cgt_on         : 1;  /**< [ 34: 34](R/W) Force the clock gate for the pattern receive data path clock on.
16685                                                                  For diagnostic use only. */
16686         uint64_t pat_tx_cgt_on         : 1;  /**< [ 35: 35](R/W) Force the clock gate for the pattern transmit data path clock on.
16687                                                                  For diagnostic use only. */
16688         uint64_t pcie_rx_cgt_on        : 1;  /**< [ 36: 36](R/W) Force the clock gate for the PCIe receive data path clock on.
16689                                                                  For diagnostic use only. */
16690         uint64_t pcie_tx_cgt_on        : 1;  /**< [ 37: 37](R/W) Force the clock gate for the PCIe transmit data path clock on.
16691                                                                  For diagnostic use only. */
16692         uint64_t sata_rx_cgt_on        : 1;  /**< [ 38: 38](R/W) Force the clock gate for the SATA receive data path clock on.
16693                                                                  For diagnostic use only. */
16694         uint64_t sata_tx_cgt_on        : 1;  /**< [ 39: 39](R/W) Force the clock gate for the SATA transmit data path clock on.
16695                                                                  For diagnostic use only. */
16696         uint64_t ocx_rx_cgt_on         : 1;  /**< [ 40: 40](R/W) Force on the clock gate for the OCX interface.
16697                                                                  For diagnostic use only. */
16698         uint64_t ocx_tx_cgt_on         : 1;  /**< [ 41: 41](R/W) Force on the clock gate for the OCX interface.
16699                                                                  For diagnostic use only. */
16700         uint64_t trn_rx_cgt_on         : 1;  /**< [ 42: 42](R/W) Force the clock gate for the training receive data path clock on.
16701                                                                  For diagnostic use only. */
16702         uint64_t trn_tx_cgt_on         : 1;  /**< [ 43: 43](R/W) Force the clock gate for the training transmit data path clock on.
16703                                                                  For diagnostic use only. */
16704         uint64_t reserved_44_47        : 4;
16705         uint64_t en_pauseadpt_on_idle  : 1;  /**< [ 48: 48](R/W) Enable pausing adaptation when the receiver idle filter detects idle.
16706                                                                  For diagnostic use only. */
16707         uint64_t en_hldcdrfsm_on_idle  : 1;  /**< [ 49: 49](R/W) Enable holding the CSR finite state machine when the receiver idle filter
16708                                                                  detects idle.
16709                                                                  For diagnostic use only. */
16710         uint64_t reserved_50_63        : 14;
16711 #endif /* Word 0 - End */
16712     } s;
16713     /* struct bdk_gsernx_lanex_srcmx_bcfg_s cn; */
16714 };
16715 typedef union bdk_gsernx_lanex_srcmx_bcfg bdk_gsernx_lanex_srcmx_bcfg_t;
16716 
16717 static inline uint64_t BDK_GSERNX_LANEX_SRCMX_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_SRCMX_BCFG(unsigned long a,unsigned long b)16718 static inline uint64_t BDK_GSERNX_LANEX_SRCMX_BCFG(unsigned long a, unsigned long b)
16719 {
16720     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
16721         return 0x87e090000a10ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
16722     __bdk_csr_fatal("GSERNX_LANEX_SRCMX_BCFG", 2, a, b, 0, 0);
16723 }
16724 
16725 #define typedef_BDK_GSERNX_LANEX_SRCMX_BCFG(a,b) bdk_gsernx_lanex_srcmx_bcfg_t
16726 #define bustype_BDK_GSERNX_LANEX_SRCMX_BCFG(a,b) BDK_CSR_TYPE_RSL
16727 #define basename_BDK_GSERNX_LANEX_SRCMX_BCFG(a,b) "GSERNX_LANEX_SRCMX_BCFG"
16728 #define device_bar_BDK_GSERNX_LANEX_SRCMX_BCFG(a,b) 0x0 /* PF_BAR0 */
16729 #define busnum_BDK_GSERNX_LANEX_SRCMX_BCFG(a,b) (a)
16730 #define arguments_BDK_GSERNX_LANEX_SRCMX_BCFG(a,b) (a),(b),-1,-1
16731 
16732 /**
16733  * Register (RSL) gsern#_lane#_train_0_bcfg
16734  *
16735  * GSER Lane Training Base Configuration Register 0
16736  * This register controls settings for lane training.
16737  */
16738 union bdk_gsernx_lanex_train_0_bcfg
16739 {
16740     uint64_t u;
16741     struct bdk_gsernx_lanex_train_0_bcfg_s
16742     {
16743 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
16744         uint64_t txt_post              : 5;  /**< [ 63: 59](RO/H) After TX BASE-R link training, this is the resultant POST Tap value that was
16745                                                                  written to the PHY.  This field has no meaning if TX BASE-R link training was
16746                                                                  not performed.
16747                                                                  For diagnostic use only. */
16748         uint64_t txt_main              : 6;  /**< [ 58: 53](RO/H) After TX BASE-R link training, this is the resultant MAIN Tap value that was
16749                                                                  written to the PHY.  This field has no meaning if TX BASE-R link training was
16750                                                                  not performed.
16751                                                                  For diagnostic use only. */
16752         uint64_t txt_pre               : 5;  /**< [ 52: 48](RO/H) After TX BASE-R link training, this is the resultant POST Tap value that was
16753                                                                  written to the PHY.  This field has no meaning if TX BASE-R link training was
16754                                                                  not performed.
16755                                                                  For diagnostic use only. */
16756         uint64_t txt_swm               : 1;  /**< [ 47: 47](R/W) Set when TX BASE-R link training is to be performed under software control. For diagnostic
16757                                                                  use only. */
16758         uint64_t txt_cur_post          : 5;  /**< [ 46: 42](R/W) When TX BASE-R link training is being performed under software control,
16759                                                                  e.g. GSERN()_LANE()_TRAIN_0_BCFG[TXT_SWM] is set, this is the (C+1) coefficient
16760                                                                  update to be written to the SerDes TX Equalizer.
16761                                                                  The coefficients are written to the TX equalizer when
16762                                                                  GSERN()_LANE()_TRAIN_0_BCFG[TXT_CUR_PRG] is set to a one.
16763                                                                  For diagnostic use only. */
16764         uint64_t txt_cur_main          : 6;  /**< [ 41: 36](R/W) When TX BASE-R link training is being performed under software control,
16765                                                                  e.g. GSERN()_LANE()_TRAIN_0_BCFG[TXT_SWM] is set, this is the (C0) coefficient
16766                                                                  update to be written to the SerDes TX Equalizer.
16767                                                                  The coefficients are written to the TX equalizer when
16768                                                                  GSERN()_LANE()_TRAIN_0_BCFG[TXT_CUR_PRG] is set to a one.
16769                                                                  For diagnostic use only. */
16770         uint64_t txt_cur_pre           : 5;  /**< [ 35: 31](R/W) When TX BASE-R link training is being performed under software control,
16771                                                                  e.g. GSERN()_LANE()_TRAIN_0_BCFG[TXT_SWM] is set, this is the (C-1) coefficient
16772                                                                  update to be written to the SerDes TX Equalizer.
16773                                                                  The coefficients are written to the TX equalizer when
16774                                                                  GSERN()_LANE()_TRAIN_0_BCFG[TXT_CUR_PRG] is set to a one.
16775                                                                  For diagnostic use only. */
16776         uint64_t txt_cur_prg           : 1;  /**< [ 30: 30](R/W) When TX BASE-R link training is being performed under software control,
16777                                                                  e.g. GSERN()_LANE()_TRAIN_0_BCFG[TXT_SWM] is set, setting [TXT_CUR_PRG] writes the TX
16778                                                                  equalizer
16779                                                                  coefficients in GSERN()_LANE()_TRAIN_0_BCFG[TXT_CUR_PRE],
16780                                                                  GSERN()_LANE()_TRAIN_0_BCFG[TXT_CUR_MAIN],
16781                                                                  and GSERN()_LANE()_TRAIN_0_BCFG[TXT_CUR_POST] registers into the GSER TX equalizer.
16782                                                                  For diagnostic use only. */
16783         uint64_t rxt_adtmout_fast      : 1;  /**< [ 29: 29](R/W) Reserved.
16784                                                                  Internal:
16785                                                                  For simulation use only. When set accelerates the link training time-out timer during
16786                                                                  BASE-R link training.  When set shortens the link training time-out timer to time-out
16787                                                                  after 164 microseconds to facilitate shorter BASE-R training simulations runs.
16788                                                                  For diagnostic use only. */
16789         uint64_t rxt_adtmout_sel       : 2;  /**< [ 28: 27](R/W) Selects the timeout value for the BASE-R link training time-out timer.
16790                                                                  This time-out timer value is only valid if
16791                                                                  GSERN()_LANE()_TRAIN_0_BCFG[RXT_ADTMOUT_DISABLE]
16792                                                                  is cleared to 0 and BASE-R hardware training is enabled.
16793 
16794                                                                  When GSERN()_LANE()_TRAIN_0_BCFG[RXT_ADTMOUT_FAST] is cleared to 0 the link training
16795                                                                  time-out timer value is set by [RXT_ADTMOUT_SEL] to the values shown.
16796                                                                  0x0 = 83.89  milliseconds.
16797                                                                  0x1 = 167.77 milliseconds.
16798                                                                  0x2 = 335.54 milliseconds.
16799                                                                  0x3 = 419.43 milliseconds.
16800 
16801                                                                  When GSERN()_LANE()_TRAIN_0_BCFG[RXT_ADTMOUT_FAST] is set to 1 the link training
16802                                                                  time-out timer value is set by [RXT_ADTMOUT_SEL] to the values shown.
16803                                                                  0x0 = 81.92  microseconds.
16804                                                                  0x1 = 163.84 microseconds.
16805                                                                  0x2 = 327.68 microseconds.
16806                                                                  0x3 = 655.36 microseconds. */
16807         uint64_t rxt_adtmout_disable   : 1;  /**< [ 26: 26](R/W) For BASE-R links one of the terminating condition for link training receiver adaptation
16808                                                                  is a programmable time-out timer.  When the receiver adaptation time-out timer
16809                                                                  expires the link training process is concluded and the link is considered good and
16810                                                                  the receiver ready status report bit is set in the local device.
16811                                                                  Note that when BASE-R link training is performed under software control,
16812                                                                  (GSERN()_LANE()_TRAIN_0_BCFG[RXT_SWM] is set), the receiver adaptation time-out timer is
16813                                                                  disabled and not used.
16814 
16815                                                                  Set this bit to a one to disable the link training receiver adaptation time-out
16816                                                                  timer during BASE-R link training under hardware control.  For diagnostic use only. */
16817         uint64_t rxt_eer               : 1;  /**< [ 25: 25](WO/H) When RX BASE-R link training is being performed under software control,
16818                                                                  (GSERN()_LANE()_TRAIN_0_BCFG[RXT_SWM] is set), writing this bit initiates an equalization
16819                                                                  request to the SerDes receiver equalizer. Reading this bit always returns a zero. */
16820         uint64_t rxt_esv               : 1;  /**< [ 24: 24](RO/H) When performing an equalization request ([RXT_EER]), this bit, when set, indicates that
16821                                                                  the
16822                                                                  equalization status (RXT_ESM) is valid. When issuing a [RXT_EER] request, it is expected
16823                                                                  that [RXT_ESV] will get written to zero so that a valid RXT_ESM can be determined. */
16824         uint64_t rxt_tx_post_dir       : 2;  /**< [ 23: 22](RO/H) RX recommended TXPOST direction change.
16825 
16826                                                                  Recommended direction change outputs from the PHY for the link partner transmitter
16827                                                                  coefficients.
16828                                                                  0x0 = Hold.
16829                                                                  0x1 = Increment.
16830                                                                  0x2 = Decrement.
16831                                                                  0x3 = Hold. */
16832         uint64_t rxt_tx_main_dir       : 2;  /**< [ 21: 20](RO/H) RX recommended TXMAIN direction change.
16833 
16834                                                                  Recommended direction change outputs from the PHY for the link partner transmitter
16835                                                                  coefficients.
16836                                                                  0x0 = Hold.
16837                                                                  0x1 = Increment.
16838                                                                  0x2 = Decrement.
16839                                                                  0x3 = Hold. */
16840         uint64_t rxt_tx_pre_dir        : 2;  /**< [ 19: 18](RO/H) RX recommended TXPRE direction change.
16841 
16842                                                                  Recommended direction change outputs from the PHY for the link partner transmitter
16843                                                                  coefficients.
16844                                                                  0x0 = Hold.
16845                                                                  0x1 = Increment.
16846                                                                  0x2 = Decrement.
16847                                                                  0x3 = Hold. */
16848         uint64_t trn_short             : 1;  /**< [ 17: 17](R/W) Train short. Executes an abbreviated BASE-R training session.
16849                                                                  For diagnostic use only. */
16850         uint64_t ld_receiver_rdy       : 1;  /**< [ 16: 16](RO/H) At the completion of BASE-R training the local device sets receiver ready.  This bit
16851                                                                  reflects the state of the local device receiver ready status.  For Debug use only.
16852                                                                  This bit is only valid during BASE-R link training and at the conclusion of link
16853                                                                  training. */
16854         uint64_t frz_cdr_en            : 1;  /**< [ 15: 15](R/W) Freeze CDR enable. In CGX mode when set to a one enables the CGX MAC to
16855                                                                  Freeze the receiver CDR during BASE-R autonegotiation (AN) and KR training
16856                                                                  to prevent the RX CDR from locking onto the differential manchester encoded
16857                                                                  AN and KR training frames.  CGX asserts the rx cdr coast signal to the GSER
16858                                                                  block to freeze the RX CDR.  Clearing [FRZ_CDR_EN] prevents CGS from freezing
16859                                                                  the RX CDR.
16860                                                                  For diagnostic use only. */
16861         uint64_t trn_ovrd_en           : 1;  /**< [ 14: 14](R/W) BASE-R Training Override Enable.  Setting [TRN_OVRD_EN] will enable BASE-R training logic
16862                                                                  for both CGX and OCX.  This is a CSR override for the BASE-R training enable signals from
16863                                                                  the CGX and OCX blocks.  Either GSERN()_LANE()_TRAIN_0_BCFG[CFG_CGX] or
16864                                                                  GSERN()_LANE()_TRAIN_0_BCFG[CFG_OCX] must be set to 1 before [TRN_OVRD_EN] is set to 1.  Also
16865                                                                  GSERN()_LANE()_SRCMX_BCFG[TX_CTRL_SEL] must be programmed to select CGX or OCX mode
16866                                                                  before [TRN_OVRD_EN] is set to 1.
16867                                                                  For diagnostic use only. */
16868         uint64_t reserved_8_13         : 6;
16869         uint64_t cfg_ocx               : 1;  /**< [  7:  7](R/W) Configure BASE-R training logic for OCX mode.   When [CFG_OCX] is set the
16870                                                                  Coefficient Update (CU) and Status Report (SR) messaging is reconfigured for
16871                                                                  the OCX controller.  The CU and SR messages must be sent and received in the
16872                                                                  txdivclk and rxdivclk domains for the OCX controller.
16873 
16874                                                                  When [CFG_OCX] is set, the GSERN()_LANE()_TRAIN_0_BCFG[CFG_CGX] field must be
16875                                                                  cleared to zero. */
16876         uint64_t rxt_adjmain           : 1;  /**< [  6:  6](R/W) For all link training, this bit determines how the main tap is adjusted at the start
16877                                                                  of link training.  When set the main tap of link partner transmitter peak-to-peak level
16878                                                                  is adjusted to optimize the AGC of the local device receiver.  This is intended to prevent
16879                                                                  receiver saturation on short or low loss links.
16880 
16881                                                                  To perform main tap optimization of the link partner transmitter set this bit prior to
16882                                                                  enabling link training. */
16883         uint64_t rxt_initialize        : 1;  /**< [  5:  5](R/W) For all link training, this bit determines how to configure the initialize bit in the
16884                                                                  coefficient update message that is sent to the far end transmitter of RX training. When
16885                                                                  set, a request is made that the coefficients be set to its INITIALIZE state. To perform an
16886                                                                  initialize prior to link training, set this bit prior to performing link training. Note
16887                                                                  that it is illegal to set both the preset and initialize bits at the same time. */
16888         uint64_t rxt_preset            : 1;  /**< [  4:  4](R/W) For all link training, this bit determines how to configure the preset bit in the
16889                                                                  coefficient update message that is sent to the far end transmitter. When set, a one time
16890                                                                  request is made that the coefficients be set to a state where equalization is turned off.
16891 
16892                                                                  To perform a preset, set this bit prior to link training. Link training needs to be
16893                                                                  disabled to complete the request and get the rxtrain state machine back to idle. Note that
16894                                                                  it is illegal to set both the preset and initialize bits at the same time. For diagnostic
16895                                                                  use only. */
16896         uint64_t rxt_swm               : 1;  /**< [  3:  3](R/W) Set when RX BASE-R link training is to be performed under software control.
16897 
16898                                                                  See GSERN()_LANE()_TRAIN_0_BCFG[RXT_EER]. */
16899         uint64_t cgx_quad              : 1;  /**< [  2:  2](R/W) When set, indicates the QLM is in CGX quad aggregation mode. [CGX_QUAD] must only be
16900                                                                  set when GSERN()_LANE()_SRCMX_BCFG[TX_DATA_SEL]=CGX is set and
16901                                                                  GSERN()_LANE()_SRCMX_BCFG[TX_CTRL_SEL]=CGX is set and [CGX_DUAL] is clear.
16902 
16903                                                                  When [CGX_QUAD] is set, GSER bundles all four lanes for one BCX controller.
16904                                                                  [CGX_QUAD] must only be set for the XAUI/DXAUI, XLAUI, and CAUI protocols. */
16905         uint64_t cgx_dual              : 1;  /**< [  1:  1](R/W) When set, indicates the QLM is in CGX dual aggregation mode. [CGX_DUAL] must only be
16906                                                                  set when GSERN()_LANE()_SRCMX_BCFG[TX_DATA_SEL]=CGX is set and
16907                                                                  GSERN()_LANE()_SRCMX_BCFG[TX_CTRL_SEL]=CGX is set and [CGX_QUAD] is clear.
16908 
16909                                                                  When [CGX_DUAL] is set, GSER bundles lanes 0 and 1 for one CGX controller and bundles
16910                                                                  lanes 2 and 3 for another CGX controller. [CGX_DUAL] must only be set for the RXAUI
16911                                                                  protocol. */
16912         uint64_t cfg_cgx               : 1;  /**< [  0:  0](R/W) When set, indicates the BASE-R training logic is in CGX mode.  Enables SCLK to the CGX TX
16913                                                                  and RX
16914                                                                  data path and the BASE-R TX/RX Training blocks. [CFG_CGX] must be set to one when
16915                                                                  either GSERN()_LANE()_TRAIN_0_BCFG[CGX_DUAL] or GSERN()_LANE()_TRAIN_0_BCFG[CGX_QUAD]
16916                                                                  is set.
16917 
16918                                                                  When [CFG_CGX] is set, the GSERN()_LANE()_TRAIN_0_BCFG[CFG_OCX] field must be
16919                                                                  cleared to zero. */
16920 #else /* Word 0 - Little Endian */
16921         uint64_t cfg_cgx               : 1;  /**< [  0:  0](R/W) When set, indicates the BASE-R training logic is in CGX mode.  Enables SCLK to the CGX TX
16922                                                                  and RX
16923                                                                  data path and the BASE-R TX/RX Training blocks. [CFG_CGX] must be set to one when
16924                                                                  either GSERN()_LANE()_TRAIN_0_BCFG[CGX_DUAL] or GSERN()_LANE()_TRAIN_0_BCFG[CGX_QUAD]
16925                                                                  is set.
16926 
16927                                                                  When [CFG_CGX] is set, the GSERN()_LANE()_TRAIN_0_BCFG[CFG_OCX] field must be
16928                                                                  cleared to zero. */
16929         uint64_t cgx_dual              : 1;  /**< [  1:  1](R/W) When set, indicates the QLM is in CGX dual aggregation mode. [CGX_DUAL] must only be
16930                                                                  set when GSERN()_LANE()_SRCMX_BCFG[TX_DATA_SEL]=CGX is set and
16931                                                                  GSERN()_LANE()_SRCMX_BCFG[TX_CTRL_SEL]=CGX is set and [CGX_QUAD] is clear.
16932 
16933                                                                  When [CGX_DUAL] is set, GSER bundles lanes 0 and 1 for one CGX controller and bundles
16934                                                                  lanes 2 and 3 for another CGX controller. [CGX_DUAL] must only be set for the RXAUI
16935                                                                  protocol. */
16936         uint64_t cgx_quad              : 1;  /**< [  2:  2](R/W) When set, indicates the QLM is in CGX quad aggregation mode. [CGX_QUAD] must only be
16937                                                                  set when GSERN()_LANE()_SRCMX_BCFG[TX_DATA_SEL]=CGX is set and
16938                                                                  GSERN()_LANE()_SRCMX_BCFG[TX_CTRL_SEL]=CGX is set and [CGX_DUAL] is clear.
16939 
16940                                                                  When [CGX_QUAD] is set, GSER bundles all four lanes for one BCX controller.
16941                                                                  [CGX_QUAD] must only be set for the XAUI/DXAUI, XLAUI, and CAUI protocols. */
16942         uint64_t rxt_swm               : 1;  /**< [  3:  3](R/W) Set when RX BASE-R link training is to be performed under software control.
16943 
16944                                                                  See GSERN()_LANE()_TRAIN_0_BCFG[RXT_EER]. */
16945         uint64_t rxt_preset            : 1;  /**< [  4:  4](R/W) For all link training, this bit determines how to configure the preset bit in the
16946                                                                  coefficient update message that is sent to the far end transmitter. When set, a one time
16947                                                                  request is made that the coefficients be set to a state where equalization is turned off.
16948 
16949                                                                  To perform a preset, set this bit prior to link training. Link training needs to be
16950                                                                  disabled to complete the request and get the rxtrain state machine back to idle. Note that
16951                                                                  it is illegal to set both the preset and initialize bits at the same time. For diagnostic
16952                                                                  use only. */
16953         uint64_t rxt_initialize        : 1;  /**< [  5:  5](R/W) For all link training, this bit determines how to configure the initialize bit in the
16954                                                                  coefficient update message that is sent to the far end transmitter of RX training. When
16955                                                                  set, a request is made that the coefficients be set to its INITIALIZE state. To perform an
16956                                                                  initialize prior to link training, set this bit prior to performing link training. Note
16957                                                                  that it is illegal to set both the preset and initialize bits at the same time. */
16958         uint64_t rxt_adjmain           : 1;  /**< [  6:  6](R/W) For all link training, this bit determines how the main tap is adjusted at the start
16959                                                                  of link training.  When set the main tap of link partner transmitter peak-to-peak level
16960                                                                  is adjusted to optimize the AGC of the local device receiver.  This is intended to prevent
16961                                                                  receiver saturation on short or low loss links.
16962 
16963                                                                  To perform main tap optimization of the link partner transmitter set this bit prior to
16964                                                                  enabling link training. */
16965         uint64_t cfg_ocx               : 1;  /**< [  7:  7](R/W) Configure BASE-R training logic for OCX mode.   When [CFG_OCX] is set the
16966                                                                  Coefficient Update (CU) and Status Report (SR) messaging is reconfigured for
16967                                                                  the OCX controller.  The CU and SR messages must be sent and received in the
16968                                                                  txdivclk and rxdivclk domains for the OCX controller.
16969 
16970                                                                  When [CFG_OCX] is set, the GSERN()_LANE()_TRAIN_0_BCFG[CFG_CGX] field must be
16971                                                                  cleared to zero. */
16972         uint64_t reserved_8_13         : 6;
16973         uint64_t trn_ovrd_en           : 1;  /**< [ 14: 14](R/W) BASE-R Training Override Enable.  Setting [TRN_OVRD_EN] will enable BASE-R training logic
16974                                                                  for both CGX and OCX.  This is a CSR override for the BASE-R training enable signals from
16975                                                                  the CGX and OCX blocks.  Either GSERN()_LANE()_TRAIN_0_BCFG[CFG_CGX] or
16976                                                                  GSERN()_LANE()_TRAIN_0_BCFG[CFG_OCX] must be set to 1 before [TRN_OVRD_EN] is set to 1.  Also
16977                                                                  GSERN()_LANE()_SRCMX_BCFG[TX_CTRL_SEL] must be programmed to select CGX or OCX mode
16978                                                                  before [TRN_OVRD_EN] is set to 1.
16979                                                                  For diagnostic use only. */
16980         uint64_t frz_cdr_en            : 1;  /**< [ 15: 15](R/W) Freeze CDR enable. In CGX mode when set to a one enables the CGX MAC to
16981                                                                  Freeze the receiver CDR during BASE-R autonegotiation (AN) and KR training
16982                                                                  to prevent the RX CDR from locking onto the differential manchester encoded
16983                                                                  AN and KR training frames.  CGX asserts the rx cdr coast signal to the GSER
16984                                                                  block to freeze the RX CDR.  Clearing [FRZ_CDR_EN] prevents CGS from freezing
16985                                                                  the RX CDR.
16986                                                                  For diagnostic use only. */
16987         uint64_t ld_receiver_rdy       : 1;  /**< [ 16: 16](RO/H) At the completion of BASE-R training the local device sets receiver ready.  This bit
16988                                                                  reflects the state of the local device receiver ready status.  For Debug use only.
16989                                                                  This bit is only valid during BASE-R link training and at the conclusion of link
16990                                                                  training. */
16991         uint64_t trn_short             : 1;  /**< [ 17: 17](R/W) Train short. Executes an abbreviated BASE-R training session.
16992                                                                  For diagnostic use only. */
16993         uint64_t rxt_tx_pre_dir        : 2;  /**< [ 19: 18](RO/H) RX recommended TXPRE direction change.
16994 
16995                                                                  Recommended direction change outputs from the PHY for the link partner transmitter
16996                                                                  coefficients.
16997                                                                  0x0 = Hold.
16998                                                                  0x1 = Increment.
16999                                                                  0x2 = Decrement.
17000                                                                  0x3 = Hold. */
17001         uint64_t rxt_tx_main_dir       : 2;  /**< [ 21: 20](RO/H) RX recommended TXMAIN direction change.
17002 
17003                                                                  Recommended direction change outputs from the PHY for the link partner transmitter
17004                                                                  coefficients.
17005                                                                  0x0 = Hold.
17006                                                                  0x1 = Increment.
17007                                                                  0x2 = Decrement.
17008                                                                  0x3 = Hold. */
17009         uint64_t rxt_tx_post_dir       : 2;  /**< [ 23: 22](RO/H) RX recommended TXPOST direction change.
17010 
17011                                                                  Recommended direction change outputs from the PHY for the link partner transmitter
17012                                                                  coefficients.
17013                                                                  0x0 = Hold.
17014                                                                  0x1 = Increment.
17015                                                                  0x2 = Decrement.
17016                                                                  0x3 = Hold. */
17017         uint64_t rxt_esv               : 1;  /**< [ 24: 24](RO/H) When performing an equalization request ([RXT_EER]), this bit, when set, indicates that
17018                                                                  the
17019                                                                  equalization status (RXT_ESM) is valid. When issuing a [RXT_EER] request, it is expected
17020                                                                  that [RXT_ESV] will get written to zero so that a valid RXT_ESM can be determined. */
17021         uint64_t rxt_eer               : 1;  /**< [ 25: 25](WO/H) When RX BASE-R link training is being performed under software control,
17022                                                                  (GSERN()_LANE()_TRAIN_0_BCFG[RXT_SWM] is set), writing this bit initiates an equalization
17023                                                                  request to the SerDes receiver equalizer. Reading this bit always returns a zero. */
17024         uint64_t rxt_adtmout_disable   : 1;  /**< [ 26: 26](R/W) For BASE-R links one of the terminating condition for link training receiver adaptation
17025                                                                  is a programmable time-out timer.  When the receiver adaptation time-out timer
17026                                                                  expires the link training process is concluded and the link is considered good and
17027                                                                  the receiver ready status report bit is set in the local device.
17028                                                                  Note that when BASE-R link training is performed under software control,
17029                                                                  (GSERN()_LANE()_TRAIN_0_BCFG[RXT_SWM] is set), the receiver adaptation time-out timer is
17030                                                                  disabled and not used.
17031 
17032                                                                  Set this bit to a one to disable the link training receiver adaptation time-out
17033                                                                  timer during BASE-R link training under hardware control.  For diagnostic use only. */
17034         uint64_t rxt_adtmout_sel       : 2;  /**< [ 28: 27](R/W) Selects the timeout value for the BASE-R link training time-out timer.
17035                                                                  This time-out timer value is only valid if
17036                                                                  GSERN()_LANE()_TRAIN_0_BCFG[RXT_ADTMOUT_DISABLE]
17037                                                                  is cleared to 0 and BASE-R hardware training is enabled.
17038 
17039                                                                  When GSERN()_LANE()_TRAIN_0_BCFG[RXT_ADTMOUT_FAST] is cleared to 0 the link training
17040                                                                  time-out timer value is set by [RXT_ADTMOUT_SEL] to the values shown.
17041                                                                  0x0 = 83.89  milliseconds.
17042                                                                  0x1 = 167.77 milliseconds.
17043                                                                  0x2 = 335.54 milliseconds.
17044                                                                  0x3 = 419.43 milliseconds.
17045 
17046                                                                  When GSERN()_LANE()_TRAIN_0_BCFG[RXT_ADTMOUT_FAST] is set to 1 the link training
17047                                                                  time-out timer value is set by [RXT_ADTMOUT_SEL] to the values shown.
17048                                                                  0x0 = 81.92  microseconds.
17049                                                                  0x1 = 163.84 microseconds.
17050                                                                  0x2 = 327.68 microseconds.
17051                                                                  0x3 = 655.36 microseconds. */
17052         uint64_t rxt_adtmout_fast      : 1;  /**< [ 29: 29](R/W) Reserved.
17053                                                                  Internal:
17054                                                                  For simulation use only. When set accelerates the link training time-out timer during
17055                                                                  BASE-R link training.  When set shortens the link training time-out timer to time-out
17056                                                                  after 164 microseconds to facilitate shorter BASE-R training simulations runs.
17057                                                                  For diagnostic use only. */
17058         uint64_t txt_cur_prg           : 1;  /**< [ 30: 30](R/W) When TX BASE-R link training is being performed under software control,
17059                                                                  e.g. GSERN()_LANE()_TRAIN_0_BCFG[TXT_SWM] is set, setting [TXT_CUR_PRG] writes the TX
17060                                                                  equalizer
17061                                                                  coefficients in GSERN()_LANE()_TRAIN_0_BCFG[TXT_CUR_PRE],
17062                                                                  GSERN()_LANE()_TRAIN_0_BCFG[TXT_CUR_MAIN],
17063                                                                  and GSERN()_LANE()_TRAIN_0_BCFG[TXT_CUR_POST] registers into the GSER TX equalizer.
17064                                                                  For diagnostic use only. */
17065         uint64_t txt_cur_pre           : 5;  /**< [ 35: 31](R/W) When TX BASE-R link training is being performed under software control,
17066                                                                  e.g. GSERN()_LANE()_TRAIN_0_BCFG[TXT_SWM] is set, this is the (C-1) coefficient
17067                                                                  update to be written to the SerDes TX Equalizer.
17068                                                                  The coefficients are written to the TX equalizer when
17069                                                                  GSERN()_LANE()_TRAIN_0_BCFG[TXT_CUR_PRG] is set to a one.
17070                                                                  For diagnostic use only. */
17071         uint64_t txt_cur_main          : 6;  /**< [ 41: 36](R/W) When TX BASE-R link training is being performed under software control,
17072                                                                  e.g. GSERN()_LANE()_TRAIN_0_BCFG[TXT_SWM] is set, this is the (C0) coefficient
17073                                                                  update to be written to the SerDes TX Equalizer.
17074                                                                  The coefficients are written to the TX equalizer when
17075                                                                  GSERN()_LANE()_TRAIN_0_BCFG[TXT_CUR_PRG] is set to a one.
17076                                                                  For diagnostic use only. */
17077         uint64_t txt_cur_post          : 5;  /**< [ 46: 42](R/W) When TX BASE-R link training is being performed under software control,
17078                                                                  e.g. GSERN()_LANE()_TRAIN_0_BCFG[TXT_SWM] is set, this is the (C+1) coefficient
17079                                                                  update to be written to the SerDes TX Equalizer.
17080                                                                  The coefficients are written to the TX equalizer when
17081                                                                  GSERN()_LANE()_TRAIN_0_BCFG[TXT_CUR_PRG] is set to a one.
17082                                                                  For diagnostic use only. */
17083         uint64_t txt_swm               : 1;  /**< [ 47: 47](R/W) Set when TX BASE-R link training is to be performed under software control. For diagnostic
17084                                                                  use only. */
17085         uint64_t txt_pre               : 5;  /**< [ 52: 48](RO/H) After TX BASE-R link training, this is the resultant POST Tap value that was
17086                                                                  written to the PHY.  This field has no meaning if TX BASE-R link training was
17087                                                                  not performed.
17088                                                                  For diagnostic use only. */
17089         uint64_t txt_main              : 6;  /**< [ 58: 53](RO/H) After TX BASE-R link training, this is the resultant MAIN Tap value that was
17090                                                                  written to the PHY.  This field has no meaning if TX BASE-R link training was
17091                                                                  not performed.
17092                                                                  For diagnostic use only. */
17093         uint64_t txt_post              : 5;  /**< [ 63: 59](RO/H) After TX BASE-R link training, this is the resultant POST Tap value that was
17094                                                                  written to the PHY.  This field has no meaning if TX BASE-R link training was
17095                                                                  not performed.
17096                                                                  For diagnostic use only. */
17097 #endif /* Word 0 - End */
17098     } s;
17099     /* struct bdk_gsernx_lanex_train_0_bcfg_s cn; */
17100 };
17101 typedef union bdk_gsernx_lanex_train_0_bcfg bdk_gsernx_lanex_train_0_bcfg_t;
17102 
17103 static inline uint64_t BDK_GSERNX_LANEX_TRAIN_0_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_TRAIN_0_BCFG(unsigned long a,unsigned long b)17104 static inline uint64_t BDK_GSERNX_LANEX_TRAIN_0_BCFG(unsigned long a, unsigned long b)
17105 {
17106     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
17107         return 0x87e0900031b0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
17108     __bdk_csr_fatal("GSERNX_LANEX_TRAIN_0_BCFG", 2, a, b, 0, 0);
17109 }
17110 
17111 #define typedef_BDK_GSERNX_LANEX_TRAIN_0_BCFG(a,b) bdk_gsernx_lanex_train_0_bcfg_t
17112 #define bustype_BDK_GSERNX_LANEX_TRAIN_0_BCFG(a,b) BDK_CSR_TYPE_RSL
17113 #define basename_BDK_GSERNX_LANEX_TRAIN_0_BCFG(a,b) "GSERNX_LANEX_TRAIN_0_BCFG"
17114 #define device_bar_BDK_GSERNX_LANEX_TRAIN_0_BCFG(a,b) 0x0 /* PF_BAR0 */
17115 #define busnum_BDK_GSERNX_LANEX_TRAIN_0_BCFG(a,b) (a)
17116 #define arguments_BDK_GSERNX_LANEX_TRAIN_0_BCFG(a,b) (a),(b),-1,-1
17117 
17118 /**
17119  * Register (RSL) gsern#_lane#_train_10_bcfg
17120  *
17121  * GSER Lane Training Base Configuration Register 10
17122  * This register controls settings for lane training.
17123  */
17124 union bdk_gsernx_lanex_train_10_bcfg
17125 {
17126     uint64_t u;
17127     struct bdk_gsernx_lanex_train_10_bcfg_s
17128     {
17129 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
17130         uint64_t reserved_59_63        : 5;
17131         uint64_t l_c1_e_adj_sgn        : 1;  /**< [ 58: 58](R/W) Sets the lower C1 E sampler adjustment voltage offset sign.
17132                                                                  0 = The offset sign is positive
17133                                                                  positioning the lower C1_E sampler below the eye C1_Q sampler.
17134                                                                  1 = The offset sign is negative
17135                                                                  positioning the lower C1_E sampler above the eye C1_Q sampler.
17136 
17137                                                                  Used in conjunction with
17138                                                                  GSERN()_LANE()_TRAIN_4_BCFG[C1_E_ADJ_STEP] during KR training.
17139                                                                  For diagnostic use only. */
17140         uint64_t u_c1_e_adj_sgn        : 1;  /**< [ 57: 57](R/W) Sets the upper C1 E sampler adjustment voltage offset sign.
17141                                                                  0 = The offset sign is positive
17142                                                                  positioning the upper C1_E sampler above the eye C1_Q sampler.
17143                                                                  1 = The offset sign is negative
17144                                                                  positioning the upper C1_E sampler below the eye C1_Q sampler.
17145 
17146                                                                  Used in conjunction with
17147                                                                  GSERN()_LANE()_TRAIN_10_BCFG[U_C1_E_ADJ_STEP] for BASE-R training.
17148                                                                  For diagnostic use only. */
17149         uint64_t u_c1_e_adj_step       : 5;  /**< [ 56: 52](R/W) Sets the C1 E sampler voltage level during eye monitor sampling when
17150                                                                  GSERN()_LANE()_TRAIN_10_BCFG[FOM_TYPE] is set to one for BASE-R training.
17151                                                                  Typically [U_C1_E_ADJ_STEP] is set to 0x3 to position the eye monitor
17152                                                                  error sampler at ~15mv above the C1 Q sampler voltage level when
17153                                                                  computing the FOM using the two step process, e.g. [FOM_TYPE] set to one,
17154                                                                  with the error slicer level positioned above and below the data slicer
17155                                                                  level.  The error slicer level and positon relative to the data slicer
17156                                                                  is controlled by [U_C1_E_ADJ_STEP] and
17157                                                                  GSERN()_LANE()_TRAIN_10_BCFG[U_C1_E_ADJ_SGN] for BASE-R training.
17158                                                                  Steps are in units of 5.08 mV per step.
17159                                                                  For diagnostic use only. */
17160         uint64_t l_c1_e_adj_step       : 5;  /**< [ 51: 47](R/W) Sets the C1 E sampler voltage level during eye monitor sampling when
17161                                                                  GSERN()_LANE()_TRAIN_10_BCFG[FOM_TYPE] is set to one for BASE-R training.
17162                                                                  Typically [U_C1_E_ADJ_STEP] is set to 0x3 to position the eye monitor
17163                                                                  error sampler at ~15mv below the C1 Q sampler voltage level when
17164                                                                  computing the FOM using the two step process, e.g. [FOM_TYPE] set to one,
17165                                                                  with the error slicer level positioned above and below the data slicer
17166                                                                  level.  The error slicer level and positon relative to the data slicer
17167                                                                  is controlled by [U_C1_E_ADJ_STEP] and
17168                                                                  GSERN()_LANE()_TRAIN_10_BCFG[L_C1_E_ADJ_SGN] for BASE-R training.
17169                                                                  Steps are in units of 5.08 mV per step.
17170                                                                  For diagnostic use only. */
17171         uint64_t fom_type              : 1;  /**< [ 46: 46](R/W) BASE-R and PCIE training selects the Figure of Merit (FOM) measurement type. For
17172                                                                  diagnostic use only.
17173                                                                  0 = The raw FOM is measured by setting the eye monitor
17174                                                                  error slicer below the data slicer nominal level and counting the errors
17175                                                                  for each of the transition ones, non trasition ones, transition zeros, and
17176                                                                  non transition zeros then summing the four error counts, convert to ones
17177                                                                  complement, then normalize to a 12-bit unsigned integer.
17178                                                                  1 = The raw FOM calculation follows the steps above however the
17179                                                                  eye monitor error measurements is a two step process with the error slicer
17180                                                                  first set both below the nominal data slicer level and then on the second
17181                                                                  measurement pass set above the data slicer nominal level.
17182 
17183                                                                  Internal:
17184                                                                  The first FOM method can detect a saturated receiver and stop training
17185                                                                  if the eye is sufficiently open.
17186                                                                  The second FOM method returns a lower value for overequalized eyes and
17187                                                                  is useful for driving the training to a more optimal equalization
17188                                                                  setting on longer links. */
17189         uint64_t trn_fom_thrs_en       : 1;  /**< [ 45: 45](R/W) BASE-R training when set to 1 enables the FOM threshold value in
17190                                                                  GSERN()_LANE()_TRAIN_10_BCFG[EXIT_FOM_THRS_VAL] for training convergence
17191                                                                  detection.  When the measured FOM exceeds the value in
17192                                                                  GSERN()_LANE()_TRAIN_10_BCFG[EXIT_FOM_THRS_VAL] and
17193                                                                  GSERN()_LANE()_TRAIN_10_BCFG[TRN_FOM_THRS_EN] is set to 0x1, training
17194                                                                  will terminate depending on the settings of the training termination
17195                                                                  condition values set in
17196                                                                  GSERN()_LANE()_TRAIN_4_BCFG[TERM_FOM_THRS_AND] and
17197                                                                  GSERN()_LANE()_TRAIN_4_BCFG[TERM_FOM_THRS_OR].
17198 
17199                                                                  When BASE-R training converges due the FOM threshold being met or
17200                                                                  exceeded GSERN()_LANE()_TRAIN_3_BCFG[EXIT_FOM_THRS] will be set to 1
17201                                                                  if GSERN()_LANE()_TRAIN_10_BCFG[TRN_FOM_THRS_EN] is set to 1.
17202                                                                  For diagnostic use only. */
17203         uint64_t exit_fom_thrs_val     : 12; /**< [ 44: 33](R/W) BASE-R training sets the FOM threshold value used for training convergence
17204                                                                  detection.  When the measured FOM exceeds the value in [EXIT_FOM_THRS_VAL]
17205                                                                  and GSERN()_LANE()_TRAIN_10_BCFG[TRN_FOM_THRS_EN] is set to 0x1, training
17206                                                                  will terminate depending on the settings of the training termination
17207                                                                  condition values set in
17208                                                                  GSERN()_LANE()_TRAIN_4_BCFG[TERM_FOM_THRS_AND] and
17209                                                                  GSERN()_LANE()_TRAIN_4_BCFG[TERM_FOM_THRS_OR].
17210 
17211                                                                  Refer to the description for GSERN()_LANE()_TRAIN_10_BCFG[TRN_FOM_THRS_EN]
17212                                                                  and GSERN()_LANE()_TRAIN_3_BCFG[EXIT_FOM_THRS].
17213                                                                  For diagnostic use only. */
17214         uint64_t ttrk_array_clr        : 1;  /**< [ 32: 32](R/W) KR training Local Device Tx Equalizer tracking array clear signal. Used to
17215                                                                  clear the tracking array after KR training has completed.
17216                                                                  For diagnostic use only. */
17217         uint64_t ttrk_array_rd         : 1;  /**< [ 31: 31](R/W) KR training Local Device Tx Equalizer tracking array index Read signal. Used to
17218                                                                  readback tap values from the tracking array after KR training has completed.
17219                                                                  For diagnostic use only. */
17220         uint64_t ttrk_array_addr       : 7;  /**< [ 30: 24](R/W) KR training Local Device Tx Equalizer tracking array index. Used to
17221                                                                  readback tap values from the tracking array after KR training has completed.
17222                                                                  For diagnostic use only.
17223 
17224                                                                  Internal:
17225                                                                  During KR training the local device transmitter tap values (C0,C+1,C-1)
17226                                                                  are stored in the tap tracking array.  The array holds up to 128 locations.
17227                                                                  After KR training completes the array can be read back to determine the
17228                                                                  training progression of the transmitter taps.  This is helpful in debugging
17229                                                                  KR training convergence problems of the local device transmitter. */
17230         uint64_t ttrk_moves            : 8;  /**< [ 23: 16](RO/H) KR training Local Device Tx Equalizer number of tap adjustments during KR training.
17231                                                                  For diagnostic use only. */
17232         uint64_t ttrk_pre              : 5;  /**< [ 15: 11](RO/H) KR training Local Device Tx Equalizer Pre (C-1) value from the tap tracking array.
17233                                                                  For diagnostic use only. */
17234         uint64_t ttrk_main             : 6;  /**< [ 10:  5](RO/H) KR training Local Device Tx Equalizer Main (C0) value from the tap tracking array.
17235                                                                  For diagnostic use only. */
17236         uint64_t ttrk_post             : 5;  /**< [  4:  0](RO/H) KR training Local Device Tx Equalizer Post (C+1) value from the tap tracking array.
17237                                                                  For diagnostic use only. */
17238 #else /* Word 0 - Little Endian */
17239         uint64_t ttrk_post             : 5;  /**< [  4:  0](RO/H) KR training Local Device Tx Equalizer Post (C+1) value from the tap tracking array.
17240                                                                  For diagnostic use only. */
17241         uint64_t ttrk_main             : 6;  /**< [ 10:  5](RO/H) KR training Local Device Tx Equalizer Main (C0) value from the tap tracking array.
17242                                                                  For diagnostic use only. */
17243         uint64_t ttrk_pre              : 5;  /**< [ 15: 11](RO/H) KR training Local Device Tx Equalizer Pre (C-1) value from the tap tracking array.
17244                                                                  For diagnostic use only. */
17245         uint64_t ttrk_moves            : 8;  /**< [ 23: 16](RO/H) KR training Local Device Tx Equalizer number of tap adjustments during KR training.
17246                                                                  For diagnostic use only. */
17247         uint64_t ttrk_array_addr       : 7;  /**< [ 30: 24](R/W) KR training Local Device Tx Equalizer tracking array index. Used to
17248                                                                  readback tap values from the tracking array after KR training has completed.
17249                                                                  For diagnostic use only.
17250 
17251                                                                  Internal:
17252                                                                  During KR training the local device transmitter tap values (C0,C+1,C-1)
17253                                                                  are stored in the tap tracking array.  The array holds up to 128 locations.
17254                                                                  After KR training completes the array can be read back to determine the
17255                                                                  training progression of the transmitter taps.  This is helpful in debugging
17256                                                                  KR training convergence problems of the local device transmitter. */
17257         uint64_t ttrk_array_rd         : 1;  /**< [ 31: 31](R/W) KR training Local Device Tx Equalizer tracking array index Read signal. Used to
17258                                                                  readback tap values from the tracking array after KR training has completed.
17259                                                                  For diagnostic use only. */
17260         uint64_t ttrk_array_clr        : 1;  /**< [ 32: 32](R/W) KR training Local Device Tx Equalizer tracking array clear signal. Used to
17261                                                                  clear the tracking array after KR training has completed.
17262                                                                  For diagnostic use only. */
17263         uint64_t exit_fom_thrs_val     : 12; /**< [ 44: 33](R/W) BASE-R training sets the FOM threshold value used for training convergence
17264                                                                  detection.  When the measured FOM exceeds the value in [EXIT_FOM_THRS_VAL]
17265                                                                  and GSERN()_LANE()_TRAIN_10_BCFG[TRN_FOM_THRS_EN] is set to 0x1, training
17266                                                                  will terminate depending on the settings of the training termination
17267                                                                  condition values set in
17268                                                                  GSERN()_LANE()_TRAIN_4_BCFG[TERM_FOM_THRS_AND] and
17269                                                                  GSERN()_LANE()_TRAIN_4_BCFG[TERM_FOM_THRS_OR].
17270 
17271                                                                  Refer to the description for GSERN()_LANE()_TRAIN_10_BCFG[TRN_FOM_THRS_EN]
17272                                                                  and GSERN()_LANE()_TRAIN_3_BCFG[EXIT_FOM_THRS].
17273                                                                  For diagnostic use only. */
17274         uint64_t trn_fom_thrs_en       : 1;  /**< [ 45: 45](R/W) BASE-R training when set to 1 enables the FOM threshold value in
17275                                                                  GSERN()_LANE()_TRAIN_10_BCFG[EXIT_FOM_THRS_VAL] for training convergence
17276                                                                  detection.  When the measured FOM exceeds the value in
17277                                                                  GSERN()_LANE()_TRAIN_10_BCFG[EXIT_FOM_THRS_VAL] and
17278                                                                  GSERN()_LANE()_TRAIN_10_BCFG[TRN_FOM_THRS_EN] is set to 0x1, training
17279                                                                  will terminate depending on the settings of the training termination
17280                                                                  condition values set in
17281                                                                  GSERN()_LANE()_TRAIN_4_BCFG[TERM_FOM_THRS_AND] and
17282                                                                  GSERN()_LANE()_TRAIN_4_BCFG[TERM_FOM_THRS_OR].
17283 
17284                                                                  When BASE-R training converges due the FOM threshold being met or
17285                                                                  exceeded GSERN()_LANE()_TRAIN_3_BCFG[EXIT_FOM_THRS] will be set to 1
17286                                                                  if GSERN()_LANE()_TRAIN_10_BCFG[TRN_FOM_THRS_EN] is set to 1.
17287                                                                  For diagnostic use only. */
17288         uint64_t fom_type              : 1;  /**< [ 46: 46](R/W) BASE-R and PCIE training selects the Figure of Merit (FOM) measurement type. For
17289                                                                  diagnostic use only.
17290                                                                  0 = The raw FOM is measured by setting the eye monitor
17291                                                                  error slicer below the data slicer nominal level and counting the errors
17292                                                                  for each of the transition ones, non trasition ones, transition zeros, and
17293                                                                  non transition zeros then summing the four error counts, convert to ones
17294                                                                  complement, then normalize to a 12-bit unsigned integer.
17295                                                                  1 = The raw FOM calculation follows the steps above however the
17296                                                                  eye monitor error measurements is a two step process with the error slicer
17297                                                                  first set both below the nominal data slicer level and then on the second
17298                                                                  measurement pass set above the data slicer nominal level.
17299 
17300                                                                  Internal:
17301                                                                  The first FOM method can detect a saturated receiver and stop training
17302                                                                  if the eye is sufficiently open.
17303                                                                  The second FOM method returns a lower value for overequalized eyes and
17304                                                                  is useful for driving the training to a more optimal equalization
17305                                                                  setting on longer links. */
17306         uint64_t l_c1_e_adj_step       : 5;  /**< [ 51: 47](R/W) Sets the C1 E sampler voltage level during eye monitor sampling when
17307                                                                  GSERN()_LANE()_TRAIN_10_BCFG[FOM_TYPE] is set to one for BASE-R training.
17308                                                                  Typically [U_C1_E_ADJ_STEP] is set to 0x3 to position the eye monitor
17309                                                                  error sampler at ~15mv below the C1 Q sampler voltage level when
17310                                                                  computing the FOM using the two step process, e.g. [FOM_TYPE] set to one,
17311                                                                  with the error slicer level positioned above and below the data slicer
17312                                                                  level.  The error slicer level and positon relative to the data slicer
17313                                                                  is controlled by [U_C1_E_ADJ_STEP] and
17314                                                                  GSERN()_LANE()_TRAIN_10_BCFG[L_C1_E_ADJ_SGN] for BASE-R training.
17315                                                                  Steps are in units of 5.08 mV per step.
17316                                                                  For diagnostic use only. */
17317         uint64_t u_c1_e_adj_step       : 5;  /**< [ 56: 52](R/W) Sets the C1 E sampler voltage level during eye monitor sampling when
17318                                                                  GSERN()_LANE()_TRAIN_10_BCFG[FOM_TYPE] is set to one for BASE-R training.
17319                                                                  Typically [U_C1_E_ADJ_STEP] is set to 0x3 to position the eye monitor
17320                                                                  error sampler at ~15mv above the C1 Q sampler voltage level when
17321                                                                  computing the FOM using the two step process, e.g. [FOM_TYPE] set to one,
17322                                                                  with the error slicer level positioned above and below the data slicer
17323                                                                  level.  The error slicer level and positon relative to the data slicer
17324                                                                  is controlled by [U_C1_E_ADJ_STEP] and
17325                                                                  GSERN()_LANE()_TRAIN_10_BCFG[U_C1_E_ADJ_SGN] for BASE-R training.
17326                                                                  Steps are in units of 5.08 mV per step.
17327                                                                  For diagnostic use only. */
17328         uint64_t u_c1_e_adj_sgn        : 1;  /**< [ 57: 57](R/W) Sets the upper C1 E sampler adjustment voltage offset sign.
17329                                                                  0 = The offset sign is positive
17330                                                                  positioning the upper C1_E sampler above the eye C1_Q sampler.
17331                                                                  1 = The offset sign is negative
17332                                                                  positioning the upper C1_E sampler below the eye C1_Q sampler.
17333 
17334                                                                  Used in conjunction with
17335                                                                  GSERN()_LANE()_TRAIN_10_BCFG[U_C1_E_ADJ_STEP] for BASE-R training.
17336                                                                  For diagnostic use only. */
17337         uint64_t l_c1_e_adj_sgn        : 1;  /**< [ 58: 58](R/W) Sets the lower C1 E sampler adjustment voltage offset sign.
17338                                                                  0 = The offset sign is positive
17339                                                                  positioning the lower C1_E sampler below the eye C1_Q sampler.
17340                                                                  1 = The offset sign is negative
17341                                                                  positioning the lower C1_E sampler above the eye C1_Q sampler.
17342 
17343                                                                  Used in conjunction with
17344                                                                  GSERN()_LANE()_TRAIN_4_BCFG[C1_E_ADJ_STEP] during KR training.
17345                                                                  For diagnostic use only. */
17346         uint64_t reserved_59_63        : 5;
17347 #endif /* Word 0 - End */
17348     } s;
17349     /* struct bdk_gsernx_lanex_train_10_bcfg_s cn; */
17350 };
17351 typedef union bdk_gsernx_lanex_train_10_bcfg bdk_gsernx_lanex_train_10_bcfg_t;
17352 
17353 static inline uint64_t BDK_GSERNX_LANEX_TRAIN_10_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_TRAIN_10_BCFG(unsigned long a,unsigned long b)17354 static inline uint64_t BDK_GSERNX_LANEX_TRAIN_10_BCFG(unsigned long a, unsigned long b)
17355 {
17356     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
17357         return 0x87e090003250ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
17358     __bdk_csr_fatal("GSERNX_LANEX_TRAIN_10_BCFG", 2, a, b, 0, 0);
17359 }
17360 
17361 #define typedef_BDK_GSERNX_LANEX_TRAIN_10_BCFG(a,b) bdk_gsernx_lanex_train_10_bcfg_t
17362 #define bustype_BDK_GSERNX_LANEX_TRAIN_10_BCFG(a,b) BDK_CSR_TYPE_RSL
17363 #define basename_BDK_GSERNX_LANEX_TRAIN_10_BCFG(a,b) "GSERNX_LANEX_TRAIN_10_BCFG"
17364 #define device_bar_BDK_GSERNX_LANEX_TRAIN_10_BCFG(a,b) 0x0 /* PF_BAR0 */
17365 #define busnum_BDK_GSERNX_LANEX_TRAIN_10_BCFG(a,b) (a)
17366 #define arguments_BDK_GSERNX_LANEX_TRAIN_10_BCFG(a,b) (a),(b),-1,-1
17367 
17368 /**
17369  * Register (RSL) gsern#_lane#_train_1_bcfg
17370  *
17371  * GSER Lane Training Base Configuration Register 1
17372  * This register controls settings for lane training.
17373  */
17374 union bdk_gsernx_lanex_train_1_bcfg
17375 {
17376     uint64_t u;
17377     struct bdk_gsernx_lanex_train_1_bcfg_s
17378     {
17379 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
17380         uint64_t rxt_fom               : 12; /**< [ 63: 52](RO/H) Figure of merit. An 11-bit output from the PHY indicating the quality of the
17381                                                                  received data eye. A higher value indicates better link equalization, with 0x0
17382                                                                  indicating worst equalization setting and 4095 indicating the best equalization
17383                                                                  setting. */
17384         uint64_t train_tx_rule         : 8;  /**< [ 51: 44](R/W) BASE-R training TX taps coefficient rule.  Sets the upper limit of the permissible
17385                                                                  range of the combined TX equalizer c(0), c(+1), and c(-1) taps so that the TX equalizer
17386                                                                  operates within range specified in the 10GBASE-KR standard.
17387                                                                  The TX coefficient rule requires (pre + post + main) \<= [TRAIN_TX_RULE].
17388 
17389                                                                  The allowable range for [TRAIN_TX_RULE] is (24 decimal \<= [TRAIN_TX_RULE] \<= 48
17390                                                                  decimal).
17391                                                                  For 10GBASE-KR it is recommended to program [TRAIN_TX_RULE] to 0x30  (48 decimal).
17392 
17393                                                                  c(-1) pre TX tap range is programmed by GSERN()_LANE()_TRAIN_2_BCFG[PRE_MAX_LIMIT] and
17394                                                                  GSERN()_LANE()_TRAIN_2_BCFG[PRE_MIN_LIMIT].
17395 
17396                                                                  c(0) main TX tap range is programmed by GSERN()_LANE()_TRAIN_2_BCFG[MAIN_MAX_LIMIT] and
17397                                                                  GSERN()_LANE()_TRAIN_2_BCFG[MAIN_MIN_LIMIT].
17398 
17399                                                                  c(+1) post TX tap range is programmed by GSERN()_LANE()_TRAIN_2_BCFG[POST_MAX_LIMIT] and
17400                                                                  GSERN()_LANE()_TRAIN_2_BCFG[POST_MIN_LIMIT]. */
17401         uint64_t trn_rx_nxt_st         : 6;  /**< [ 43: 38](RO/H) BASE-R training single step next state for the receive training state machine.
17402                                                                  In single step mode this field holds the value of the next state of the receive
17403                                                                  training state machine when the GSERN()_LANE()_TRAIN_1_BCFG[TRN_RX_SS_SP] bit is
17404                                                                  set to a one.
17405                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_EN] must be set to a one to enable single
17406                                                                  step mode and the GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_ST] must be set to a one
17407                                                                  to force the receive training state machine to the STOP state.
17408 
17409                                                                  Used in conjunction with
17410                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_EN],
17411                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_ST].
17412 
17413                                                                  For diagnostic use only. */
17414         uint64_t trn_ovrd_st           : 6;  /**< [ 37: 32](R/W) BASE-R training single step override state for the receive training
17415                                                                  state machine.  In single step mode allows for forcing the receive training
17416                                                                  state machine to a specific state when exiting the STOP state.
17417                                                                  Refer to the description for GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_OVRD].
17418 
17419                                                                  Used in conjunction with
17420                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_EN],
17421                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_ST],
17422                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_OVRD],
17423                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_RX_SS_SP].
17424 
17425                                                                  For diagnostic use only. */
17426         uint64_t trn_ss_ovrd           : 1;  /**< [ 31: 31](R/W) BASE-R training single step state override control for the receive training
17427                                                                  state machine.
17428                                                                  When single step mode is enabled by setting GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_EN]
17429                                                                  to 1 and the receive state machine is forced to the STOP state by setting
17430                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_ST] to a 1. When the receive state machine enters
17431                                                                  the STOP state, indicated by the stop flag GSERN()_LANE()_TRAIN_1_BCFG[TRN_RX_SS_SP]
17432                                                                  set to one, the next state of the receive state machine, prior to entering the STOP
17433                                                                  state is indicated by the value in the GSERN()_LANE()_TRAIN_1_BCFG[TRN_RX_NXT_ST]
17434                                                                  field.  The next state of the receive state machine can be overridden, that is forced
17435                                                                  to another state other than the next state by setting
17436                                                                  the desired next state in the GSERN()_LANE()_TRAIN_1_BCFG[TRN_OVRD_ST] field and then
17437                                                                  clearing the GSERN()_LANE()_TRAIN_1_BCFG[TRN_RX_SS_SP] to zero.  The receive state
17438                                                                  machine will exit the STOP state and proceed to state indicated in [TRN_OVRD_ST]
17439                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_OVRD_ST] field.
17440 
17441                                                                  Used in conjunction with
17442                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_EN],
17443                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_ST],
17444                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_OVRD_ST],
17445                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_RX_SS_SP].
17446 
17447                                                                  For diagnostic use only. */
17448         uint64_t reserved_30           : 1;
17449         uint64_t trn_rx_ss_sp          : 1;  /**< [ 29: 29](RO/H) BASE-R training single step stop flag for the receiver training state machine.
17450                                                                  When single step mode is enabled by setting GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_EN]
17451                                                                  to 1 the receive state machine is forced to the STOP state by setting
17452                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_ST] to a 1. When the receive state machine enters
17453                                                                  the STOP state, the [TRN_RX_SS_SP] flag will be set. Subsequently, writing
17454                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_ST] to zero will cause the receive state machine
17455                                                                  to exit the STOP state and jump to the state indicated in the
17456                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_RX_NXT_ST] field.
17457 
17458                                                                  Used in conjunction with
17459                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_EN],
17460                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_ST],
17461                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_RX_NXT_ST],
17462                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_OVRD_ST],
17463                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_RX_SS_SP].
17464 
17465                                                                  For diagnostic use only. */
17466         uint64_t trn_ss_st             : 1;  /**< [ 28: 28](WO/H) BASE-R training single-step start single-step stop.
17467                                                                  Refer to the description for GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_EN].
17468 
17469                                                                  Used in conjunction with
17470                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_EN],
17471                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_RX_SS_SP].
17472                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_RX_NXT_ST],
17473                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_OVRD_ST],
17474 
17475                                                                  For diagnostic use only. */
17476         uint64_t trn_ss_en             : 1;  /**< [ 27: 27](R/W) BASE-R training single step mode enable. When set to a 1 enables single stepping
17477                                                                  the BASE-R link training receive state machines.
17478 
17479                                                                  When single step mode is enabled by setting GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_EN]
17480                                                                  to 1 the receive state machine is forced to the STOP state by setting
17481                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_ST] to a 1. When the receive state machine enters
17482                                                                  the STOP state, the [TRN_RX_SS_SP] flag will be set. Subsequently, writing
17483                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_ST] to 0 then writing
17484                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_ST] to 1 will cause the receive state machine
17485                                                                  to exit the STOP state and jump to the state indicated in the
17486                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_RX_NXT_ST] field. Alternatively, the receive
17487                                                                  state machine can be forced to a different state by writing the state value
17488                                                                  to the GSERN()_LANE()_TRAIN_1_BCFG[TRN_OVRD_ST] field then set the
17489                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_OVRD] to 1 and then writing
17490                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_ST] to 0 then writing
17491                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_ST] to 1 to force the receive state machine to the
17492                                                                  override state and then return to the STOP state.
17493 
17494                                                                  Used in conjunction with
17495                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_ST],
17496                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_RX_NXT_ST],
17497                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_OVRD_ST],
17498                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_OVRD],
17499                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_RX_SS_SP].
17500 
17501                                                                  For diagnostic use only. */
17502         uint64_t rx_train_fsm          : 6;  /**< [ 26: 21](RO/H) Value of the BASE-R hardware receiver link training state machine state during
17503                                                                  link training single step mode. The values in this field are only valid when
17504                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_EN] is set.
17505                                                                  For diagnostic use only. */
17506         uint64_t tx_train_fsm          : 5;  /**< [ 20: 16](RO/H) Value of the BASE-R hardware transmitter link training state machine state.
17507                                                                  For diagnostic use only. */
17508         uint64_t txt_post_init         : 5;  /**< [ 15: 11](R/W) During TX BASE-R link training, the TX posttap value that is used
17509                                                                  when the initialize coefficients update is received. It is also the TX posttap
17510                                                                  value used when the BASE-R link training begins.
17511                                                                  For diagnostic use only. */
17512         uint64_t txt_main_init         : 6;  /**< [ 10:  5](R/W) During TX BASE-R link training, the TX swing-tap value that is used
17513                                                                  when the initialize coefficients update is received. It is also the TX swing-tap
17514                                                                  value used when the BASE-R link training begins.
17515                                                                  For diagnostic use only. */
17516         uint64_t txt_pre_init          : 5;  /**< [  4:  0](R/W) During TX BASE-R link training, the TX pretap value that is used
17517                                                                  when the initialize coefficients update is received. It is also the TX pretap
17518                                                                  value used when the BASE-R link training begins.
17519                                                                  For diagnostic use only. */
17520 #else /* Word 0 - Little Endian */
17521         uint64_t txt_pre_init          : 5;  /**< [  4:  0](R/W) During TX BASE-R link training, the TX pretap value that is used
17522                                                                  when the initialize coefficients update is received. It is also the TX pretap
17523                                                                  value used when the BASE-R link training begins.
17524                                                                  For diagnostic use only. */
17525         uint64_t txt_main_init         : 6;  /**< [ 10:  5](R/W) During TX BASE-R link training, the TX swing-tap value that is used
17526                                                                  when the initialize coefficients update is received. It is also the TX swing-tap
17527                                                                  value used when the BASE-R link training begins.
17528                                                                  For diagnostic use only. */
17529         uint64_t txt_post_init         : 5;  /**< [ 15: 11](R/W) During TX BASE-R link training, the TX posttap value that is used
17530                                                                  when the initialize coefficients update is received. It is also the TX posttap
17531                                                                  value used when the BASE-R link training begins.
17532                                                                  For diagnostic use only. */
17533         uint64_t tx_train_fsm          : 5;  /**< [ 20: 16](RO/H) Value of the BASE-R hardware transmitter link training state machine state.
17534                                                                  For diagnostic use only. */
17535         uint64_t rx_train_fsm          : 6;  /**< [ 26: 21](RO/H) Value of the BASE-R hardware receiver link training state machine state during
17536                                                                  link training single step mode. The values in this field are only valid when
17537                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_EN] is set.
17538                                                                  For diagnostic use only. */
17539         uint64_t trn_ss_en             : 1;  /**< [ 27: 27](R/W) BASE-R training single step mode enable. When set to a 1 enables single stepping
17540                                                                  the BASE-R link training receive state machines.
17541 
17542                                                                  When single step mode is enabled by setting GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_EN]
17543                                                                  to 1 the receive state machine is forced to the STOP state by setting
17544                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_ST] to a 1. When the receive state machine enters
17545                                                                  the STOP state, the [TRN_RX_SS_SP] flag will be set. Subsequently, writing
17546                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_ST] to 0 then writing
17547                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_ST] to 1 will cause the receive state machine
17548                                                                  to exit the STOP state and jump to the state indicated in the
17549                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_RX_NXT_ST] field. Alternatively, the receive
17550                                                                  state machine can be forced to a different state by writing the state value
17551                                                                  to the GSERN()_LANE()_TRAIN_1_BCFG[TRN_OVRD_ST] field then set the
17552                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_OVRD] to 1 and then writing
17553                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_ST] to 0 then writing
17554                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_ST] to 1 to force the receive state machine to the
17555                                                                  override state and then return to the STOP state.
17556 
17557                                                                  Used in conjunction with
17558                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_ST],
17559                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_RX_NXT_ST],
17560                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_OVRD_ST],
17561                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_OVRD],
17562                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_RX_SS_SP].
17563 
17564                                                                  For diagnostic use only. */
17565         uint64_t trn_ss_st             : 1;  /**< [ 28: 28](WO/H) BASE-R training single-step start single-step stop.
17566                                                                  Refer to the description for GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_EN].
17567 
17568                                                                  Used in conjunction with
17569                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_EN],
17570                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_RX_SS_SP].
17571                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_RX_NXT_ST],
17572                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_OVRD_ST],
17573 
17574                                                                  For diagnostic use only. */
17575         uint64_t trn_rx_ss_sp          : 1;  /**< [ 29: 29](RO/H) BASE-R training single step stop flag for the receiver training state machine.
17576                                                                  When single step mode is enabled by setting GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_EN]
17577                                                                  to 1 the receive state machine is forced to the STOP state by setting
17578                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_ST] to a 1. When the receive state machine enters
17579                                                                  the STOP state, the [TRN_RX_SS_SP] flag will be set. Subsequently, writing
17580                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_ST] to zero will cause the receive state machine
17581                                                                  to exit the STOP state and jump to the state indicated in the
17582                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_RX_NXT_ST] field.
17583 
17584                                                                  Used in conjunction with
17585                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_EN],
17586                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_ST],
17587                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_RX_NXT_ST],
17588                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_OVRD_ST],
17589                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_RX_SS_SP].
17590 
17591                                                                  For diagnostic use only. */
17592         uint64_t reserved_30           : 1;
17593         uint64_t trn_ss_ovrd           : 1;  /**< [ 31: 31](R/W) BASE-R training single step state override control for the receive training
17594                                                                  state machine.
17595                                                                  When single step mode is enabled by setting GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_EN]
17596                                                                  to 1 and the receive state machine is forced to the STOP state by setting
17597                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_ST] to a 1. When the receive state machine enters
17598                                                                  the STOP state, indicated by the stop flag GSERN()_LANE()_TRAIN_1_BCFG[TRN_RX_SS_SP]
17599                                                                  set to one, the next state of the receive state machine, prior to entering the STOP
17600                                                                  state is indicated by the value in the GSERN()_LANE()_TRAIN_1_BCFG[TRN_RX_NXT_ST]
17601                                                                  field.  The next state of the receive state machine can be overridden, that is forced
17602                                                                  to another state other than the next state by setting
17603                                                                  the desired next state in the GSERN()_LANE()_TRAIN_1_BCFG[TRN_OVRD_ST] field and then
17604                                                                  clearing the GSERN()_LANE()_TRAIN_1_BCFG[TRN_RX_SS_SP] to zero.  The receive state
17605                                                                  machine will exit the STOP state and proceed to state indicated in [TRN_OVRD_ST]
17606                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_OVRD_ST] field.
17607 
17608                                                                  Used in conjunction with
17609                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_EN],
17610                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_ST],
17611                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_OVRD_ST],
17612                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_RX_SS_SP].
17613 
17614                                                                  For diagnostic use only. */
17615         uint64_t trn_ovrd_st           : 6;  /**< [ 37: 32](R/W) BASE-R training single step override state for the receive training
17616                                                                  state machine.  In single step mode allows for forcing the receive training
17617                                                                  state machine to a specific state when exiting the STOP state.
17618                                                                  Refer to the description for GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_OVRD].
17619 
17620                                                                  Used in conjunction with
17621                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_EN],
17622                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_ST],
17623                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_OVRD],
17624                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_RX_SS_SP].
17625 
17626                                                                  For diagnostic use only. */
17627         uint64_t trn_rx_nxt_st         : 6;  /**< [ 43: 38](RO/H) BASE-R training single step next state for the receive training state machine.
17628                                                                  In single step mode this field holds the value of the next state of the receive
17629                                                                  training state machine when the GSERN()_LANE()_TRAIN_1_BCFG[TRN_RX_SS_SP] bit is
17630                                                                  set to a one.
17631                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_EN] must be set to a one to enable single
17632                                                                  step mode and the GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_ST] must be set to a one
17633                                                                  to force the receive training state machine to the STOP state.
17634 
17635                                                                  Used in conjunction with
17636                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_EN],
17637                                                                  GSERN()_LANE()_TRAIN_1_BCFG[TRN_SS_ST].
17638 
17639                                                                  For diagnostic use only. */
17640         uint64_t train_tx_rule         : 8;  /**< [ 51: 44](R/W) BASE-R training TX taps coefficient rule.  Sets the upper limit of the permissible
17641                                                                  range of the combined TX equalizer c(0), c(+1), and c(-1) taps so that the TX equalizer
17642                                                                  operates within range specified in the 10GBASE-KR standard.
17643                                                                  The TX coefficient rule requires (pre + post + main) \<= [TRAIN_TX_RULE].
17644 
17645                                                                  The allowable range for [TRAIN_TX_RULE] is (24 decimal \<= [TRAIN_TX_RULE] \<= 48
17646                                                                  decimal).
17647                                                                  For 10GBASE-KR it is recommended to program [TRAIN_TX_RULE] to 0x30  (48 decimal).
17648 
17649                                                                  c(-1) pre TX tap range is programmed by GSERN()_LANE()_TRAIN_2_BCFG[PRE_MAX_LIMIT] and
17650                                                                  GSERN()_LANE()_TRAIN_2_BCFG[PRE_MIN_LIMIT].
17651 
17652                                                                  c(0) main TX tap range is programmed by GSERN()_LANE()_TRAIN_2_BCFG[MAIN_MAX_LIMIT] and
17653                                                                  GSERN()_LANE()_TRAIN_2_BCFG[MAIN_MIN_LIMIT].
17654 
17655                                                                  c(+1) post TX tap range is programmed by GSERN()_LANE()_TRAIN_2_BCFG[POST_MAX_LIMIT] and
17656                                                                  GSERN()_LANE()_TRAIN_2_BCFG[POST_MIN_LIMIT]. */
17657         uint64_t rxt_fom               : 12; /**< [ 63: 52](RO/H) Figure of merit. An 11-bit output from the PHY indicating the quality of the
17658                                                                  received data eye. A higher value indicates better link equalization, with 0x0
17659                                                                  indicating worst equalization setting and 4095 indicating the best equalization
17660                                                                  setting. */
17661 #endif /* Word 0 - End */
17662     } s;
17663     /* struct bdk_gsernx_lanex_train_1_bcfg_s cn; */
17664 };
17665 typedef union bdk_gsernx_lanex_train_1_bcfg bdk_gsernx_lanex_train_1_bcfg_t;
17666 
17667 static inline uint64_t BDK_GSERNX_LANEX_TRAIN_1_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_TRAIN_1_BCFG(unsigned long a,unsigned long b)17668 static inline uint64_t BDK_GSERNX_LANEX_TRAIN_1_BCFG(unsigned long a, unsigned long b)
17669 {
17670     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
17671         return 0x87e0900031c0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
17672     __bdk_csr_fatal("GSERNX_LANEX_TRAIN_1_BCFG", 2, a, b, 0, 0);
17673 }
17674 
17675 #define typedef_BDK_GSERNX_LANEX_TRAIN_1_BCFG(a,b) bdk_gsernx_lanex_train_1_bcfg_t
17676 #define bustype_BDK_GSERNX_LANEX_TRAIN_1_BCFG(a,b) BDK_CSR_TYPE_RSL
17677 #define basename_BDK_GSERNX_LANEX_TRAIN_1_BCFG(a,b) "GSERNX_LANEX_TRAIN_1_BCFG"
17678 #define device_bar_BDK_GSERNX_LANEX_TRAIN_1_BCFG(a,b) 0x0 /* PF_BAR0 */
17679 #define busnum_BDK_GSERNX_LANEX_TRAIN_1_BCFG(a,b) (a)
17680 #define arguments_BDK_GSERNX_LANEX_TRAIN_1_BCFG(a,b) (a),(b),-1,-1
17681 
17682 /**
17683  * Register (RSL) gsern#_lane#_train_2_bcfg
17684  *
17685  * GSER Lane Training Base Configuration Register 2
17686  * This register controls settings for lane training.
17687  */
17688 union bdk_gsernx_lanex_train_2_bcfg
17689 {
17690     uint64_t u;
17691     struct bdk_gsernx_lanex_train_2_bcfg_s
17692     {
17693 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
17694         uint64_t trn_sat_mv_lmt        : 4;  /**< [ 63: 60](R/W) BASE-R training saturated move limit threshold.
17695                                                                  See GSERN()_LANE()_TRAIN_2_BCFG[TRN_SAT_MV_LMT_EN].
17696                                                                  For diagnostic use only. */
17697         uint64_t trn_sat_mv_lmt_en     : 1;  /**< [ 59: 59](R/W) BASE-R training saturated move limit threshold enable. During BASE-R training
17698                                                                  if a consecutive number of saturated tap moves specified by
17699                                                                  GSERN()_LANE()_TRAIN_2_BCFG[TRN_SAT_MV_LMT] is met or exceeded training will conclude.
17700                                                                  This is to prevent cases where the FOM can no longer be improved and the
17701                                                                  link partner TX taps are at their minimum or maximum limits and the algorithm
17702                                                                  is attempting to repeatedly move the Tx taps beyond their min/max limits.
17703                                                                  If the threshold limit is met or exceeded and [TRN_SAT_MV_LMT_EN] is set to 1
17704                                                                  training will terminate and the GSERN()_LANE()_TRAIN_3_BCFG[EXIT_SAT_MV_LMT]
17705                                                                  flag will set.
17706                                                                  For diagnostic use only. */
17707         uint64_t trn_cfg_use_eye_en    : 1;  /**< [ 58: 58](R/W) BASE-R and PCIe training when [TRN_CFG_USE_EYE_EN] is set the training state machine
17708                                                                  will control the eye monitor block while training is active the power down the
17709                                                                  eye monitor at the conclusion of link training.
17710                                                                  For diagnostic use only. */
17711         uint64_t trn_rrrpt_en          : 1;  /**< [ 57: 57](R/W) BASE-R training when [TRN_RRRPT_EN] is set the training state machine
17712                                                                  will repeatedly send Receiver Ready messages to the CGX/OCX MAC every
17713                                                                  128 services clocks when training completes. For diagnostic use only. */
17714         uint64_t trn_preset_en         : 1;  /**< [ 56: 56](R/W) BASE-R training when [TRN_PRESET_EN] is set to one preset the link
17715                                                                  partner TX equalizer when training starts.  When [TRN_PRESET_EN]
17716                                                                  is cleared to zero the link partner TX equalizer will start in the
17717                                                                  INITIALIZE state.  For BASE-R training it is recommended to
17718                                                                  start link training with [TRN_PRESET_EN] set to one. */
17719         uint64_t trn_main_en           : 2;  /**< [ 55: 54](R/W) BASE-R training decrements the link partner (LP) TX equalizer main (C0) tap
17720                                                                  at the start of link training after the PRESET coefficient update has been
17721                                                                  issued to the link partner.  Used in conjunction with [TRN_MAIN_VAL].
17722 
17723                                                                      0x0 = Disabled, do not decrement LP main C0 tap following PRESET.
17724                                                                      0x1 = Decrement LP main C0 tap following PRESET until vga_gain\<3:0\>
17725                                                                            is less than or equal to the value in [TRN_MAIN_VAL].
17726                                                                      0x2 = Decrement LP main C0 tap following PRESET by the number of
17727                                                                            steps in the [TRN_MAIN_VAL].
17728                                                                      0x3 = Increment LP main C0 tap at the start of training (PRESET disabled)
17729                                                                            by the number of steps in [TRN_MAIN_VAL]. */
17730         uint64_t trn_main_val          : 6;  /**< [ 53: 48](R/W) BASE-R training decrements the link partner (LP) TX equalizer main (C0) tap
17731                                                                  at the start of link training after the PRESET coefficient update has been
17732                                                                  issued to the link partner.  Used in conjunction with [TRN_MAIN_EN].
17733                                                                  See [TRN_MAIN_EN]. */
17734         uint64_t max_tap_moves         : 8;  /**< [ 47: 40](R/W) BASE-R training sets the maximum number of link partner TX Equalizer Tap moves
17735                                                                  allowed. Exceeding the [MAX_TAP_MOVES] forces training to terminate and local
17736                                                                  device ready signaled if TRAIN_DONE_MASK[MAX_MOVES] is set.
17737 
17738                                                                  Internal:
17739                                                                  FIXME no such register TRAIN_DONE_MASK[MAX_MOVES], then remove above exempt attribute. */
17740         uint64_t min_tap_moves         : 8;  /**< [ 39: 32](R/W) BASE-R training sets the minimum number of link partner TX Equalizer Tap moves
17741                                                                  before training completion (local device ready) is permitted. */
17742         uint64_t main_max_limit        : 6;  /**< [ 31: 26](R/W) BASE-R training sets the maximum limit of the local device transmitter main (C0) tap
17743                                                                  value during KR training.  Successive coefficient update message tap increments
17744                                                                  will increase the main tap value until it reaches the value in this field. At
17745                                                                  that point the local device TX training state machine will return a status report
17746                                                                  of maximum for the main (C0) tap value.
17747                                                                  The allowable range for the main (C0) tap is 0x18 to 0x30. */
17748         uint64_t post_max_limit        : 5;  /**< [ 25: 21](R/W) BASE-R training sets the maximum limit of the local device transmitter post (C+1) tap
17749                                                                  value during KR training.  Successive coefficient update message tap increments
17750                                                                  will increase the post tap value until it reaches the value in this field. At
17751                                                                  that point the local device TX training state machine will return a status report
17752                                                                  of maximum for the post (C+1) tap value.
17753                                                                  The allowable range for the post (C+1) tap is 0 to 0xC. */
17754         uint64_t pre_max_limit         : 5;  /**< [ 20: 16](R/W) BASE-R training sets the maximum limit of the local device transmitter pre (C-1) tap
17755                                                                  value during KR training.  Successive coefficient update message tap increments
17756                                                                  will increase the pre tap value until it reaches the value in this field. At
17757                                                                  that point the local device TX training state machine will return a status report
17758                                                                  of maximum for the pre (C-1) tap value.
17759                                                                  The allowable range for the pre (C-1) tap is 0 to 0x10. */
17760         uint64_t main_min_limit        : 6;  /**< [ 15: 10](R/W) BASE-R training sets the minimum limit of the local device transmitter main (C0) tap
17761                                                                  value during KR training.  Successive coefficient update message tap decrements
17762                                                                  will decrease the main tap value until it reaches the value in this field. At
17763                                                                  that point the local device TX training state machine will return a status report
17764                                                                  of minimum for the main (C0) tap value.
17765                                                                  The allowable range for the main (C0) tap is 0x18 to 0x30. */
17766         uint64_t post_min_limit        : 5;  /**< [  9:  5](R/W) BASE-R training sets the minimum limit of the local device transmitter post (C+1) tap
17767                                                                  value during KR training.  Successive coefficient update message tap decrements
17768                                                                  will decrease the post tap value until it reaches the value in this field. At
17769                                                                  that point the local device TX training state machine will return a status report
17770                                                                  of minimum for the post (C+1) tap value.
17771                                                                  The allowable range for the post (C+1) tap is 0 to 0x10. */
17772         uint64_t pre_min_limit         : 5;  /**< [  4:  0](R/W) BASE-R training sets the minimum limit of the local device transmitter pre (C-1) tap
17773                                                                  value during KR training.  Successive coefficient update message tap decrements
17774                                                                  will decrease the pre tap value until it reaches the value in this field. At
17775                                                                  that point the local device TX training state machine will return a status report
17776                                                                  of minimum for the pre (C-1) tap value.
17777                                                                  The allowable range for the min (C-1) tap is 0 to 0x10. */
17778 #else /* Word 0 - Little Endian */
17779         uint64_t pre_min_limit         : 5;  /**< [  4:  0](R/W) BASE-R training sets the minimum limit of the local device transmitter pre (C-1) tap
17780                                                                  value during KR training.  Successive coefficient update message tap decrements
17781                                                                  will decrease the pre tap value until it reaches the value in this field. At
17782                                                                  that point the local device TX training state machine will return a status report
17783                                                                  of minimum for the pre (C-1) tap value.
17784                                                                  The allowable range for the min (C-1) tap is 0 to 0x10. */
17785         uint64_t post_min_limit        : 5;  /**< [  9:  5](R/W) BASE-R training sets the minimum limit of the local device transmitter post (C+1) tap
17786                                                                  value during KR training.  Successive coefficient update message tap decrements
17787                                                                  will decrease the post tap value until it reaches the value in this field. At
17788                                                                  that point the local device TX training state machine will return a status report
17789                                                                  of minimum for the post (C+1) tap value.
17790                                                                  The allowable range for the post (C+1) tap is 0 to 0x10. */
17791         uint64_t main_min_limit        : 6;  /**< [ 15: 10](R/W) BASE-R training sets the minimum limit of the local device transmitter main (C0) tap
17792                                                                  value during KR training.  Successive coefficient update message tap decrements
17793                                                                  will decrease the main tap value until it reaches the value in this field. At
17794                                                                  that point the local device TX training state machine will return a status report
17795                                                                  of minimum for the main (C0) tap value.
17796                                                                  The allowable range for the main (C0) tap is 0x18 to 0x30. */
17797         uint64_t pre_max_limit         : 5;  /**< [ 20: 16](R/W) BASE-R training sets the maximum limit of the local device transmitter pre (C-1) tap
17798                                                                  value during KR training.  Successive coefficient update message tap increments
17799                                                                  will increase the pre tap value until it reaches the value in this field. At
17800                                                                  that point the local device TX training state machine will return a status report
17801                                                                  of maximum for the pre (C-1) tap value.
17802                                                                  The allowable range for the pre (C-1) tap is 0 to 0x10. */
17803         uint64_t post_max_limit        : 5;  /**< [ 25: 21](R/W) BASE-R training sets the maximum limit of the local device transmitter post (C+1) tap
17804                                                                  value during KR training.  Successive coefficient update message tap increments
17805                                                                  will increase the post tap value until it reaches the value in this field. At
17806                                                                  that point the local device TX training state machine will return a status report
17807                                                                  of maximum for the post (C+1) tap value.
17808                                                                  The allowable range for the post (C+1) tap is 0 to 0xC. */
17809         uint64_t main_max_limit        : 6;  /**< [ 31: 26](R/W) BASE-R training sets the maximum limit of the local device transmitter main (C0) tap
17810                                                                  value during KR training.  Successive coefficient update message tap increments
17811                                                                  will increase the main tap value until it reaches the value in this field. At
17812                                                                  that point the local device TX training state machine will return a status report
17813                                                                  of maximum for the main (C0) tap value.
17814                                                                  The allowable range for the main (C0) tap is 0x18 to 0x30. */
17815         uint64_t min_tap_moves         : 8;  /**< [ 39: 32](R/W) BASE-R training sets the minimum number of link partner TX Equalizer Tap moves
17816                                                                  before training completion (local device ready) is permitted. */
17817         uint64_t max_tap_moves         : 8;  /**< [ 47: 40](R/W) BASE-R training sets the maximum number of link partner TX Equalizer Tap moves
17818                                                                  allowed. Exceeding the [MAX_TAP_MOVES] forces training to terminate and local
17819                                                                  device ready signaled if TRAIN_DONE_MASK[MAX_MOVES] is set.
17820 
17821                                                                  Internal:
17822                                                                  FIXME no such register TRAIN_DONE_MASK[MAX_MOVES], then remove above exempt attribute. */
17823         uint64_t trn_main_val          : 6;  /**< [ 53: 48](R/W) BASE-R training decrements the link partner (LP) TX equalizer main (C0) tap
17824                                                                  at the start of link training after the PRESET coefficient update has been
17825                                                                  issued to the link partner.  Used in conjunction with [TRN_MAIN_EN].
17826                                                                  See [TRN_MAIN_EN]. */
17827         uint64_t trn_main_en           : 2;  /**< [ 55: 54](R/W) BASE-R training decrements the link partner (LP) TX equalizer main (C0) tap
17828                                                                  at the start of link training after the PRESET coefficient update has been
17829                                                                  issued to the link partner.  Used in conjunction with [TRN_MAIN_VAL].
17830 
17831                                                                      0x0 = Disabled, do not decrement LP main C0 tap following PRESET.
17832                                                                      0x1 = Decrement LP main C0 tap following PRESET until vga_gain\<3:0\>
17833                                                                            is less than or equal to the value in [TRN_MAIN_VAL].
17834                                                                      0x2 = Decrement LP main C0 tap following PRESET by the number of
17835                                                                            steps in the [TRN_MAIN_VAL].
17836                                                                      0x3 = Increment LP main C0 tap at the start of training (PRESET disabled)
17837                                                                            by the number of steps in [TRN_MAIN_VAL]. */
17838         uint64_t trn_preset_en         : 1;  /**< [ 56: 56](R/W) BASE-R training when [TRN_PRESET_EN] is set to one preset the link
17839                                                                  partner TX equalizer when training starts.  When [TRN_PRESET_EN]
17840                                                                  is cleared to zero the link partner TX equalizer will start in the
17841                                                                  INITIALIZE state.  For BASE-R training it is recommended to
17842                                                                  start link training with [TRN_PRESET_EN] set to one. */
17843         uint64_t trn_rrrpt_en          : 1;  /**< [ 57: 57](R/W) BASE-R training when [TRN_RRRPT_EN] is set the training state machine
17844                                                                  will repeatedly send Receiver Ready messages to the CGX/OCX MAC every
17845                                                                  128 services clocks when training completes. For diagnostic use only. */
17846         uint64_t trn_cfg_use_eye_en    : 1;  /**< [ 58: 58](R/W) BASE-R and PCIe training when [TRN_CFG_USE_EYE_EN] is set the training state machine
17847                                                                  will control the eye monitor block while training is active the power down the
17848                                                                  eye monitor at the conclusion of link training.
17849                                                                  For diagnostic use only. */
17850         uint64_t trn_sat_mv_lmt_en     : 1;  /**< [ 59: 59](R/W) BASE-R training saturated move limit threshold enable. During BASE-R training
17851                                                                  if a consecutive number of saturated tap moves specified by
17852                                                                  GSERN()_LANE()_TRAIN_2_BCFG[TRN_SAT_MV_LMT] is met or exceeded training will conclude.
17853                                                                  This is to prevent cases where the FOM can no longer be improved and the
17854                                                                  link partner TX taps are at their minimum or maximum limits and the algorithm
17855                                                                  is attempting to repeatedly move the Tx taps beyond their min/max limits.
17856                                                                  If the threshold limit is met or exceeded and [TRN_SAT_MV_LMT_EN] is set to 1
17857                                                                  training will terminate and the GSERN()_LANE()_TRAIN_3_BCFG[EXIT_SAT_MV_LMT]
17858                                                                  flag will set.
17859                                                                  For diagnostic use only. */
17860         uint64_t trn_sat_mv_lmt        : 4;  /**< [ 63: 60](R/W) BASE-R training saturated move limit threshold.
17861                                                                  See GSERN()_LANE()_TRAIN_2_BCFG[TRN_SAT_MV_LMT_EN].
17862                                                                  For diagnostic use only. */
17863 #endif /* Word 0 - End */
17864     } s;
17865     /* struct bdk_gsernx_lanex_train_2_bcfg_s cn; */
17866 };
17867 typedef union bdk_gsernx_lanex_train_2_bcfg bdk_gsernx_lanex_train_2_bcfg_t;
17868 
17869 static inline uint64_t BDK_GSERNX_LANEX_TRAIN_2_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_TRAIN_2_BCFG(unsigned long a,unsigned long b)17870 static inline uint64_t BDK_GSERNX_LANEX_TRAIN_2_BCFG(unsigned long a, unsigned long b)
17871 {
17872     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
17873         return 0x87e0900031d0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
17874     __bdk_csr_fatal("GSERNX_LANEX_TRAIN_2_BCFG", 2, a, b, 0, 0);
17875 }
17876 
17877 #define typedef_BDK_GSERNX_LANEX_TRAIN_2_BCFG(a,b) bdk_gsernx_lanex_train_2_bcfg_t
17878 #define bustype_BDK_GSERNX_LANEX_TRAIN_2_BCFG(a,b) BDK_CSR_TYPE_RSL
17879 #define basename_BDK_GSERNX_LANEX_TRAIN_2_BCFG(a,b) "GSERNX_LANEX_TRAIN_2_BCFG"
17880 #define device_bar_BDK_GSERNX_LANEX_TRAIN_2_BCFG(a,b) 0x0 /* PF_BAR0 */
17881 #define busnum_BDK_GSERNX_LANEX_TRAIN_2_BCFG(a,b) (a)
17882 #define arguments_BDK_GSERNX_LANEX_TRAIN_2_BCFG(a,b) (a),(b),-1,-1
17883 
17884 /**
17885  * Register (RSL) gsern#_lane#_train_3_bcfg
17886  *
17887  * GSER Lane Training Base Configuration Register 3
17888  * This register controls settings for lane training.
17889  */
17890 union bdk_gsernx_lanex_train_3_bcfg
17891 {
17892     uint64_t u;
17893     struct bdk_gsernx_lanex_train_3_bcfg_s
17894     {
17895 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
17896         uint64_t exit_fom_thrs         : 1;  /**< [ 63: 63](RO/H) BASE-R training exit condition flag indicates the measured FOM
17897                                                                  was equal to or exceeded the FOM threshold value specified in
17898                                                                  GSERN()_LANE()_TRAIN_10_BCFG[EXIT_FOM_THRS_VAL] when
17899                                                                  GSERN()_LANE()_TRAIN_10_BCFG[TRN_FOM_THRS_EN] is set to 1.
17900 
17901                                                                  Used in conjustion with
17902                                                                  GSERN()_LANE()_TRAIN_4_BCFG[TERM_FOM_THRS_AND] and
17903                                                                  GSERN()_LANE()_TRAIN_4_BCFG[TERM_FOM_THRS_OR] to
17904                                                                  specify the BASE-R training convergence exit criteria. */
17905         uint64_t train_tx_min_rule     : 8;  /**< [ 62: 55](R/W) BASE-R training TX taps minimum coefficient rule.  Sets the lower limit of the permissible
17906                                                                  range of the TX equalizer c(0), c(+1), and c(-1) taps so that the TX equalizer
17907                                                                  operates within range specified in the IEEE 802.3-2012 Clause 72 10GBASE-KR
17908                                                                  and IEEE 802.3bj-2014 Clause 93 100GBASE-KR4.
17909                                                                  The TX coefficient minimum rule requires (main - pre - post) \>= [TRAIN_TX_MIN_RULE].
17910 
17911                                                                  The allowable range for [TRAIN_TX_MIN_RULE] is
17912                                                                  (6 decimal \<= [TRAIN_TX_MIN_RULE] \<= 16 decimal).
17913                                                                  For 10GBASE-KR, 40GBASE-KR4 and 100GBASE-KR4 it is recommended to
17914                                                                  program [TRAIN_TX_MIN_RULE] to 0x6.
17915 
17916                                                                  c(-1) pre TX tap range is programmed by GSERN()_LANE()_TRAIN_2_BCFG[PRE_MAX_LIMIT] and
17917                                                                  GSERN()_LANE()_TRAIN_2_BCFG[PRE_MIN_LIMIT].
17918 
17919                                                                  c(0) main TX tap range is programmed by GSERN()_LANE()_TRAIN_2_BCFG[MAIN_MAX_LIMIT] and
17920                                                                  GSERN()_LANE()_TRAIN_2_BCFG[MAIN_MIN_LIMIT].
17921 
17922                                                                  c(+1) post TX tap range is programmed by GSERN()_LANE()_TRAIN_2_BCFG[POST_MAX_LIMIT] and
17923                                                                  GSERN()_LANE()_TRAIN_2_BCFG[POST_MIN_LIMIT]. */
17924         uint64_t exit_sat_mv_lmt       : 1;  /**< [ 54: 54](RO/H) BASE-R training saturated move limit threshold exit flag.
17925                                                                  See GSERN()_LANE()_TRAIN_2_BCFG[TRN_SAT_MV_LMT_EN].
17926                                                                  For diagnostic use only. */
17927         uint64_t exit_prbs11_ok        : 1;  /**< [ 53: 53](RO/H) Training exit condition PRBS11 in the BASE-R KR training frame is
17928                                                                  error free.
17929                                                                  When BASE-R training is concluded, indicated by
17930                                                                  GSERN()_LANE()_TRAIN_0_BCFG[LD_RECEIVER_RDY] set to one
17931                                                                  [EXIT_PRBS11_OK] will be set if the training was terminated
17932                                                                  because the PRBS11 pattern extracted by the CGX or OCX MAC
17933                                                                  indicates that the PRBS11 pattern is error free.
17934 
17935                                                                  This bit will report the PRBS11 status when BASE-R training
17936                                                                  completes even if GSERN()_LANE()_TRAIN_3_BCFG[LD_TRAIN_DONE\<21\>
17937                                                                  or LD_TRAIN_DONE\<26\>] are not set.
17938                                                                  GSERN()_LANE()_TRAIN_4_BCFG[EN_PRBS11_CHK] must be enabled
17939                                                                  for the [EXIT_PRBS11_OK] status to be reported.
17940 
17941                                                                  This bit will be cleared if BASE-R training is re-enabled.
17942                                                                  For diagnostic use only.
17943 
17944                                                                  Internal:
17945                                                                  FIXME what does LD_TRAIN_DONE refer to, then remove above exempt attribute. */
17946         uint64_t exit_delta_ffom       : 1;  /**< [ 52: 52](RO/H) Training exit condition due to delta filtered FOM.
17947                                                                  When BASE-R training is concluded, indicated by
17948                                                                  GSERN()_LANE()_TRAIN_0_BCFG[LD_RECEIVER_RDY] set to one the
17949                                                                  [EXIT_DELTA_FFOM] bit will be set if the training was terminated
17950                                                                  because the Delta Filtered FOM is within the high and low limits set by
17951                                                                  GSERN()_LANE()_TRAIN_5_BCFG[FDLTFOM_HI_LMT] and
17952                                                                  GSERN()_LANE()_TRAIN_5_BCFG[FDLTFOM_LO_LMT], and
17953                                                                  GSERN()_LANE()_TRAIN_6_BCFG[DFFOM_EXIT_EN]=1, and
17954                                                                  the number of consecutive tap move iterations in which
17955                                                                  the Delta Filtered FOM is within the high/low limits
17956                                                                  exceeded the count in
17957                                                                  GSERN()_LANE()_TRAIN_6_BCFG[DELTA_FFOM_CCNT]
17958 
17959                                                                  This bit will be cleared if BASE-R training is re-enabled.
17960                                                                  For diagnostic use only. */
17961         uint64_t exit_rep_pattern      : 1;  /**< [ 51: 51](RO/H) Training exit condition repeating TAP moves pattern detected.
17962                                                                  When BASE-R training is concluded, indicated by
17963                                                                  GSERN()_LANE()_TRAIN_0_BCFG[LD_RECEIVER_RDY] set to one
17964                                                                  [EXIT_REP_PATTERN] will be set if the training was terminated
17965                                                                  because the training state machine discovered a repeating tap
17966                                                                  move pattern.  The GSERN()_LANE()_TRAIN_5_BCFG[PAT_EXIT_CNT] must
17967                                                                  be set to a non-zero value and GSERN()_LANE()_TRAIN_5_BCFG[PAT_MATCH_EN]
17968                                                                  must be set to a one to enable the repeating tap move pattern
17969                                                                  matching logic which looks for repeating tap moves to signal
17970                                                                  training convergence.
17971 
17972                                                                  This bit will be cleared if BASE-R training is re-enabled.
17973                                                                  For diagnostic use only. */
17974         uint64_t exit_tmt_timer        : 1;  /**< [ 50: 50](RO/H) Training timeout timer expired.
17975                                                                  When BASE-R training is concluded, indicated by
17976                                                                  GSERN()_LANE()_TRAIN_0_BCFG[LD_RECEIVER_RDY] set to one
17977                                                                  [EXIT_MAX_TAP_MOVES] will be set if the training was terminated
17978                                                                  because the training state machine KR training time-out timer expired.
17979                                                                  GSERN()_LANE()_TRAIN_0_BCFG[RXT_ADTMOUT_SEL] and
17980                                                                  GSERN()_LANE()_TRAIN_0_BCFG[RXT_ADTMOUT_FAST] select the
17981                                                                  timeout time in milliseconds/microseconds and
17982                                                                  GSERN()_LANE()_TRAIN_0_BCFG[RXT_ADTMOUT_DISABLE] enables
17983                                                                  the timeout timer when cleared to zero.
17984 
17985                                                                  This bit will be cleared if BASE-R training is re-enabled.
17986                                                                  For diagnostic use only. */
17987         uint64_t exit_min_tap_moves    : 1;  /**< [ 49: 49](RO/H) Training exit condition exceeded minimum number of tap moves.
17988                                                                  When BASE-R training is concluded, indicated by
17989                                                                  GSERN()_LANE()_TRAIN_0_BCFG[LD_RECEIVER_RDY] set to one
17990                                                                  [EXIT_MIN_TAP_MOVES] will be set if the training was terminated
17991                                                                  because the training state machine exceeded the minimum number of
17992                                                                  tap moves specified in
17993                                                                  GSERN()_LANE()_TRAIN_2_BCFG[MIN_TAP_MOVES].
17994 
17995                                                                  This bit will be cleared if BASE-R training is re-enabled.
17996                                                                  For diagnostic use only. */
17997         uint64_t exit_max_tap_moves    : 1;  /**< [ 48: 48](RO/H) Training exit condition exceeded maximum number of tap moves.
17998                                                                  When BASE-R training is concluded, indicated by
17999                                                                  GSERN()_LANE()_TRAIN_0_BCFG[LD_RECEIVER_RDY] set to one
18000                                                                  [EXIT_MAX_TAP_MOVES] will be set if the training was terminated
18001                                                                  because the training state machine exceeded the maximum number of
18002                                                                  tap moves specified in
18003                                                                  GSERN()_LANE()_TRAIN_2_BCFG[MAX_TAP_MOVES].
18004 
18005                                                                  This bit will be cleared if BASE-R training is re-enabled.
18006                                                                  For diagnostic use only. */
18007         uint64_t exit_dffom            : 13; /**< [ 47: 35](RO/H) Training exit location delta filtered FOM value. Holds the delta filtered FOM
18008                                                                  value at the completion of BASE-R training. Number represented in offset binary
18009                                                                  notation. For diagnostic use only. */
18010         uint64_t trn_ntap_mvs          : 8;  /**< [ 34: 27](RO/H) BASE-R training holds the number of link partner tap moves made during
18011                                                                  link training. */
18012         uint64_t term_prbs11_and       : 1;  /**< [ 26: 26](R/W) BASE-R training KR training PRBS11 pattern check extracted from the
18013                                                                  KR training frame is error free. Termination AND condition.
18014                                                                  Part of the BASE-R training termination condition register.
18015                                                                  See the full description of the training termination conditions
18016                                                                  register in GSERN()_LANE()_TRAIN_3_BCFG[TERM_MAX_MVS_OR].
18017 
18018                                                                  PRBS11 pattern check extracted from the KR training
18019                                                                  frame is error free.
18020                                                                  GSERN()_LANE()_TRAIN_4_BCFG[EN_PRBS11_CHK] must be enabled to
18021                                                                  enable PRBS11 pattern error checking. */
18022         uint64_t term_dffom_and        : 1;  /**< [ 25: 25](R/W) BASE-R training KR training Delta Filtered FOM is within the high
18023                                                                  and low limits. Termination AND condition.
18024                                                                  Part of the BASE-R training termination condition register.
18025                                                                  See the full description of the training termination conditions
18026                                                                  register in GSERN()_LANE()_TRAIN_3_BCFG[TERM_MAX_MVS_OR].
18027 
18028                                                                  Delta filtered FOM is within the high and low
18029                                                                  limits set by
18030                                                                  GSERN()_LANE()_TRAIN_5_BCFG[FDLTFOM_HI_LMT] and
18031                                                                  GSERN()_LANE()_TRAIN_5_BCFG[FDLTFOM_LO_LMT], and
18032                                                                  GSERN()_LANE()_TRAIN_6_BCFG[DFFOM_EXIT_EN]=1, and
18033                                                                  the number of consecutive tap move iterations in which
18034                                                                  the Delta Filtered FOM is within the high/low limits
18035                                                                  exceeds the count in
18036                                                                  GSERN()_LANE()_TRAIN_6_BCFG[DELTA_FFOM_CCNT] */
18037         uint64_t term_rep_pat_and      : 1;  /**< [ 24: 24](R/W) BASE-R training KR training taps move repeating pattern detected.
18038                                                                  Termination AND condition.
18039                                                                  Part of the BASE-R training termination condition register.
18040                                                                  See the full description of the training termination conditions
18041                                                                  register in GSERN()_LANE()_TRAIN_3_BCFG[TERM_MAX_MVS_OR].
18042 
18043                                                                  GSERN()_LANE()_TRAIN_5_BCFG[PAT_EXIT_CNT] must be set to
18044                                                                  a non-zero value and GSERN()_LANE()_TRAIN_5_BCFG[PAT_MATCH_EN]
18045                                                                  must be set to a one to enable the repeating tap move pattern
18046                                                                  matching logic which looks for repeating tap moves to signal
18047                                                                  training convergence. */
18048         uint64_t term_tmt_tmr_and      : 1;  /**< [ 23: 23](R/W) BASE-R training KR training time-out timer expired. Termination
18049                                                                  AND condition.
18050                                                                  Part of the BASE-R training termination condition register.
18051                                                                  See the full description of the training termination conditions
18052                                                                  register in GSERN()_LANE()_TRAIN_3_BCFG[TERM_MAX_MVS_OR].
18053 
18054                                                                  GSERN()_LANE()_TRAIN_0_BCFG[RXT_ADTMOUT_SEL] and
18055                                                                  GSERN()_LANE()_TRAIN_0_BCFG[RXT_ADTMOUT_FAST] select the
18056                                                                  timeout time in milliseconds/microseconds and
18057                                                                  GSERN()_LANE()_TRAIN_0_BCFG[RXT_ADTMOUT_DISABLE] enables
18058                                                                  the timeout timer when cleared to zero. */
18059         uint64_t term_min_mvs_and      : 1;  /**< [ 22: 22](R/W) BASE-R training termination exceeded minimum number of tap moves.
18060                                                                  Termination AND condition.  See description below.
18061                                                                  Part of the BASE-R training termination condition register.
18062                                                                  See the full description of the training termination conditions
18063                                                                  register in GSERN()_LANE()_TRAIN_3_BCFG[TERM_MAX_MVS_OR].
18064 
18065                                                                  Exceeded minimum tap moves iterations.
18066                                                                  GSERN()_LANE()_TRAIN_2_BCFG[MIN_TAP_MOVES] sets the minimum
18067                                                                  number of tap moves. */
18068         uint64_t term_prbs11_or        : 1;  /**< [ 21: 21](R/W) BASE-R training KR training PRBS11 pattern check extracted from the
18069                                                                  KR training frame is error free. Termination OR condition.
18070                                                                  Part of the BASE-R training termination condition register.
18071                                                                  See the full description of the training termination conditions
18072                                                                  register in GSERN()_LANE()_TRAIN_3_BCFG[TERM_MAX_MVS_OR].
18073 
18074                                                                  PRBS11 pattern check extracted from the KR training
18075                                                                  frame is error free.
18076                                                                  GSERN()_LANE()_TRAIN_4_BCFG[EN_PRBS11_CHK] must be enabled to
18077                                                                  enable PRBS11 pattern error checking. */
18078         uint64_t term_dffom_or         : 1;  /**< [ 20: 20](R/W) BASE-R training KR training Delta Filtered FOM is within the high
18079                                                                  and low limits. Termination OR condition.
18080                                                                  Part of the BASE-R training termination condition register.
18081                                                                  See the full description of the training termination conditions
18082                                                                  register in GSERN()_LANE()_TRAIN_3_BCFG[TERM_MAX_MVS_OR].
18083 
18084                                                                  Delta filtered FOM is within the high and low
18085                                                                  limits set by
18086                                                                  GSERN()_LANE()_TRAIN_5_BCFG[FDLTFOM_HI_LMT] and
18087                                                                  GSERN()_LANE()_TRAIN_5_BCFG[FDLTFOM_LO_LMT], and
18088                                                                  GSERN()_LANE()_TRAIN_6_BCFG[DFFOM_EXIT_EN]=1, and
18089                                                                  the number of consecutive tap move iterations in which
18090                                                                  the Delta Filtered FOM is within the high/low limits
18091                                                                  exceeds the count in
18092                                                                  GSERN()_LANE()_TRAIN_6_BCFG[DELTA_FFOM_CCNT] */
18093         uint64_t term_rep_pat_or       : 1;  /**< [ 19: 19](R/W) BASE-R training KR training taps move repeating pattern detected.
18094                                                                  Termination OR condition.
18095                                                                  Part of the BASE-R training termination condition register.
18096                                                                  See the full description of the training termination conditions
18097                                                                  register in GSERN()_LANE()_TRAIN_3_BCFG[TERM_MAX_MVS_OR].
18098 
18099                                                                  GSERN()_LANE()_TRAIN_5_BCFG[PAT_EXIT_CNT] must be set to
18100                                                                  a non-zero value and GSERN()_LANE()_TRAIN_5_BCFG[PAT_MATCH_EN]
18101                                                                  must be set to a one to enable the repeating tap move pattern
18102                                                                  matching logic which looks for repeating tap moves to signal
18103                                                                  training convergence. */
18104         uint64_t term_tmt_tmr_or       : 1;  /**< [ 18: 18](R/W) BASE-R training KR training time-out timer expired. Termination
18105                                                                  OR condition.
18106                                                                  Part of the BASE-R training termination condition register.
18107                                                                  See the full description of the training termination conditions
18108                                                                  register in GSERN()_LANE()_TRAIN_3_BCFG[TERM_MAX_MVS_OR].
18109 
18110                                                                  GSERN()_LANE()_TRAIN_0_BCFG[RXT_ADTMOUT_SEL] and
18111                                                                  GSERN()_LANE()_TRAIN_0_BCFG[RXT_ADTMOUT_FAST] select the
18112                                                                  timeout time in milliseconds/microseconds and
18113                                                                  GSERN()_LANE()_TRAIN_0_BCFG[RXT_ADTMOUT_DISABLE] enables
18114                                                                  the timeout timer when cleared to zero. */
18115         uint64_t term_max_mvs_or       : 1;  /**< [ 17: 17](R/W) BASE-R training termination exceeded maximum number of tap moves.
18116                                                                  Termination OR condition.  See description below.
18117 
18118                                                                  BASE-R training termination condition register fields. Selects the conditions
18119                                                                  used to terminate local device KR link training. Setting the associated
18120                                                                  bit will enable the training termination condition.  An AND-OR
18121                                                                  tree is used to allow setting conditions that must occur together
18122                                                                  (AND function) or any single condition (OR function) will trigger the
18123                                                                  BASE-R training termination.  AND and OR conditions can be combined.
18124 
18125                                                                  \<page\>
18126                                                                  OR CONDITIONS.  Any condition that is true and has a set condition bit will
18127                                                                  trigger training termination.  Conditions with bits that are not set
18128                                                                  (cleared to zero) are not used to trigger training termination.
18129 
18130                                                                    [TERM_MAX_MVS_OR] = Exceeded maximum tap moves iterations.
18131                                                                         GSERN()_LANE()_TRAIN_2_BCFG[MAX_TAP_MOVES] sets the maximum
18132                                                                         number of tap moves.
18133 
18134                                                                    [TERM_TMT_TMR_OR] = KR training time-out timer expired.
18135                                                                         See description in GSERN()_LANE()_TRAIN_3_BCFG[TERM_TMT_TMR_OR].
18136 
18137                                                                    [TERM_REP_PAT_OR] =Taps move repeating pattern detected.
18138                                                                         See description in GSERN()_LANE()_TRAIN_3_BCFG[TERM_REP_PAT_OR].
18139 
18140                                                                    [TERM_DFFOM_OR] = Delta Filtered FOM is within the high and low
18141                                                                         limits.
18142                                                                         See description in GSERN()_LANE()_TRAIN_3_BCFG[TERM_DFFOM_OR].
18143 
18144                                                                    [TERM_PRBS11_OR] = PRBS11 pattern check extracted from the KR training
18145                                                                         frame is error free.
18146                                                                         See description in GSERN()_LANE()_TRAIN_3_BCFG[TERM_PRBS11_OR].
18147 
18148                                                                    GSERN()_LANE()_TRAIN_4_BCFG[TERM_FOM_THRS_OR] =
18149                                                                         Measured FOM equal or exceeds the FOM threshold
18150                                                                         in GSERN()_LANE()_TRAIN_10_BCFG[EXIT_FOM_THRS_VAL] during KR
18151                                                                         training.  GSERN()_LANE()_TRAIN_10_BCFG[TRN_FOM_THRS_EN] must also
18152                                                                         be set to 1.
18153                                                                         See description in GSERN()_LANE()_TRAIN_4_BCFG[TERM_FOM_THRS_OR].
18154 
18155                                                                  \<page\>
18156                                                                  AND CONDITIONS.  The conditions associated with bits that are set must
18157                                                                  all be true to trigger training termination.  Conditions with bits that
18158                                                                  are not set (cleared to zero) are not used to trigger training termination.
18159 
18160                                                                    [TERM_MIN_MVS_AND] = Exceeded minimum tap moves iterations.
18161                                                                         GSERN()_LANE()_TRAIN_2_BCFG[MIN_TAP_MOVES] sets the minimum
18162                                                                         number of tap moves.
18163 
18164                                                                    [TERM_TMT_TMR_AND] = KR training time-out timer expired.
18165                                                                         See description in GSERN()_LANE()_TRAIN_3_BCFG[TERM_TMT_TMR_AND].
18166 
18167                                                                    [TERM_REP_PAT_AND] = Taps move repeating pattern detected.
18168                                                                         See description in GSERN()_LANE()_TRAIN_3_BCFG[TERM_REP_PAT_AND].
18169 
18170                                                                    [TERM_DFFOM_AND] = Delta Filtered FOM is within the high and low
18171                                                                         limits.
18172                                                                         See description in GSERN()_LANE()_TRAIN_3_BCFG[TERM_DFFOM_AND].
18173 
18174                                                                    [TERM_PRBS11_AND] = PRBS11 pattern check extracted from the KR training
18175                                                                         frame is error free.
18176                                                                         See description in GSERN()_LANE()_TRAIN_3_BCFG[TERM_PRBS11_AND].
18177 
18178                                                                    GSERN()_LANE()_TRAIN_4_BCFG[TERM_FOM_THRS_AND] =
18179                                                                         Measured FOM equal or exceeds the FOM threshold
18180                                                                         in GSERN()_LANE()_TRAIN_10_BCFG[EXIT_FOM_THRS_VAL] during KR
18181                                                                         training.  GSERN()_LANE()_TRAIN_10_BCFG[TRN_FOM_THRS_EN] must also
18182                                                                         be set to 1.
18183                                                                         See description in GSERN()_LANE()_TRAIN_4_BCFG[TERM_FOM_THRS_AND]. */
18184         uint64_t inv_tx_post_dir       : 1;  /**< [ 16: 16](R/W) BASE-R training when set reverses the direction of the post tap (C+1)
18185                                                                  direction hint in the local transmitter received from the link partner. */
18186         uint64_t inv_tx_main_dir       : 1;  /**< [ 15: 15](R/W) BASE-R training when set reverses the direction of the main tap (C0)
18187                                                                  direction hint in the local transmitter received from the link partner. */
18188         uint64_t inv_tx_pre_dir        : 1;  /**< [ 14: 14](R/W) BASE-R training when set reverses the direction of the pre tap (C-1)
18189                                                                  direction hint in the local transmitter received from the link partner. */
18190         uint64_t trn_post_en           : 2;  /**< [ 13: 12](R/W) BASE-R training decrements the link partner (LP) TX equalizer post (C+1) tap
18191                                                                  at the start of link training after the PRESET coefficient update has been
18192                                                                  issued to the link partner.  Used in conjunction with [TRN_POST_VAL].
18193 
18194                                                                      0x0 = Disabled, do not decrement LP post C+1 tap following PRESET.
18195                                                                      0x1 = Reserved, do not use.
18196                                                                      0x2 = Decrement LP post C+1 tap following PRESET by the number of
18197                                                                            steps in the [TRN_POST_VAL].
18198                                                                      0x3 = Increment LP post C+1 tap at the start of training (PRESET disabled)
18199                                                                            by the number of steps in [TRN_POST_VAL]. */
18200         uint64_t trn_post_val          : 5;  /**< [ 11:  7](R/W) BASE-R training decrements the link partner (LP) TX equalizer post (C+1) tap
18201                                                                  at the start of link training after the PRESET coefficient update has been
18202                                                                  issued to the link partner.  See [TRN_POST_EN]. */
18203         uint64_t trn_pre_en            : 2;  /**< [  6:  5](R/W) BASE-R training decrements the link partner (LP) TX equalizer pre (C-1) tap
18204                                                                  at the start of link training after the PRESET coefficient update has been
18205                                                                  issued to the link partner.  Used in conjunction with [TRN_PRE_VAL].
18206 
18207                                                                      0x0 = Disabled, do not decrement LP pre C-1 tap following PRESET.
18208                                                                      0x1 = Reserved, do not use.
18209                                                                      0x2 = Decrement LP pre C-1 tap following PRESET by the number of
18210                                                                            steps in the [TRN_PRE_VAL].
18211                                                                      0x3 = Increment LP pre C-1 tap at the start of training (PRESET disabled)
18212                                                                            by the number of steps in [TRN_PRE_VAL]. */
18213         uint64_t trn_pre_val           : 5;  /**< [  4:  0](R/W) BASE-R training decrements the link partner (LP) TX equalizer pre (C-1) tap
18214                                                                  at the start of link training after the PRESET coefficient update has been
18215                                                                  issued to the link partner.  Used in conjunction with [TRN_PRE_EN].
18216                                                                  See [TRN_PRE_EN]. */
18217 #else /* Word 0 - Little Endian */
18218         uint64_t trn_pre_val           : 5;  /**< [  4:  0](R/W) BASE-R training decrements the link partner (LP) TX equalizer pre (C-1) tap
18219                                                                  at the start of link training after the PRESET coefficient update has been
18220                                                                  issued to the link partner.  Used in conjunction with [TRN_PRE_EN].
18221                                                                  See [TRN_PRE_EN]. */
18222         uint64_t trn_pre_en            : 2;  /**< [  6:  5](R/W) BASE-R training decrements the link partner (LP) TX equalizer pre (C-1) tap
18223                                                                  at the start of link training after the PRESET coefficient update has been
18224                                                                  issued to the link partner.  Used in conjunction with [TRN_PRE_VAL].
18225 
18226                                                                      0x0 = Disabled, do not decrement LP pre C-1 tap following PRESET.
18227                                                                      0x1 = Reserved, do not use.
18228                                                                      0x2 = Decrement LP pre C-1 tap following PRESET by the number of
18229                                                                            steps in the [TRN_PRE_VAL].
18230                                                                      0x3 = Increment LP pre C-1 tap at the start of training (PRESET disabled)
18231                                                                            by the number of steps in [TRN_PRE_VAL]. */
18232         uint64_t trn_post_val          : 5;  /**< [ 11:  7](R/W) BASE-R training decrements the link partner (LP) TX equalizer post (C+1) tap
18233                                                                  at the start of link training after the PRESET coefficient update has been
18234                                                                  issued to the link partner.  See [TRN_POST_EN]. */
18235         uint64_t trn_post_en           : 2;  /**< [ 13: 12](R/W) BASE-R training decrements the link partner (LP) TX equalizer post (C+1) tap
18236                                                                  at the start of link training after the PRESET coefficient update has been
18237                                                                  issued to the link partner.  Used in conjunction with [TRN_POST_VAL].
18238 
18239                                                                      0x0 = Disabled, do not decrement LP post C+1 tap following PRESET.
18240                                                                      0x1 = Reserved, do not use.
18241                                                                      0x2 = Decrement LP post C+1 tap following PRESET by the number of
18242                                                                            steps in the [TRN_POST_VAL].
18243                                                                      0x3 = Increment LP post C+1 tap at the start of training (PRESET disabled)
18244                                                                            by the number of steps in [TRN_POST_VAL]. */
18245         uint64_t inv_tx_pre_dir        : 1;  /**< [ 14: 14](R/W) BASE-R training when set reverses the direction of the pre tap (C-1)
18246                                                                  direction hint in the local transmitter received from the link partner. */
18247         uint64_t inv_tx_main_dir       : 1;  /**< [ 15: 15](R/W) BASE-R training when set reverses the direction of the main tap (C0)
18248                                                                  direction hint in the local transmitter received from the link partner. */
18249         uint64_t inv_tx_post_dir       : 1;  /**< [ 16: 16](R/W) BASE-R training when set reverses the direction of the post tap (C+1)
18250                                                                  direction hint in the local transmitter received from the link partner. */
18251         uint64_t term_max_mvs_or       : 1;  /**< [ 17: 17](R/W) BASE-R training termination exceeded maximum number of tap moves.
18252                                                                  Termination OR condition.  See description below.
18253 
18254                                                                  BASE-R training termination condition register fields. Selects the conditions
18255                                                                  used to terminate local device KR link training. Setting the associated
18256                                                                  bit will enable the training termination condition.  An AND-OR
18257                                                                  tree is used to allow setting conditions that must occur together
18258                                                                  (AND function) or any single condition (OR function) will trigger the
18259                                                                  BASE-R training termination.  AND and OR conditions can be combined.
18260 
18261                                                                  \<page\>
18262                                                                  OR CONDITIONS.  Any condition that is true and has a set condition bit will
18263                                                                  trigger training termination.  Conditions with bits that are not set
18264                                                                  (cleared to zero) are not used to trigger training termination.
18265 
18266                                                                    [TERM_MAX_MVS_OR] = Exceeded maximum tap moves iterations.
18267                                                                         GSERN()_LANE()_TRAIN_2_BCFG[MAX_TAP_MOVES] sets the maximum
18268                                                                         number of tap moves.
18269 
18270                                                                    [TERM_TMT_TMR_OR] = KR training time-out timer expired.
18271                                                                         See description in GSERN()_LANE()_TRAIN_3_BCFG[TERM_TMT_TMR_OR].
18272 
18273                                                                    [TERM_REP_PAT_OR] =Taps move repeating pattern detected.
18274                                                                         See description in GSERN()_LANE()_TRAIN_3_BCFG[TERM_REP_PAT_OR].
18275 
18276                                                                    [TERM_DFFOM_OR] = Delta Filtered FOM is within the high and low
18277                                                                         limits.
18278                                                                         See description in GSERN()_LANE()_TRAIN_3_BCFG[TERM_DFFOM_OR].
18279 
18280                                                                    [TERM_PRBS11_OR] = PRBS11 pattern check extracted from the KR training
18281                                                                         frame is error free.
18282                                                                         See description in GSERN()_LANE()_TRAIN_3_BCFG[TERM_PRBS11_OR].
18283 
18284                                                                    GSERN()_LANE()_TRAIN_4_BCFG[TERM_FOM_THRS_OR] =
18285                                                                         Measured FOM equal or exceeds the FOM threshold
18286                                                                         in GSERN()_LANE()_TRAIN_10_BCFG[EXIT_FOM_THRS_VAL] during KR
18287                                                                         training.  GSERN()_LANE()_TRAIN_10_BCFG[TRN_FOM_THRS_EN] must also
18288                                                                         be set to 1.
18289                                                                         See description in GSERN()_LANE()_TRAIN_4_BCFG[TERM_FOM_THRS_OR].
18290 
18291                                                                  \<page\>
18292                                                                  AND CONDITIONS.  The conditions associated with bits that are set must
18293                                                                  all be true to trigger training termination.  Conditions with bits that
18294                                                                  are not set (cleared to zero) are not used to trigger training termination.
18295 
18296                                                                    [TERM_MIN_MVS_AND] = Exceeded minimum tap moves iterations.
18297                                                                         GSERN()_LANE()_TRAIN_2_BCFG[MIN_TAP_MOVES] sets the minimum
18298                                                                         number of tap moves.
18299 
18300                                                                    [TERM_TMT_TMR_AND] = KR training time-out timer expired.
18301                                                                         See description in GSERN()_LANE()_TRAIN_3_BCFG[TERM_TMT_TMR_AND].
18302 
18303                                                                    [TERM_REP_PAT_AND] = Taps move repeating pattern detected.
18304                                                                         See description in GSERN()_LANE()_TRAIN_3_BCFG[TERM_REP_PAT_AND].
18305 
18306                                                                    [TERM_DFFOM_AND] = Delta Filtered FOM is within the high and low
18307                                                                         limits.
18308                                                                         See description in GSERN()_LANE()_TRAIN_3_BCFG[TERM_DFFOM_AND].
18309 
18310                                                                    [TERM_PRBS11_AND] = PRBS11 pattern check extracted from the KR training
18311                                                                         frame is error free.
18312                                                                         See description in GSERN()_LANE()_TRAIN_3_BCFG[TERM_PRBS11_AND].
18313 
18314                                                                    GSERN()_LANE()_TRAIN_4_BCFG[TERM_FOM_THRS_AND] =
18315                                                                         Measured FOM equal or exceeds the FOM threshold
18316                                                                         in GSERN()_LANE()_TRAIN_10_BCFG[EXIT_FOM_THRS_VAL] during KR
18317                                                                         training.  GSERN()_LANE()_TRAIN_10_BCFG[TRN_FOM_THRS_EN] must also
18318                                                                         be set to 1.
18319                                                                         See description in GSERN()_LANE()_TRAIN_4_BCFG[TERM_FOM_THRS_AND]. */
18320         uint64_t term_tmt_tmr_or       : 1;  /**< [ 18: 18](R/W) BASE-R training KR training time-out timer expired. Termination
18321                                                                  OR condition.
18322                                                                  Part of the BASE-R training termination condition register.
18323                                                                  See the full description of the training termination conditions
18324                                                                  register in GSERN()_LANE()_TRAIN_3_BCFG[TERM_MAX_MVS_OR].
18325 
18326                                                                  GSERN()_LANE()_TRAIN_0_BCFG[RXT_ADTMOUT_SEL] and
18327                                                                  GSERN()_LANE()_TRAIN_0_BCFG[RXT_ADTMOUT_FAST] select the
18328                                                                  timeout time in milliseconds/microseconds and
18329                                                                  GSERN()_LANE()_TRAIN_0_BCFG[RXT_ADTMOUT_DISABLE] enables
18330                                                                  the timeout timer when cleared to zero. */
18331         uint64_t term_rep_pat_or       : 1;  /**< [ 19: 19](R/W) BASE-R training KR training taps move repeating pattern detected.
18332                                                                  Termination OR condition.
18333                                                                  Part of the BASE-R training termination condition register.
18334                                                                  See the full description of the training termination conditions
18335                                                                  register in GSERN()_LANE()_TRAIN_3_BCFG[TERM_MAX_MVS_OR].
18336 
18337                                                                  GSERN()_LANE()_TRAIN_5_BCFG[PAT_EXIT_CNT] must be set to
18338                                                                  a non-zero value and GSERN()_LANE()_TRAIN_5_BCFG[PAT_MATCH_EN]
18339                                                                  must be set to a one to enable the repeating tap move pattern
18340                                                                  matching logic which looks for repeating tap moves to signal
18341                                                                  training convergence. */
18342         uint64_t term_dffom_or         : 1;  /**< [ 20: 20](R/W) BASE-R training KR training Delta Filtered FOM is within the high
18343                                                                  and low limits. Termination OR condition.
18344                                                                  Part of the BASE-R training termination condition register.
18345                                                                  See the full description of the training termination conditions
18346                                                                  register in GSERN()_LANE()_TRAIN_3_BCFG[TERM_MAX_MVS_OR].
18347 
18348                                                                  Delta filtered FOM is within the high and low
18349                                                                  limits set by
18350                                                                  GSERN()_LANE()_TRAIN_5_BCFG[FDLTFOM_HI_LMT] and
18351                                                                  GSERN()_LANE()_TRAIN_5_BCFG[FDLTFOM_LO_LMT], and
18352                                                                  GSERN()_LANE()_TRAIN_6_BCFG[DFFOM_EXIT_EN]=1, and
18353                                                                  the number of consecutive tap move iterations in which
18354                                                                  the Delta Filtered FOM is within the high/low limits
18355                                                                  exceeds the count in
18356                                                                  GSERN()_LANE()_TRAIN_6_BCFG[DELTA_FFOM_CCNT] */
18357         uint64_t term_prbs11_or        : 1;  /**< [ 21: 21](R/W) BASE-R training KR training PRBS11 pattern check extracted from the
18358                                                                  KR training frame is error free. Termination OR condition.
18359                                                                  Part of the BASE-R training termination condition register.
18360                                                                  See the full description of the training termination conditions
18361                                                                  register in GSERN()_LANE()_TRAIN_3_BCFG[TERM_MAX_MVS_OR].
18362 
18363                                                                  PRBS11 pattern check extracted from the KR training
18364                                                                  frame is error free.
18365                                                                  GSERN()_LANE()_TRAIN_4_BCFG[EN_PRBS11_CHK] must be enabled to
18366                                                                  enable PRBS11 pattern error checking. */
18367         uint64_t term_min_mvs_and      : 1;  /**< [ 22: 22](R/W) BASE-R training termination exceeded minimum number of tap moves.
18368                                                                  Termination AND condition.  See description below.
18369                                                                  Part of the BASE-R training termination condition register.
18370                                                                  See the full description of the training termination conditions
18371                                                                  register in GSERN()_LANE()_TRAIN_3_BCFG[TERM_MAX_MVS_OR].
18372 
18373                                                                  Exceeded minimum tap moves iterations.
18374                                                                  GSERN()_LANE()_TRAIN_2_BCFG[MIN_TAP_MOVES] sets the minimum
18375                                                                  number of tap moves. */
18376         uint64_t term_tmt_tmr_and      : 1;  /**< [ 23: 23](R/W) BASE-R training KR training time-out timer expired. Termination
18377                                                                  AND condition.
18378                                                                  Part of the BASE-R training termination condition register.
18379                                                                  See the full description of the training termination conditions
18380                                                                  register in GSERN()_LANE()_TRAIN_3_BCFG[TERM_MAX_MVS_OR].
18381 
18382                                                                  GSERN()_LANE()_TRAIN_0_BCFG[RXT_ADTMOUT_SEL] and
18383                                                                  GSERN()_LANE()_TRAIN_0_BCFG[RXT_ADTMOUT_FAST] select the
18384                                                                  timeout time in milliseconds/microseconds and
18385                                                                  GSERN()_LANE()_TRAIN_0_BCFG[RXT_ADTMOUT_DISABLE] enables
18386                                                                  the timeout timer when cleared to zero. */
18387         uint64_t term_rep_pat_and      : 1;  /**< [ 24: 24](R/W) BASE-R training KR training taps move repeating pattern detected.
18388                                                                  Termination AND condition.
18389                                                                  Part of the BASE-R training termination condition register.
18390                                                                  See the full description of the training termination conditions
18391                                                                  register in GSERN()_LANE()_TRAIN_3_BCFG[TERM_MAX_MVS_OR].
18392 
18393                                                                  GSERN()_LANE()_TRAIN_5_BCFG[PAT_EXIT_CNT] must be set to
18394                                                                  a non-zero value and GSERN()_LANE()_TRAIN_5_BCFG[PAT_MATCH_EN]
18395                                                                  must be set to a one to enable the repeating tap move pattern
18396                                                                  matching logic which looks for repeating tap moves to signal
18397                                                                  training convergence. */
18398         uint64_t term_dffom_and        : 1;  /**< [ 25: 25](R/W) BASE-R training KR training Delta Filtered FOM is within the high
18399                                                                  and low limits. Termination AND condition.
18400                                                                  Part of the BASE-R training termination condition register.
18401                                                                  See the full description of the training termination conditions
18402                                                                  register in GSERN()_LANE()_TRAIN_3_BCFG[TERM_MAX_MVS_OR].
18403 
18404                                                                  Delta filtered FOM is within the high and low
18405                                                                  limits set by
18406                                                                  GSERN()_LANE()_TRAIN_5_BCFG[FDLTFOM_HI_LMT] and
18407                                                                  GSERN()_LANE()_TRAIN_5_BCFG[FDLTFOM_LO_LMT], and
18408                                                                  GSERN()_LANE()_TRAIN_6_BCFG[DFFOM_EXIT_EN]=1, and
18409                                                                  the number of consecutive tap move iterations in which
18410                                                                  the Delta Filtered FOM is within the high/low limits
18411                                                                  exceeds the count in
18412                                                                  GSERN()_LANE()_TRAIN_6_BCFG[DELTA_FFOM_CCNT] */
18413         uint64_t term_prbs11_and       : 1;  /**< [ 26: 26](R/W) BASE-R training KR training PRBS11 pattern check extracted from the
18414                                                                  KR training frame is error free. Termination AND condition.
18415                                                                  Part of the BASE-R training termination condition register.
18416                                                                  See the full description of the training termination conditions
18417                                                                  register in GSERN()_LANE()_TRAIN_3_BCFG[TERM_MAX_MVS_OR].
18418 
18419                                                                  PRBS11 pattern check extracted from the KR training
18420                                                                  frame is error free.
18421                                                                  GSERN()_LANE()_TRAIN_4_BCFG[EN_PRBS11_CHK] must be enabled to
18422                                                                  enable PRBS11 pattern error checking. */
18423         uint64_t trn_ntap_mvs          : 8;  /**< [ 34: 27](RO/H) BASE-R training holds the number of link partner tap moves made during
18424                                                                  link training. */
18425         uint64_t exit_dffom            : 13; /**< [ 47: 35](RO/H) Training exit location delta filtered FOM value. Holds the delta filtered FOM
18426                                                                  value at the completion of BASE-R training. Number represented in offset binary
18427                                                                  notation. For diagnostic use only. */
18428         uint64_t exit_max_tap_moves    : 1;  /**< [ 48: 48](RO/H) Training exit condition exceeded maximum number of tap moves.
18429                                                                  When BASE-R training is concluded, indicated by
18430                                                                  GSERN()_LANE()_TRAIN_0_BCFG[LD_RECEIVER_RDY] set to one
18431                                                                  [EXIT_MAX_TAP_MOVES] will be set if the training was terminated
18432                                                                  because the training state machine exceeded the maximum number of
18433                                                                  tap moves specified in
18434                                                                  GSERN()_LANE()_TRAIN_2_BCFG[MAX_TAP_MOVES].
18435 
18436                                                                  This bit will be cleared if BASE-R training is re-enabled.
18437                                                                  For diagnostic use only. */
18438         uint64_t exit_min_tap_moves    : 1;  /**< [ 49: 49](RO/H) Training exit condition exceeded minimum number of tap moves.
18439                                                                  When BASE-R training is concluded, indicated by
18440                                                                  GSERN()_LANE()_TRAIN_0_BCFG[LD_RECEIVER_RDY] set to one
18441                                                                  [EXIT_MIN_TAP_MOVES] will be set if the training was terminated
18442                                                                  because the training state machine exceeded the minimum number of
18443                                                                  tap moves specified in
18444                                                                  GSERN()_LANE()_TRAIN_2_BCFG[MIN_TAP_MOVES].
18445 
18446                                                                  This bit will be cleared if BASE-R training is re-enabled.
18447                                                                  For diagnostic use only. */
18448         uint64_t exit_tmt_timer        : 1;  /**< [ 50: 50](RO/H) Training timeout timer expired.
18449                                                                  When BASE-R training is concluded, indicated by
18450                                                                  GSERN()_LANE()_TRAIN_0_BCFG[LD_RECEIVER_RDY] set to one
18451                                                                  [EXIT_MAX_TAP_MOVES] will be set if the training was terminated
18452                                                                  because the training state machine KR training time-out timer expired.
18453                                                                  GSERN()_LANE()_TRAIN_0_BCFG[RXT_ADTMOUT_SEL] and
18454                                                                  GSERN()_LANE()_TRAIN_0_BCFG[RXT_ADTMOUT_FAST] select the
18455                                                                  timeout time in milliseconds/microseconds and
18456                                                                  GSERN()_LANE()_TRAIN_0_BCFG[RXT_ADTMOUT_DISABLE] enables
18457                                                                  the timeout timer when cleared to zero.
18458 
18459                                                                  This bit will be cleared if BASE-R training is re-enabled.
18460                                                                  For diagnostic use only. */
18461         uint64_t exit_rep_pattern      : 1;  /**< [ 51: 51](RO/H) Training exit condition repeating TAP moves pattern detected.
18462                                                                  When BASE-R training is concluded, indicated by
18463                                                                  GSERN()_LANE()_TRAIN_0_BCFG[LD_RECEIVER_RDY] set to one
18464                                                                  [EXIT_REP_PATTERN] will be set if the training was terminated
18465                                                                  because the training state machine discovered a repeating tap
18466                                                                  move pattern.  The GSERN()_LANE()_TRAIN_5_BCFG[PAT_EXIT_CNT] must
18467                                                                  be set to a non-zero value and GSERN()_LANE()_TRAIN_5_BCFG[PAT_MATCH_EN]
18468                                                                  must be set to a one to enable the repeating tap move pattern
18469                                                                  matching logic which looks for repeating tap moves to signal
18470                                                                  training convergence.
18471 
18472                                                                  This bit will be cleared if BASE-R training is re-enabled.
18473                                                                  For diagnostic use only. */
18474         uint64_t exit_delta_ffom       : 1;  /**< [ 52: 52](RO/H) Training exit condition due to delta filtered FOM.
18475                                                                  When BASE-R training is concluded, indicated by
18476                                                                  GSERN()_LANE()_TRAIN_0_BCFG[LD_RECEIVER_RDY] set to one the
18477                                                                  [EXIT_DELTA_FFOM] bit will be set if the training was terminated
18478                                                                  because the Delta Filtered FOM is within the high and low limits set by
18479                                                                  GSERN()_LANE()_TRAIN_5_BCFG[FDLTFOM_HI_LMT] and
18480                                                                  GSERN()_LANE()_TRAIN_5_BCFG[FDLTFOM_LO_LMT], and
18481                                                                  GSERN()_LANE()_TRAIN_6_BCFG[DFFOM_EXIT_EN]=1, and
18482                                                                  the number of consecutive tap move iterations in which
18483                                                                  the Delta Filtered FOM is within the high/low limits
18484                                                                  exceeded the count in
18485                                                                  GSERN()_LANE()_TRAIN_6_BCFG[DELTA_FFOM_CCNT]
18486 
18487                                                                  This bit will be cleared if BASE-R training is re-enabled.
18488                                                                  For diagnostic use only. */
18489         uint64_t exit_prbs11_ok        : 1;  /**< [ 53: 53](RO/H) Training exit condition PRBS11 in the BASE-R KR training frame is
18490                                                                  error free.
18491                                                                  When BASE-R training is concluded, indicated by
18492                                                                  GSERN()_LANE()_TRAIN_0_BCFG[LD_RECEIVER_RDY] set to one
18493                                                                  [EXIT_PRBS11_OK] will be set if the training was terminated
18494                                                                  because the PRBS11 pattern extracted by the CGX or OCX MAC
18495                                                                  indicates that the PRBS11 pattern is error free.
18496 
18497                                                                  This bit will report the PRBS11 status when BASE-R training
18498                                                                  completes even if GSERN()_LANE()_TRAIN_3_BCFG[LD_TRAIN_DONE\<21\>
18499                                                                  or LD_TRAIN_DONE\<26\>] are not set.
18500                                                                  GSERN()_LANE()_TRAIN_4_BCFG[EN_PRBS11_CHK] must be enabled
18501                                                                  for the [EXIT_PRBS11_OK] status to be reported.
18502 
18503                                                                  This bit will be cleared if BASE-R training is re-enabled.
18504                                                                  For diagnostic use only.
18505 
18506                                                                  Internal:
18507                                                                  FIXME what does LD_TRAIN_DONE refer to, then remove above exempt attribute. */
18508         uint64_t exit_sat_mv_lmt       : 1;  /**< [ 54: 54](RO/H) BASE-R training saturated move limit threshold exit flag.
18509                                                                  See GSERN()_LANE()_TRAIN_2_BCFG[TRN_SAT_MV_LMT_EN].
18510                                                                  For diagnostic use only. */
18511         uint64_t train_tx_min_rule     : 8;  /**< [ 62: 55](R/W) BASE-R training TX taps minimum coefficient rule.  Sets the lower limit of the permissible
18512                                                                  range of the TX equalizer c(0), c(+1), and c(-1) taps so that the TX equalizer
18513                                                                  operates within range specified in the IEEE 802.3-2012 Clause 72 10GBASE-KR
18514                                                                  and IEEE 802.3bj-2014 Clause 93 100GBASE-KR4.
18515                                                                  The TX coefficient minimum rule requires (main - pre - post) \>= [TRAIN_TX_MIN_RULE].
18516 
18517                                                                  The allowable range for [TRAIN_TX_MIN_RULE] is
18518                                                                  (6 decimal \<= [TRAIN_TX_MIN_RULE] \<= 16 decimal).
18519                                                                  For 10GBASE-KR, 40GBASE-KR4 and 100GBASE-KR4 it is recommended to
18520                                                                  program [TRAIN_TX_MIN_RULE] to 0x6.
18521 
18522                                                                  c(-1) pre TX tap range is programmed by GSERN()_LANE()_TRAIN_2_BCFG[PRE_MAX_LIMIT] and
18523                                                                  GSERN()_LANE()_TRAIN_2_BCFG[PRE_MIN_LIMIT].
18524 
18525                                                                  c(0) main TX tap range is programmed by GSERN()_LANE()_TRAIN_2_BCFG[MAIN_MAX_LIMIT] and
18526                                                                  GSERN()_LANE()_TRAIN_2_BCFG[MAIN_MIN_LIMIT].
18527 
18528                                                                  c(+1) post TX tap range is programmed by GSERN()_LANE()_TRAIN_2_BCFG[POST_MAX_LIMIT] and
18529                                                                  GSERN()_LANE()_TRAIN_2_BCFG[POST_MIN_LIMIT]. */
18530         uint64_t exit_fom_thrs         : 1;  /**< [ 63: 63](RO/H) BASE-R training exit condition flag indicates the measured FOM
18531                                                                  was equal to or exceeded the FOM threshold value specified in
18532                                                                  GSERN()_LANE()_TRAIN_10_BCFG[EXIT_FOM_THRS_VAL] when
18533                                                                  GSERN()_LANE()_TRAIN_10_BCFG[TRN_FOM_THRS_EN] is set to 1.
18534 
18535                                                                  Used in conjustion with
18536                                                                  GSERN()_LANE()_TRAIN_4_BCFG[TERM_FOM_THRS_AND] and
18537                                                                  GSERN()_LANE()_TRAIN_4_BCFG[TERM_FOM_THRS_OR] to
18538                                                                  specify the BASE-R training convergence exit criteria. */
18539 #endif /* Word 0 - End */
18540     } s;
18541     /* struct bdk_gsernx_lanex_train_3_bcfg_s cn; */
18542 };
18543 typedef union bdk_gsernx_lanex_train_3_bcfg bdk_gsernx_lanex_train_3_bcfg_t;
18544 
18545 static inline uint64_t BDK_GSERNX_LANEX_TRAIN_3_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_TRAIN_3_BCFG(unsigned long a,unsigned long b)18546 static inline uint64_t BDK_GSERNX_LANEX_TRAIN_3_BCFG(unsigned long a, unsigned long b)
18547 {
18548     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
18549         return 0x87e0900031e0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
18550     __bdk_csr_fatal("GSERNX_LANEX_TRAIN_3_BCFG", 2, a, b, 0, 0);
18551 }
18552 
18553 #define typedef_BDK_GSERNX_LANEX_TRAIN_3_BCFG(a,b) bdk_gsernx_lanex_train_3_bcfg_t
18554 #define bustype_BDK_GSERNX_LANEX_TRAIN_3_BCFG(a,b) BDK_CSR_TYPE_RSL
18555 #define basename_BDK_GSERNX_LANEX_TRAIN_3_BCFG(a,b) "GSERNX_LANEX_TRAIN_3_BCFG"
18556 #define device_bar_BDK_GSERNX_LANEX_TRAIN_3_BCFG(a,b) 0x0 /* PF_BAR0 */
18557 #define busnum_BDK_GSERNX_LANEX_TRAIN_3_BCFG(a,b) (a)
18558 #define arguments_BDK_GSERNX_LANEX_TRAIN_3_BCFG(a,b) (a),(b),-1,-1
18559 
18560 /**
18561  * Register (RSL) gsern#_lane#_train_4_bcfg
18562  *
18563  * GSER Lane Training Base Configuration Register 4
18564  * This register controls settings for lane training.
18565  */
18566 union bdk_gsernx_lanex_train_4_bcfg
18567 {
18568     uint64_t u;
18569     struct bdk_gsernx_lanex_train_4_bcfg_s
18570     {
18571 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
18572         uint64_t term_fom_thrs_and     : 1;  /**< [ 63: 63](R/W) BASE-R training termination condition measured FOM equal or
18573                                                                  exceeds the FOM threshold set in
18574                                                                  GSERN()_LANE()_TRAIN_10_BCFG[EXIT_FOM_THRS_VAL].
18575                                                                  Termination AND condition.
18576                                                                  Part of the BASE-R training termination condition register.
18577                                                                  See the full description of the training termination conditions
18578                                                                  register in GSERN()_LANE()_TRAIN_3_BCFG[TERM_MAX_MVS_OR].
18579 
18580                                                                  Exceeded FOM threshold.
18581                                                                  GSERN()_LANE()_TRAIN_10_BCFG[TRN_FOM_THRS_VAL] sets the FOM
18582                                                                  threshold.
18583 
18584                                                                  Refer to the description for
18585                                                                  GSERN()_LANE()_TRAIN_10_BCFG[TRN_FOM_THRS_EN] and
18586                                                                  GSERN()_LANE()_TRAIN_10_BCFG[EXIT_FOM_THRS_VAL] and
18587                                                                  GSERN()_LANE()_TRAIN_3_BCFG[EXIT_FOM_THRS].
18588 
18589                                                                  Internal:
18590                                                                  FIXME no such field GSERN()_LANE()_TRAIN_10_BCFG[TRN_FOM_THRS_VAL], then remove
18591                                                                  above exempt attribute. */
18592         uint64_t term_fom_thrs_or      : 1;  /**< [ 62: 62](R/W) BASE-R training termination condition measured FOM equal or
18593                                                                  exceeds the FOM threshold set in
18594                                                                  GSERN()_LANE()_TRAIN_10_BCFG[EXIT_FOM_THRS_VAL].
18595                                                                  Termination OR condition.
18596                                                                  Part of the BASE-R training termination condition register.
18597                                                                  See the full description of the training termination conditions
18598                                                                  register in GSERN()_LANE()_TRAIN_3_BCFG[TERM_MAX_MVS_OR].
18599 
18600                                                                  Exceeded FOM threshold.
18601                                                                  GSERN()_LANE()_TRAIN_10_BCFG[TRN_FOM_THRS_VAL] sets the FOM
18602                                                                  threshold.
18603 
18604                                                                  Refer to the description for
18605                                                                  GSERN()_LANE()_TRAIN_10_BCFG[TRN_FOM_THRS_EN] and
18606                                                                  GSERN()_LANE()_TRAIN_10_BCFG[EXIT_FOM_THRS_VAL] and
18607                                                                  GSERN()_LANE()_TRAIN_3_BCFG[EXIT_FOM_THRS].
18608 
18609                                                                  Internal:
18610                                                                  FIXME no such field GSERN()_LANE()_TRAIN_10_BCFG[TRN_FOM_THRS_VAL]. */
18611         uint64_t en_prbs11_chk         : 1;  /**< [ 61: 61](R/W) BASE-R training enables the check for PRBS11 checking for training
18612                                                                  convergence.
18613                                                                  0 = Disables PRBS11 checking.
18614                                                                  1 = Enables PRBS11 checking.
18615 
18616                                                                  The CGX/OCX MAC extracts the PRBS11 pattern from the KR training frame
18617                                                                  and checks the PRBS11 pattern for errors.  The CGX/MAC signals to the
18618                                                                  KR training frame if the PRBS11 pattern sampled from the KR training
18619                                                                  frame is error free or contains errors.
18620 
18621                                                                  When [EN_PRBS11_CHK] is set the KR training state machine will
18622                                                                  sample the PRBS11 status signal from the MAC and if the PRBS11 is
18623                                                                  error free will use this to signal training convergence and signal
18624                                                                  receiver ready if this condition is enabled in the
18625                                                                  GSERN()_LANE()_TRAIN_3_BCFG[LD_TRAIN_DONE\<21\> or LD_TRAIN_DONE\<26\>]
18626                                                                  training termination condition fields.
18627 
18628                                                                  Internal:
18629                                                                  FIXME what does LD_TRAIN_DONE refer to? */
18630         uint64_t en_rev_moves          : 1;  /**< [ 60: 60](R/W) BASE-R training controls the receiver adaptation algorithm to reverse previous
18631                                                                  tap moves that resulted in a decrease in the receiver figure of merit
18632                                                                  (FOM).
18633                                                                  0 = Prevents the adaptation algorithm state machine from
18634                                                                  reversing previous tap moves that resulted in a lower FOM.
18635                                                                  1 = Enables the adaptation algorithm state machine
18636                                                                  to reverse a previous tap move that resulted in a lower FOM value.
18637 
18638                                                                  The receiver adaptation algorithm will not reverse previous tap moves until the
18639                                                                  number of tap moves exceeds the minimum number of tap moves specified in
18640                                                                  GSERN()_LANE()_TRAIN_2_BCFG[MIN_TAP_MOVES]. [EN_REV_MOVES] is normally enabled to
18641                                                                  improve the adaptation convergence time. */
18642         uint64_t tx_tap_stepsize       : 1;  /**< [ 59: 59](R/W) BASE-R training controls the transmitter Pre/Main/Post step size when a Coefficient Update
18643                                                                  increment or decrement request is received.  When [TX_TAP_STEPSIZE] is zero the
18644                                                                  transmitter Pre/Main/Post step size is set to +/- 1.  When [TX_TAP_STEPSIZE] is set to one
18645                                                                  the
18646                                                                  transmitter Pre/Main/Post step size is set to +/- 2. */
18647         uint64_t train_rst             : 1;  /**< [ 58: 58](R/W) Set to force the training engine into reset. Set low to enable link
18648                                                                  training. */
18649         uint64_t train_ovrrd_en        : 1;  /**< [ 57: 57](R/W) Training engine eye monitor FOM request override enable.
18650                                                                  If not programmed to PCIe, CGX, or OCX mode via GSERN()_LANE()_SRCMX_BCFG[TX_CTRL_SEL]
18651                                                                  then program [TRAIN_OVRRD_EN] to 1 before using
18652                                                                  GSERN()_LANE()_TRAIN_4_BCFG[EQ_EVAL_OVRRD_REQ] and
18653                                                                  GSERN()_LANE()_TRAIN_4_BCFG[EQ_EVAL_OVRRD_EN] to request an RX equalizer
18654                                                                  evaluation to measure the RX equalizer Figure of Merit (FOM).  The 8-bit FOM is
18655                                                                  returned in GSERN()_LANE()_TRAIN_5_BCFG[FOM] and the raw 12-bit FOM
18656                                                                  is returned in GSERN()_LANE()_TRAIN_5_BCFG[RAW_FOM].
18657                                                                  For diagnostic use only. */
18658         uint64_t rxt_rev_dir           : 1;  /**< [ 56: 56](R/W) When set, reverses the direction of the
18659                                                                  GSERN()_LANE()_TRAIN_0_BCFG[RXT_TX_POST_DIR],
18660                                                                  GSERN()_LANE()_TRAIN_0_BCFG[RXT_TX_MAIN_DIR], and
18661                                                                  GSERN()_LANE()_TRAIN_0_BCFG[RXT_TX_PRE_DIR]
18662                                                                  link partner TX tap direction hints. For diagnostic use only. */
18663         uint64_t adapt_axis            : 3;  /**< [ 55: 53](R/W) Sets the number or adaptation axes to use during receiver adaptation.
18664                                                                  Typically set to 0x7 to enable all three adaptation axes.  One-hot encoded.
18665 
18666                                                                  Set to 0x1 to only enable axis 1 and disable axis 2 and axis 3.
18667                                                                  Set to 0x3 to enable axis 1 and axis 2 but disable axis 3.
18668                                                                  Set to 0x7 to enable axis 1, 2 and 3. (default.)
18669                                                                  For diagnostic use only. */
18670         uint64_t c1_e_adj_step         : 5;  /**< [ 52: 48](R/W) Reserved.
18671                                                                  Internal:
18672                                                                  Functionality moved to GSERN()_LANE()_TRAIN_10_BCFG.L_C1_E_ADJ_STEP */
18673         uint64_t eq_eval_ovrrd_req     : 1;  /**< [ 47: 47](R/W) When set issues a receiver equalization evaluation request when
18674                                                                  GSERN()_LANE()_TRAIN_4_BCFG[EQ_EVAL_OVRRD_EN] is set.
18675                                                                  For diagnostic use only. */
18676         uint64_t eq_eval_ovrrd_en      : 1;  /**< [ 46: 46](R/W) When set the RX equalization evaluation request is controlled by
18677                                                                  GSERN()_LANE()_TRAIN_4_BCFG[EQ_EVAL_OVRRD_REQ].
18678                                                                  For diagnostic use only. */
18679         uint64_t err_cnt_div_ovrrd_val : 4;  /**< [ 45: 42](R/W) Error counter divider override value. See table below.
18680                                                                  Divider is active when the [ERR_CNT_DIV_OVRRD_EN] is set.
18681                                                                  For diagnostic use only.
18682 
18683                                                                     0x0 = No divider.
18684                                                                     0x1 = DIV 2.
18685                                                                     0x2 = DIV 4.
18686                                                                     0x3 = DIV 8.
18687                                                                     0x4 = DIV 16.
18688                                                                     0x5 = DIV 32.
18689                                                                     0x6 = DIV 64.
18690                                                                     0x7 = DIV 128.
18691                                                                     0x8 = DIV 256.
18692                                                                     0x9 = DIV 512.
18693                                                                     0xA = DIV 1024.
18694                                                                     0xB = DIV 2048.
18695                                                                     0xC = DIV 4096.
18696                                                                     0xD = DIV 8192.
18697                                                                     0xE = DIV 16384.
18698                                                                     0xF = DIV 32768. */
18699         uint64_t err_cnt_div_ovrrd_en  : 1;  /**< [ 41: 41](R/W) Error counter divider override enable.
18700                                                                  For diagnostic use only. */
18701         uint64_t eye_cnt_ovrrd_en      : 1;  /**< [ 40: 40](R/W) Eye Cycle Count Override Enable. When set the number of eye monitor
18702                                                                  cycles to sample and count during the BASE-R training
18703                                                                  figure of merit (FOM) calculation
18704                                                                  is controlled by GSERN()_LANE()_TRAIN_4_BCFG[EYE_CNT_OVRRD_VAL].
18705                                                                  For diagnostic use only. */
18706         uint64_t eye_cnt_ovrrd_val     : 40; /**< [ 39:  0](R/W) Sets the number of eye monitor cycles to sample/count during the BASE-R training
18707                                                                  figure of merit (FOM) calculation when
18708                                                                  GSERN()_LANE()_TRAIN_4_BCFG[EYE_CNT_OVRRD_EN]=1.
18709                                                                  For diagnostic use only. */
18710 #else /* Word 0 - Little Endian */
18711         uint64_t eye_cnt_ovrrd_val     : 40; /**< [ 39:  0](R/W) Sets the number of eye monitor cycles to sample/count during the BASE-R training
18712                                                                  figure of merit (FOM) calculation when
18713                                                                  GSERN()_LANE()_TRAIN_4_BCFG[EYE_CNT_OVRRD_EN]=1.
18714                                                                  For diagnostic use only. */
18715         uint64_t eye_cnt_ovrrd_en      : 1;  /**< [ 40: 40](R/W) Eye Cycle Count Override Enable. When set the number of eye monitor
18716                                                                  cycles to sample and count during the BASE-R training
18717                                                                  figure of merit (FOM) calculation
18718                                                                  is controlled by GSERN()_LANE()_TRAIN_4_BCFG[EYE_CNT_OVRRD_VAL].
18719                                                                  For diagnostic use only. */
18720         uint64_t err_cnt_div_ovrrd_en  : 1;  /**< [ 41: 41](R/W) Error counter divider override enable.
18721                                                                  For diagnostic use only. */
18722         uint64_t err_cnt_div_ovrrd_val : 4;  /**< [ 45: 42](R/W) Error counter divider override value. See table below.
18723                                                                  Divider is active when the [ERR_CNT_DIV_OVRRD_EN] is set.
18724                                                                  For diagnostic use only.
18725 
18726                                                                     0x0 = No divider.
18727                                                                     0x1 = DIV 2.
18728                                                                     0x2 = DIV 4.
18729                                                                     0x3 = DIV 8.
18730                                                                     0x4 = DIV 16.
18731                                                                     0x5 = DIV 32.
18732                                                                     0x6 = DIV 64.
18733                                                                     0x7 = DIV 128.
18734                                                                     0x8 = DIV 256.
18735                                                                     0x9 = DIV 512.
18736                                                                     0xA = DIV 1024.
18737                                                                     0xB = DIV 2048.
18738                                                                     0xC = DIV 4096.
18739                                                                     0xD = DIV 8192.
18740                                                                     0xE = DIV 16384.
18741                                                                     0xF = DIV 32768. */
18742         uint64_t eq_eval_ovrrd_en      : 1;  /**< [ 46: 46](R/W) When set the RX equalization evaluation request is controlled by
18743                                                                  GSERN()_LANE()_TRAIN_4_BCFG[EQ_EVAL_OVRRD_REQ].
18744                                                                  For diagnostic use only. */
18745         uint64_t eq_eval_ovrrd_req     : 1;  /**< [ 47: 47](R/W) When set issues a receiver equalization evaluation request when
18746                                                                  GSERN()_LANE()_TRAIN_4_BCFG[EQ_EVAL_OVRRD_EN] is set.
18747                                                                  For diagnostic use only. */
18748         uint64_t c1_e_adj_step         : 5;  /**< [ 52: 48](R/W) Reserved.
18749                                                                  Internal:
18750                                                                  Functionality moved to GSERN()_LANE()_TRAIN_10_BCFG.L_C1_E_ADJ_STEP */
18751         uint64_t adapt_axis            : 3;  /**< [ 55: 53](R/W) Sets the number or adaptation axes to use during receiver adaptation.
18752                                                                  Typically set to 0x7 to enable all three adaptation axes.  One-hot encoded.
18753 
18754                                                                  Set to 0x1 to only enable axis 1 and disable axis 2 and axis 3.
18755                                                                  Set to 0x3 to enable axis 1 and axis 2 but disable axis 3.
18756                                                                  Set to 0x7 to enable axis 1, 2 and 3. (default.)
18757                                                                  For diagnostic use only. */
18758         uint64_t rxt_rev_dir           : 1;  /**< [ 56: 56](R/W) When set, reverses the direction of the
18759                                                                  GSERN()_LANE()_TRAIN_0_BCFG[RXT_TX_POST_DIR],
18760                                                                  GSERN()_LANE()_TRAIN_0_BCFG[RXT_TX_MAIN_DIR], and
18761                                                                  GSERN()_LANE()_TRAIN_0_BCFG[RXT_TX_PRE_DIR]
18762                                                                  link partner TX tap direction hints. For diagnostic use only. */
18763         uint64_t train_ovrrd_en        : 1;  /**< [ 57: 57](R/W) Training engine eye monitor FOM request override enable.
18764                                                                  If not programmed to PCIe, CGX, or OCX mode via GSERN()_LANE()_SRCMX_BCFG[TX_CTRL_SEL]
18765                                                                  then program [TRAIN_OVRRD_EN] to 1 before using
18766                                                                  GSERN()_LANE()_TRAIN_4_BCFG[EQ_EVAL_OVRRD_REQ] and
18767                                                                  GSERN()_LANE()_TRAIN_4_BCFG[EQ_EVAL_OVRRD_EN] to request an RX equalizer
18768                                                                  evaluation to measure the RX equalizer Figure of Merit (FOM).  The 8-bit FOM is
18769                                                                  returned in GSERN()_LANE()_TRAIN_5_BCFG[FOM] and the raw 12-bit FOM
18770                                                                  is returned in GSERN()_LANE()_TRAIN_5_BCFG[RAW_FOM].
18771                                                                  For diagnostic use only. */
18772         uint64_t train_rst             : 1;  /**< [ 58: 58](R/W) Set to force the training engine into reset. Set low to enable link
18773                                                                  training. */
18774         uint64_t tx_tap_stepsize       : 1;  /**< [ 59: 59](R/W) BASE-R training controls the transmitter Pre/Main/Post step size when a Coefficient Update
18775                                                                  increment or decrement request is received.  When [TX_TAP_STEPSIZE] is zero the
18776                                                                  transmitter Pre/Main/Post step size is set to +/- 1.  When [TX_TAP_STEPSIZE] is set to one
18777                                                                  the
18778                                                                  transmitter Pre/Main/Post step size is set to +/- 2. */
18779         uint64_t en_rev_moves          : 1;  /**< [ 60: 60](R/W) BASE-R training controls the receiver adaptation algorithm to reverse previous
18780                                                                  tap moves that resulted in a decrease in the receiver figure of merit
18781                                                                  (FOM).
18782                                                                  0 = Prevents the adaptation algorithm state machine from
18783                                                                  reversing previous tap moves that resulted in a lower FOM.
18784                                                                  1 = Enables the adaptation algorithm state machine
18785                                                                  to reverse a previous tap move that resulted in a lower FOM value.
18786 
18787                                                                  The receiver adaptation algorithm will not reverse previous tap moves until the
18788                                                                  number of tap moves exceeds the minimum number of tap moves specified in
18789                                                                  GSERN()_LANE()_TRAIN_2_BCFG[MIN_TAP_MOVES]. [EN_REV_MOVES] is normally enabled to
18790                                                                  improve the adaptation convergence time. */
18791         uint64_t en_prbs11_chk         : 1;  /**< [ 61: 61](R/W) BASE-R training enables the check for PRBS11 checking for training
18792                                                                  convergence.
18793                                                                  0 = Disables PRBS11 checking.
18794                                                                  1 = Enables PRBS11 checking.
18795 
18796                                                                  The CGX/OCX MAC extracts the PRBS11 pattern from the KR training frame
18797                                                                  and checks the PRBS11 pattern for errors.  The CGX/MAC signals to the
18798                                                                  KR training frame if the PRBS11 pattern sampled from the KR training
18799                                                                  frame is error free or contains errors.
18800 
18801                                                                  When [EN_PRBS11_CHK] is set the KR training state machine will
18802                                                                  sample the PRBS11 status signal from the MAC and if the PRBS11 is
18803                                                                  error free will use this to signal training convergence and signal
18804                                                                  receiver ready if this condition is enabled in the
18805                                                                  GSERN()_LANE()_TRAIN_3_BCFG[LD_TRAIN_DONE\<21\> or LD_TRAIN_DONE\<26\>]
18806                                                                  training termination condition fields.
18807 
18808                                                                  Internal:
18809                                                                  FIXME what does LD_TRAIN_DONE refer to? */
18810         uint64_t term_fom_thrs_or      : 1;  /**< [ 62: 62](R/W) BASE-R training termination condition measured FOM equal or
18811                                                                  exceeds the FOM threshold set in
18812                                                                  GSERN()_LANE()_TRAIN_10_BCFG[EXIT_FOM_THRS_VAL].
18813                                                                  Termination OR condition.
18814                                                                  Part of the BASE-R training termination condition register.
18815                                                                  See the full description of the training termination conditions
18816                                                                  register in GSERN()_LANE()_TRAIN_3_BCFG[TERM_MAX_MVS_OR].
18817 
18818                                                                  Exceeded FOM threshold.
18819                                                                  GSERN()_LANE()_TRAIN_10_BCFG[TRN_FOM_THRS_VAL] sets the FOM
18820                                                                  threshold.
18821 
18822                                                                  Refer to the description for
18823                                                                  GSERN()_LANE()_TRAIN_10_BCFG[TRN_FOM_THRS_EN] and
18824                                                                  GSERN()_LANE()_TRAIN_10_BCFG[EXIT_FOM_THRS_VAL] and
18825                                                                  GSERN()_LANE()_TRAIN_3_BCFG[EXIT_FOM_THRS].
18826 
18827                                                                  Internal:
18828                                                                  FIXME no such field GSERN()_LANE()_TRAIN_10_BCFG[TRN_FOM_THRS_VAL]. */
18829         uint64_t term_fom_thrs_and     : 1;  /**< [ 63: 63](R/W) BASE-R training termination condition measured FOM equal or
18830                                                                  exceeds the FOM threshold set in
18831                                                                  GSERN()_LANE()_TRAIN_10_BCFG[EXIT_FOM_THRS_VAL].
18832                                                                  Termination AND condition.
18833                                                                  Part of the BASE-R training termination condition register.
18834                                                                  See the full description of the training termination conditions
18835                                                                  register in GSERN()_LANE()_TRAIN_3_BCFG[TERM_MAX_MVS_OR].
18836 
18837                                                                  Exceeded FOM threshold.
18838                                                                  GSERN()_LANE()_TRAIN_10_BCFG[TRN_FOM_THRS_VAL] sets the FOM
18839                                                                  threshold.
18840 
18841                                                                  Refer to the description for
18842                                                                  GSERN()_LANE()_TRAIN_10_BCFG[TRN_FOM_THRS_EN] and
18843                                                                  GSERN()_LANE()_TRAIN_10_BCFG[EXIT_FOM_THRS_VAL] and
18844                                                                  GSERN()_LANE()_TRAIN_3_BCFG[EXIT_FOM_THRS].
18845 
18846                                                                  Internal:
18847                                                                  FIXME no such field GSERN()_LANE()_TRAIN_10_BCFG[TRN_FOM_THRS_VAL], then remove
18848                                                                  above exempt attribute. */
18849 #endif /* Word 0 - End */
18850     } s;
18851     /* struct bdk_gsernx_lanex_train_4_bcfg_s cn; */
18852 };
18853 typedef union bdk_gsernx_lanex_train_4_bcfg bdk_gsernx_lanex_train_4_bcfg_t;
18854 
18855 static inline uint64_t BDK_GSERNX_LANEX_TRAIN_4_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_TRAIN_4_BCFG(unsigned long a,unsigned long b)18856 static inline uint64_t BDK_GSERNX_LANEX_TRAIN_4_BCFG(unsigned long a, unsigned long b)
18857 {
18858     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
18859         return 0x87e0900031f0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
18860     __bdk_csr_fatal("GSERNX_LANEX_TRAIN_4_BCFG", 2, a, b, 0, 0);
18861 }
18862 
18863 #define typedef_BDK_GSERNX_LANEX_TRAIN_4_BCFG(a,b) bdk_gsernx_lanex_train_4_bcfg_t
18864 #define bustype_BDK_GSERNX_LANEX_TRAIN_4_BCFG(a,b) BDK_CSR_TYPE_RSL
18865 #define basename_BDK_GSERNX_LANEX_TRAIN_4_BCFG(a,b) "GSERNX_LANEX_TRAIN_4_BCFG"
18866 #define device_bar_BDK_GSERNX_LANEX_TRAIN_4_BCFG(a,b) 0x0 /* PF_BAR0 */
18867 #define busnum_BDK_GSERNX_LANEX_TRAIN_4_BCFG(a,b) (a)
18868 #define arguments_BDK_GSERNX_LANEX_TRAIN_4_BCFG(a,b) (a),(b),-1,-1
18869 
18870 /**
18871  * Register (RSL) gsern#_lane#_train_5_bcfg
18872  *
18873  * GSER Lane Training Base Configuration Register 5
18874  * This register controls settings for lane training.
18875  */
18876 union bdk_gsernx_lanex_train_5_bcfg
18877 {
18878     uint64_t u;
18879     struct bdk_gsernx_lanex_train_5_bcfg_s
18880     {
18881 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
18882         uint64_t pat_exit_cnt          : 4;  /**< [ 63: 60](R/W) BASE-R training controls the receiver adaptation algorithm training convergence
18883                                                                  pattern matching logic.  As BASE-R training progresses the Pre/Main/Post tap
18884                                                                  direction change coefficient updates to the link partner start to dither around the
18885                                                                  optimal tap values.  The pattern matching logic looks for repeating patterns of
18886                                                                  the tap dithering around the optimal value and is used as one metric to determine
18887                                                                  that BASE-R training has converged and local device can signal receiver ready.
18888 
18889                                                                  The [PAT_EXIT_CNT] variable sets the maximum length of the repeating pattern to search
18890                                                                  for in the pattern matching array.  The pattern matching array has twelve elements
18891                                                                  therefore the maximum value of [PAT_EXIT_CNT] is 0xC.  A value of 0x6 has been
18892                                                                  found to be optimal for recognizing training tap convergence.
18893 
18894                                                                  The GSERN()_LANE()_TRAIN_5_BCFG[PAT_EXIT_CNT] field is used in conjunction with the
18895                                                                  GSERN()_LANE()_TRAIN_5_BCFG[PAT_MATCH_EN] field to control the training convergence
18896                                                                  pattern matching logic during BASE-R training. */
18897         uint64_t pat_match_en          : 1;  /**< [ 59: 59](R/W) BASE-R training controls the receiver adaptation algorithm when [PAT_MATCH_EN] is set to
18898                                                                  one
18899                                                                  the training convergence pattern matching logic is enabled.  The training pattern matching
18900                                                                  logic tracks the link partner transmitter tap moves and sets a flag when the pattern
18901                                                                  is found to be repeating in the taps moves tracking array.  This is used to help
18902                                                                  converge training adaptation.  When [PAT_MATCH_EN] is cleared to zero the pattern matching
18903                                                                  logic is disabled and not used to detect training convergence.
18904 
18905                                                                  The GSERN()_LANE()_TRAIN_5_BCFG[PAT_MATCH_EN] field is used in conjunction with the
18906                                                                  GSERN()_LANE()_TRAIN_5_BCFG[PAT_EXIT_CNT] field to control the training convergence
18907                                                                  pattern matching logic during BASE-R training. */
18908         uint64_t fdltfom_hi_lmt        : 8;  /**< [ 58: 51](R/W) BASE-R training sets the Delta Filtered FOM upper limit for training convergence.
18909                                                                  Value is a signed twos complement value. */
18910         uint64_t fdltfom_lo_lmt        : 8;  /**< [ 50: 43](R/W) BASE-R training sets the Delta Filtered FOM lower limit for training convergence.
18911                                                                  Value is a signed twos complement value. */
18912         uint64_t inv_post_dir          : 1;  /**< [ 42: 42](R/W) BASE-R training when set reverses the direction of the post tap (C+1)
18913                                                                  direction hint from the local device. */
18914         uint64_t inv_main_dir          : 1;  /**< [ 41: 41](R/W) BASE-R training when set reverses the direction of the main tap (C0)
18915                                                                  direction hint from the local device. */
18916         uint64_t inv_pre_dir           : 1;  /**< [ 40: 40](R/W) BASE-R training when set reverses the direction of the pre tap (C-1)
18917                                                                  direction hint from the local device. */
18918         uint64_t use_ffom              : 1;  /**< [ 39: 39](R/W) Use filtered figure of merit for BASE-R transmitter adaptation logic.
18919                                                                  For diagnostic use only.
18920                                                                  0 = The BASE-R transmitter adaptation logic use the unfiltered raw figure
18921                                                                  of merit FOM for BASE-R Inc/Dec direction hint computation.
18922                                                                  1 = The BASE-R transmitter adaptation logic use the
18923                                                                  filtered FOM for Inc/Dec direction hint computation. */
18924         uint64_t dfom_tc               : 3;  /**< [ 38: 36](R/W) Delta filtered figure of merit (DFOM) filter time constant. The DFOM is filtered
18925                                                                  by a cumulative moving average (CMA) filter.  [DFOM_TC] sets the time constant
18926                                                                  of the CMA filter.
18927                                                                  Selectable time constant options are in the range 0 to 7 which sets the divider value
18928                                                                  used to scale the summed DFOM input term and the filtered DFOM feedback term. This
18929                                                                  provides
18930                                                                  a smoothed delta filtered figure of merit for use by the BASE-R transmitter adaptation
18931                                                                  logic.
18932 
18933                                                                  For diagnostic use only.
18934 
18935                                                                    0x0 = No scaling.
18936                                                                    0x1 = Divide by 2.
18937                                                                    0x2 = Divide by 4.
18938                                                                    0x3 = Divide by 8.
18939                                                                    0x4 = Divide by 16.
18940                                                                    0x5 = Divide by 32.
18941                                                                    0x6 = Divide by 64.
18942                                                                    0x7 = Divide by 128. */
18943         uint64_t ffom_tc               : 3;  /**< [ 35: 33](R/W) Filtered figure of merit (FFOM) filter time constant. The raw figure of merit (raw FOM)
18944                                                                  is filtered by a cumulative moving average (CMA) filter.  [FFOM_TC] sets the time
18945                                                                  constant of the CMA filter.
18946                                                                  Selectable time constant options are in the range 0 to 7 which sets the divider value
18947                                                                  used to scale the raw FOM input term and the filtered FOM feedback term. This provides
18948                                                                  a smoothed filtered figure of merit for use by the BASE-R transmitter adaptation logic.
18949 
18950                                                                    0x0 = No scaling.
18951                                                                    0x1 = Divide by 2.
18952                                                                    0x2 = Divide by 4.
18953                                                                    0x3 = Divide by 8.
18954                                                                    0x4 = Divide by 16.
18955                                                                    0x5 = Divide by 32.
18956                                                                    0x6 = Divide by 64.
18957                                                                    0x7 = Divide by 128.
18958 
18959                                                                  For diagnostic use only. */
18960         uint64_t eq_eval_ack           : 1;  /**< [ 32: 32](RO/H) When set indicates a receiver equalization evaluation acknowledgment. Set in
18961                                                                  response to request when GSERN()_LANE()_TRAIN_4_BCFG[EQ_EVAL_OVRRD_EN] is set
18962                                                                  and GSERN()_LANE()_TRAIN_4_BCFG[EQ_EVAL_OVRRD_REQ] is set.
18963 
18964                                                                  When [EQ_EVAL_ACK] is set, clear GSERN()_LANE()_TRAIN_4_BCFG[EQ_EVAL_OVRRD_REQ]
18965                                                                  which will in turn clear [EQ_EVAL_ACK] before issue another RX equalization
18966                                                                  evaluation request via GSERN()_LANE()_TRAIN_4_BCFG[EQ_EVAL_OVRRD_REQ].
18967 
18968                                                                  For diagnostic use only. */
18969         uint64_t filtered_fom          : 12; /**< [ 31: 20](RO/H) Filtered figure of merit (FOM) from the receiver adaptation logic.
18970                                                                  For diagnostic use only. */
18971         uint64_t raw_fom               : 12; /**< [ 19:  8](RO/H) Raw figure of merit (FOM) from the receiver adaptation logic.
18972                                                                  For diagnostic use only. */
18973         uint64_t fom                   : 8;  /**< [  7:  0](RO/H) Figure of merit (FOM) for PCIe and CGX logic used for link partner TX equalizer
18974                                                                  adaptation. For diagnostic use only. */
18975 #else /* Word 0 - Little Endian */
18976         uint64_t fom                   : 8;  /**< [  7:  0](RO/H) Figure of merit (FOM) for PCIe and CGX logic used for link partner TX equalizer
18977                                                                  adaptation. For diagnostic use only. */
18978         uint64_t raw_fom               : 12; /**< [ 19:  8](RO/H) Raw figure of merit (FOM) from the receiver adaptation logic.
18979                                                                  For diagnostic use only. */
18980         uint64_t filtered_fom          : 12; /**< [ 31: 20](RO/H) Filtered figure of merit (FOM) from the receiver adaptation logic.
18981                                                                  For diagnostic use only. */
18982         uint64_t eq_eval_ack           : 1;  /**< [ 32: 32](RO/H) When set indicates a receiver equalization evaluation acknowledgment. Set in
18983                                                                  response to request when GSERN()_LANE()_TRAIN_4_BCFG[EQ_EVAL_OVRRD_EN] is set
18984                                                                  and GSERN()_LANE()_TRAIN_4_BCFG[EQ_EVAL_OVRRD_REQ] is set.
18985 
18986                                                                  When [EQ_EVAL_ACK] is set, clear GSERN()_LANE()_TRAIN_4_BCFG[EQ_EVAL_OVRRD_REQ]
18987                                                                  which will in turn clear [EQ_EVAL_ACK] before issue another RX equalization
18988                                                                  evaluation request via GSERN()_LANE()_TRAIN_4_BCFG[EQ_EVAL_OVRRD_REQ].
18989 
18990                                                                  For diagnostic use only. */
18991         uint64_t ffom_tc               : 3;  /**< [ 35: 33](R/W) Filtered figure of merit (FFOM) filter time constant. The raw figure of merit (raw FOM)
18992                                                                  is filtered by a cumulative moving average (CMA) filter.  [FFOM_TC] sets the time
18993                                                                  constant of the CMA filter.
18994                                                                  Selectable time constant options are in the range 0 to 7 which sets the divider value
18995                                                                  used to scale the raw FOM input term and the filtered FOM feedback term. This provides
18996                                                                  a smoothed filtered figure of merit for use by the BASE-R transmitter adaptation logic.
18997 
18998                                                                    0x0 = No scaling.
18999                                                                    0x1 = Divide by 2.
19000                                                                    0x2 = Divide by 4.
19001                                                                    0x3 = Divide by 8.
19002                                                                    0x4 = Divide by 16.
19003                                                                    0x5 = Divide by 32.
19004                                                                    0x6 = Divide by 64.
19005                                                                    0x7 = Divide by 128.
19006 
19007                                                                  For diagnostic use only. */
19008         uint64_t dfom_tc               : 3;  /**< [ 38: 36](R/W) Delta filtered figure of merit (DFOM) filter time constant. The DFOM is filtered
19009                                                                  by a cumulative moving average (CMA) filter.  [DFOM_TC] sets the time constant
19010                                                                  of the CMA filter.
19011                                                                  Selectable time constant options are in the range 0 to 7 which sets the divider value
19012                                                                  used to scale the summed DFOM input term and the filtered DFOM feedback term. This
19013                                                                  provides
19014                                                                  a smoothed delta filtered figure of merit for use by the BASE-R transmitter adaptation
19015                                                                  logic.
19016 
19017                                                                  For diagnostic use only.
19018 
19019                                                                    0x0 = No scaling.
19020                                                                    0x1 = Divide by 2.
19021                                                                    0x2 = Divide by 4.
19022                                                                    0x3 = Divide by 8.
19023                                                                    0x4 = Divide by 16.
19024                                                                    0x5 = Divide by 32.
19025                                                                    0x6 = Divide by 64.
19026                                                                    0x7 = Divide by 128. */
19027         uint64_t use_ffom              : 1;  /**< [ 39: 39](R/W) Use filtered figure of merit for BASE-R transmitter adaptation logic.
19028                                                                  For diagnostic use only.
19029                                                                  0 = The BASE-R transmitter adaptation logic use the unfiltered raw figure
19030                                                                  of merit FOM for BASE-R Inc/Dec direction hint computation.
19031                                                                  1 = The BASE-R transmitter adaptation logic use the
19032                                                                  filtered FOM for Inc/Dec direction hint computation. */
19033         uint64_t inv_pre_dir           : 1;  /**< [ 40: 40](R/W) BASE-R training when set reverses the direction of the pre tap (C-1)
19034                                                                  direction hint from the local device. */
19035         uint64_t inv_main_dir          : 1;  /**< [ 41: 41](R/W) BASE-R training when set reverses the direction of the main tap (C0)
19036                                                                  direction hint from the local device. */
19037         uint64_t inv_post_dir          : 1;  /**< [ 42: 42](R/W) BASE-R training when set reverses the direction of the post tap (C+1)
19038                                                                  direction hint from the local device. */
19039         uint64_t fdltfom_lo_lmt        : 8;  /**< [ 50: 43](R/W) BASE-R training sets the Delta Filtered FOM lower limit for training convergence.
19040                                                                  Value is a signed twos complement value. */
19041         uint64_t fdltfom_hi_lmt        : 8;  /**< [ 58: 51](R/W) BASE-R training sets the Delta Filtered FOM upper limit for training convergence.
19042                                                                  Value is a signed twos complement value. */
19043         uint64_t pat_match_en          : 1;  /**< [ 59: 59](R/W) BASE-R training controls the receiver adaptation algorithm when [PAT_MATCH_EN] is set to
19044                                                                  one
19045                                                                  the training convergence pattern matching logic is enabled.  The training pattern matching
19046                                                                  logic tracks the link partner transmitter tap moves and sets a flag when the pattern
19047                                                                  is found to be repeating in the taps moves tracking array.  This is used to help
19048                                                                  converge training adaptation.  When [PAT_MATCH_EN] is cleared to zero the pattern matching
19049                                                                  logic is disabled and not used to detect training convergence.
19050 
19051                                                                  The GSERN()_LANE()_TRAIN_5_BCFG[PAT_MATCH_EN] field is used in conjunction with the
19052                                                                  GSERN()_LANE()_TRAIN_5_BCFG[PAT_EXIT_CNT] field to control the training convergence
19053                                                                  pattern matching logic during BASE-R training. */
19054         uint64_t pat_exit_cnt          : 4;  /**< [ 63: 60](R/W) BASE-R training controls the receiver adaptation algorithm training convergence
19055                                                                  pattern matching logic.  As BASE-R training progresses the Pre/Main/Post tap
19056                                                                  direction change coefficient updates to the link partner start to dither around the
19057                                                                  optimal tap values.  The pattern matching logic looks for repeating patterns of
19058                                                                  the tap dithering around the optimal value and is used as one metric to determine
19059                                                                  that BASE-R training has converged and local device can signal receiver ready.
19060 
19061                                                                  The [PAT_EXIT_CNT] variable sets the maximum length of the repeating pattern to search
19062                                                                  for in the pattern matching array.  The pattern matching array has twelve elements
19063                                                                  therefore the maximum value of [PAT_EXIT_CNT] is 0xC.  A value of 0x6 has been
19064                                                                  found to be optimal for recognizing training tap convergence.
19065 
19066                                                                  The GSERN()_LANE()_TRAIN_5_BCFG[PAT_EXIT_CNT] field is used in conjunction with the
19067                                                                  GSERN()_LANE()_TRAIN_5_BCFG[PAT_MATCH_EN] field to control the training convergence
19068                                                                  pattern matching logic during BASE-R training. */
19069 #endif /* Word 0 - End */
19070     } s;
19071     /* struct bdk_gsernx_lanex_train_5_bcfg_s cn; */
19072 };
19073 typedef union bdk_gsernx_lanex_train_5_bcfg bdk_gsernx_lanex_train_5_bcfg_t;
19074 
19075 static inline uint64_t BDK_GSERNX_LANEX_TRAIN_5_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_TRAIN_5_BCFG(unsigned long a,unsigned long b)19076 static inline uint64_t BDK_GSERNX_LANEX_TRAIN_5_BCFG(unsigned long a, unsigned long b)
19077 {
19078     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
19079         return 0x87e090003200ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
19080     __bdk_csr_fatal("GSERNX_LANEX_TRAIN_5_BCFG", 2, a, b, 0, 0);
19081 }
19082 
19083 #define typedef_BDK_GSERNX_LANEX_TRAIN_5_BCFG(a,b) bdk_gsernx_lanex_train_5_bcfg_t
19084 #define bustype_BDK_GSERNX_LANEX_TRAIN_5_BCFG(a,b) BDK_CSR_TYPE_RSL
19085 #define basename_BDK_GSERNX_LANEX_TRAIN_5_BCFG(a,b) "GSERNX_LANEX_TRAIN_5_BCFG"
19086 #define device_bar_BDK_GSERNX_LANEX_TRAIN_5_BCFG(a,b) 0x0 /* PF_BAR0 */
19087 #define busnum_BDK_GSERNX_LANEX_TRAIN_5_BCFG(a,b) (a)
19088 #define arguments_BDK_GSERNX_LANEX_TRAIN_5_BCFG(a,b) (a),(b),-1,-1
19089 
19090 /**
19091  * Register (RSL) gsern#_lane#_train_6_bcfg
19092  *
19093  * GSER Lane Training Base Configuration Register 6
19094  * This register controls settings for lane training.
19095  */
19096 union bdk_gsernx_lanex_train_6_bcfg
19097 {
19098     uint64_t u;
19099     struct bdk_gsernx_lanex_train_6_bcfg_s
19100     {
19101 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
19102         uint64_t frame_err             : 1;  /**< [ 63: 63](RO/H) Framing error. When set to a one and the
19103                                                                  GSERN()_LANE()_TRAIN_6_BCFG[EN_FRMOFFS_CHK] bit is set
19104                                                                  to a one and the training state machine has completed the framing
19105                                                                  alignment check indicates that the DOUTE and DOUTQ pipes could
19106                                                                  not be aligned to produce error free eye monitor data.
19107                                                                  For diagnostic use only. */
19108         uint64_t no_shft_path_gd       : 1;  /**< [ 62: 62](RO/H) The non-shifted error path completed the framing test without errors.
19109                                                                  Valid when the GSERN()_LANE()_TRAIN_6_BCFG[EN_FRMOFFS_CHK] bit is set
19110                                                                  to a one and the training state machine has completed the framing
19111                                                                  alignment check.
19112                                                                  For diagnostic use only. */
19113         uint64_t shft_path_gd          : 1;  /**< [ 61: 61](RO/H) The shifted error path completed the framing test without errors.
19114                                                                  Valid when the GSERN()_LANE()_TRAIN_6_BCFG[EN_FRMOFFS_CHK] bit is set
19115                                                                  to a one and the training state machine has completed the framing
19116                                                                  alignment check.
19117                                                                  For diagnostic use only. */
19118         uint64_t en_frmoffs_chk        : 1;  /**< [ 60: 60](R/W) Enable framing offset check. When [EN_FRMOFFS_CHK] is set to a one the training
19119                                                                  eye monitor state machine checks if framing offset is needed between the receiver
19120                                                                  DOUTQ and DOUTE pipes.  The framing offset check is performed when BASE-R or PCIe
19121                                                                  Gen3 training is first enabled.
19122                                                                  The GSERN()_LANE()_TRAIN_6_BCFG[SHFT_PATH_GD] or
19123                                                                  GSERN()_LANE()_TRAIN_6_BCFG[NO_SHFT_PATH_GD] flag will be set to indicate which
19124                                                                  framing offset was required.  If no framing offset can be found to that produces
19125                                                                  an error free eye measurement then the GSERN()_LANE()_TRAIN_6_BCFG[FRAME_ERR] flag will
19126                                                                  be set.
19127                                                                  For diagnostic use only. */
19128         uint64_t en_rxwt_ctr           : 1;  /**< [ 59: 59](R/W) Enable receiver adaptation wait timer. When [EN_RXWT_CTR] is set to a one the
19129                                                                  training state machine eye monitor measurement to measure the figure of merit
19130                                                                  (FOM) is delayed by 10 microseconds to allow the receiver equalizer to adjust
19131                                                                  to the link partner TX equalizer tap adjustments (BASE-R training and PCIe
19132                                                                  training) during link training.
19133                                                                  For diagnostic use only. */
19134         uint64_t en_teoffs             : 1;  /**< [ 58: 58](R/W) Enable E-path QAC time offset adjustment.  This is a diagnostic control used
19135                                                                  to adjust the QAC E-path time offset.  Typically the E-path QAC time offset is
19136                                                                  set to 0.5UI.  Setting [EN_TEOFFS] to a one enables the training state machine
19137                                                                  to adjust the E-path QAC time offset by the value specified in
19138                                                                  GSERN()_LANE()_TRAIN_6_BCFG[PRG_TEOFFS].
19139                                                                  For diagnostic use only. */
19140         uint64_t prg_teoffs            : 6;  /**< [ 57: 52](R/W) Programmable E-path QAC time offset. This is a diagnostic control used to set the
19141                                                                  eye monitor Epath QAC offset.  Use to trim the qac_eoffs offset during eye
19142                                                                  monitor usage when used in BASE-R and PCIE training to measure the RX eye figure of
19143                                                                  merit (FOM).  Typically set to the middle of the eye, e.g. 0.5UI.
19144 
19145                                                                  _ Target_eoffs = [PRG_TEOFFS] + (GSERN()_LANE()_RX_QAC_BSTS[QAC_EOFFS]
19146                                                                                 - GSERN()_LANE()_TRAIN_6_BCFG[PRG_TDELTA]).
19147                                                                  _ [PRG_TEOFFS] = round(0.5UI/(1/63UI) = 6'h20.
19148 
19149                                                                  typically but other values can be set for testing purposes.
19150                                                                  For diagnostic use only.
19151 
19152                                                                  Internal:
19153                                                                  FIXME no such field GSERN()_LANE()_TRAIN_6_BCFG[PRG_TDELTA], then remove above exempt attribute. */
19154         uint64_t trn_tst_pat           : 2;  /**< [ 51: 50](R/W) Training test pattern. This is a diagnostic control used to send a sequence
19155                                                                  of predetermined cost values to the BASE-R training logic to mimic training of a
19156                                                                  predetermined channel between the local device and link partner.  This is to
19157                                                                  facilitate BASE-R testing between channels in a manufacturing test environment.
19158                                                                  When training starts the predetermined set of cost values (raw figure of merit)
19159                                                                  values will be provided to the BASE-R receiver and used to steer the training
19160                                                                  logic and tap convergence logic.
19161 
19162                                                                  Used only when GSERN()_LANE()_TRAIN_6_BCFG[TRN_TST_PATEN] is set to one.
19163                                                                  For diagnostic use only.
19164 
19165                                                                     0x0 = Test training pattern with cost cache disabled 32 dB channel.
19166                                                                     0x1 = Test training pattern with cost cache enabled 32 dB channel.
19167                                                                     0x2 = Test training pattern with cost cache disabled 32 dB channel.
19168                                                                     0x3 = Test training pattern with cost cache enabled 8 dB channel. */
19169         uint64_t trn_tst_paten         : 1;  /**< [ 49: 49](R/W) Training test pattern enable. This is a diagnostic control used to send a sequence
19170                                                                  of predetermined cost values to the BASE-R training logic to mimic training of a
19171                                                                  predetermined channel between the local device and link partner.  This is to
19172                                                                  facilitate BASE-R testing between channels in a manufacturing test environment.
19173                                                                  Used in conjunction with GSERN()_LANE()_TRAIN_6_BCFG[TRN_TST_PAT].
19174                                                                  For diagnostic use only. */
19175         uint64_t sav_cost_cache        : 1;  /**< [ 48: 48](R/W) Save cost cache contents when BASE-R training is completed.  This is a diagnostic
19176                                                                  control used to preserve the cost cache contents after training is complete.
19177                                                                  When [SAV_COST_CACHE] is set to one the cost cache is not automatically clear at the
19178                                                                  completion of BASE-R training. When [SAV_COST_CACHE] is cleared to zero the cost
19179                                                                  cached is cleared when training is complete so that the BASE-R training logic can
19180                                                                  process a new request for BASE-R training in cases where training is restarted.
19181                                                                  Used when GSERN()_LANE()_TRAIN_6_BCFG[COST_CACHE_EN] is set to one.
19182                                                                  For diagnostic use only. */
19183         uint64_t ccache_hits_min       : 5;  /**< [ 47: 43](R/W) Cost cache hits minimum.  When BASE-R training is using the cost average cache to
19184                                                                  improve the gradient estimation process to get more accurate tap moves during the
19185                                                                  final stages of training convergence [CCACHE_HITS_MIN] sets the minimum number of
19186                                                                  cache hits that must be accumulate before the cost cache will be used.
19187                                                                  Used when GSERN()_LANE()_TRAIN_6_BCFG[COST_CACHE_EN] is set to one.
19188                                                                  For diagnostic use only. */
19189         uint64_t cost_cache_en         : 1;  /**< [ 42: 42](R/W) Cost cache enable. When set BASE-R training will use the cost average cache to
19190                                                                  improve the gradient estimation process to get more accurate tap moves during
19191                                                                  the final stages of training convergence. For diagnostic use only. */
19192         uint64_t dffom_exit_en         : 1;  /**< [ 41: 41](R/W) Delta Filtered FOM Exit Enable.  When set to one BASE-R training will conclude and local
19193                                                                  device will signal ready if the Delta Filtered FOM is within the high and low limits
19194                                                                  specified in the GSERN()_LANE()_TRAIN_5_BCFG[FDLTFOM_HI_LMT] and
19195                                                                  GSERN()_LANE()_TRAIN_5_BCFG[FDLTFOM_LO_LMT] for the number of tap move iterations
19196                                                                  specified in the GSERN()_LANE()_TRAIN_6_BCFG[DELTA_FFOM_CCNT] field.
19197                                                                  For diagnostic use only. */
19198         uint64_t delta_ffom_ccnt       : 5;  /**< [ 40: 36](R/W) Delta Filtered FOM Convergence Count.  Used during BASE-R training to specify the
19199                                                                  number of successive iterations required for the Delta Filtered FOM to be within
19200                                                                  the high and low limits specified in the GSERN()_LANE()_TRAIN_5_BCFG[FDLTFOM_HI_LMT] and
19201                                                                  GSERN()_LANE()_TRAIN_5_BCFG[FDLTFOM_LO_LMT] to signal that BASE-R training is converged
19202                                                                  on the Local Device receiver.
19203 
19204                                                                  Used when GSERN()_LANE()_TRAIN_6_BCFG[DFFOM_EXIT_EN] is set to a one.
19205 
19206                                                                  For diagnostic use only. */
19207         uint64_t exit_loc_main         : 8;  /**< [ 35: 28](RO/H) Training Exit Location Main tap value.  Holds the exit location of the LP Main tap
19208                                                                  at the completion of BASE-R training when training completes.
19209                                                                  Number represented in offset binary notation.
19210                                                                  For diagnostic use only. */
19211         uint64_t exit_loc_post         : 8;  /**< [ 27: 20](RO/H) Training Exit Location Post tap value.  Holds the exit location of the LP Post tap
19212                                                                  at the completion of BASE-R training completes.
19213                                                                  Number represented in offset binary notation.
19214                                                                  For diagnostic use only. */
19215         uint64_t exit_loc_pre          : 8;  /**< [ 19: 12](RO/H) Training Exit Location Pre tap value.  Holds the exit location of the LP Pre tap
19216                                                                  at the completion of BASE-R training completes.
19217                                                                  Number represented in offset binary notation.
19218                                                                  For diagnostic use only. */
19219         uint64_t exit_fom_val          : 12; /**< [ 11:  0](RO/H) Pattern match logic exit value. Holds the Figure of merit (FOM) at the completion of
19220                                                                  BASE-R
19221                                                                  training when training is converged using the pattern matching logic.
19222                                                                  For diagnostic use only. */
19223 #else /* Word 0 - Little Endian */
19224         uint64_t exit_fom_val          : 12; /**< [ 11:  0](RO/H) Pattern match logic exit value. Holds the Figure of merit (FOM) at the completion of
19225                                                                  BASE-R
19226                                                                  training when training is converged using the pattern matching logic.
19227                                                                  For diagnostic use only. */
19228         uint64_t exit_loc_pre          : 8;  /**< [ 19: 12](RO/H) Training Exit Location Pre tap value.  Holds the exit location of the LP Pre tap
19229                                                                  at the completion of BASE-R training completes.
19230                                                                  Number represented in offset binary notation.
19231                                                                  For diagnostic use only. */
19232         uint64_t exit_loc_post         : 8;  /**< [ 27: 20](RO/H) Training Exit Location Post tap value.  Holds the exit location of the LP Post tap
19233                                                                  at the completion of BASE-R training completes.
19234                                                                  Number represented in offset binary notation.
19235                                                                  For diagnostic use only. */
19236         uint64_t exit_loc_main         : 8;  /**< [ 35: 28](RO/H) Training Exit Location Main tap value.  Holds the exit location of the LP Main tap
19237                                                                  at the completion of BASE-R training when training completes.
19238                                                                  Number represented in offset binary notation.
19239                                                                  For diagnostic use only. */
19240         uint64_t delta_ffom_ccnt       : 5;  /**< [ 40: 36](R/W) Delta Filtered FOM Convergence Count.  Used during BASE-R training to specify the
19241                                                                  number of successive iterations required for the Delta Filtered FOM to be within
19242                                                                  the high and low limits specified in the GSERN()_LANE()_TRAIN_5_BCFG[FDLTFOM_HI_LMT] and
19243                                                                  GSERN()_LANE()_TRAIN_5_BCFG[FDLTFOM_LO_LMT] to signal that BASE-R training is converged
19244                                                                  on the Local Device receiver.
19245 
19246                                                                  Used when GSERN()_LANE()_TRAIN_6_BCFG[DFFOM_EXIT_EN] is set to a one.
19247 
19248                                                                  For diagnostic use only. */
19249         uint64_t dffom_exit_en         : 1;  /**< [ 41: 41](R/W) Delta Filtered FOM Exit Enable.  When set to one BASE-R training will conclude and local
19250                                                                  device will signal ready if the Delta Filtered FOM is within the high and low limits
19251                                                                  specified in the GSERN()_LANE()_TRAIN_5_BCFG[FDLTFOM_HI_LMT] and
19252                                                                  GSERN()_LANE()_TRAIN_5_BCFG[FDLTFOM_LO_LMT] for the number of tap move iterations
19253                                                                  specified in the GSERN()_LANE()_TRAIN_6_BCFG[DELTA_FFOM_CCNT] field.
19254                                                                  For diagnostic use only. */
19255         uint64_t cost_cache_en         : 1;  /**< [ 42: 42](R/W) Cost cache enable. When set BASE-R training will use the cost average cache to
19256                                                                  improve the gradient estimation process to get more accurate tap moves during
19257                                                                  the final stages of training convergence. For diagnostic use only. */
19258         uint64_t ccache_hits_min       : 5;  /**< [ 47: 43](R/W) Cost cache hits minimum.  When BASE-R training is using the cost average cache to
19259                                                                  improve the gradient estimation process to get more accurate tap moves during the
19260                                                                  final stages of training convergence [CCACHE_HITS_MIN] sets the minimum number of
19261                                                                  cache hits that must be accumulate before the cost cache will be used.
19262                                                                  Used when GSERN()_LANE()_TRAIN_6_BCFG[COST_CACHE_EN] is set to one.
19263                                                                  For diagnostic use only. */
19264         uint64_t sav_cost_cache        : 1;  /**< [ 48: 48](R/W) Save cost cache contents when BASE-R training is completed.  This is a diagnostic
19265                                                                  control used to preserve the cost cache contents after training is complete.
19266                                                                  When [SAV_COST_CACHE] is set to one the cost cache is not automatically clear at the
19267                                                                  completion of BASE-R training. When [SAV_COST_CACHE] is cleared to zero the cost
19268                                                                  cached is cleared when training is complete so that the BASE-R training logic can
19269                                                                  process a new request for BASE-R training in cases where training is restarted.
19270                                                                  Used when GSERN()_LANE()_TRAIN_6_BCFG[COST_CACHE_EN] is set to one.
19271                                                                  For diagnostic use only. */
19272         uint64_t trn_tst_paten         : 1;  /**< [ 49: 49](R/W) Training test pattern enable. This is a diagnostic control used to send a sequence
19273                                                                  of predetermined cost values to the BASE-R training logic to mimic training of a
19274                                                                  predetermined channel between the local device and link partner.  This is to
19275                                                                  facilitate BASE-R testing between channels in a manufacturing test environment.
19276                                                                  Used in conjunction with GSERN()_LANE()_TRAIN_6_BCFG[TRN_TST_PAT].
19277                                                                  For diagnostic use only. */
19278         uint64_t trn_tst_pat           : 2;  /**< [ 51: 50](R/W) Training test pattern. This is a diagnostic control used to send a sequence
19279                                                                  of predetermined cost values to the BASE-R training logic to mimic training of a
19280                                                                  predetermined channel between the local device and link partner.  This is to
19281                                                                  facilitate BASE-R testing between channels in a manufacturing test environment.
19282                                                                  When training starts the predetermined set of cost values (raw figure of merit)
19283                                                                  values will be provided to the BASE-R receiver and used to steer the training
19284                                                                  logic and tap convergence logic.
19285 
19286                                                                  Used only when GSERN()_LANE()_TRAIN_6_BCFG[TRN_TST_PATEN] is set to one.
19287                                                                  For diagnostic use only.
19288 
19289                                                                     0x0 = Test training pattern with cost cache disabled 32 dB channel.
19290                                                                     0x1 = Test training pattern with cost cache enabled 32 dB channel.
19291                                                                     0x2 = Test training pattern with cost cache disabled 32 dB channel.
19292                                                                     0x3 = Test training pattern with cost cache enabled 8 dB channel. */
19293         uint64_t prg_teoffs            : 6;  /**< [ 57: 52](R/W) Programmable E-path QAC time offset. This is a diagnostic control used to set the
19294                                                                  eye monitor Epath QAC offset.  Use to trim the qac_eoffs offset during eye
19295                                                                  monitor usage when used in BASE-R and PCIE training to measure the RX eye figure of
19296                                                                  merit (FOM).  Typically set to the middle of the eye, e.g. 0.5UI.
19297 
19298                                                                  _ Target_eoffs = [PRG_TEOFFS] + (GSERN()_LANE()_RX_QAC_BSTS[QAC_EOFFS]
19299                                                                                 - GSERN()_LANE()_TRAIN_6_BCFG[PRG_TDELTA]).
19300                                                                  _ [PRG_TEOFFS] = round(0.5UI/(1/63UI) = 6'h20.
19301 
19302                                                                  typically but other values can be set for testing purposes.
19303                                                                  For diagnostic use only.
19304 
19305                                                                  Internal:
19306                                                                  FIXME no such field GSERN()_LANE()_TRAIN_6_BCFG[PRG_TDELTA], then remove above exempt attribute. */
19307         uint64_t en_teoffs             : 1;  /**< [ 58: 58](R/W) Enable E-path QAC time offset adjustment.  This is a diagnostic control used
19308                                                                  to adjust the QAC E-path time offset.  Typically the E-path QAC time offset is
19309                                                                  set to 0.5UI.  Setting [EN_TEOFFS] to a one enables the training state machine
19310                                                                  to adjust the E-path QAC time offset by the value specified in
19311                                                                  GSERN()_LANE()_TRAIN_6_BCFG[PRG_TEOFFS].
19312                                                                  For diagnostic use only. */
19313         uint64_t en_rxwt_ctr           : 1;  /**< [ 59: 59](R/W) Enable receiver adaptation wait timer. When [EN_RXWT_CTR] is set to a one the
19314                                                                  training state machine eye monitor measurement to measure the figure of merit
19315                                                                  (FOM) is delayed by 10 microseconds to allow the receiver equalizer to adjust
19316                                                                  to the link partner TX equalizer tap adjustments (BASE-R training and PCIe
19317                                                                  training) during link training.
19318                                                                  For diagnostic use only. */
19319         uint64_t en_frmoffs_chk        : 1;  /**< [ 60: 60](R/W) Enable framing offset check. When [EN_FRMOFFS_CHK] is set to a one the training
19320                                                                  eye monitor state machine checks if framing offset is needed between the receiver
19321                                                                  DOUTQ and DOUTE pipes.  The framing offset check is performed when BASE-R or PCIe
19322                                                                  Gen3 training is first enabled.
19323                                                                  The GSERN()_LANE()_TRAIN_6_BCFG[SHFT_PATH_GD] or
19324                                                                  GSERN()_LANE()_TRAIN_6_BCFG[NO_SHFT_PATH_GD] flag will be set to indicate which
19325                                                                  framing offset was required.  If no framing offset can be found to that produces
19326                                                                  an error free eye measurement then the GSERN()_LANE()_TRAIN_6_BCFG[FRAME_ERR] flag will
19327                                                                  be set.
19328                                                                  For diagnostic use only. */
19329         uint64_t shft_path_gd          : 1;  /**< [ 61: 61](RO/H) The shifted error path completed the framing test without errors.
19330                                                                  Valid when the GSERN()_LANE()_TRAIN_6_BCFG[EN_FRMOFFS_CHK] bit is set
19331                                                                  to a one and the training state machine has completed the framing
19332                                                                  alignment check.
19333                                                                  For diagnostic use only. */
19334         uint64_t no_shft_path_gd       : 1;  /**< [ 62: 62](RO/H) The non-shifted error path completed the framing test without errors.
19335                                                                  Valid when the GSERN()_LANE()_TRAIN_6_BCFG[EN_FRMOFFS_CHK] bit is set
19336                                                                  to a one and the training state machine has completed the framing
19337                                                                  alignment check.
19338                                                                  For diagnostic use only. */
19339         uint64_t frame_err             : 1;  /**< [ 63: 63](RO/H) Framing error. When set to a one and the
19340                                                                  GSERN()_LANE()_TRAIN_6_BCFG[EN_FRMOFFS_CHK] bit is set
19341                                                                  to a one and the training state machine has completed the framing
19342                                                                  alignment check indicates that the DOUTE and DOUTQ pipes could
19343                                                                  not be aligned to produce error free eye monitor data.
19344                                                                  For diagnostic use only. */
19345 #endif /* Word 0 - End */
19346     } s;
19347     /* struct bdk_gsernx_lanex_train_6_bcfg_s cn; */
19348 };
19349 typedef union bdk_gsernx_lanex_train_6_bcfg bdk_gsernx_lanex_train_6_bcfg_t;
19350 
19351 static inline uint64_t BDK_GSERNX_LANEX_TRAIN_6_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_TRAIN_6_BCFG(unsigned long a,unsigned long b)19352 static inline uint64_t BDK_GSERNX_LANEX_TRAIN_6_BCFG(unsigned long a, unsigned long b)
19353 {
19354     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
19355         return 0x87e090003210ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
19356     __bdk_csr_fatal("GSERNX_LANEX_TRAIN_6_BCFG", 2, a, b, 0, 0);
19357 }
19358 
19359 #define typedef_BDK_GSERNX_LANEX_TRAIN_6_BCFG(a,b) bdk_gsernx_lanex_train_6_bcfg_t
19360 #define bustype_BDK_GSERNX_LANEX_TRAIN_6_BCFG(a,b) BDK_CSR_TYPE_RSL
19361 #define basename_BDK_GSERNX_LANEX_TRAIN_6_BCFG(a,b) "GSERNX_LANEX_TRAIN_6_BCFG"
19362 #define device_bar_BDK_GSERNX_LANEX_TRAIN_6_BCFG(a,b) 0x0 /* PF_BAR0 */
19363 #define busnum_BDK_GSERNX_LANEX_TRAIN_6_BCFG(a,b) (a)
19364 #define arguments_BDK_GSERNX_LANEX_TRAIN_6_BCFG(a,b) (a),(b),-1,-1
19365 
19366 /**
19367  * Register (RSL) gsern#_lane#_train_7_bcfg
19368  *
19369  * GSER Lane Training Base Configuration Register 7
19370  * This register controls settings for lane training.
19371  */
19372 union bdk_gsernx_lanex_train_7_bcfg
19373 {
19374     uint64_t u;
19375     struct bdk_gsernx_lanex_train_7_bcfg_s
19376     {
19377 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
19378         uint64_t pcie_fasteq_val       : 5;  /**< [ 63: 59](R/W) Reserved.
19379                                                                  Internal:
19380                                                                  PCIe fast equalization delay value for simulation.
19381                                                                  Used in conjunction with GSERN()_LANE()_TRAIN_7_BCFG[PCIE_FASTEQ]
19382                                                                  When testing PCIe Gen3/Gen4 equalization in simulation.
19383                                                                  The default value of 0x6 programs the PCIe equalization FOM and
19384                                                                  link evaluation direction change request acknowledgement handshake
19385                                                                  to 1.6 microseconds to accelerate simulation modeling of the PCIe
19386                                                                  Gen3/Gen4 equalization phases 2 and 3. .
19387                                                                  For simulation use only. */
19388         uint64_t pcie_fasteq           : 1;  /**< [ 58: 58](R/W) Reserved.
19389                                                                  Internal:
19390                                                                  PCIe fast equalization mode for simulation.
19391                                                                  When testing PCIe Gen3/Gen4 equalization in simulation setting [PCIE_FASTEQ]
19392                                                                  to 1 will reduce the PCIe equalization response to 1.6 microseconds.
19393                                                                  Can be used in conjunction with GSERN()_LANE()_TRAIN_7_BCFG[PCIE_TST_FOM_EN].
19394                                                                  If the GSERN()_LANE()_TRAIN_7_BCFG[PCIE_TST_FOM_EN] is not used the raw FOM
19395                                                                  value returned will be zero.  Further the [PCIE_FASTEQ] is set the link evaluation
19396                                                                  feedback direction change for C(-1), C(0), and C(+1) will indicate no change.
19397                                                                  For simulation use only. */
19398         uint64_t pcie_dir_eq_done      : 1;  /**< [ 57: 57](RO/H) PCIe direction change equalization done flag. During PCIe Gen3/Gen4
19399                                                                  direction change equalization reflects the state of the direction
19400                                                                  equalization done flag.  When set to 1 indicates that the current
19401                                                                  direction change equalization tap adjustment sequence is complete.
19402                                                                  Reset automatically by hardware when PCIe Gen3/Gen4 equalization is
19403                                                                  completed. */
19404         uint64_t pcie_term_adtmout     : 1;  /**< [ 56: 56](R/W) PCIe terminate direction change feedback equalization when reached the
19405                                                                  the equalization timeout specified in
19406                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_ADTMOUT_SEL].
19407                                                                  During PCIe Gen3/Gen4 equalization direction change
19408                                                                  feedback mode the equalization timeout period is controlled by
19409                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_ADTMOUT_SEL] and
19410                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_ADTMOUT_FAST].
19411                                                                  When [PCIE_TERM_ADTMOUT] sets when the equalization timeout timer expires
19412                                                                  the equalization logic will signal equalization complete on the next
19413                                                                  equalization request from the PCIe controller.
19414                                                                  The training logic will signal equalization complete by returning
19415                                                                  C(-1) TAP direction change set to No Change and C(+1) TAP direction change
19416                                                                  also set to No Change.  This will signal the termination of
19417                                                                  PCIe Gen3/Gen4 equalization direction change feedback mode. */
19418         uint64_t pcie_adtmout_fast     : 1;  /**< [ 55: 55](R/W) Reserved.
19419                                                                  Internal:
19420                                                                  For simulation use only. When set accelerates the PCIe Gen3/Gen4 direction change
19421                                                                  feedback equalization timeout timer period.  When set shortens the direction change
19422                                                                  equalization time-out timer.
19423                                                                  See the description for
19424                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_ADTMOUT_SEL].
19425                                                                  For diagnostic use only. */
19426         uint64_t pcie_adtmout_disable  : 1;  /**< [ 54: 54](R/W) PCIe Gen3/Gen4 direction change feedback equalization timeout timer disable.
19427                                                                  When [PCIE_ADTMOUT_DISABLE] is set to 1 the timeout timer that runs during
19428                                                                  PCIe Gen3/Gen4 direction change feecback equalization is disabled.  When
19429                                                                  [PCIE_ADTMOUT_DISABLE] is cleared to 0 the equalization timeout timer is enabled.
19430                                                                  The equalization timeout period is controlled by
19431                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_ADTMOUT_SEL] and
19432                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_ADTMOUT_FAST].
19433                                                                  For diagnostic use only. */
19434         uint64_t pcie_adtmout_sel      : 2;  /**< [ 53: 52](R/W) Selects the timeout value for the PCIe Gen3/Gen4 direction change feedback equalization.
19435                                                                  This time-out timer value is only valid if
19436                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_ADTMOUT_DISABLE]
19437                                                                  is cleared to 0.
19438 
19439                                                                  When GSERN()_LANE()_TRAIN_7_BCFG[PCIE_ADTMOUT_FAST] is cleared to 0 the link training
19440                                                                  time-out timer value is set by [PCIE_ADTMOUT_SEL] to the values shown.
19441                                                                  0x0 = 5.24  milliseconds.
19442                                                                  0x1 = 10.49 milliseconds.
19443                                                                  0x2 = 13.1  milliseconds.
19444                                                                  0x3 = 15.73 milliseconds.
19445 
19446                                                                  When GSERN()_LANE()_TRAIN_7_BCFG[PCIE_ADTMOUT_FAST] is set to 1 the link training
19447                                                                  time-out timer value is set by [PCIE_ADTMOUT_SEL] to the values shown.
19448                                                                  0x0 = 81.92  microseconds.
19449                                                                  0x1 = 163.84 microseconds.
19450                                                                  0x2 = 327.68 microseconds.
19451                                                                  0x3 = 655.36 microseconds. */
19452         uint64_t pcie_term_max_mvs     : 1;  /**< [ 51: 51](R/W) PCIe terminate direction change feedback equalization when reached the
19453                                                                  the maximum number of tap moves specified in
19454                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_MAX_MOVES].
19455                                                                  During PCIe Gen3/Gen4 equalization direction change
19456                                                                  feedback mode [PCIE_MAX_MOVES] sets the maximum number of tap moves to make
19457                                                                  before signaling equalization complete. When [PCIE_TERM_MAX_MVS] is set
19458                                                                  to 1 the training logic will signal equalization complete by returning
19459                                                                  C(-1) TAP direction change set to No Change and C(+1) TAP direction change
19460                                                                  also set to No Change.  This will signal the termination of
19461                                                                  PCIe Gen3/Gen4 equalization direction change feedback mode. */
19462         uint64_t pcie_term_min_mvs     : 1;  /**< [ 50: 50](R/W) PCIe terminate direction change feedback equalization when exceeded the
19463                                                                  the minimum number of tap moves specified in
19464                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_MIN_MOVES].
19465                                                                  During PCIe Gen3/Gen4 equalization direction change
19466                                                                  feedback mode [PCIE_MIN_MOVES] sets the minimum number of tap moves to make
19467                                                                  before signaling equalization complete. When [PCIE_TERM_MIN_MVS] is set
19468                                                                  to 1 the training logic will signal equalization complete by returning
19469                                                                  C(-1) TAP direction change set to No Change and C(+1) TAP direction change
19470                                                                  also set to No Change.  This will signal the termination of
19471                                                                  PCIe Gen3/Gen4 equalization direction change feedback mode. */
19472         uint64_t pcie_max_moves        : 8;  /**< [ 49: 42](R/W) PCIe maximum tap moves. During PCIe Gen3/Gen4 equalization direction change
19473                                                                  feedback mode [PCIE_MIN_MOVES] sets the maximum number of tap moves to make
19474                                                                  before signaling equalization complete. */
19475         uint64_t pcie_min_moves        : 8;  /**< [ 41: 34](R/W) PCIe minimum tap moves. During PCIe Gen3/Gen4 equalization direction change
19476                                                                  feedback mode [PCIE_MIN_MOVES] sets the minimum number of tap moves to make
19477                                                                  before signaling equalization complete. */
19478         uint64_t pcie_rev_dir_hints    : 1;  /**< [ 33: 33](R/W) When set, reverses the direction of the
19479                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_POST_DIR],
19480                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_MAIN_DIR], and
19481                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_PRE_DIR]
19482                                                                  Tx tap direction feedback hints. For diagnostic use only. */
19483         uint64_t pcie_inv_post_dir     : 1;  /**< [ 32: 32](R/W) PCIe direction change equalization invert post tap direction.
19484                                                                  When set reverses the Increment/Decrement direction
19485                                                                  of the GSERN()_LANE()_TRAIN_7_BCFG[PCIE_POST_DIR]
19486                                                                  Tx tap direction feedback.  For diagnostic use only. */
19487         uint64_t pcie_inv_main_dir     : 1;  /**< [ 31: 31](R/W) PCIe direction change equalization invert main tap direction.
19488                                                                  When set reverses the Increment/Decrement direction
19489                                                                  of the GSERN()_LANE()_TRAIN_7_BCFG[PCIE_MAIN_DIR]
19490                                                                  Tx tap direction feedback.  For diagnostic use only. */
19491         uint64_t pcie_inv_pre_dir      : 1;  /**< [ 30: 30](R/W) PCIe direction change equalization invert pre tap direction.
19492                                                                  When set reverses the Increment/Decrement direction
19493                                                                  of the GSERN()_LANE()_TRAIN_7_BCFG[PCIE_PRE_DIR]
19494                                                                  Tx tap direction feedback.  For diagnostic use only. */
19495         uint64_t pcie_post_dir         : 2;  /**< [ 29: 28](RO/H) PCIe direction change equalization post (C+1) tap direction.
19496                                                                  During PCIe Gen3/Gen4 link training using direction change equalization
19497                                                                  the [PCIE_POST_DIR] field reflects the value of the post (C+1) tap
19498                                                                  direction for the link evaluation direction feedback.
19499                                                                      0x0 = No change.
19500                                                                      0x1 = Increment feedback for each coefficient.
19501                                                                      0x2 = Decrement feedback for each coefficient.
19502                                                                      0x3 = Reserved. */
19503         uint64_t pcie_main_dir         : 2;  /**< [ 27: 26](RO/H) PCIe direction change equalization main (C0) tap direction.
19504                                                                  During PCIe Gen3/Gen4 link training using direction change equalization
19505                                                                  the [PCIE_MAIN_DIR] field reflects the value of the main (C0) tap
19506                                                                  direction for the link evaluation direction feedback.
19507                                                                      0x0 = No change.
19508                                                                      0x1 = Increment feedback for each coefficient.
19509                                                                      0x2 = Decrement feedback for each coefficient.
19510                                                                      0x3 = Reserved.
19511 
19512                                                                  The main direction will always be 0x0 no change. The PCIe
19513                                                                  MAC computes the Main (C0) tap direction change. */
19514         uint64_t pcie_pre_dir          : 2;  /**< [ 25: 24](RO/H) PCIe direction change equalization pre (C-1) tap direction.
19515                                                                  During PCIe Gen3/Gen4 link training using direction change equalization
19516                                                                  the [PCIE_PRE_DIR] field reflects the value of the pre (C-1) tap
19517                                                                  direction for the link evaluation direction feedback.
19518                                                                      0x0 = No change.
19519                                                                      0x1 = Increment feedback for each coefficient.
19520                                                                      0x2 = Decrement feedback for each coefficient.
19521                                                                      0x3 = Reserved. */
19522         uint64_t pcie_tst_array_rdy    : 1;  /**< [ 23: 23](RO/H) PCIe test FOM array ready. For verification diagnostic use only.
19523                                                                  See [PCIE_TST_FOM_VAL].
19524 
19525                                                                  Internal:
19526                                                                  PCIe test FOM array ready.  For verification diagnostic use only.
19527                                                                  All entries of the PCIe test FOM array are cleared following release
19528                                                                  of reset.  When [PCIE_TST_ARRAY_RDY] is set to 1 the PCIe test FOM
19529                                                                  array is ready and can be used for PCIe training testing.  Do not
19530                                                                  read or write the PCIe test FOM array while [PCIE_TST_ARRAY_RDY] is
19531                                                                  cleared to 0.  When the GSER QLM is released from reset the
19532                                                                  [PCIE_TST_ARRAY_RDY] will transition from 0 to 1 after 128 service
19533                                                                  clock cycles. */
19534         uint64_t pcie_tst_fom_mode     : 1;  /**< [ 22: 22](R/W) PCIe test FOM array mode. For verification diagnostic use only.
19535                                                                  See [PCIE_TST_FOM_VAL].
19536 
19537                                                                  Internal:
19538                                                                  PCIe test FOM array mode.  For verification diagnostic use only.
19539                                                                      0x0 = Test FOM array is used to load and play back test FOMs for PCIe link
19540                                                                            training.
19541                                                                      0x1 = Test FOM array is used to capture raw FOMs during link training for
19542                                                                            diagnostic verification. */
19543         uint64_t pcie_tst_fom_en       : 1;  /**< [ 21: 21](R/W) PCIe test figure of merit array enable. For verification diagnostic use only.
19544                                                                  See [PCIE_TST_FOM_VAL]. */
19545         uint64_t pcie_tst_fom_rd       : 1;  /**< [ 20: 20](R/W) PCIe test figure of merit array enable. For verification diagnostic use only.
19546                                                                  See [PCIE_TST_FOM_VAL]. */
19547         uint64_t pcie_tst_fom_ld       : 1;  /**< [ 19: 19](R/W) PCIe test figure of merit array enable. For verification diagnostic use only.
19548                                                                  See [PCIE_TST_FOM_VAL]. */
19549         uint64_t pcie_tst_fom_addr     : 7;  /**< [ 18: 12](R/W) PCIe test figure of merit array enable. For verification diagnostic use only.
19550                                                                  See [PCIE_TST_FOM_VAL]. */
19551         uint64_t pcie_tst_fom_val      : 12; /**< [ 11:  0](R/W/H) PCIe test figure of merit array enable. For verification diagnostic use only.
19552                                                                  Internal:
19553                                                                  Used to load the test raw figure of merit (raw FOM) array with test
19554                                                                  FOM values to play back during PCIe Gen3/Gen4 training to check the
19555                                                                  training preset selection logic and PCIE training logic.
19556                                                                  An 11-bit by 32 word array is used to hold the test raw FOM values.
19557                                                                  The array FOM values are initialized by writing the
19558                                                                  [PCIE_TST_FOM_ADDR] field with a value
19559                                                                  from 0x0 to 0x7F to index a location in the array, then writing the
19560                                                                  [PCIE_TST_FOM_VAL] with a 12-bit quantity representing the raw
19561                                                                  FOM value to be written to the array location, then writing the
19562                                                                  [PCIE_TST_FOM_LD] bit to 1 to write
19563                                                                  the raw FOM 12-bit value to the array, and the writing the
19564                                                                  [PCIE_TST_FOM_LD] bit to 0 to complete
19565                                                                  array write operation.
19566                                                                  Before writing the array software should poll the
19567                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_TST_ARRAY_RDY] and wait for
19568                                                                  [PCIE_TST_ARRAY_RDY] field to be set to 1 before reading or writing
19569                                                                  the test fom array.  Also write
19570                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_TST_FOM_MODE] to 0.
19571 
19572                                                                  Each array location is written with the desired raw FOM value following
19573                                                                  the thse steps.
19574 
19575                                                                  After all array locations are written, the array locations can be read
19576                                                                  back.  Write the [PCIE_TST_FOM_ADDR] to point
19577                                                                  to the desired array location, next write
19578                                                                  [PCIE_TST_FOM_RD] to 1 to enable read back mode.
19579                                                                  Read the [PCIE_TST_FOM_VAL] field to readback the 12-bit test raw FOM
19580                                                                  value from the array. Finally write
19581                                                                  [PCIE_TST_FOM_RD] to 0 to disable read back mode.
19582 
19583                                                                  To enable the PCI Express Test FOM array during PCIe Gen3/Gen4 link training
19584                                                                  write [PCIE_TST_FOM_EN] to 1. Note prior to
19585                                                                  writing [PCIE_TST_FOM_EN] to 1, ensure that
19586                                                                  [PCIE_TST_FOM_RD] is cleared to 0 and
19587                                                                  [PCIE_TST_FOM_LD] is cleared to 0.
19588 
19589                                                                  During PCIe Gen3/Gen4 link training each time a Preset receiver evaluation
19590                                                                  request is received the training logic will return the 12-bit raw FOM
19591                                                                  from the current test FOM array location to the PIPE PCS logic and then
19592                                                                  move to the next test FOM array location.  The test FOM array always
19593                                                                  starts at location 0x0 and increments to the next location in the FOM
19594                                                                  array after each preset evaluation.
19595 
19596                                                                  Related Registers
19597                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_TST_FOM_ADDR]
19598                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_TST_FOM_LD]
19599                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_TST_FOM_RD]
19600                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_TST_FOM_EN]
19601                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_TST_FOM_MODE]
19602                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_TST_ARRAY_RDY] */
19603 #else /* Word 0 - Little Endian */
19604         uint64_t pcie_tst_fom_val      : 12; /**< [ 11:  0](R/W/H) PCIe test figure of merit array enable. For verification diagnostic use only.
19605                                                                  Internal:
19606                                                                  Used to load the test raw figure of merit (raw FOM) array with test
19607                                                                  FOM values to play back during PCIe Gen3/Gen4 training to check the
19608                                                                  training preset selection logic and PCIE training logic.
19609                                                                  An 11-bit by 32 word array is used to hold the test raw FOM values.
19610                                                                  The array FOM values are initialized by writing the
19611                                                                  [PCIE_TST_FOM_ADDR] field with a value
19612                                                                  from 0x0 to 0x7F to index a location in the array, then writing the
19613                                                                  [PCIE_TST_FOM_VAL] with a 12-bit quantity representing the raw
19614                                                                  FOM value to be written to the array location, then writing the
19615                                                                  [PCIE_TST_FOM_LD] bit to 1 to write
19616                                                                  the raw FOM 12-bit value to the array, and the writing the
19617                                                                  [PCIE_TST_FOM_LD] bit to 0 to complete
19618                                                                  array write operation.
19619                                                                  Before writing the array software should poll the
19620                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_TST_ARRAY_RDY] and wait for
19621                                                                  [PCIE_TST_ARRAY_RDY] field to be set to 1 before reading or writing
19622                                                                  the test fom array.  Also write
19623                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_TST_FOM_MODE] to 0.
19624 
19625                                                                  Each array location is written with the desired raw FOM value following
19626                                                                  the thse steps.
19627 
19628                                                                  After all array locations are written, the array locations can be read
19629                                                                  back.  Write the [PCIE_TST_FOM_ADDR] to point
19630                                                                  to the desired array location, next write
19631                                                                  [PCIE_TST_FOM_RD] to 1 to enable read back mode.
19632                                                                  Read the [PCIE_TST_FOM_VAL] field to readback the 12-bit test raw FOM
19633                                                                  value from the array. Finally write
19634                                                                  [PCIE_TST_FOM_RD] to 0 to disable read back mode.
19635 
19636                                                                  To enable the PCI Express Test FOM array during PCIe Gen3/Gen4 link training
19637                                                                  write [PCIE_TST_FOM_EN] to 1. Note prior to
19638                                                                  writing [PCIE_TST_FOM_EN] to 1, ensure that
19639                                                                  [PCIE_TST_FOM_RD] is cleared to 0 and
19640                                                                  [PCIE_TST_FOM_LD] is cleared to 0.
19641 
19642                                                                  During PCIe Gen3/Gen4 link training each time a Preset receiver evaluation
19643                                                                  request is received the training logic will return the 12-bit raw FOM
19644                                                                  from the current test FOM array location to the PIPE PCS logic and then
19645                                                                  move to the next test FOM array location.  The test FOM array always
19646                                                                  starts at location 0x0 and increments to the next location in the FOM
19647                                                                  array after each preset evaluation.
19648 
19649                                                                  Related Registers
19650                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_TST_FOM_ADDR]
19651                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_TST_FOM_LD]
19652                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_TST_FOM_RD]
19653                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_TST_FOM_EN]
19654                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_TST_FOM_MODE]
19655                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_TST_ARRAY_RDY] */
19656         uint64_t pcie_tst_fom_addr     : 7;  /**< [ 18: 12](R/W) PCIe test figure of merit array enable. For verification diagnostic use only.
19657                                                                  See [PCIE_TST_FOM_VAL]. */
19658         uint64_t pcie_tst_fom_ld       : 1;  /**< [ 19: 19](R/W) PCIe test figure of merit array enable. For verification diagnostic use only.
19659                                                                  See [PCIE_TST_FOM_VAL]. */
19660         uint64_t pcie_tst_fom_rd       : 1;  /**< [ 20: 20](R/W) PCIe test figure of merit array enable. For verification diagnostic use only.
19661                                                                  See [PCIE_TST_FOM_VAL]. */
19662         uint64_t pcie_tst_fom_en       : 1;  /**< [ 21: 21](R/W) PCIe test figure of merit array enable. For verification diagnostic use only.
19663                                                                  See [PCIE_TST_FOM_VAL]. */
19664         uint64_t pcie_tst_fom_mode     : 1;  /**< [ 22: 22](R/W) PCIe test FOM array mode. For verification diagnostic use only.
19665                                                                  See [PCIE_TST_FOM_VAL].
19666 
19667                                                                  Internal:
19668                                                                  PCIe test FOM array mode.  For verification diagnostic use only.
19669                                                                      0x0 = Test FOM array is used to load and play back test FOMs for PCIe link
19670                                                                            training.
19671                                                                      0x1 = Test FOM array is used to capture raw FOMs during link training for
19672                                                                            diagnostic verification. */
19673         uint64_t pcie_tst_array_rdy    : 1;  /**< [ 23: 23](RO/H) PCIe test FOM array ready. For verification diagnostic use only.
19674                                                                  See [PCIE_TST_FOM_VAL].
19675 
19676                                                                  Internal:
19677                                                                  PCIe test FOM array ready.  For verification diagnostic use only.
19678                                                                  All entries of the PCIe test FOM array are cleared following release
19679                                                                  of reset.  When [PCIE_TST_ARRAY_RDY] is set to 1 the PCIe test FOM
19680                                                                  array is ready and can be used for PCIe training testing.  Do not
19681                                                                  read or write the PCIe test FOM array while [PCIE_TST_ARRAY_RDY] is
19682                                                                  cleared to 0.  When the GSER QLM is released from reset the
19683                                                                  [PCIE_TST_ARRAY_RDY] will transition from 0 to 1 after 128 service
19684                                                                  clock cycles. */
19685         uint64_t pcie_pre_dir          : 2;  /**< [ 25: 24](RO/H) PCIe direction change equalization pre (C-1) tap direction.
19686                                                                  During PCIe Gen3/Gen4 link training using direction change equalization
19687                                                                  the [PCIE_PRE_DIR] field reflects the value of the pre (C-1) tap
19688                                                                  direction for the link evaluation direction feedback.
19689                                                                      0x0 = No change.
19690                                                                      0x1 = Increment feedback for each coefficient.
19691                                                                      0x2 = Decrement feedback for each coefficient.
19692                                                                      0x3 = Reserved. */
19693         uint64_t pcie_main_dir         : 2;  /**< [ 27: 26](RO/H) PCIe direction change equalization main (C0) tap direction.
19694                                                                  During PCIe Gen3/Gen4 link training using direction change equalization
19695                                                                  the [PCIE_MAIN_DIR] field reflects the value of the main (C0) tap
19696                                                                  direction for the link evaluation direction feedback.
19697                                                                      0x0 = No change.
19698                                                                      0x1 = Increment feedback for each coefficient.
19699                                                                      0x2 = Decrement feedback for each coefficient.
19700                                                                      0x3 = Reserved.
19701 
19702                                                                  The main direction will always be 0x0 no change. The PCIe
19703                                                                  MAC computes the Main (C0) tap direction change. */
19704         uint64_t pcie_post_dir         : 2;  /**< [ 29: 28](RO/H) PCIe direction change equalization post (C+1) tap direction.
19705                                                                  During PCIe Gen3/Gen4 link training using direction change equalization
19706                                                                  the [PCIE_POST_DIR] field reflects the value of the post (C+1) tap
19707                                                                  direction for the link evaluation direction feedback.
19708                                                                      0x0 = No change.
19709                                                                      0x1 = Increment feedback for each coefficient.
19710                                                                      0x2 = Decrement feedback for each coefficient.
19711                                                                      0x3 = Reserved. */
19712         uint64_t pcie_inv_pre_dir      : 1;  /**< [ 30: 30](R/W) PCIe direction change equalization invert pre tap direction.
19713                                                                  When set reverses the Increment/Decrement direction
19714                                                                  of the GSERN()_LANE()_TRAIN_7_BCFG[PCIE_PRE_DIR]
19715                                                                  Tx tap direction feedback.  For diagnostic use only. */
19716         uint64_t pcie_inv_main_dir     : 1;  /**< [ 31: 31](R/W) PCIe direction change equalization invert main tap direction.
19717                                                                  When set reverses the Increment/Decrement direction
19718                                                                  of the GSERN()_LANE()_TRAIN_7_BCFG[PCIE_MAIN_DIR]
19719                                                                  Tx tap direction feedback.  For diagnostic use only. */
19720         uint64_t pcie_inv_post_dir     : 1;  /**< [ 32: 32](R/W) PCIe direction change equalization invert post tap direction.
19721                                                                  When set reverses the Increment/Decrement direction
19722                                                                  of the GSERN()_LANE()_TRAIN_7_BCFG[PCIE_POST_DIR]
19723                                                                  Tx tap direction feedback.  For diagnostic use only. */
19724         uint64_t pcie_rev_dir_hints    : 1;  /**< [ 33: 33](R/W) When set, reverses the direction of the
19725                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_POST_DIR],
19726                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_MAIN_DIR], and
19727                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_PRE_DIR]
19728                                                                  Tx tap direction feedback hints. For diagnostic use only. */
19729         uint64_t pcie_min_moves        : 8;  /**< [ 41: 34](R/W) PCIe minimum tap moves. During PCIe Gen3/Gen4 equalization direction change
19730                                                                  feedback mode [PCIE_MIN_MOVES] sets the minimum number of tap moves to make
19731                                                                  before signaling equalization complete. */
19732         uint64_t pcie_max_moves        : 8;  /**< [ 49: 42](R/W) PCIe maximum tap moves. During PCIe Gen3/Gen4 equalization direction change
19733                                                                  feedback mode [PCIE_MIN_MOVES] sets the maximum number of tap moves to make
19734                                                                  before signaling equalization complete. */
19735         uint64_t pcie_term_min_mvs     : 1;  /**< [ 50: 50](R/W) PCIe terminate direction change feedback equalization when exceeded the
19736                                                                  the minimum number of tap moves specified in
19737                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_MIN_MOVES].
19738                                                                  During PCIe Gen3/Gen4 equalization direction change
19739                                                                  feedback mode [PCIE_MIN_MOVES] sets the minimum number of tap moves to make
19740                                                                  before signaling equalization complete. When [PCIE_TERM_MIN_MVS] is set
19741                                                                  to 1 the training logic will signal equalization complete by returning
19742                                                                  C(-1) TAP direction change set to No Change and C(+1) TAP direction change
19743                                                                  also set to No Change.  This will signal the termination of
19744                                                                  PCIe Gen3/Gen4 equalization direction change feedback mode. */
19745         uint64_t pcie_term_max_mvs     : 1;  /**< [ 51: 51](R/W) PCIe terminate direction change feedback equalization when reached the
19746                                                                  the maximum number of tap moves specified in
19747                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_MAX_MOVES].
19748                                                                  During PCIe Gen3/Gen4 equalization direction change
19749                                                                  feedback mode [PCIE_MAX_MOVES] sets the maximum number of tap moves to make
19750                                                                  before signaling equalization complete. When [PCIE_TERM_MAX_MVS] is set
19751                                                                  to 1 the training logic will signal equalization complete by returning
19752                                                                  C(-1) TAP direction change set to No Change and C(+1) TAP direction change
19753                                                                  also set to No Change.  This will signal the termination of
19754                                                                  PCIe Gen3/Gen4 equalization direction change feedback mode. */
19755         uint64_t pcie_adtmout_sel      : 2;  /**< [ 53: 52](R/W) Selects the timeout value for the PCIe Gen3/Gen4 direction change feedback equalization.
19756                                                                  This time-out timer value is only valid if
19757                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_ADTMOUT_DISABLE]
19758                                                                  is cleared to 0.
19759 
19760                                                                  When GSERN()_LANE()_TRAIN_7_BCFG[PCIE_ADTMOUT_FAST] is cleared to 0 the link training
19761                                                                  time-out timer value is set by [PCIE_ADTMOUT_SEL] to the values shown.
19762                                                                  0x0 = 5.24  milliseconds.
19763                                                                  0x1 = 10.49 milliseconds.
19764                                                                  0x2 = 13.1  milliseconds.
19765                                                                  0x3 = 15.73 milliseconds.
19766 
19767                                                                  When GSERN()_LANE()_TRAIN_7_BCFG[PCIE_ADTMOUT_FAST] is set to 1 the link training
19768                                                                  time-out timer value is set by [PCIE_ADTMOUT_SEL] to the values shown.
19769                                                                  0x0 = 81.92  microseconds.
19770                                                                  0x1 = 163.84 microseconds.
19771                                                                  0x2 = 327.68 microseconds.
19772                                                                  0x3 = 655.36 microseconds. */
19773         uint64_t pcie_adtmout_disable  : 1;  /**< [ 54: 54](R/W) PCIe Gen3/Gen4 direction change feedback equalization timeout timer disable.
19774                                                                  When [PCIE_ADTMOUT_DISABLE] is set to 1 the timeout timer that runs during
19775                                                                  PCIe Gen3/Gen4 direction change feecback equalization is disabled.  When
19776                                                                  [PCIE_ADTMOUT_DISABLE] is cleared to 0 the equalization timeout timer is enabled.
19777                                                                  The equalization timeout period is controlled by
19778                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_ADTMOUT_SEL] and
19779                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_ADTMOUT_FAST].
19780                                                                  For diagnostic use only. */
19781         uint64_t pcie_adtmout_fast     : 1;  /**< [ 55: 55](R/W) Reserved.
19782                                                                  Internal:
19783                                                                  For simulation use only. When set accelerates the PCIe Gen3/Gen4 direction change
19784                                                                  feedback equalization timeout timer period.  When set shortens the direction change
19785                                                                  equalization time-out timer.
19786                                                                  See the description for
19787                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_ADTMOUT_SEL].
19788                                                                  For diagnostic use only. */
19789         uint64_t pcie_term_adtmout     : 1;  /**< [ 56: 56](R/W) PCIe terminate direction change feedback equalization when reached the
19790                                                                  the equalization timeout specified in
19791                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_ADTMOUT_SEL].
19792                                                                  During PCIe Gen3/Gen4 equalization direction change
19793                                                                  feedback mode the equalization timeout period is controlled by
19794                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_ADTMOUT_SEL] and
19795                                                                  GSERN()_LANE()_TRAIN_7_BCFG[PCIE_ADTMOUT_FAST].
19796                                                                  When [PCIE_TERM_ADTMOUT] sets when the equalization timeout timer expires
19797                                                                  the equalization logic will signal equalization complete on the next
19798                                                                  equalization request from the PCIe controller.
19799                                                                  The training logic will signal equalization complete by returning
19800                                                                  C(-1) TAP direction change set to No Change and C(+1) TAP direction change
19801                                                                  also set to No Change.  This will signal the termination of
19802                                                                  PCIe Gen3/Gen4 equalization direction change feedback mode. */
19803         uint64_t pcie_dir_eq_done      : 1;  /**< [ 57: 57](RO/H) PCIe direction change equalization done flag. During PCIe Gen3/Gen4
19804                                                                  direction change equalization reflects the state of the direction
19805                                                                  equalization done flag.  When set to 1 indicates that the current
19806                                                                  direction change equalization tap adjustment sequence is complete.
19807                                                                  Reset automatically by hardware when PCIe Gen3/Gen4 equalization is
19808                                                                  completed. */
19809         uint64_t pcie_fasteq           : 1;  /**< [ 58: 58](R/W) Reserved.
19810                                                                  Internal:
19811                                                                  PCIe fast equalization mode for simulation.
19812                                                                  When testing PCIe Gen3/Gen4 equalization in simulation setting [PCIE_FASTEQ]
19813                                                                  to 1 will reduce the PCIe equalization response to 1.6 microseconds.
19814                                                                  Can be used in conjunction with GSERN()_LANE()_TRAIN_7_BCFG[PCIE_TST_FOM_EN].
19815                                                                  If the GSERN()_LANE()_TRAIN_7_BCFG[PCIE_TST_FOM_EN] is not used the raw FOM
19816                                                                  value returned will be zero.  Further the [PCIE_FASTEQ] is set the link evaluation
19817                                                                  feedback direction change for C(-1), C(0), and C(+1) will indicate no change.
19818                                                                  For simulation use only. */
19819         uint64_t pcie_fasteq_val       : 5;  /**< [ 63: 59](R/W) Reserved.
19820                                                                  Internal:
19821                                                                  PCIe fast equalization delay value for simulation.
19822                                                                  Used in conjunction with GSERN()_LANE()_TRAIN_7_BCFG[PCIE_FASTEQ]
19823                                                                  When testing PCIe Gen3/Gen4 equalization in simulation.
19824                                                                  The default value of 0x6 programs the PCIe equalization FOM and
19825                                                                  link evaluation direction change request acknowledgement handshake
19826                                                                  to 1.6 microseconds to accelerate simulation modeling of the PCIe
19827                                                                  Gen3/Gen4 equalization phases 2 and 3. .
19828                                                                  For simulation use only. */
19829 #endif /* Word 0 - End */
19830     } s;
19831     /* struct bdk_gsernx_lanex_train_7_bcfg_s cn; */
19832 };
19833 typedef union bdk_gsernx_lanex_train_7_bcfg bdk_gsernx_lanex_train_7_bcfg_t;
19834 
19835 static inline uint64_t BDK_GSERNX_LANEX_TRAIN_7_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_TRAIN_7_BCFG(unsigned long a,unsigned long b)19836 static inline uint64_t BDK_GSERNX_LANEX_TRAIN_7_BCFG(unsigned long a, unsigned long b)
19837 {
19838     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
19839         return 0x87e090003220ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
19840     __bdk_csr_fatal("GSERNX_LANEX_TRAIN_7_BCFG", 2, a, b, 0, 0);
19841 }
19842 
19843 #define typedef_BDK_GSERNX_LANEX_TRAIN_7_BCFG(a,b) bdk_gsernx_lanex_train_7_bcfg_t
19844 #define bustype_BDK_GSERNX_LANEX_TRAIN_7_BCFG(a,b) BDK_CSR_TYPE_RSL
19845 #define basename_BDK_GSERNX_LANEX_TRAIN_7_BCFG(a,b) "GSERNX_LANEX_TRAIN_7_BCFG"
19846 #define device_bar_BDK_GSERNX_LANEX_TRAIN_7_BCFG(a,b) 0x0 /* PF_BAR0 */
19847 #define busnum_BDK_GSERNX_LANEX_TRAIN_7_BCFG(a,b) (a)
19848 #define arguments_BDK_GSERNX_LANEX_TRAIN_7_BCFG(a,b) (a),(b),-1,-1
19849 
19850 /**
19851  * Register (RSL) gsern#_lane#_train_8_bcfg
19852  *
19853  * GSER Lane Training Base Configuration Register 8
19854  * This register controls settings for lane training.
19855  */
19856 union bdk_gsernx_lanex_train_8_bcfg
19857 {
19858     uint64_t u;
19859     struct bdk_gsernx_lanex_train_8_bcfg_s
19860     {
19861 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
19862         uint64_t reserved_61_63        : 3;
19863         uint64_t pcie_l_c1_e_adj_sgn   : 1;  /**< [ 60: 60](R/W) Sets the lower C1 E sampler adjustment voltage offset sign.
19864                                                                  0 = The offset sign is positive
19865                                                                  positioning the lower C1_E sampler below the eye C1_Q sampler.
19866                                                                  1 = The offset sign is negative
19867                                                                  positioning the lower C1_E sampler above the eye C1_Q sampler.
19868 
19869                                                                  Used in conjunction with
19870                                                                  GSERN()_LANE()_TRAIN_8_BCFG[PCIE_L_C1_E_ADJ_STEP] during PCIE training.
19871                                                                  For diagnostic use only. */
19872         uint64_t pcie_u_c1_e_adj_sgn   : 1;  /**< [ 59: 59](R/W) Sets the upper C1 E sampler adjustment voltage offset sign.
19873                                                                  0 = The offset sign is positive
19874                                                                  positioning the upper C1_E sampler above the eye C1_Q sampler.
19875                                                                  1 = The offset sign is negative
19876                                                                  positioning the upper C1_E sampler below the eye C1_Q sampler.
19877 
19878                                                                  Used in conjunction with
19879                                                                  GSERN()_LANE()_TRAIN_8_BCFG[PCIE_U_C1_E_ADJ_STEP] for PCIE training.
19880                                                                  For diagnostic use only. */
19881         uint64_t pcie_u_c1_e_adj_step  : 5;  /**< [ 58: 54](R/W) Sets the C1 E sampler voltage level during eye monitor sampling.
19882                                                                  Typically [PCIE_U_C1_E_ADJ_STEP] is set to 0x3 to position the eye monitor
19883                                                                  error sampler at ~15 mV above the C1 Q sampler voltage level.
19884                                                                  Steps are in units of 5.08 mV per step.
19885                                                                  Used in conjunction with
19886                                                                  GSERN()_LANE()_TRAIN_8_BCFG[PCIE_U_C1_E_ADJ_SGN] for PCIE training.
19887                                                                  For diagnostic use only. */
19888         uint64_t pcie_adapt_axis       : 3;  /**< [ 53: 51](R/W) Sets the number or adaptation axes to use during receiver adaptation.
19889                                                                  Typically set to 0x7 to enable all three adaptation axes.  One-hot encoded.
19890 
19891                                                                  Set to 0x1 to only enable axis 1 and disable axis 2 and axis 3.
19892                                                                  Set to 0x3 to enable axis 1 and axis 2 but disable axis 3.
19893                                                                  Set to 0x7 to enable axis 1, 2 and 3. (default.)
19894                                                                  For diagnostic use only. */
19895         uint64_t pcie_l_c1_e_adj_step  : 5;  /**< [ 50: 46](R/W) Sets the lower C1 E sampler voltage level during eye monitor sampling.
19896                                                                  Typically set to 0x2 to position the eye monitor
19897                                                                  error sampler at ~15mV below the C1 Q sampler voltage level.
19898                                                                  Steps are in units of 5.08 mV per step.
19899                                                                  Used in conjunction with
19900                                                                  GSERN()_LANE()_TRAIN_8_BCFG[PCIE_L_C1_E_ADJ_SGN] during PCIE training.
19901                                                                  For diagnostic use only. */
19902         uint64_t pcie_ecnt_div_val     : 4;  /**< [ 45: 42](R/W) Error counter divider override value. See table below.
19903                                                                  Divider is active when the [PCIE_ECNT_DIV_EN] is set.
19904                                                                  For diagnostic use only.
19905 
19906                                                                     0x0 = No divider.
19907                                                                     0x1 = Divide by 2.
19908                                                                     0x2 = Divide by 4.
19909                                                                     0x3 = Divide by 8.
19910                                                                     0x4 = Divide by 16.
19911                                                                     0x5 = Divide by 32.
19912                                                                     0x6 = Divide by 64.
19913                                                                     0x7 = Divide by 128.
19914                                                                     0x8 = Divide by 256.
19915                                                                     0x9 = Divide by 512.
19916                                                                     0xA = Divide by 1024.
19917                                                                     0xB = Divide by 2048.
19918                                                                     0xC = Divide by 4096.
19919                                                                     0xD = Divide by 8192.
19920                                                                     0xE = Divide by 16384.
19921                                                                     0xF = Divide by 32768. */
19922         uint64_t pcie_ecnt_div_en      : 1;  /**< [ 41: 41](R/W) Error counter divider override enable.
19923                                                                  For diagnostic use only. */
19924         uint64_t pcie_eye_cnt_en       : 1;  /**< [ 40: 40](R/W) Eye cycle count enable. When set the number of eye monitor
19925                                                                  cycles to sample and count during the PCIe Gen3/Gen4 training
19926                                                                  figure of merit (FOM) calculation
19927                                                                  is controlled by GSERN()_LANE()_TRAIN_8_BCFG[PCIE_EYE_CNT_VAL].
19928                                                                  For diagnostic use only. */
19929         uint64_t pcie_eye_cnt_val      : 40; /**< [ 39:  0](R/W) PCIe eye count value Preset FOM.  Sets the number of eye monitor cycles to sample/count
19930                                                                  during the PCIe training figure of merit (FOM) calculation when
19931                                                                  GSERN()_LANE()_TRAIN_8_BCFG[PCIE_EYE_CNT_EN]=1.
19932                                                                  For diagnostic use only. */
19933 #else /* Word 0 - Little Endian */
19934         uint64_t pcie_eye_cnt_val      : 40; /**< [ 39:  0](R/W) PCIe eye count value Preset FOM.  Sets the number of eye monitor cycles to sample/count
19935                                                                  during the PCIe training figure of merit (FOM) calculation when
19936                                                                  GSERN()_LANE()_TRAIN_8_BCFG[PCIE_EYE_CNT_EN]=1.
19937                                                                  For diagnostic use only. */
19938         uint64_t pcie_eye_cnt_en       : 1;  /**< [ 40: 40](R/W) Eye cycle count enable. When set the number of eye monitor
19939                                                                  cycles to sample and count during the PCIe Gen3/Gen4 training
19940                                                                  figure of merit (FOM) calculation
19941                                                                  is controlled by GSERN()_LANE()_TRAIN_8_BCFG[PCIE_EYE_CNT_VAL].
19942                                                                  For diagnostic use only. */
19943         uint64_t pcie_ecnt_div_en      : 1;  /**< [ 41: 41](R/W) Error counter divider override enable.
19944                                                                  For diagnostic use only. */
19945         uint64_t pcie_ecnt_div_val     : 4;  /**< [ 45: 42](R/W) Error counter divider override value. See table below.
19946                                                                  Divider is active when the [PCIE_ECNT_DIV_EN] is set.
19947                                                                  For diagnostic use only.
19948 
19949                                                                     0x0 = No divider.
19950                                                                     0x1 = Divide by 2.
19951                                                                     0x2 = Divide by 4.
19952                                                                     0x3 = Divide by 8.
19953                                                                     0x4 = Divide by 16.
19954                                                                     0x5 = Divide by 32.
19955                                                                     0x6 = Divide by 64.
19956                                                                     0x7 = Divide by 128.
19957                                                                     0x8 = Divide by 256.
19958                                                                     0x9 = Divide by 512.
19959                                                                     0xA = Divide by 1024.
19960                                                                     0xB = Divide by 2048.
19961                                                                     0xC = Divide by 4096.
19962                                                                     0xD = Divide by 8192.
19963                                                                     0xE = Divide by 16384.
19964                                                                     0xF = Divide by 32768. */
19965         uint64_t pcie_l_c1_e_adj_step  : 5;  /**< [ 50: 46](R/W) Sets the lower C1 E sampler voltage level during eye monitor sampling.
19966                                                                  Typically set to 0x2 to position the eye monitor
19967                                                                  error sampler at ~15mV below the C1 Q sampler voltage level.
19968                                                                  Steps are in units of 5.08 mV per step.
19969                                                                  Used in conjunction with
19970                                                                  GSERN()_LANE()_TRAIN_8_BCFG[PCIE_L_C1_E_ADJ_SGN] during PCIE training.
19971                                                                  For diagnostic use only. */
19972         uint64_t pcie_adapt_axis       : 3;  /**< [ 53: 51](R/W) Sets the number or adaptation axes to use during receiver adaptation.
19973                                                                  Typically set to 0x7 to enable all three adaptation axes.  One-hot encoded.
19974 
19975                                                                  Set to 0x1 to only enable axis 1 and disable axis 2 and axis 3.
19976                                                                  Set to 0x3 to enable axis 1 and axis 2 but disable axis 3.
19977                                                                  Set to 0x7 to enable axis 1, 2 and 3. (default.)
19978                                                                  For diagnostic use only. */
19979         uint64_t pcie_u_c1_e_adj_step  : 5;  /**< [ 58: 54](R/W) Sets the C1 E sampler voltage level during eye monitor sampling.
19980                                                                  Typically [PCIE_U_C1_E_ADJ_STEP] is set to 0x3 to position the eye monitor
19981                                                                  error sampler at ~15 mV above the C1 Q sampler voltage level.
19982                                                                  Steps are in units of 5.08 mV per step.
19983                                                                  Used in conjunction with
19984                                                                  GSERN()_LANE()_TRAIN_8_BCFG[PCIE_U_C1_E_ADJ_SGN] for PCIE training.
19985                                                                  For diagnostic use only. */
19986         uint64_t pcie_u_c1_e_adj_sgn   : 1;  /**< [ 59: 59](R/W) Sets the upper C1 E sampler adjustment voltage offset sign.
19987                                                                  0 = The offset sign is positive
19988                                                                  positioning the upper C1_E sampler above the eye C1_Q sampler.
19989                                                                  1 = The offset sign is negative
19990                                                                  positioning the upper C1_E sampler below the eye C1_Q sampler.
19991 
19992                                                                  Used in conjunction with
19993                                                                  GSERN()_LANE()_TRAIN_8_BCFG[PCIE_U_C1_E_ADJ_STEP] for PCIE training.
19994                                                                  For diagnostic use only. */
19995         uint64_t pcie_l_c1_e_adj_sgn   : 1;  /**< [ 60: 60](R/W) Sets the lower C1 E sampler adjustment voltage offset sign.
19996                                                                  0 = The offset sign is positive
19997                                                                  positioning the lower C1_E sampler below the eye C1_Q sampler.
19998                                                                  1 = The offset sign is negative
19999                                                                  positioning the lower C1_E sampler above the eye C1_Q sampler.
20000 
20001                                                                  Used in conjunction with
20002                                                                  GSERN()_LANE()_TRAIN_8_BCFG[PCIE_L_C1_E_ADJ_STEP] during PCIE training.
20003                                                                  For diagnostic use only. */
20004         uint64_t reserved_61_63        : 3;
20005 #endif /* Word 0 - End */
20006     } s;
20007     /* struct bdk_gsernx_lanex_train_8_bcfg_s cn; */
20008 };
20009 typedef union bdk_gsernx_lanex_train_8_bcfg bdk_gsernx_lanex_train_8_bcfg_t;
20010 
20011 static inline uint64_t BDK_GSERNX_LANEX_TRAIN_8_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_TRAIN_8_BCFG(unsigned long a,unsigned long b)20012 static inline uint64_t BDK_GSERNX_LANEX_TRAIN_8_BCFG(unsigned long a, unsigned long b)
20013 {
20014     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
20015         return 0x87e090003230ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
20016     __bdk_csr_fatal("GSERNX_LANEX_TRAIN_8_BCFG", 2, a, b, 0, 0);
20017 }
20018 
20019 #define typedef_BDK_GSERNX_LANEX_TRAIN_8_BCFG(a,b) bdk_gsernx_lanex_train_8_bcfg_t
20020 #define bustype_BDK_GSERNX_LANEX_TRAIN_8_BCFG(a,b) BDK_CSR_TYPE_RSL
20021 #define basename_BDK_GSERNX_LANEX_TRAIN_8_BCFG(a,b) "GSERNX_LANEX_TRAIN_8_BCFG"
20022 #define device_bar_BDK_GSERNX_LANEX_TRAIN_8_BCFG(a,b) 0x0 /* PF_BAR0 */
20023 #define busnum_BDK_GSERNX_LANEX_TRAIN_8_BCFG(a,b) (a)
20024 #define arguments_BDK_GSERNX_LANEX_TRAIN_8_BCFG(a,b) (a),(b),-1,-1
20025 
20026 /**
20027  * Register (RSL) gsern#_lane#_train_9_bcfg
20028  *
20029  * GSER Lane Training Base Configuration Register 9
20030  * This register controls settings for lane training.
20031  */
20032 union bdk_gsernx_lanex_train_9_bcfg
20033 {
20034     uint64_t u;
20035     struct bdk_gsernx_lanex_train_9_bcfg_s
20036     {
20037 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
20038         uint64_t reserved_59_63        : 5;
20039         uint64_t pcie_dir_fom_en       : 1;  /**< [ 58: 58](R/W) Enable PCIe Gen3 and Gen4 equalization direction change minimum FOM for termination.
20040                                                                  During PCIe Gen3 and Gen4 equalization using the direction change method
20041                                                                  the GSERN()_LANE()_TRAIN_9_BCFG[PCIE_DIR_FOM_THRS] field sets the minimum threshold
20042                                                                  for the raw 12-bit FOM value that when exceeded will terminate direction change
20043                                                                  equalization.
20044                                                                  [PCIE_DIR_FOM_EN] must be set to 1 to allow the direction change state machine
20045                                                                  to terminate equalization when the measured raw FOM has exceeded the value in the
20046                                                                  GSERN()_LANE()_TRAIN_9_BCFG[PCIE_DIR_FOM_THRS] field.
20047                                                                  For diagnostic use only. */
20048         uint64_t pcie_dir_fom_thrs     : 12; /**< [ 57: 46](R/W) PCIe Gen3 and Gen4 equalization direction change FOM threshold for termination.
20049                                                                  During PCIe Gen3 and Gen4 equalization using the direction change method
20050                                                                  [PCIE_DIR_FOM_THRS] sets the minimum threshold for the raw 12-bit FOM
20051                                                                  value that when exceeded will terminate direction change equalization.
20052                                                                  The GSERN()_LANE()_TRAIN_9_BCFG[PCIE_DIR_FOM_EN] field must be set to 1 to
20053                                                                  allow the direction change state machine to terminate equalization when the
20054                                                                  raw FOM has exceeded the value in [PCIE_DIR_FOM_THRS].
20055                                                                  For diagnostic use only. */
20056         uint64_t pcie_dir_ecnt_div_val : 4;  /**< [ 45: 42](R/W) Error counter divider override value. See table below.
20057                                                                  Divider is active when the [PCIE_DIR_ECNT_DIV_EN] is set.
20058                                                                  Used when direction change equalization is enabled.
20059                                                                  For diagnostic use only.
20060 
20061                                                                     0x0 = No divider.
20062                                                                     0x1 = Divide by 2.
20063                                                                     0x2 = Divide by 4.
20064                                                                     0x3 = Divide by 8.
20065                                                                     0x4 = Divide by 16.
20066                                                                     0x5 = Divide by 32.
20067                                                                     0x6 = Divide by 64.
20068                                                                     0x7 = Divide by 128.
20069                                                                     0x8 = Divide by 256.
20070                                                                     0x9 = Divide by 512.
20071                                                                     0xA = Divide by 1024.
20072                                                                     0xB = Divide by 2048.
20073                                                                     0xC = Divide by 4096.
20074                                                                     0xD = Divide by 8192.
20075                                                                     0xE = Divide by 16384.
20076                                                                     0xF = Divide by 32768. */
20077         uint64_t pcie_dir_ecnt_div_en  : 1;  /**< [ 41: 41](R/W) Error counter divider override enable.
20078                                                                  Used when direction change equalization is enabled.
20079                                                                  For diagnostic use only. */
20080         uint64_t pcie_dir_eye_cnt_en   : 1;  /**< [ 40: 40](R/W) Eye cycle count enable. When set the number of eye monitor
20081                                                                  cycles to sample and count during the PCIe Gen3/Gen4 training
20082                                                                  figure of merit (FOM) calculation
20083                                                                  is controlled by GSERN()_LANE()_TRAIN_9_BCFG[PCIE_DIR_EYE_CNT_VAL].
20084                                                                  Used when direction change equalization is enabled.
20085                                                                  For diagnostic use only. */
20086         uint64_t pcie_dir_eye_cnt_val  : 40; /**< [ 39:  0](R/W) PCIe eye count value in direction change mode.  Sets the number of eye monitor cycles to
20087                                                                  sample/count during the PCIe training figure of merit (FOM) calculation when
20088                                                                  GSERN()_LANE()_TRAIN_9_BCFG[PCIE_DIR_EYE_CNT_EN]=1.
20089                                                                  See GSERN()_LANE()_TRAIN_8_BCFG[PCIE_EYE_CNT_VAL]. */
20090 #else /* Word 0 - Little Endian */
20091         uint64_t pcie_dir_eye_cnt_val  : 40; /**< [ 39:  0](R/W) PCIe eye count value in direction change mode.  Sets the number of eye monitor cycles to
20092                                                                  sample/count during the PCIe training figure of merit (FOM) calculation when
20093                                                                  GSERN()_LANE()_TRAIN_9_BCFG[PCIE_DIR_EYE_CNT_EN]=1.
20094                                                                  See GSERN()_LANE()_TRAIN_8_BCFG[PCIE_EYE_CNT_VAL]. */
20095         uint64_t pcie_dir_eye_cnt_en   : 1;  /**< [ 40: 40](R/W) Eye cycle count enable. When set the number of eye monitor
20096                                                                  cycles to sample and count during the PCIe Gen3/Gen4 training
20097                                                                  figure of merit (FOM) calculation
20098                                                                  is controlled by GSERN()_LANE()_TRAIN_9_BCFG[PCIE_DIR_EYE_CNT_VAL].
20099                                                                  Used when direction change equalization is enabled.
20100                                                                  For diagnostic use only. */
20101         uint64_t pcie_dir_ecnt_div_en  : 1;  /**< [ 41: 41](R/W) Error counter divider override enable.
20102                                                                  Used when direction change equalization is enabled.
20103                                                                  For diagnostic use only. */
20104         uint64_t pcie_dir_ecnt_div_val : 4;  /**< [ 45: 42](R/W) Error counter divider override value. See table below.
20105                                                                  Divider is active when the [PCIE_DIR_ECNT_DIV_EN] is set.
20106                                                                  Used when direction change equalization is enabled.
20107                                                                  For diagnostic use only.
20108 
20109                                                                     0x0 = No divider.
20110                                                                     0x1 = Divide by 2.
20111                                                                     0x2 = Divide by 4.
20112                                                                     0x3 = Divide by 8.
20113                                                                     0x4 = Divide by 16.
20114                                                                     0x5 = Divide by 32.
20115                                                                     0x6 = Divide by 64.
20116                                                                     0x7 = Divide by 128.
20117                                                                     0x8 = Divide by 256.
20118                                                                     0x9 = Divide by 512.
20119                                                                     0xA = Divide by 1024.
20120                                                                     0xB = Divide by 2048.
20121                                                                     0xC = Divide by 4096.
20122                                                                     0xD = Divide by 8192.
20123                                                                     0xE = Divide by 16384.
20124                                                                     0xF = Divide by 32768. */
20125         uint64_t pcie_dir_fom_thrs     : 12; /**< [ 57: 46](R/W) PCIe Gen3 and Gen4 equalization direction change FOM threshold for termination.
20126                                                                  During PCIe Gen3 and Gen4 equalization using the direction change method
20127                                                                  [PCIE_DIR_FOM_THRS] sets the minimum threshold for the raw 12-bit FOM
20128                                                                  value that when exceeded will terminate direction change equalization.
20129                                                                  The GSERN()_LANE()_TRAIN_9_BCFG[PCIE_DIR_FOM_EN] field must be set to 1 to
20130                                                                  allow the direction change state machine to terminate equalization when the
20131                                                                  raw FOM has exceeded the value in [PCIE_DIR_FOM_THRS].
20132                                                                  For diagnostic use only. */
20133         uint64_t pcie_dir_fom_en       : 1;  /**< [ 58: 58](R/W) Enable PCIe Gen3 and Gen4 equalization direction change minimum FOM for termination.
20134                                                                  During PCIe Gen3 and Gen4 equalization using the direction change method
20135                                                                  the GSERN()_LANE()_TRAIN_9_BCFG[PCIE_DIR_FOM_THRS] field sets the minimum threshold
20136                                                                  for the raw 12-bit FOM value that when exceeded will terminate direction change
20137                                                                  equalization.
20138                                                                  [PCIE_DIR_FOM_EN] must be set to 1 to allow the direction change state machine
20139                                                                  to terminate equalization when the measured raw FOM has exceeded the value in the
20140                                                                  GSERN()_LANE()_TRAIN_9_BCFG[PCIE_DIR_FOM_THRS] field.
20141                                                                  For diagnostic use only. */
20142         uint64_t reserved_59_63        : 5;
20143 #endif /* Word 0 - End */
20144     } s;
20145     /* struct bdk_gsernx_lanex_train_9_bcfg_s cn; */
20146 };
20147 typedef union bdk_gsernx_lanex_train_9_bcfg bdk_gsernx_lanex_train_9_bcfg_t;
20148 
20149 static inline uint64_t BDK_GSERNX_LANEX_TRAIN_9_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_TRAIN_9_BCFG(unsigned long a,unsigned long b)20150 static inline uint64_t BDK_GSERNX_LANEX_TRAIN_9_BCFG(unsigned long a, unsigned long b)
20151 {
20152     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
20153         return 0x87e090003240ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
20154     __bdk_csr_fatal("GSERNX_LANEX_TRAIN_9_BCFG", 2, a, b, 0, 0);
20155 }
20156 
20157 #define typedef_BDK_GSERNX_LANEX_TRAIN_9_BCFG(a,b) bdk_gsernx_lanex_train_9_bcfg_t
20158 #define bustype_BDK_GSERNX_LANEX_TRAIN_9_BCFG(a,b) BDK_CSR_TYPE_RSL
20159 #define basename_BDK_GSERNX_LANEX_TRAIN_9_BCFG(a,b) "GSERNX_LANEX_TRAIN_9_BCFG"
20160 #define device_bar_BDK_GSERNX_LANEX_TRAIN_9_BCFG(a,b) 0x0 /* PF_BAR0 */
20161 #define busnum_BDK_GSERNX_LANEX_TRAIN_9_BCFG(a,b) (a)
20162 #define arguments_BDK_GSERNX_LANEX_TRAIN_9_BCFG(a,b) (a),(b),-1,-1
20163 
20164 /**
20165  * Register (RSL) gsern#_lane#_tx_1_bcfg
20166  *
20167  * GSER Lane TX Base Configuration Register 1
20168  * lane transmitter configuration Register 1
20169  */
20170 union bdk_gsernx_lanex_tx_1_bcfg
20171 {
20172     uint64_t u;
20173     struct bdk_gsernx_lanex_tx_1_bcfg_s
20174     {
20175 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
20176         uint64_t reserved_57_63        : 7;
20177         uint64_t tx_acjtag             : 1;  /**< [ 56: 56](R/W) TBD */
20178         uint64_t tx_dacj               : 8;  /**< [ 55: 48](R/W) ACJTAG block data bits (some redundant). */
20179         uint64_t reserved_41_47        : 7;
20180         uint64_t tx_enloop             : 1;  /**< [ 40: 40](R/W) Set to enable the DDR loopback mux in the custom transmitter to
20181                                                                  send a copy of transmit data back into the receive path. */
20182         uint64_t reserved_33_39        : 7;
20183         uint64_t nvlink                : 1;  /**< [ 32: 32](R/W) Transmitter lower impedance termination control (43 ohm instead of 50 ohm). */
20184         uint64_t reserved_26_31        : 6;
20185         uint64_t rx_mod4               : 1;  /**< [ 25: 25](R/W) Use PCS layer receive data path clock ratio of 16:1 or 32:1
20186                                                                  (serdes-data-rate:PCS-layer-clock-frequency) when set to 1. When set
20187                                                                  to 0, use PCS layer receive clock ratio of 20:1 or 40:1.
20188 
20189                                                                  GSERN()_LANE()_TX_1_BCFG[RX_POST4] and GSERN()_LANE()_TX_1_BCFG[RX_MOD4]
20190                                                                  together set the width of the parallel receive data path (pipe) in the
20191                                                                  custom receiver. GSERN()_LANE()_TX_1_BCFG[RX_POST4] and
20192                                                                  GSERN()_LANE()_TX_1_BCFG[RX_MOD4] together control the clock ratio of the
20193                                                                  serializer in the custom receiver.
20194 
20195                                                                  GSERN()_LANE()_TX_1_BCFG[RX_MOD4] and GSERN()_LANE()_TX_1_BCFG[MOD4] and
20196                                                                  would normally be set to the same value to use the transmitter and
20197                                                                  receiver at the same PCS clock ratio. */
20198         uint64_t rx_post4              : 1;  /**< [ 24: 24](R/W) Use PCS layer receive data path clock ratio of 32:1 or 40:1
20199                                                                  (serdes-data-rate:PCS-layer-clock-frequency) when set to 1. When set
20200                                                                  to 0, use PCS layer receive clock ratio of 16:1 or 20:1. (The
20201                                                                  function is similar to [DIV20] but for the receiver instead of the
20202                                                                  transmitter.)
20203 
20204                                                                  GSERN()_LANE()_TX_1_BCFG[RX_POST4] and GSERN()_LANE()_TX_1_BCFG[RX_MOD4]
20205                                                                  together set the width of the parallel receive data path (pipe) in the
20206                                                                  custom receiver. GSERN()_LANE()_TX_1_BCFG[RX_POST4] and
20207                                                                  GSERN()_LANE()_TX_1_BCFG[RX_MOD4] together control the clock ratio of the
20208                                                                  serializer in the custom receiver.
20209 
20210                                                                  GSERN()_LANE()_TX_1_BCFG[RX_POST4] and GSERN()_LANE()_TX_1_BCFG[DIV20] and
20211                                                                  would normally be set to the same value to use the transmitter and
20212                                                                  receiver at the same PCS clock ratio. */
20213         uint64_t reserved_18_23        : 6;
20214         uint64_t mod4                  : 1;  /**< [ 17: 17](R/W) Use PCS layer transmit data path clock ratio of 16:1 or 32:1
20215                                                                  (serdes-data-rate:PCS-layer-clock-frequency) when set to 1. When set
20216                                                                  to 0, use PCS layer transmit clock ratio of 20:1 or 40:1.
20217 
20218                                                                  Should be programed as desired before sequencing the transmitter reset
20219                                                                  state machine.
20220 
20221                                                                  GSERN()_LANE()_TX_1_BCFG[DIV20] and GSERN()_LANE()_TX_1_BCFG[MOD4] together set
20222                                                                  the width of the parallel transmit data path (pipe) in the custom
20223                                                                  transmitter. GSERN()_LANE()_TX_1_BCFG[DIV20] and GSERN()_LANE()_TX_1_BCFG[MOD4]
20224                                                                  together control the clock ratio of the serializer in the custom
20225                                                                  transmitter.
20226 
20227                                                                  GSERN()_LANE()_TX_1_BCFG[RX_MOD4] and GSERN()_LANE()_TX_1_BCFG[MOD4] and
20228                                                                  would normally be set to the same value to use the transmitter and
20229                                                                  receiver at the same PCS clock ratio. */
20230         uint64_t div20                 : 1;  /**< [ 16: 16](R/W) Use PCS layer transmit data path clock ratio of 32:1 or 40:1
20231                                                                  (serdes-data-rate:PCS-layer-clock-frequency) when set to 1. When set
20232                                                                  to 0, use PCS layer transmit clock ratio of 16:1 or 20:1.
20233 
20234                                                                  Should be programed as desired before sequencing the transmitter reset
20235                                                                  state machine.
20236 
20237                                                                  GSERN()_LANE()_TX_1_BCFG[DIV20] and GSERN()_LANE()_TX_1_BCFG[MOD4] together set
20238                                                                  the width of the parallel transmit data path (pipe) in the custom
20239                                                                  transmitter. GSERN()_LANE()_TX_1_BCFG[DIV20] and GSERN()_LANE()_TX_1_BCFG[MOD4]
20240                                                                  together control the clock ratio of the serializer in the custom
20241                                                                  transnmitter.
20242 
20243                                                                  GSERN()_LANE()_TX_1_BCFG[RX_POST4] and GSERN()_LANE()_TX_1_BCFG[DIV20] and
20244                                                                  would normally be set to the same value to use the transmitter and
20245                                                                  receiver at the same PCS clock ratio. */
20246         uint64_t reserved_9_15         : 7;
20247         uint64_t tx_enfast             : 1;  /**< [  8:  8](R/W) Enable fast slew on the TX preamp output. */
20248         uint64_t reserved_1_7          : 7;
20249         uint64_t tx_encm               : 1;  /**< [  0:  0](R/W) Enable common mode correction in the transmitter. */
20250 #else /* Word 0 - Little Endian */
20251         uint64_t tx_encm               : 1;  /**< [  0:  0](R/W) Enable common mode correction in the transmitter. */
20252         uint64_t reserved_1_7          : 7;
20253         uint64_t tx_enfast             : 1;  /**< [  8:  8](R/W) Enable fast slew on the TX preamp output. */
20254         uint64_t reserved_9_15         : 7;
20255         uint64_t div20                 : 1;  /**< [ 16: 16](R/W) Use PCS layer transmit data path clock ratio of 32:1 or 40:1
20256                                                                  (serdes-data-rate:PCS-layer-clock-frequency) when set to 1. When set
20257                                                                  to 0, use PCS layer transmit clock ratio of 16:1 or 20:1.
20258 
20259                                                                  Should be programed as desired before sequencing the transmitter reset
20260                                                                  state machine.
20261 
20262                                                                  GSERN()_LANE()_TX_1_BCFG[DIV20] and GSERN()_LANE()_TX_1_BCFG[MOD4] together set
20263                                                                  the width of the parallel transmit data path (pipe) in the custom
20264                                                                  transmitter. GSERN()_LANE()_TX_1_BCFG[DIV20] and GSERN()_LANE()_TX_1_BCFG[MOD4]
20265                                                                  together control the clock ratio of the serializer in the custom
20266                                                                  transnmitter.
20267 
20268                                                                  GSERN()_LANE()_TX_1_BCFG[RX_POST4] and GSERN()_LANE()_TX_1_BCFG[DIV20] and
20269                                                                  would normally be set to the same value to use the transmitter and
20270                                                                  receiver at the same PCS clock ratio. */
20271         uint64_t mod4                  : 1;  /**< [ 17: 17](R/W) Use PCS layer transmit data path clock ratio of 16:1 or 32:1
20272                                                                  (serdes-data-rate:PCS-layer-clock-frequency) when set to 1. When set
20273                                                                  to 0, use PCS layer transmit clock ratio of 20:1 or 40:1.
20274 
20275                                                                  Should be programed as desired before sequencing the transmitter reset
20276                                                                  state machine.
20277 
20278                                                                  GSERN()_LANE()_TX_1_BCFG[DIV20] and GSERN()_LANE()_TX_1_BCFG[MOD4] together set
20279                                                                  the width of the parallel transmit data path (pipe) in the custom
20280                                                                  transmitter. GSERN()_LANE()_TX_1_BCFG[DIV20] and GSERN()_LANE()_TX_1_BCFG[MOD4]
20281                                                                  together control the clock ratio of the serializer in the custom
20282                                                                  transmitter.
20283 
20284                                                                  GSERN()_LANE()_TX_1_BCFG[RX_MOD4] and GSERN()_LANE()_TX_1_BCFG[MOD4] and
20285                                                                  would normally be set to the same value to use the transmitter and
20286                                                                  receiver at the same PCS clock ratio. */
20287         uint64_t reserved_18_23        : 6;
20288         uint64_t rx_post4              : 1;  /**< [ 24: 24](R/W) Use PCS layer receive data path clock ratio of 32:1 or 40:1
20289                                                                  (serdes-data-rate:PCS-layer-clock-frequency) when set to 1. When set
20290                                                                  to 0, use PCS layer receive clock ratio of 16:1 or 20:1. (The
20291                                                                  function is similar to [DIV20] but for the receiver instead of the
20292                                                                  transmitter.)
20293 
20294                                                                  GSERN()_LANE()_TX_1_BCFG[RX_POST4] and GSERN()_LANE()_TX_1_BCFG[RX_MOD4]
20295                                                                  together set the width of the parallel receive data path (pipe) in the
20296                                                                  custom receiver. GSERN()_LANE()_TX_1_BCFG[RX_POST4] and
20297                                                                  GSERN()_LANE()_TX_1_BCFG[RX_MOD4] together control the clock ratio of the
20298                                                                  serializer in the custom receiver.
20299 
20300                                                                  GSERN()_LANE()_TX_1_BCFG[RX_POST4] and GSERN()_LANE()_TX_1_BCFG[DIV20] and
20301                                                                  would normally be set to the same value to use the transmitter and
20302                                                                  receiver at the same PCS clock ratio. */
20303         uint64_t rx_mod4               : 1;  /**< [ 25: 25](R/W) Use PCS layer receive data path clock ratio of 16:1 or 32:1
20304                                                                  (serdes-data-rate:PCS-layer-clock-frequency) when set to 1. When set
20305                                                                  to 0, use PCS layer receive clock ratio of 20:1 or 40:1.
20306 
20307                                                                  GSERN()_LANE()_TX_1_BCFG[RX_POST4] and GSERN()_LANE()_TX_1_BCFG[RX_MOD4]
20308                                                                  together set the width of the parallel receive data path (pipe) in the
20309                                                                  custom receiver. GSERN()_LANE()_TX_1_BCFG[RX_POST4] and
20310                                                                  GSERN()_LANE()_TX_1_BCFG[RX_MOD4] together control the clock ratio of the
20311                                                                  serializer in the custom receiver.
20312 
20313                                                                  GSERN()_LANE()_TX_1_BCFG[RX_MOD4] and GSERN()_LANE()_TX_1_BCFG[MOD4] and
20314                                                                  would normally be set to the same value to use the transmitter and
20315                                                                  receiver at the same PCS clock ratio. */
20316         uint64_t reserved_26_31        : 6;
20317         uint64_t nvlink                : 1;  /**< [ 32: 32](R/W) Transmitter lower impedance termination control (43 ohm instead of 50 ohm). */
20318         uint64_t reserved_33_39        : 7;
20319         uint64_t tx_enloop             : 1;  /**< [ 40: 40](R/W) Set to enable the DDR loopback mux in the custom transmitter to
20320                                                                  send a copy of transmit data back into the receive path. */
20321         uint64_t reserved_41_47        : 7;
20322         uint64_t tx_dacj               : 8;  /**< [ 55: 48](R/W) ACJTAG block data bits (some redundant). */
20323         uint64_t tx_acjtag             : 1;  /**< [ 56: 56](R/W) TBD */
20324         uint64_t reserved_57_63        : 7;
20325 #endif /* Word 0 - End */
20326     } s;
20327     /* struct bdk_gsernx_lanex_tx_1_bcfg_s cn; */
20328 };
20329 typedef union bdk_gsernx_lanex_tx_1_bcfg bdk_gsernx_lanex_tx_1_bcfg_t;
20330 
20331 static inline uint64_t BDK_GSERNX_LANEX_TX_1_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_TX_1_BCFG(unsigned long a,unsigned long b)20332 static inline uint64_t BDK_GSERNX_LANEX_TX_1_BCFG(unsigned long a, unsigned long b)
20333 {
20334     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
20335         return 0x87e090000b40ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
20336     __bdk_csr_fatal("GSERNX_LANEX_TX_1_BCFG", 2, a, b, 0, 0);
20337 }
20338 
20339 #define typedef_BDK_GSERNX_LANEX_TX_1_BCFG(a,b) bdk_gsernx_lanex_tx_1_bcfg_t
20340 #define bustype_BDK_GSERNX_LANEX_TX_1_BCFG(a,b) BDK_CSR_TYPE_RSL
20341 #define basename_BDK_GSERNX_LANEX_TX_1_BCFG(a,b) "GSERNX_LANEX_TX_1_BCFG"
20342 #define device_bar_BDK_GSERNX_LANEX_TX_1_BCFG(a,b) 0x0 /* PF_BAR0 */
20343 #define busnum_BDK_GSERNX_LANEX_TX_1_BCFG(a,b) (a)
20344 #define arguments_BDK_GSERNX_LANEX_TX_1_BCFG(a,b) (a),(b),-1,-1
20345 
20346 /**
20347  * Register (RSL) gsern#_lane#_tx_bsts
20348  *
20349  * GSER Lane TX Base Status Register
20350  * lane transmitter status
20351  */
20352 union bdk_gsernx_lanex_tx_bsts
20353 {
20354     uint64_t u;
20355     struct bdk_gsernx_lanex_tx_bsts_s
20356     {
20357 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
20358         uint64_t reserved_3_63         : 61;
20359         uint64_t rxdetn                : 1;  /**< [  2:  2](RO/H) Transmitter block detection of receiver termination presence,
20360                                                                  low-side. Asserted indicates termination presence was
20361                                                                  detected. Valid only if [RXDETCOMPLETE] is set. */
20362         uint64_t rxdetp                : 1;  /**< [  1:  1](RO/H) Transmitter block detection of receiver termination presence,
20363                                                                  high-side. Asserted indicates termination presence was
20364                                                                  detected. Valid only if [RXDETCOMPLETE] is set. */
20365         uint64_t rxdetcomplete         : 1;  /**< [  0:  0](RO/H) Receiver presence detection engine has completed. */
20366 #else /* Word 0 - Little Endian */
20367         uint64_t rxdetcomplete         : 1;  /**< [  0:  0](RO/H) Receiver presence detection engine has completed. */
20368         uint64_t rxdetp                : 1;  /**< [  1:  1](RO/H) Transmitter block detection of receiver termination presence,
20369                                                                  high-side. Asserted indicates termination presence was
20370                                                                  detected. Valid only if [RXDETCOMPLETE] is set. */
20371         uint64_t rxdetn                : 1;  /**< [  2:  2](RO/H) Transmitter block detection of receiver termination presence,
20372                                                                  low-side. Asserted indicates termination presence was
20373                                                                  detected. Valid only if [RXDETCOMPLETE] is set. */
20374         uint64_t reserved_3_63         : 61;
20375 #endif /* Word 0 - End */
20376     } s;
20377     /* struct bdk_gsernx_lanex_tx_bsts_s cn; */
20378 };
20379 typedef union bdk_gsernx_lanex_tx_bsts bdk_gsernx_lanex_tx_bsts_t;
20380 
20381 static inline uint64_t BDK_GSERNX_LANEX_TX_BSTS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_TX_BSTS(unsigned long a,unsigned long b)20382 static inline uint64_t BDK_GSERNX_LANEX_TX_BSTS(unsigned long a, unsigned long b)
20383 {
20384     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
20385         return 0x87e090000b60ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
20386     __bdk_csr_fatal("GSERNX_LANEX_TX_BSTS", 2, a, b, 0, 0);
20387 }
20388 
20389 #define typedef_BDK_GSERNX_LANEX_TX_BSTS(a,b) bdk_gsernx_lanex_tx_bsts_t
20390 #define bustype_BDK_GSERNX_LANEX_TX_BSTS(a,b) BDK_CSR_TYPE_RSL
20391 #define basename_BDK_GSERNX_LANEX_TX_BSTS(a,b) "GSERNX_LANEX_TX_BSTS"
20392 #define device_bar_BDK_GSERNX_LANEX_TX_BSTS(a,b) 0x0 /* PF_BAR0 */
20393 #define busnum_BDK_GSERNX_LANEX_TX_BSTS(a,b) (a)
20394 #define arguments_BDK_GSERNX_LANEX_TX_BSTS(a,b) (a),(b),-1,-1
20395 
20396 /**
20397  * Register (RSL) gsern#_lane#_tx_drv2_bcfg
20398  *
20399  * GSER Lane TX Drive Override Base Configuration Register 2
20400  * Upper limits on the allowed preemphasis and postemphasis values before translating to the
20401  * raw transmitter control settings.
20402  */
20403 union bdk_gsernx_lanex_tx_drv2_bcfg
20404 {
20405     uint64_t u;
20406     struct bdk_gsernx_lanex_tx_drv2_bcfg_s
20407     {
20408 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
20409         uint64_t reserved_13_63        : 51;
20410         uint64_t cpost_limit           : 5;  /**< [ 12:  8](R/W) Upper limit for the postemphasis value. The valid range is 0x0 to 0x10. */
20411         uint64_t reserved_5_7          : 3;
20412         uint64_t cpre_limit            : 5;  /**< [  4:  0](R/W) Upper limit for the preemphasis value. The valid range is 0x0 to 0x10. */
20413 #else /* Word 0 - Little Endian */
20414         uint64_t cpre_limit            : 5;  /**< [  4:  0](R/W) Upper limit for the preemphasis value. The valid range is 0x0 to 0x10. */
20415         uint64_t reserved_5_7          : 3;
20416         uint64_t cpost_limit           : 5;  /**< [ 12:  8](R/W) Upper limit for the postemphasis value. The valid range is 0x0 to 0x10. */
20417         uint64_t reserved_13_63        : 51;
20418 #endif /* Word 0 - End */
20419     } s;
20420     /* struct bdk_gsernx_lanex_tx_drv2_bcfg_s cn; */
20421 };
20422 typedef union bdk_gsernx_lanex_tx_drv2_bcfg bdk_gsernx_lanex_tx_drv2_bcfg_t;
20423 
20424 static inline uint64_t BDK_GSERNX_LANEX_TX_DRV2_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_TX_DRV2_BCFG(unsigned long a,unsigned long b)20425 static inline uint64_t BDK_GSERNX_LANEX_TX_DRV2_BCFG(unsigned long a, unsigned long b)
20426 {
20427     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
20428         return 0x87e090000b20ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
20429     __bdk_csr_fatal("GSERNX_LANEX_TX_DRV2_BCFG", 2, a, b, 0, 0);
20430 }
20431 
20432 #define typedef_BDK_GSERNX_LANEX_TX_DRV2_BCFG(a,b) bdk_gsernx_lanex_tx_drv2_bcfg_t
20433 #define bustype_BDK_GSERNX_LANEX_TX_DRV2_BCFG(a,b) BDK_CSR_TYPE_RSL
20434 #define basename_BDK_GSERNX_LANEX_TX_DRV2_BCFG(a,b) "GSERNX_LANEX_TX_DRV2_BCFG"
20435 #define device_bar_BDK_GSERNX_LANEX_TX_DRV2_BCFG(a,b) 0x0 /* PF_BAR0 */
20436 #define busnum_BDK_GSERNX_LANEX_TX_DRV2_BCFG(a,b) (a)
20437 #define arguments_BDK_GSERNX_LANEX_TX_DRV2_BCFG(a,b) (a),(b),-1,-1
20438 
20439 /**
20440  * Register (RSL) gsern#_lane#_tx_drv_bcfg
20441  *
20442  * GSER Lane TX Drive Override Base Configuration Register
20443  * Lane transmitter drive override values and enables configuration
20444  * Register. Default values are chosen to provide the "idle" configuration
20445  * when the lane reset state machine completes. The transmitter "idle"
20446  * configuration drives the output to mid-rail with 2 pull-up and 2
20447  * pull-down legs active.
20448  *
20449  * These value fields in this register are in effect when the
20450  * corresponding enable fields ([EN_TX_DRV], [EN_TX_CSPD], and
20451  * GSERN()_LANE()_TX_DRV_BCFG[EN_TX_BS]) are set.
20452  */
20453 union bdk_gsernx_lanex_tx_drv_bcfg
20454 {
20455     uint64_t u;
20456     struct bdk_gsernx_lanex_tx_drv_bcfg_s
20457     {
20458 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
20459         uint64_t tx_cspd               : 1;  /**< [ 63: 63](R/W) Power-down control for a second TX bias/swing leg with the same
20460                                                                  weight as TX_BS[3]. Normally this field is left deasserted to
20461                                                                  provide a minimum transmit amplitude. Asserting [TX_CSPD] will turn
20462                                                                  off all legs of the bias/swing generator for lower standby power. */
20463         uint64_t reserved_62           : 1;
20464         uint64_t tx_bs                 : 6;  /**< [ 61: 56](R/W) TX bias/swing selection. This setting only takes effect if [EN_TX_BS]
20465                                                                  is asserted and [TX_CSPD] is deasserted; with [TX_CSPD] asserted the
20466                                                                  bias/swing control setting seen in the analog bias generator is zero.
20467 
20468                                                                  Typical override values would be:
20469                                                                    42 = Nominal 1.0V p-p transmit amplitude.
20470                                                                    52 = Nominal 1.2V p-p transmit amplitude.
20471 
20472                                                                  The maximum usable value without transmitted waveform distortion depends
20473                                                                  primarily on voltage, secondarily on process corner and temperature, but is at
20474                                                                  least 52.  There is no minimum setting based on transmitter distortion, only
20475                                                                  that set by the receiver. */
20476         uint64_t reserved_51_55        : 5;
20477         uint64_t en_tx_cspd            : 1;  /**< [ 50: 50](R/W) Enables use of [TX_CSPD] an overrides to
20478                                                                  set the current source power down control of the transmitter. */
20479         uint64_t en_tx_bs              : 1;  /**< [ 49: 49](R/W) Enables use of [TX_BS] as an override to
20480                                                                  set the bias/swing control of the transmitter. */
20481         uint64_t en_tx_drv             : 1;  /**< [ 48: 48](R/W) Enables use of the transmit drive strength fields in this register as overrides
20482                                                                  to explicitly set the base transmitter controls. (All fields except [TX_BS] and
20483                                                                  [TX_CSPD], which have separate override enables.) For diagnostic use only. */
20484         uint64_t reserved_42_47        : 6;
20485         uint64_t muxpost               : 2;  /**< [ 41: 40](R/W) Postcursor mux controls. */
20486         uint64_t cpostb                : 3;  /**< [ 39: 37](R/W) Post cursor block 1 coefficient. */
20487         uint64_t cposta                : 3;  /**< [ 36: 34](R/W) Post cursor block 0 coefficient. */
20488         uint64_t enpost                : 2;  /**< [ 33: 32](R/W) Postcursor block enables. */
20489         uint64_t reserved_27_31        : 5;
20490         uint64_t muxmain               : 4;  /**< [ 26: 23](R/W) Main mux controls (some redundant). */
20491         uint64_t cmaind                : 3;  /**< [ 22: 20](R/W) Main block 3 coefficient. */
20492         uint64_t enmain                : 4;  /**< [ 19: 16](R/W) Main block enables. */
20493         uint64_t reserved_10_15        : 6;
20494         uint64_t muxpre                : 2;  /**< [  9:  8](R/W) Precursor mux controls. */
20495         uint64_t cpreb                 : 3;  /**< [  7:  5](R/W) Precursor Block 1 coefficient. */
20496         uint64_t cprea                 : 3;  /**< [  4:  2](R/W) Precursor Block 0 coefficient. */
20497         uint64_t enpre                 : 2;  /**< [  1:  0](R/W) Precursor block enables. */
20498 #else /* Word 0 - Little Endian */
20499         uint64_t enpre                 : 2;  /**< [  1:  0](R/W) Precursor block enables. */
20500         uint64_t cprea                 : 3;  /**< [  4:  2](R/W) Precursor Block 0 coefficient. */
20501         uint64_t cpreb                 : 3;  /**< [  7:  5](R/W) Precursor Block 1 coefficient. */
20502         uint64_t muxpre                : 2;  /**< [  9:  8](R/W) Precursor mux controls. */
20503         uint64_t reserved_10_15        : 6;
20504         uint64_t enmain                : 4;  /**< [ 19: 16](R/W) Main block enables. */
20505         uint64_t cmaind                : 3;  /**< [ 22: 20](R/W) Main block 3 coefficient. */
20506         uint64_t muxmain               : 4;  /**< [ 26: 23](R/W) Main mux controls (some redundant). */
20507         uint64_t reserved_27_31        : 5;
20508         uint64_t enpost                : 2;  /**< [ 33: 32](R/W) Postcursor block enables. */
20509         uint64_t cposta                : 3;  /**< [ 36: 34](R/W) Post cursor block 0 coefficient. */
20510         uint64_t cpostb                : 3;  /**< [ 39: 37](R/W) Post cursor block 1 coefficient. */
20511         uint64_t muxpost               : 2;  /**< [ 41: 40](R/W) Postcursor mux controls. */
20512         uint64_t reserved_42_47        : 6;
20513         uint64_t en_tx_drv             : 1;  /**< [ 48: 48](R/W) Enables use of the transmit drive strength fields in this register as overrides
20514                                                                  to explicitly set the base transmitter controls. (All fields except [TX_BS] and
20515                                                                  [TX_CSPD], which have separate override enables.) For diagnostic use only. */
20516         uint64_t en_tx_bs              : 1;  /**< [ 49: 49](R/W) Enables use of [TX_BS] as an override to
20517                                                                  set the bias/swing control of the transmitter. */
20518         uint64_t en_tx_cspd            : 1;  /**< [ 50: 50](R/W) Enables use of [TX_CSPD] an overrides to
20519                                                                  set the current source power down control of the transmitter. */
20520         uint64_t reserved_51_55        : 5;
20521         uint64_t tx_bs                 : 6;  /**< [ 61: 56](R/W) TX bias/swing selection. This setting only takes effect if [EN_TX_BS]
20522                                                                  is asserted and [TX_CSPD] is deasserted; with [TX_CSPD] asserted the
20523                                                                  bias/swing control setting seen in the analog bias generator is zero.
20524 
20525                                                                  Typical override values would be:
20526                                                                    42 = Nominal 1.0V p-p transmit amplitude.
20527                                                                    52 = Nominal 1.2V p-p transmit amplitude.
20528 
20529                                                                  The maximum usable value without transmitted waveform distortion depends
20530                                                                  primarily on voltage, secondarily on process corner and temperature, but is at
20531                                                                  least 52.  There is no minimum setting based on transmitter distortion, only
20532                                                                  that set by the receiver. */
20533         uint64_t reserved_62           : 1;
20534         uint64_t tx_cspd               : 1;  /**< [ 63: 63](R/W) Power-down control for a second TX bias/swing leg with the same
20535                                                                  weight as TX_BS[3]. Normally this field is left deasserted to
20536                                                                  provide a minimum transmit amplitude. Asserting [TX_CSPD] will turn
20537                                                                  off all legs of the bias/swing generator for lower standby power. */
20538 #endif /* Word 0 - End */
20539     } s;
20540     /* struct bdk_gsernx_lanex_tx_drv_bcfg_s cn; */
20541 };
20542 typedef union bdk_gsernx_lanex_tx_drv_bcfg bdk_gsernx_lanex_tx_drv_bcfg_t;
20543 
20544 static inline uint64_t BDK_GSERNX_LANEX_TX_DRV_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_TX_DRV_BCFG(unsigned long a,unsigned long b)20545 static inline uint64_t BDK_GSERNX_LANEX_TX_DRV_BCFG(unsigned long a, unsigned long b)
20546 {
20547     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
20548         return 0x87e090000b10ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
20549     __bdk_csr_fatal("GSERNX_LANEX_TX_DRV_BCFG", 2, a, b, 0, 0);
20550 }
20551 
20552 #define typedef_BDK_GSERNX_LANEX_TX_DRV_BCFG(a,b) bdk_gsernx_lanex_tx_drv_bcfg_t
20553 #define bustype_BDK_GSERNX_LANEX_TX_DRV_BCFG(a,b) BDK_CSR_TYPE_RSL
20554 #define basename_BDK_GSERNX_LANEX_TX_DRV_BCFG(a,b) "GSERNX_LANEX_TX_DRV_BCFG"
20555 #define device_bar_BDK_GSERNX_LANEX_TX_DRV_BCFG(a,b) 0x0 /* PF_BAR0 */
20556 #define busnum_BDK_GSERNX_LANEX_TX_DRV_BCFG(a,b) (a)
20557 #define arguments_BDK_GSERNX_LANEX_TX_DRV_BCFG(a,b) (a),(b),-1,-1
20558 
20559 /**
20560  * Register (RSL) gsern#_lane#_tx_drv_bsts
20561  *
20562  * GSER Lane TX Drive Base Status Register
20563  * Lane transmitter drive setup status, i.e., settings which the
20564  * transmitter is actually using. During a transmitter receiver presence
20565  * detection sequence the fields of this register not reliable, i.e.,
20566  * following a write of GSERN()_LANE()_TX_RXD_BCFG[TRIGGER] to one this register is not
20567  * reliable until after GSERN()_LANE()_TX_BSTS[RXDETCOMPLETE] reads as one.
20568  */
20569 union bdk_gsernx_lanex_tx_drv_bsts
20570 {
20571     uint64_t u;
20572     struct bdk_gsernx_lanex_tx_drv_bsts_s
20573     {
20574 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
20575         uint64_t tx_cspd               : 1;  /**< [ 63: 63](RO/H) TX current source power down (cspd) setting in use, a second
20576                                                                  bias/swing leg with the same weight as TX_BS[3], but with opposite
20577                                                                  polarity for the control signal. */
20578         uint64_t reserved_62           : 1;
20579         uint64_t tx_bs                 : 6;  /**< [ 61: 56](RO/H) TX bias/swing selection in use. */
20580         uint64_t reserved_52_55        : 4;
20581         uint64_t tx_invalid            : 1;  /**< [ 51: 51](RO/H) Invalid status generated by the gser_lane_pnr_txdrv_remap module
20582                                                                  indicating an invalid combination of (cpre, cpost, cmain, bit-stuff)
20583                                                                  was requested. */
20584         uint64_t reserved_42_50        : 9;
20585         uint64_t muxpost               : 2;  /**< [ 41: 40](RO/H) Postcursor mux controls in use. */
20586         uint64_t cpostb                : 3;  /**< [ 39: 37](RO/H) Post cursor block 1 coefficient in use. */
20587         uint64_t cposta                : 3;  /**< [ 36: 34](RO/H) Post cursor block 0 coefficient in use. */
20588         uint64_t enpost                : 2;  /**< [ 33: 32](RO/H) Postcursor block enables in use. */
20589         uint64_t reserved_27_31        : 5;
20590         uint64_t muxmain               : 4;  /**< [ 26: 23](RO/H) Main mux controls (some redundant) in use. */
20591         uint64_t cmaind                : 3;  /**< [ 22: 20](RO/H) Main block 3 coefficient in use. */
20592         uint64_t enmain                : 4;  /**< [ 19: 16](RO/H) Main block enables in use. */
20593         uint64_t reserved_10_15        : 6;
20594         uint64_t muxpre                : 2;  /**< [  9:  8](RO/H) Precursor mux controls in use. */
20595         uint64_t cpreb                 : 3;  /**< [  7:  5](RO/H) Precursor Block 1 coefficient in use. */
20596         uint64_t cprea                 : 3;  /**< [  4:  2](RO/H) Precursor Block 0 coefficient in use. */
20597         uint64_t enpre                 : 2;  /**< [  1:  0](RO/H) Precursor block enables in use. */
20598 #else /* Word 0 - Little Endian */
20599         uint64_t enpre                 : 2;  /**< [  1:  0](RO/H) Precursor block enables in use. */
20600         uint64_t cprea                 : 3;  /**< [  4:  2](RO/H) Precursor Block 0 coefficient in use. */
20601         uint64_t cpreb                 : 3;  /**< [  7:  5](RO/H) Precursor Block 1 coefficient in use. */
20602         uint64_t muxpre                : 2;  /**< [  9:  8](RO/H) Precursor mux controls in use. */
20603         uint64_t reserved_10_15        : 6;
20604         uint64_t enmain                : 4;  /**< [ 19: 16](RO/H) Main block enables in use. */
20605         uint64_t cmaind                : 3;  /**< [ 22: 20](RO/H) Main block 3 coefficient in use. */
20606         uint64_t muxmain               : 4;  /**< [ 26: 23](RO/H) Main mux controls (some redundant) in use. */
20607         uint64_t reserved_27_31        : 5;
20608         uint64_t enpost                : 2;  /**< [ 33: 32](RO/H) Postcursor block enables in use. */
20609         uint64_t cposta                : 3;  /**< [ 36: 34](RO/H) Post cursor block 0 coefficient in use. */
20610         uint64_t cpostb                : 3;  /**< [ 39: 37](RO/H) Post cursor block 1 coefficient in use. */
20611         uint64_t muxpost               : 2;  /**< [ 41: 40](RO/H) Postcursor mux controls in use. */
20612         uint64_t reserved_42_50        : 9;
20613         uint64_t tx_invalid            : 1;  /**< [ 51: 51](RO/H) Invalid status generated by the gser_lane_pnr_txdrv_remap module
20614                                                                  indicating an invalid combination of (cpre, cpost, cmain, bit-stuff)
20615                                                                  was requested. */
20616         uint64_t reserved_52_55        : 4;
20617         uint64_t tx_bs                 : 6;  /**< [ 61: 56](RO/H) TX bias/swing selection in use. */
20618         uint64_t reserved_62           : 1;
20619         uint64_t tx_cspd               : 1;  /**< [ 63: 63](RO/H) TX current source power down (cspd) setting in use, a second
20620                                                                  bias/swing leg with the same weight as TX_BS[3], but with opposite
20621                                                                  polarity for the control signal. */
20622 #endif /* Word 0 - End */
20623     } s;
20624     /* struct bdk_gsernx_lanex_tx_drv_bsts_s cn; */
20625 };
20626 typedef union bdk_gsernx_lanex_tx_drv_bsts bdk_gsernx_lanex_tx_drv_bsts_t;
20627 
20628 static inline uint64_t BDK_GSERNX_LANEX_TX_DRV_BSTS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_TX_DRV_BSTS(unsigned long a,unsigned long b)20629 static inline uint64_t BDK_GSERNX_LANEX_TX_DRV_BSTS(unsigned long a, unsigned long b)
20630 {
20631     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
20632         return 0x87e090000b30ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
20633     __bdk_csr_fatal("GSERNX_LANEX_TX_DRV_BSTS", 2, a, b, 0, 0);
20634 }
20635 
20636 #define typedef_BDK_GSERNX_LANEX_TX_DRV_BSTS(a,b) bdk_gsernx_lanex_tx_drv_bsts_t
20637 #define bustype_BDK_GSERNX_LANEX_TX_DRV_BSTS(a,b) BDK_CSR_TYPE_RSL
20638 #define basename_BDK_GSERNX_LANEX_TX_DRV_BSTS(a,b) "GSERNX_LANEX_TX_DRV_BSTS"
20639 #define device_bar_BDK_GSERNX_LANEX_TX_DRV_BSTS(a,b) 0x0 /* PF_BAR0 */
20640 #define busnum_BDK_GSERNX_LANEX_TX_DRV_BSTS(a,b) (a)
20641 #define arguments_BDK_GSERNX_LANEX_TX_DRV_BSTS(a,b) (a),(b),-1,-1
20642 
20643 /**
20644  * Register (RSL) gsern#_lane#_tx_rxd_bcfg
20645  *
20646  * GSER Lane TX Receive Presence Detector Base Configuration Register
20647  * The lane transmitter receiver presence detector controls are in this
20648  * register. When the transmitter's receiver presence detection sequencer
20649  * is triggered (by asserting [TRIGGER]), the transmitter needs to
20650  * be in a weak idle state, i.e., all fields of GSERN()_LANE()_TX_DRV_BSTS
20651  * should reflect the reset default values of the same fields in
20652  * GSERN()_LANE()_TX_DRV_BCFG.
20653  */
20654 union bdk_gsernx_lanex_tx_rxd_bcfg
20655 {
20656     uint64_t u;
20657     struct bdk_gsernx_lanex_tx_rxd_bcfg_s
20658     {
20659 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
20660         uint64_t reserved_34_63        : 30;
20661         uint64_t ovrride_det_en        : 1;  /**< [ 33: 33](R/W) Enable use of the [OVRRIDE_DET] value for the result of PCIe transmitter
20662                                                                  receiver presense detection instead of the normal measured result.
20663 
20664                                                                  Internal:
20665                                                                  When asserted, this control will also suppress the normal pull-down and release
20666                                                                  of the transmit signals that takes place during receiver presence detaction. */
20667         uint64_t ovrride_det           : 1;  /**< [ 32: 32](R/W) When enabled by [OVRRIDE_DET_EN], the PCIe transmitter receiver presence
20668                                                                  detector will use this value instead of that measured by the functional
20669                                                                  circuit. This provides a mechanism to force recognition of a known number of
20670                                                                  lanes in the link independent of the normal receiver presence detection
20671                                                                  procedure. */
20672         uint64_t reserved_30_31        : 2;
20673         uint64_t release_wait          : 6;  /**< [ 29: 24](R/W) Wait time after asserting rxd_samp and rxd_samn to capture the
20674                                                                  result before releasing tx_rxd, rxd_samp, and rxd_samn,
20675                                                                  expressed as a count of txdivclk cycles minus one, e.g., set to 0
20676                                                                  to get 1 cycles. Typically set for 8 ns, or a count of 1 cycle when
20677                                                                  using for PCIe gen1 (125 MHz txdivclk). */
20678         uint64_t reserved_22_23        : 2;
20679         uint64_t sample_wait           : 6;  /**< [ 21: 16](R/W) Wait time after asserting tx_rxd before asserting rxd_samp and
20680                                                                  rxd_samn to sample the result, expressed as a count of lane PLL
20681                                                                  reference clock cycles minus 1, e.g., set to 1 to get 2 cycles.
20682                                                                  Typically set for 16 ns, or a count of 2 cycles for PCIe gen1
20683                                                                  (125 MHz txdivclk). */
20684         uint64_t reserved_12_15        : 4;
20685         uint64_t tx_disable            : 1;  /**< [ 11: 11](R/W) Disable all transmitter eqdrv blocks during the receiver-present
20686                                                                  detection sequence. When asserted, this temporarily overrides the
20687                                                                  enmain, empre, and enpost settings in
20688                                                                  GSERN()_LANE()_TX_DRV_BCFG, tri-stating the transmitter
20689                                                                  during the sequence instead of leaving it in weak idle. */
20690         uint64_t samn_en               : 1;  /**< [ 10: 10](R/W) Enable sampling of the transmitter's receiver termination presence
20691                                                                  detector on the padn output. */
20692         uint64_t samp_en               : 1;  /**< [  9:  9](R/W) Enable sampling of the transmitter's receiver termination presence
20693                                                                  detector on the padp output. */
20694         uint64_t rxd_en                : 1;  /**< [  8:  8](R/W) Enable assertion of the RXD pulldown on the (common) termination
20695                                                                  point for differential pair prior to sampling the pad voltages. Set
20696                                                                  to one for the normal detection sequence to work correctly. Setting
20697                                                                  to zero is a verification hook to allow sampling the pad values
20698                                                                  without first pulling the pads low. */
20699         uint64_t reserved_1_7          : 7;
20700         uint64_t trigger               : 1;  /**< [  0:  0](R/W/H) Enable the sequencer which exercises the transmitter's receiver
20701                                                                  termination presence detection. An asserting edge will start the
20702                                                                  sequencer. This field self-clears when the sequence has completed. */
20703 #else /* Word 0 - Little Endian */
20704         uint64_t trigger               : 1;  /**< [  0:  0](R/W/H) Enable the sequencer which exercises the transmitter's receiver
20705                                                                  termination presence detection. An asserting edge will start the
20706                                                                  sequencer. This field self-clears when the sequence has completed. */
20707         uint64_t reserved_1_7          : 7;
20708         uint64_t rxd_en                : 1;  /**< [  8:  8](R/W) Enable assertion of the RXD pulldown on the (common) termination
20709                                                                  point for differential pair prior to sampling the pad voltages. Set
20710                                                                  to one for the normal detection sequence to work correctly. Setting
20711                                                                  to zero is a verification hook to allow sampling the pad values
20712                                                                  without first pulling the pads low. */
20713         uint64_t samp_en               : 1;  /**< [  9:  9](R/W) Enable sampling of the transmitter's receiver termination presence
20714                                                                  detector on the padp output. */
20715         uint64_t samn_en               : 1;  /**< [ 10: 10](R/W) Enable sampling of the transmitter's receiver termination presence
20716                                                                  detector on the padn output. */
20717         uint64_t tx_disable            : 1;  /**< [ 11: 11](R/W) Disable all transmitter eqdrv blocks during the receiver-present
20718                                                                  detection sequence. When asserted, this temporarily overrides the
20719                                                                  enmain, empre, and enpost settings in
20720                                                                  GSERN()_LANE()_TX_DRV_BCFG, tri-stating the transmitter
20721                                                                  during the sequence instead of leaving it in weak idle. */
20722         uint64_t reserved_12_15        : 4;
20723         uint64_t sample_wait           : 6;  /**< [ 21: 16](R/W) Wait time after asserting tx_rxd before asserting rxd_samp and
20724                                                                  rxd_samn to sample the result, expressed as a count of lane PLL
20725                                                                  reference clock cycles minus 1, e.g., set to 1 to get 2 cycles.
20726                                                                  Typically set for 16 ns, or a count of 2 cycles for PCIe gen1
20727                                                                  (125 MHz txdivclk). */
20728         uint64_t reserved_22_23        : 2;
20729         uint64_t release_wait          : 6;  /**< [ 29: 24](R/W) Wait time after asserting rxd_samp and rxd_samn to capture the
20730                                                                  result before releasing tx_rxd, rxd_samp, and rxd_samn,
20731                                                                  expressed as a count of txdivclk cycles minus one, e.g., set to 0
20732                                                                  to get 1 cycles. Typically set for 8 ns, or a count of 1 cycle when
20733                                                                  using for PCIe gen1 (125 MHz txdivclk). */
20734         uint64_t reserved_30_31        : 2;
20735         uint64_t ovrride_det           : 1;  /**< [ 32: 32](R/W) When enabled by [OVRRIDE_DET_EN], the PCIe transmitter receiver presence
20736                                                                  detector will use this value instead of that measured by the functional
20737                                                                  circuit. This provides a mechanism to force recognition of a known number of
20738                                                                  lanes in the link independent of the normal receiver presence detection
20739                                                                  procedure. */
20740         uint64_t ovrride_det_en        : 1;  /**< [ 33: 33](R/W) Enable use of the [OVRRIDE_DET] value for the result of PCIe transmitter
20741                                                                  receiver presense detection instead of the normal measured result.
20742 
20743                                                                  Internal:
20744                                                                  When asserted, this control will also suppress the normal pull-down and release
20745                                                                  of the transmit signals that takes place during receiver presence detaction. */
20746         uint64_t reserved_34_63        : 30;
20747 #endif /* Word 0 - End */
20748     } s;
20749     /* struct bdk_gsernx_lanex_tx_rxd_bcfg_s cn; */
20750 };
20751 typedef union bdk_gsernx_lanex_tx_rxd_bcfg bdk_gsernx_lanex_tx_rxd_bcfg_t;
20752 
20753 static inline uint64_t BDK_GSERNX_LANEX_TX_RXD_BCFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_TX_RXD_BCFG(unsigned long a,unsigned long b)20754 static inline uint64_t BDK_GSERNX_LANEX_TX_RXD_BCFG(unsigned long a, unsigned long b)
20755 {
20756     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
20757         return 0x87e090000b50ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
20758     __bdk_csr_fatal("GSERNX_LANEX_TX_RXD_BCFG", 2, a, b, 0, 0);
20759 }
20760 
20761 #define typedef_BDK_GSERNX_LANEX_TX_RXD_BCFG(a,b) bdk_gsernx_lanex_tx_rxd_bcfg_t
20762 #define bustype_BDK_GSERNX_LANEX_TX_RXD_BCFG(a,b) BDK_CSR_TYPE_RSL
20763 #define basename_BDK_GSERNX_LANEX_TX_RXD_BCFG(a,b) "GSERNX_LANEX_TX_RXD_BCFG"
20764 #define device_bar_BDK_GSERNX_LANEX_TX_RXD_BCFG(a,b) 0x0 /* PF_BAR0 */
20765 #define busnum_BDK_GSERNX_LANEX_TX_RXD_BCFG(a,b) (a)
20766 #define arguments_BDK_GSERNX_LANEX_TX_RXD_BCFG(a,b) (a),(b),-1,-1
20767 
20768 /**
20769  * Register (RSL) gsern#_lane#_txdivclk_ctr
20770  *
20771  * GSER Lane TX Div Clock Cycle Counter Register
20772  * A free-running counter of lane txdivclk cycles to enable rough confirmation of
20773  * SerDes transmit data rate. Read the counter; wait some time, e.g., 100ms; read the
20774  * counter; calculate frequency based on the difference in values during the known wait
20775  * time and the programmed data path width.
20776  */
20777 union bdk_gsernx_lanex_txdivclk_ctr
20778 {
20779     uint64_t u;
20780     struct bdk_gsernx_lanex_txdivclk_ctr_s
20781     {
20782 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
20783         uint64_t count                 : 64; /**< [ 63:  0](R/W/H) Running count of txdivclk cycles. */
20784 #else /* Word 0 - Little Endian */
20785         uint64_t count                 : 64; /**< [ 63:  0](R/W/H) Running count of txdivclk cycles. */
20786 #endif /* Word 0 - End */
20787     } s;
20788     /* struct bdk_gsernx_lanex_txdivclk_ctr_s cn; */
20789 };
20790 typedef union bdk_gsernx_lanex_txdivclk_ctr bdk_gsernx_lanex_txdivclk_ctr_t;
20791 
20792 static inline uint64_t BDK_GSERNX_LANEX_TXDIVCLK_CTR(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline));
BDK_GSERNX_LANEX_TXDIVCLK_CTR(unsigned long a,unsigned long b)20793 static inline uint64_t BDK_GSERNX_LANEX_TXDIVCLK_CTR(unsigned long a, unsigned long b)
20794 {
20795     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && ((a<=7) && (b<=4)))
20796         return 0x87e0900030b0ll + 0x1000000ll * ((a) & 0x7) + 0x10000ll * ((b) & 0x7);
20797     __bdk_csr_fatal("GSERNX_LANEX_TXDIVCLK_CTR", 2, a, b, 0, 0);
20798 }
20799 
20800 #define typedef_BDK_GSERNX_LANEX_TXDIVCLK_CTR(a,b) bdk_gsernx_lanex_txdivclk_ctr_t
20801 #define bustype_BDK_GSERNX_LANEX_TXDIVCLK_CTR(a,b) BDK_CSR_TYPE_RSL
20802 #define basename_BDK_GSERNX_LANEX_TXDIVCLK_CTR(a,b) "GSERNX_LANEX_TXDIVCLK_CTR"
20803 #define device_bar_BDK_GSERNX_LANEX_TXDIVCLK_CTR(a,b) 0x0 /* PF_BAR0 */
20804 #define busnum_BDK_GSERNX_LANEX_TXDIVCLK_CTR(a,b) (a)
20805 #define arguments_BDK_GSERNX_LANEX_TXDIVCLK_CTR(a,b) (a),(b),-1,-1
20806 
20807 #endif /* __BDK_CSRS_GSERN_H__ */
20808