-
Notifications
You must be signed in to change notification settings - Fork 0
/
sfc.c
3928 lines (3750 loc) · 138 KB
/
sfc.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/****************************************************************************
* Support for Solarflare Solarstorm network controllers and boards
* Copyright 2010-2012 Solarflare Communications Inc.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation, incorporated herein by reference.
*/
#include <stdio.h>
#include <string.h>
#include "internal.h"
#ifndef ARRAY_SIZE
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#endif
/* Falcon architecture register definitions
* (from linux/drivers/net/ethernet/sfc/farch_regs.h)
*/
/* ADR_REGION_REG: Address region register */
#define FR_AZ_ADR_REGION 0x00000000
#define FRF_AZ_ADR_REGION3_LBN 96
#define FRF_AZ_ADR_REGION3_WIDTH 18
#define FRF_AZ_ADR_REGION2_LBN 64
#define FRF_AZ_ADR_REGION2_WIDTH 18
#define FRF_AZ_ADR_REGION1_LBN 32
#define FRF_AZ_ADR_REGION1_WIDTH 18
#define FRF_AZ_ADR_REGION0_LBN 0
#define FRF_AZ_ADR_REGION0_WIDTH 18
/* INT_EN_REG_KER: Kernel driver Interrupt enable register */
#define FR_AZ_INT_EN_KER 0x00000010
#define FRF_AZ_KER_INT_LEVE_SEL_LBN 8
#define FRF_AZ_KER_INT_LEVE_SEL_WIDTH 6
#define FRF_AZ_KER_INT_CHAR_LBN 4
#define FRF_AZ_KER_INT_CHAR_WIDTH 1
#define FRF_AZ_KER_INT_KER_LBN 3
#define FRF_AZ_KER_INT_KER_WIDTH 1
#define FRF_AZ_DRV_INT_EN_KER_LBN 0
#define FRF_AZ_DRV_INT_EN_KER_WIDTH 1
/* INT_EN_REG_CHAR: Char Driver interrupt enable register */
#define FR_BZ_INT_EN_CHAR 0x00000020
#define FRF_BZ_CHAR_INT_LEVE_SEL_LBN 8
#define FRF_BZ_CHAR_INT_LEVE_SEL_WIDTH 6
#define FRF_BZ_CHAR_INT_CHAR_LBN 4
#define FRF_BZ_CHAR_INT_CHAR_WIDTH 1
#define FRF_BZ_CHAR_INT_KER_LBN 3
#define FRF_BZ_CHAR_INT_KER_WIDTH 1
#define FRF_BZ_DRV_INT_EN_CHAR_LBN 0
#define FRF_BZ_DRV_INT_EN_CHAR_WIDTH 1
/* INT_ADR_REG_KER: Interrupt host address for Kernel driver */
#define FR_AZ_INT_ADR_KER 0x00000030
#define FRF_AZ_NORM_INT_VEC_DIS_KER_LBN 64
#define FRF_AZ_NORM_INT_VEC_DIS_KER_WIDTH 1
#define FRF_AZ_INT_ADR_KER_LBN 0
#define FRF_AZ_INT_ADR_KER_WIDTH 64
/* INT_ADR_REG_CHAR: Interrupt host address for Char driver */
#define FR_BZ_INT_ADR_CHAR 0x00000040
#define FRF_BZ_NORM_INT_VEC_DIS_CHAR_LBN 64
#define FRF_BZ_NORM_INT_VEC_DIS_CHAR_WIDTH 1
#define FRF_BZ_INT_ADR_CHAR_LBN 0
#define FRF_BZ_INT_ADR_CHAR_WIDTH 64
/* INT_ACK_KER: Kernel interrupt acknowledge register */
#define FR_AA_INT_ACK_KER 0x00000050
#define FRF_AA_INT_ACK_KER_FIELD_LBN 0
#define FRF_AA_INT_ACK_KER_FIELD_WIDTH 32
/* INT_ISR0_REG: Function 0 Interrupt Acknowledge Status register */
#define FR_BZ_INT_ISR0 0x00000090
#define FRF_BZ_INT_ISR_REG_LBN 0
#define FRF_BZ_INT_ISR_REG_WIDTH 64
/* HW_INIT_REG: Hardware initialization register */
#define FR_AZ_HW_INIT 0x000000c0
#define FRF_BB_BDMRD_CPLF_FULL_LBN 124
#define FRF_BB_BDMRD_CPLF_FULL_WIDTH 1
#define FRF_BB_PCIE_CPL_TIMEOUT_CTRL_LBN 121
#define FRF_BB_PCIE_CPL_TIMEOUT_CTRL_WIDTH 3
#define FRF_CZ_TX_MRG_TAGS_LBN 120
#define FRF_CZ_TX_MRG_TAGS_WIDTH 1
#define FRF_AB_TRGT_MASK_ALL_LBN 100
#define FRF_AB_TRGT_MASK_ALL_WIDTH 1
#define FRF_AZ_DOORBELL_DROP_LBN 92
#define FRF_AZ_DOORBELL_DROP_WIDTH 8
#define FRF_AB_TX_RREQ_MASK_EN_LBN 76
#define FRF_AB_TX_RREQ_MASK_EN_WIDTH 1
#define FRF_AB_PE_EIDLE_DIS_LBN 75
#define FRF_AB_PE_EIDLE_DIS_WIDTH 1
#define FRF_AA_FC_BLOCKING_EN_LBN 45
#define FRF_AA_FC_BLOCKING_EN_WIDTH 1
#define FRF_BZ_B2B_REQ_EN_LBN 45
#define FRF_BZ_B2B_REQ_EN_WIDTH 1
#define FRF_AA_B2B_REQ_EN_LBN 44
#define FRF_AA_B2B_REQ_EN_WIDTH 1
#define FRF_BB_FC_BLOCKING_EN_LBN 44
#define FRF_BB_FC_BLOCKING_EN_WIDTH 1
#define FRF_AZ_POST_WR_MASK_LBN 40
#define FRF_AZ_POST_WR_MASK_WIDTH 4
#define FRF_AZ_TLP_TC_LBN 34
#define FRF_AZ_TLP_TC_WIDTH 3
#define FRF_AZ_TLP_ATTR_LBN 32
#define FRF_AZ_TLP_ATTR_WIDTH 2
#define FRF_AB_INTB_VEC_LBN 24
#define FRF_AB_INTB_VEC_WIDTH 5
#define FRF_AB_INTA_VEC_LBN 16
#define FRF_AB_INTA_VEC_WIDTH 5
#define FRF_AZ_WD_TIMER_LBN 8
#define FRF_AZ_WD_TIMER_WIDTH 8
#define FRF_AZ_US_DISABLE_LBN 5
#define FRF_AZ_US_DISABLE_WIDTH 1
#define FRF_AZ_TLP_EP_LBN 4
#define FRF_AZ_TLP_EP_WIDTH 1
#define FRF_AZ_ATTR_SEL_LBN 3
#define FRF_AZ_ATTR_SEL_WIDTH 1
#define FRF_AZ_TD_SEL_LBN 1
#define FRF_AZ_TD_SEL_WIDTH 1
#define FRF_AZ_TLP_TD_LBN 0
#define FRF_AZ_TLP_TD_WIDTH 1
/* EE_SPI_HCMD_REG: SPI host command register */
#define FR_AB_EE_SPI_HCMD 0x00000100
#define FRF_AB_EE_SPI_HCMD_CMD_EN_LBN 31
#define FRF_AB_EE_SPI_HCMD_CMD_EN_WIDTH 1
#define FRF_AB_EE_WR_TIMER_ACTIVE_LBN 28
#define FRF_AB_EE_WR_TIMER_ACTIVE_WIDTH 1
#define FRF_AB_EE_SPI_HCMD_SF_SEL_LBN 24
#define FRF_AB_EE_SPI_HCMD_SF_SEL_WIDTH 1
#define FRF_AB_EE_SPI_HCMD_DABCNT_LBN 16
#define FRF_AB_EE_SPI_HCMD_DABCNT_WIDTH 5
#define FRF_AB_EE_SPI_HCMD_READ_LBN 15
#define FRF_AB_EE_SPI_HCMD_READ_WIDTH 1
#define FRF_AB_EE_SPI_HCMD_DUBCNT_LBN 12
#define FRF_AB_EE_SPI_HCMD_DUBCNT_WIDTH 2
#define FRF_AB_EE_SPI_HCMD_ADBCNT_LBN 8
#define FRF_AB_EE_SPI_HCMD_ADBCNT_WIDTH 2
#define FRF_AB_EE_SPI_HCMD_ENC_LBN 0
#define FRF_AB_EE_SPI_HCMD_ENC_WIDTH 8
/* USR_EV_CFG: User Level Event Configuration register */
#define FR_CZ_USR_EV_CFG 0x00000100
#define FRF_CZ_USREV_DIS_LBN 16
#define FRF_CZ_USREV_DIS_WIDTH 1
#define FRF_CZ_DFLT_EVQ_LBN 0
#define FRF_CZ_DFLT_EVQ_WIDTH 10
/* EE_SPI_HADR_REG: SPI host address register */
#define FR_AB_EE_SPI_HADR 0x00000110
#define FRF_AB_EE_SPI_HADR_DUBYTE_LBN 24
#define FRF_AB_EE_SPI_HADR_DUBYTE_WIDTH 8
#define FRF_AB_EE_SPI_HADR_ADR_LBN 0
#define FRF_AB_EE_SPI_HADR_ADR_WIDTH 24
/* EE_SPI_HDATA_REG: SPI host data register */
#define FR_AB_EE_SPI_HDATA 0x00000120
#define FRF_AB_EE_SPI_HDATA3_LBN 96
#define FRF_AB_EE_SPI_HDATA3_WIDTH 32
#define FRF_AB_EE_SPI_HDATA2_LBN 64
#define FRF_AB_EE_SPI_HDATA2_WIDTH 32
#define FRF_AB_EE_SPI_HDATA1_LBN 32
#define FRF_AB_EE_SPI_HDATA1_WIDTH 32
#define FRF_AB_EE_SPI_HDATA0_LBN 0
#define FRF_AB_EE_SPI_HDATA0_WIDTH 32
/* EE_BASE_PAGE_REG: Expansion ROM base mirror register */
#define FR_AB_EE_BASE_PAGE 0x00000130
#define FRF_AB_EE_EXPROM_MASK_LBN 16
#define FRF_AB_EE_EXPROM_MASK_WIDTH 13
#define FRF_AB_EE_EXP_ROM_WINDOW_BASE_LBN 0
#define FRF_AB_EE_EXP_ROM_WINDOW_BASE_WIDTH 13
/* EE_VPD_CFG0_REG: SPI/VPD configuration register 0 */
#define FR_AB_EE_VPD_CFG0 0x00000140
#define FRF_AB_EE_SF_FASTRD_EN_LBN 127
#define FRF_AB_EE_SF_FASTRD_EN_WIDTH 1
#define FRF_AB_EE_SF_CLOCK_DIV_LBN 120
#define FRF_AB_EE_SF_CLOCK_DIV_WIDTH 7
#define FRF_AB_EE_VPD_WIP_POLL_LBN 119
#define FRF_AB_EE_VPD_WIP_POLL_WIDTH 1
#define FRF_AB_EE_EE_CLOCK_DIV_LBN 112
#define FRF_AB_EE_EE_CLOCK_DIV_WIDTH 7
#define FRF_AB_EE_EE_WR_TMR_VALUE_LBN 96
#define FRF_AB_EE_EE_WR_TMR_VALUE_WIDTH 16
#define FRF_AB_EE_VPDW_LENGTH_LBN 80
#define FRF_AB_EE_VPDW_LENGTH_WIDTH 15
#define FRF_AB_EE_VPDW_BASE_LBN 64
#define FRF_AB_EE_VPDW_BASE_WIDTH 15
#define FRF_AB_EE_VPD_WR_CMD_EN_LBN 56
#define FRF_AB_EE_VPD_WR_CMD_EN_WIDTH 8
#define FRF_AB_EE_VPD_BASE_LBN 32
#define FRF_AB_EE_VPD_BASE_WIDTH 24
#define FRF_AB_EE_VPD_LENGTH_LBN 16
#define FRF_AB_EE_VPD_LENGTH_WIDTH 15
#define FRF_AB_EE_VPD_AD_SIZE_LBN 8
#define FRF_AB_EE_VPD_AD_SIZE_WIDTH 5
#define FRF_AB_EE_VPD_ACCESS_ON_LBN 5
#define FRF_AB_EE_VPD_ACCESS_ON_WIDTH 1
#define FRF_AB_EE_VPD_ACCESS_BLOCK_LBN 4
#define FRF_AB_EE_VPD_ACCESS_BLOCK_WIDTH 1
#define FRF_AB_EE_VPD_DEV_SF_SEL_LBN 2
#define FRF_AB_EE_VPD_DEV_SF_SEL_WIDTH 1
#define FRF_AB_EE_VPD_EN_AD9_MODE_LBN 1
#define FRF_AB_EE_VPD_EN_AD9_MODE_WIDTH 1
#define FRF_AB_EE_VPD_EN_LBN 0
#define FRF_AB_EE_VPD_EN_WIDTH 1
/* EE_VPD_SW_CNTL_REG: VPD access SW control register */
#define FR_AB_EE_VPD_SW_CNTL 0x00000150
#define FRF_AB_EE_VPD_CYCLE_PENDING_LBN 31
#define FRF_AB_EE_VPD_CYCLE_PENDING_WIDTH 1
#define FRF_AB_EE_VPD_CYC_WRITE_LBN 28
#define FRF_AB_EE_VPD_CYC_WRITE_WIDTH 1
#define FRF_AB_EE_VPD_CYC_ADR_LBN 0
#define FRF_AB_EE_VPD_CYC_ADR_WIDTH 15
/* EE_VPD_SW_DATA_REG: VPD access SW data register */
#define FR_AB_EE_VPD_SW_DATA 0x00000160
#define FRF_AB_EE_VPD_CYC_DAT_LBN 0
#define FRF_AB_EE_VPD_CYC_DAT_WIDTH 32
/* PBMX_DBG_IADDR_REG: Capture Module address register */
#define FR_CZ_PBMX_DBG_IADDR 0x000001f0
#define FRF_CZ_PBMX_DBG_IADDR_LBN 0
#define FRF_CZ_PBMX_DBG_IADDR_WIDTH 32
/* PCIE_CORE_INDIRECT_REG: Indirect Access to PCIE Core registers */
#define FR_BB_PCIE_CORE_INDIRECT 0x000001f0
#define FRF_BB_PCIE_CORE_TARGET_DATA_LBN 32
#define FRF_BB_PCIE_CORE_TARGET_DATA_WIDTH 32
#define FRF_BB_PCIE_CORE_INDIRECT_ACCESS_DIR_LBN 15
#define FRF_BB_PCIE_CORE_INDIRECT_ACCESS_DIR_WIDTH 1
#define FRF_BB_PCIE_CORE_TARGET_REG_ADRS_LBN 0
#define FRF_BB_PCIE_CORE_TARGET_REG_ADRS_WIDTH 12
/* PBMX_DBG_IDATA_REG: Capture Module data register */
#define FR_CZ_PBMX_DBG_IDATA 0x000001f8
#define FRF_CZ_PBMX_DBG_IDATA_LBN 0
#define FRF_CZ_PBMX_DBG_IDATA_WIDTH 64
/* NIC_STAT_REG: NIC status register */
#define FR_AB_NIC_STAT 0x00000200
#define FRF_BB_AER_DIS_LBN 34
#define FRF_BB_AER_DIS_WIDTH 1
#define FRF_BB_EE_STRAP_EN_LBN 31
#define FRF_BB_EE_STRAP_EN_WIDTH 1
#define FRF_BB_EE_STRAP_LBN 24
#define FRF_BB_EE_STRAP_WIDTH 4
#define FRF_BB_REVISION_ID_LBN 17
#define FRF_BB_REVISION_ID_WIDTH 7
#define FRF_AB_ONCHIP_SRAM_LBN 16
#define FRF_AB_ONCHIP_SRAM_WIDTH 1
#define FRF_AB_SF_PRST_LBN 9
#define FRF_AB_SF_PRST_WIDTH 1
#define FRF_AB_EE_PRST_LBN 8
#define FRF_AB_EE_PRST_WIDTH 1
#define FRF_AB_ATE_MODE_LBN 3
#define FRF_AB_ATE_MODE_WIDTH 1
#define FRF_AB_STRAP_PINS_LBN 0
#define FRF_AB_STRAP_PINS_WIDTH 3
/* GPIO_CTL_REG: GPIO control register */
#define FR_AB_GPIO_CTL 0x00000210
#define FRF_AB_GPIO_OUT3_LBN 112
#define FRF_AB_GPIO_OUT3_WIDTH 16
#define FRF_AB_GPIO_IN3_LBN 104
#define FRF_AB_GPIO_IN3_WIDTH 8
#define FRF_AB_GPIO_PWRUP_VALUE3_LBN 96
#define FRF_AB_GPIO_PWRUP_VALUE3_WIDTH 8
#define FRF_AB_GPIO_OUT2_LBN 80
#define FRF_AB_GPIO_OUT2_WIDTH 16
#define FRF_AB_GPIO_IN2_LBN 72
#define FRF_AB_GPIO_IN2_WIDTH 8
#define FRF_AB_GPIO_PWRUP_VALUE2_LBN 64
#define FRF_AB_GPIO_PWRUP_VALUE2_WIDTH 8
#define FRF_AB_GPIO15_OEN_LBN 63
#define FRF_AB_GPIO15_OEN_WIDTH 1
#define FRF_AB_GPIO14_OEN_LBN 62
#define FRF_AB_GPIO14_OEN_WIDTH 1
#define FRF_AB_GPIO13_OEN_LBN 61
#define FRF_AB_GPIO13_OEN_WIDTH 1
#define FRF_AB_GPIO12_OEN_LBN 60
#define FRF_AB_GPIO12_OEN_WIDTH 1
#define FRF_AB_GPIO11_OEN_LBN 59
#define FRF_AB_GPIO11_OEN_WIDTH 1
#define FRF_AB_GPIO10_OEN_LBN 58
#define FRF_AB_GPIO10_OEN_WIDTH 1
#define FRF_AB_GPIO9_OEN_LBN 57
#define FRF_AB_GPIO9_OEN_WIDTH 1
#define FRF_AB_GPIO8_OEN_LBN 56
#define FRF_AB_GPIO8_OEN_WIDTH 1
#define FRF_AB_GPIO15_OUT_LBN 55
#define FRF_AB_GPIO15_OUT_WIDTH 1
#define FRF_AB_GPIO14_OUT_LBN 54
#define FRF_AB_GPIO14_OUT_WIDTH 1
#define FRF_AB_GPIO13_OUT_LBN 53
#define FRF_AB_GPIO13_OUT_WIDTH 1
#define FRF_AB_GPIO12_OUT_LBN 52
#define FRF_AB_GPIO12_OUT_WIDTH 1
#define FRF_AB_GPIO11_OUT_LBN 51
#define FRF_AB_GPIO11_OUT_WIDTH 1
#define FRF_AB_GPIO10_OUT_LBN 50
#define FRF_AB_GPIO10_OUT_WIDTH 1
#define FRF_AB_GPIO9_OUT_LBN 49
#define FRF_AB_GPIO9_OUT_WIDTH 1
#define FRF_AB_GPIO8_OUT_LBN 48
#define FRF_AB_GPIO8_OUT_WIDTH 1
#define FRF_AB_GPIO15_IN_LBN 47
#define FRF_AB_GPIO15_IN_WIDTH 1
#define FRF_AB_GPIO14_IN_LBN 46
#define FRF_AB_GPIO14_IN_WIDTH 1
#define FRF_AB_GPIO13_IN_LBN 45
#define FRF_AB_GPIO13_IN_WIDTH 1
#define FRF_AB_GPIO12_IN_LBN 44
#define FRF_AB_GPIO12_IN_WIDTH 1
#define FRF_AB_GPIO11_IN_LBN 43
#define FRF_AB_GPIO11_IN_WIDTH 1
#define FRF_AB_GPIO10_IN_LBN 42
#define FRF_AB_GPIO10_IN_WIDTH 1
#define FRF_AB_GPIO9_IN_LBN 41
#define FRF_AB_GPIO9_IN_WIDTH 1
#define FRF_AB_GPIO8_IN_LBN 40
#define FRF_AB_GPIO8_IN_WIDTH 1
#define FRF_AB_GPIO15_PWRUP_VALUE_LBN 39
#define FRF_AB_GPIO15_PWRUP_VALUE_WIDTH 1
#define FRF_AB_GPIO14_PWRUP_VALUE_LBN 38
#define FRF_AB_GPIO14_PWRUP_VALUE_WIDTH 1
#define FRF_AB_GPIO13_PWRUP_VALUE_LBN 37
#define FRF_AB_GPIO13_PWRUP_VALUE_WIDTH 1
#define FRF_AB_GPIO12_PWRUP_VALUE_LBN 36
#define FRF_AB_GPIO12_PWRUP_VALUE_WIDTH 1
#define FRF_AB_GPIO11_PWRUP_VALUE_LBN 35
#define FRF_AB_GPIO11_PWRUP_VALUE_WIDTH 1
#define FRF_AB_GPIO10_PWRUP_VALUE_LBN 34
#define FRF_AB_GPIO10_PWRUP_VALUE_WIDTH 1
#define FRF_AB_GPIO9_PWRUP_VALUE_LBN 33
#define FRF_AB_GPIO9_PWRUP_VALUE_WIDTH 1
#define FRF_AB_GPIO8_PWRUP_VALUE_LBN 32
#define FRF_AB_GPIO8_PWRUP_VALUE_WIDTH 1
#define FRF_AB_CLK156_OUT_EN_LBN 31
#define FRF_AB_CLK156_OUT_EN_WIDTH 1
#define FRF_AB_USE_NIC_CLK_LBN 30
#define FRF_AB_USE_NIC_CLK_WIDTH 1
#define FRF_AB_GPIO5_OEN_LBN 29
#define FRF_AB_GPIO5_OEN_WIDTH 1
#define FRF_AB_GPIO4_OEN_LBN 28
#define FRF_AB_GPIO4_OEN_WIDTH 1
#define FRF_AB_GPIO3_OEN_LBN 27
#define FRF_AB_GPIO3_OEN_WIDTH 1
#define FRF_AB_GPIO2_OEN_LBN 26
#define FRF_AB_GPIO2_OEN_WIDTH 1
#define FRF_AB_GPIO1_OEN_LBN 25
#define FRF_AB_GPIO1_OEN_WIDTH 1
#define FRF_AB_GPIO0_OEN_LBN 24
#define FRF_AB_GPIO0_OEN_WIDTH 1
#define FRF_AB_GPIO7_OUT_LBN 23
#define FRF_AB_GPIO7_OUT_WIDTH 1
#define FRF_AB_GPIO6_OUT_LBN 22
#define FRF_AB_GPIO6_OUT_WIDTH 1
#define FRF_AB_GPIO5_OUT_LBN 21
#define FRF_AB_GPIO5_OUT_WIDTH 1
#define FRF_AB_GPIO4_OUT_LBN 20
#define FRF_AB_GPIO4_OUT_WIDTH 1
#define FRF_AB_GPIO3_OUT_LBN 19
#define FRF_AB_GPIO3_OUT_WIDTH 1
#define FRF_AB_GPIO2_OUT_LBN 18
#define FRF_AB_GPIO2_OUT_WIDTH 1
#define FRF_AB_GPIO1_OUT_LBN 17
#define FRF_AB_GPIO1_OUT_WIDTH 1
#define FRF_AB_GPIO0_OUT_LBN 16
#define FRF_AB_GPIO0_OUT_WIDTH 1
#define FRF_AB_GPIO7_IN_LBN 15
#define FRF_AB_GPIO7_IN_WIDTH 1
#define FRF_AB_GPIO6_IN_LBN 14
#define FRF_AB_GPIO6_IN_WIDTH 1
#define FRF_AB_GPIO5_IN_LBN 13
#define FRF_AB_GPIO5_IN_WIDTH 1
#define FRF_AB_GPIO4_IN_LBN 12
#define FRF_AB_GPIO4_IN_WIDTH 1
#define FRF_AB_GPIO3_IN_LBN 11
#define FRF_AB_GPIO3_IN_WIDTH 1
#define FRF_AB_GPIO2_IN_LBN 10
#define FRF_AB_GPIO2_IN_WIDTH 1
#define FRF_AB_GPIO1_IN_LBN 9
#define FRF_AB_GPIO1_IN_WIDTH 1
#define FRF_AB_GPIO0_IN_LBN 8
#define FRF_AB_GPIO0_IN_WIDTH 1
#define FRF_AB_GPIO7_PWRUP_VALUE_LBN 7
#define FRF_AB_GPIO7_PWRUP_VALUE_WIDTH 1
#define FRF_AB_GPIO6_PWRUP_VALUE_LBN 6
#define FRF_AB_GPIO6_PWRUP_VALUE_WIDTH 1
#define FRF_AB_GPIO5_PWRUP_VALUE_LBN 5
#define FRF_AB_GPIO5_PWRUP_VALUE_WIDTH 1
#define FRF_AB_GPIO4_PWRUP_VALUE_LBN 4
#define FRF_AB_GPIO4_PWRUP_VALUE_WIDTH 1
#define FRF_AB_GPIO3_PWRUP_VALUE_LBN 3
#define FRF_AB_GPIO3_PWRUP_VALUE_WIDTH 1
#define FRF_AB_GPIO2_PWRUP_VALUE_LBN 2
#define FRF_AB_GPIO2_PWRUP_VALUE_WIDTH 1
#define FRF_AB_GPIO1_PWRUP_VALUE_LBN 1
#define FRF_AB_GPIO1_PWRUP_VALUE_WIDTH 1
#define FRF_AB_GPIO0_PWRUP_VALUE_LBN 0
#define FRF_AB_GPIO0_PWRUP_VALUE_WIDTH 1
/* GLB_CTL_REG: Global control register */
#define FR_AB_GLB_CTL 0x00000220
#define FRF_AB_EXT_PHY_RST_CTL_LBN 63
#define FRF_AB_EXT_PHY_RST_CTL_WIDTH 1
#define FRF_AB_XAUI_SD_RST_CTL_LBN 62
#define FRF_AB_XAUI_SD_RST_CTL_WIDTH 1
#define FRF_AB_PCIE_SD_RST_CTL_LBN 61
#define FRF_AB_PCIE_SD_RST_CTL_WIDTH 1
#define FRF_AA_PCIX_RST_CTL_LBN 60
#define FRF_AA_PCIX_RST_CTL_WIDTH 1
#define FRF_BB_BIU_RST_CTL_LBN 60
#define FRF_BB_BIU_RST_CTL_WIDTH 1
#define FRF_AB_PCIE_STKY_RST_CTL_LBN 59
#define FRF_AB_PCIE_STKY_RST_CTL_WIDTH 1
#define FRF_AB_PCIE_NSTKY_RST_CTL_LBN 58
#define FRF_AB_PCIE_NSTKY_RST_CTL_WIDTH 1
#define FRF_AB_PCIE_CORE_RST_CTL_LBN 57
#define FRF_AB_PCIE_CORE_RST_CTL_WIDTH 1
#define FRF_AB_XGRX_RST_CTL_LBN 56
#define FRF_AB_XGRX_RST_CTL_WIDTH 1
#define FRF_AB_XGTX_RST_CTL_LBN 55
#define FRF_AB_XGTX_RST_CTL_WIDTH 1
#define FRF_AB_EM_RST_CTL_LBN 54
#define FRF_AB_EM_RST_CTL_WIDTH 1
#define FRF_AB_EV_RST_CTL_LBN 53
#define FRF_AB_EV_RST_CTL_WIDTH 1
#define FRF_AB_SR_RST_CTL_LBN 52
#define FRF_AB_SR_RST_CTL_WIDTH 1
#define FRF_AB_RX_RST_CTL_LBN 51
#define FRF_AB_RX_RST_CTL_WIDTH 1
#define FRF_AB_TX_RST_CTL_LBN 50
#define FRF_AB_TX_RST_CTL_WIDTH 1
#define FRF_AB_EE_RST_CTL_LBN 49
#define FRF_AB_EE_RST_CTL_WIDTH 1
#define FRF_AB_CS_RST_CTL_LBN 48
#define FRF_AB_CS_RST_CTL_WIDTH 1
#define FRF_AB_HOT_RST_CTL_LBN 40
#define FRF_AB_HOT_RST_CTL_WIDTH 2
#define FRF_AB_RST_EXT_PHY_LBN 31
#define FRF_AB_RST_EXT_PHY_WIDTH 1
#define FRF_AB_RST_XAUI_SD_LBN 30
#define FRF_AB_RST_XAUI_SD_WIDTH 1
#define FRF_AB_RST_PCIE_SD_LBN 29
#define FRF_AB_RST_PCIE_SD_WIDTH 1
#define FRF_AA_RST_PCIX_LBN 28
#define FRF_AA_RST_PCIX_WIDTH 1
#define FRF_BB_RST_BIU_LBN 28
#define FRF_BB_RST_BIU_WIDTH 1
#define FRF_AB_RST_PCIE_STKY_LBN 27
#define FRF_AB_RST_PCIE_STKY_WIDTH 1
#define FRF_AB_RST_PCIE_NSTKY_LBN 26
#define FRF_AB_RST_PCIE_NSTKY_WIDTH 1
#define FRF_AB_RST_PCIE_CORE_LBN 25
#define FRF_AB_RST_PCIE_CORE_WIDTH 1
#define FRF_AB_RST_XGRX_LBN 24
#define FRF_AB_RST_XGRX_WIDTH 1
#define FRF_AB_RST_XGTX_LBN 23
#define FRF_AB_RST_XGTX_WIDTH 1
#define FRF_AB_RST_EM_LBN 22
#define FRF_AB_RST_EM_WIDTH 1
#define FRF_AB_RST_EV_LBN 21
#define FRF_AB_RST_EV_WIDTH 1
#define FRF_AB_RST_SR_LBN 20
#define FRF_AB_RST_SR_WIDTH 1
#define FRF_AB_RST_RX_LBN 19
#define FRF_AB_RST_RX_WIDTH 1
#define FRF_AB_RST_TX_LBN 18
#define FRF_AB_RST_TX_WIDTH 1
#define FRF_AB_RST_SF_LBN 17
#define FRF_AB_RST_SF_WIDTH 1
#define FRF_AB_RST_CS_LBN 16
#define FRF_AB_RST_CS_WIDTH 1
#define FRF_AB_INT_RST_DUR_LBN 4
#define FRF_AB_INT_RST_DUR_WIDTH 3
#define FRF_AB_EXT_PHY_RST_DUR_LBN 1
#define FRF_AB_EXT_PHY_RST_DUR_WIDTH 3
#define FFE_AB_EXT_PHY_RST_DUR_10240US 7
#define FFE_AB_EXT_PHY_RST_DUR_5120US 6
#define FFE_AB_EXT_PHY_RST_DUR_2560US 5
#define FFE_AB_EXT_PHY_RST_DUR_1280US 4
#define FFE_AB_EXT_PHY_RST_DUR_640US 3
#define FFE_AB_EXT_PHY_RST_DUR_320US 2
#define FFE_AB_EXT_PHY_RST_DUR_160US 1
#define FFE_AB_EXT_PHY_RST_DUR_80US 0
#define FRF_AB_SWRST_LBN 0
#define FRF_AB_SWRST_WIDTH 1
/* FATAL_INTR_REG_KER: Fatal interrupt register for Kernel */
#define FR_AZ_FATAL_INTR_KER 0x00000230
#define FRF_CZ_SRAM_PERR_INT_P_KER_EN_LBN 44
#define FRF_CZ_SRAM_PERR_INT_P_KER_EN_WIDTH 1
#define FRF_AB_PCI_BUSERR_INT_KER_EN_LBN 43
#define FRF_AB_PCI_BUSERR_INT_KER_EN_WIDTH 1
#define FRF_CZ_MBU_PERR_INT_KER_EN_LBN 43
#define FRF_CZ_MBU_PERR_INT_KER_EN_WIDTH 1
#define FRF_AZ_SRAM_OOB_INT_KER_EN_LBN 42
#define FRF_AZ_SRAM_OOB_INT_KER_EN_WIDTH 1
#define FRF_AZ_BUFID_OOB_INT_KER_EN_LBN 41
#define FRF_AZ_BUFID_OOB_INT_KER_EN_WIDTH 1
#define FRF_AZ_MEM_PERR_INT_KER_EN_LBN 40
#define FRF_AZ_MEM_PERR_INT_KER_EN_WIDTH 1
#define FRF_AZ_RBUF_OWN_INT_KER_EN_LBN 39
#define FRF_AZ_RBUF_OWN_INT_KER_EN_WIDTH 1
#define FRF_AZ_TBUF_OWN_INT_KER_EN_LBN 38
#define FRF_AZ_TBUF_OWN_INT_KER_EN_WIDTH 1
#define FRF_AZ_RDESCQ_OWN_INT_KER_EN_LBN 37
#define FRF_AZ_RDESCQ_OWN_INT_KER_EN_WIDTH 1
#define FRF_AZ_TDESCQ_OWN_INT_KER_EN_LBN 36
#define FRF_AZ_TDESCQ_OWN_INT_KER_EN_WIDTH 1
#define FRF_AZ_EVQ_OWN_INT_KER_EN_LBN 35
#define FRF_AZ_EVQ_OWN_INT_KER_EN_WIDTH 1
#define FRF_AZ_EVF_OFLO_INT_KER_EN_LBN 34
#define FRF_AZ_EVF_OFLO_INT_KER_EN_WIDTH 1
#define FRF_AZ_ILL_ADR_INT_KER_EN_LBN 33
#define FRF_AZ_ILL_ADR_INT_KER_EN_WIDTH 1
#define FRF_AZ_SRM_PERR_INT_KER_EN_LBN 32
#define FRF_AZ_SRM_PERR_INT_KER_EN_WIDTH 1
#define FRF_CZ_SRAM_PERR_INT_P_KER_LBN 12
#define FRF_CZ_SRAM_PERR_INT_P_KER_WIDTH 1
#define FRF_AB_PCI_BUSERR_INT_KER_LBN 11
#define FRF_AB_PCI_BUSERR_INT_KER_WIDTH 1
#define FRF_CZ_MBU_PERR_INT_KER_LBN 11
#define FRF_CZ_MBU_PERR_INT_KER_WIDTH 1
#define FRF_AZ_SRAM_OOB_INT_KER_LBN 10
#define FRF_AZ_SRAM_OOB_INT_KER_WIDTH 1
#define FRF_AZ_BUFID_DC_OOB_INT_KER_LBN 9
#define FRF_AZ_BUFID_DC_OOB_INT_KER_WIDTH 1
#define FRF_AZ_MEM_PERR_INT_KER_LBN 8
#define FRF_AZ_MEM_PERR_INT_KER_WIDTH 1
#define FRF_AZ_RBUF_OWN_INT_KER_LBN 7
#define FRF_AZ_RBUF_OWN_INT_KER_WIDTH 1
#define FRF_AZ_TBUF_OWN_INT_KER_LBN 6
#define FRF_AZ_TBUF_OWN_INT_KER_WIDTH 1
#define FRF_AZ_RDESCQ_OWN_INT_KER_LBN 5
#define FRF_AZ_RDESCQ_OWN_INT_KER_WIDTH 1
#define FRF_AZ_TDESCQ_OWN_INT_KER_LBN 4
#define FRF_AZ_TDESCQ_OWN_INT_KER_WIDTH 1
#define FRF_AZ_EVQ_OWN_INT_KER_LBN 3
#define FRF_AZ_EVQ_OWN_INT_KER_WIDTH 1
#define FRF_AZ_EVF_OFLO_INT_KER_LBN 2
#define FRF_AZ_EVF_OFLO_INT_KER_WIDTH 1
#define FRF_AZ_ILL_ADR_INT_KER_LBN 1
#define FRF_AZ_ILL_ADR_INT_KER_WIDTH 1
#define FRF_AZ_SRM_PERR_INT_KER_LBN 0
#define FRF_AZ_SRM_PERR_INT_KER_WIDTH 1
/* FATAL_INTR_REG_CHAR: Fatal interrupt register for Char */
#define FR_BZ_FATAL_INTR_CHAR 0x00000240
#define FRF_CZ_SRAM_PERR_INT_P_CHAR_EN_LBN 44
#define FRF_CZ_SRAM_PERR_INT_P_CHAR_EN_WIDTH 1
#define FRF_BB_PCI_BUSERR_INT_CHAR_EN_LBN 43
#define FRF_BB_PCI_BUSERR_INT_CHAR_EN_WIDTH 1
#define FRF_CZ_MBU_PERR_INT_CHAR_EN_LBN 43
#define FRF_CZ_MBU_PERR_INT_CHAR_EN_WIDTH 1
#define FRF_BZ_SRAM_OOB_INT_CHAR_EN_LBN 42
#define FRF_BZ_SRAM_OOB_INT_CHAR_EN_WIDTH 1
#define FRF_BZ_BUFID_OOB_INT_CHAR_EN_LBN 41
#define FRF_BZ_BUFID_OOB_INT_CHAR_EN_WIDTH 1
#define FRF_BZ_MEM_PERR_INT_CHAR_EN_LBN 40
#define FRF_BZ_MEM_PERR_INT_CHAR_EN_WIDTH 1
#define FRF_BZ_RBUF_OWN_INT_CHAR_EN_LBN 39
#define FRF_BZ_RBUF_OWN_INT_CHAR_EN_WIDTH 1
#define FRF_BZ_TBUF_OWN_INT_CHAR_EN_LBN 38
#define FRF_BZ_TBUF_OWN_INT_CHAR_EN_WIDTH 1
#define FRF_BZ_RDESCQ_OWN_INT_CHAR_EN_LBN 37
#define FRF_BZ_RDESCQ_OWN_INT_CHAR_EN_WIDTH 1
#define FRF_BZ_TDESCQ_OWN_INT_CHAR_EN_LBN 36
#define FRF_BZ_TDESCQ_OWN_INT_CHAR_EN_WIDTH 1
#define FRF_BZ_EVQ_OWN_INT_CHAR_EN_LBN 35
#define FRF_BZ_EVQ_OWN_INT_CHAR_EN_WIDTH 1
#define FRF_BZ_EVF_OFLO_INT_CHAR_EN_LBN 34
#define FRF_BZ_EVF_OFLO_INT_CHAR_EN_WIDTH 1
#define FRF_BZ_ILL_ADR_INT_CHAR_EN_LBN 33
#define FRF_BZ_ILL_ADR_INT_CHAR_EN_WIDTH 1
#define FRF_BZ_SRM_PERR_INT_CHAR_EN_LBN 32
#define FRF_BZ_SRM_PERR_INT_CHAR_EN_WIDTH 1
#define FRF_CZ_SRAM_PERR_INT_P_CHAR_LBN 12
#define FRF_CZ_SRAM_PERR_INT_P_CHAR_WIDTH 1
#define FRF_BB_PCI_BUSERR_INT_CHAR_LBN 11
#define FRF_BB_PCI_BUSERR_INT_CHAR_WIDTH 1
#define FRF_CZ_MBU_PERR_INT_CHAR_LBN 11
#define FRF_CZ_MBU_PERR_INT_CHAR_WIDTH 1
#define FRF_BZ_SRAM_OOB_INT_CHAR_LBN 10
#define FRF_BZ_SRAM_OOB_INT_CHAR_WIDTH 1
#define FRF_BZ_BUFID_DC_OOB_INT_CHAR_LBN 9
#define FRF_BZ_BUFID_DC_OOB_INT_CHAR_WIDTH 1
#define FRF_BZ_MEM_PERR_INT_CHAR_LBN 8
#define FRF_BZ_MEM_PERR_INT_CHAR_WIDTH 1
#define FRF_BZ_RBUF_OWN_INT_CHAR_LBN 7
#define FRF_BZ_RBUF_OWN_INT_CHAR_WIDTH 1
#define FRF_BZ_TBUF_OWN_INT_CHAR_LBN 6
#define FRF_BZ_TBUF_OWN_INT_CHAR_WIDTH 1
#define FRF_BZ_RDESCQ_OWN_INT_CHAR_LBN 5
#define FRF_BZ_RDESCQ_OWN_INT_CHAR_WIDTH 1
#define FRF_BZ_TDESCQ_OWN_INT_CHAR_LBN 4
#define FRF_BZ_TDESCQ_OWN_INT_CHAR_WIDTH 1
#define FRF_BZ_EVQ_OWN_INT_CHAR_LBN 3
#define FRF_BZ_EVQ_OWN_INT_CHAR_WIDTH 1
#define FRF_BZ_EVF_OFLO_INT_CHAR_LBN 2
#define FRF_BZ_EVF_OFLO_INT_CHAR_WIDTH 1
#define FRF_BZ_ILL_ADR_INT_CHAR_LBN 1
#define FRF_BZ_ILL_ADR_INT_CHAR_WIDTH 1
#define FRF_BZ_SRM_PERR_INT_CHAR_LBN 0
#define FRF_BZ_SRM_PERR_INT_CHAR_WIDTH 1
/* DP_CTRL_REG: Datapath control register */
#define FR_BZ_DP_CTRL 0x00000250
#define FRF_BZ_FLS_EVQ_ID_LBN 0
#define FRF_BZ_FLS_EVQ_ID_WIDTH 12
/* MEM_STAT_REG: Memory status register */
#define FR_AZ_MEM_STAT 0x00000260
#define FRF_AB_MEM_PERR_VEC_LBN 53
#define FRF_AB_MEM_PERR_VEC_WIDTH 38
#define FRF_AB_MBIST_CORR_LBN 38
#define FRF_AB_MBIST_CORR_WIDTH 15
#define FRF_AB_MBIST_ERR_LBN 0
#define FRF_AB_MBIST_ERR_WIDTH 40
#define FRF_CZ_MEM_PERR_VEC_LBN 0
#define FRF_CZ_MEM_PERR_VEC_WIDTH 35
/* CS_DEBUG_REG: Debug register */
#define FR_AZ_CS_DEBUG 0x00000270
#define FRF_AB_GLB_DEBUG2_SEL_LBN 50
#define FRF_AB_GLB_DEBUG2_SEL_WIDTH 3
#define FRF_AB_DEBUG_BLK_SEL2_LBN 47
#define FRF_AB_DEBUG_BLK_SEL2_WIDTH 3
#define FRF_AB_DEBUG_BLK_SEL1_LBN 44
#define FRF_AB_DEBUG_BLK_SEL1_WIDTH 3
#define FRF_AB_DEBUG_BLK_SEL0_LBN 41
#define FRF_AB_DEBUG_BLK_SEL0_WIDTH 3
#define FRF_CZ_CS_PORT_NUM_LBN 40
#define FRF_CZ_CS_PORT_NUM_WIDTH 2
#define FRF_AB_MISC_DEBUG_ADDR_LBN 36
#define FRF_AB_MISC_DEBUG_ADDR_WIDTH 5
#define FRF_AB_SERDES_DEBUG_ADDR_LBN 31
#define FRF_AB_SERDES_DEBUG_ADDR_WIDTH 5
#define FRF_CZ_CS_PORT_FPE_LBN 1
#define FRF_CZ_CS_PORT_FPE_WIDTH 35
#define FRF_AB_EM_DEBUG_ADDR_LBN 26
#define FRF_AB_EM_DEBUG_ADDR_WIDTH 5
#define FRF_AB_SR_DEBUG_ADDR_LBN 21
#define FRF_AB_SR_DEBUG_ADDR_WIDTH 5
#define FRF_AB_EV_DEBUG_ADDR_LBN 16
#define FRF_AB_EV_DEBUG_ADDR_WIDTH 5
#define FRF_AB_RX_DEBUG_ADDR_LBN 11
#define FRF_AB_RX_DEBUG_ADDR_WIDTH 5
#define FRF_AB_TX_DEBUG_ADDR_LBN 6
#define FRF_AB_TX_DEBUG_ADDR_WIDTH 5
#define FRF_AB_CS_BIU_DEBUG_ADDR_LBN 1
#define FRF_AB_CS_BIU_DEBUG_ADDR_WIDTH 5
#define FRF_AZ_CS_DEBUG_EN_LBN 0
#define FRF_AZ_CS_DEBUG_EN_WIDTH 1
/* DRIVER_REG: Driver scratch register [0-7] */
#define FR_AZ_DRIVER 0x00000280
#define FR_AZ_DRIVER_STEP 16
#define FR_AZ_DRIVER_ROWS 8
#define FRF_AZ_DRIVER_DW0_LBN 0
#define FRF_AZ_DRIVER_DW0_WIDTH 32
/* ALTERA_BUILD_REG: Altera build register */
#define FR_AZ_ALTERA_BUILD 0x00000300
#define FRF_AZ_ALTERA_BUILD_VER_LBN 0
#define FRF_AZ_ALTERA_BUILD_VER_WIDTH 32
/* CSR_SPARE_REG: Spare register */
#define FR_AZ_CSR_SPARE 0x00000310
#define FRF_AB_MEM_PERR_EN_LBN 64
#define FRF_AB_MEM_PERR_EN_WIDTH 38
#define FRF_CZ_MEM_PERR_EN_LBN 64
#define FRF_CZ_MEM_PERR_EN_WIDTH 35
#define FRF_AB_MEM_PERR_EN_TX_DATA_LBN 72
#define FRF_AB_MEM_PERR_EN_TX_DATA_WIDTH 2
#define FRF_AZ_CSR_SPARE_BITS_LBN 0
#define FRF_AZ_CSR_SPARE_BITS_WIDTH 32
/* PCIE_SD_CTL0123_REG: PCIE SerDes control register 0 to 3 */
#define FR_AB_PCIE_SD_CTL0123 0x00000320
#define FRF_AB_PCIE_TESTSIG_H_LBN 96
#define FRF_AB_PCIE_TESTSIG_H_WIDTH 19
#define FRF_AB_PCIE_TESTSIG_L_LBN 64
#define FRF_AB_PCIE_TESTSIG_L_WIDTH 19
#define FRF_AB_PCIE_OFFSET_LBN 56
#define FRF_AB_PCIE_OFFSET_WIDTH 8
#define FRF_AB_PCIE_OFFSETEN_H_LBN 55
#define FRF_AB_PCIE_OFFSETEN_H_WIDTH 1
#define FRF_AB_PCIE_OFFSETEN_L_LBN 54
#define FRF_AB_PCIE_OFFSETEN_L_WIDTH 1
#define FRF_AB_PCIE_HIVMODE_H_LBN 53
#define FRF_AB_PCIE_HIVMODE_H_WIDTH 1
#define FRF_AB_PCIE_HIVMODE_L_LBN 52
#define FRF_AB_PCIE_HIVMODE_L_WIDTH 1
#define FRF_AB_PCIE_PARRESET_H_LBN 51
#define FRF_AB_PCIE_PARRESET_H_WIDTH 1
#define FRF_AB_PCIE_PARRESET_L_LBN 50
#define FRF_AB_PCIE_PARRESET_L_WIDTH 1
#define FRF_AB_PCIE_LPBKWDRV_H_LBN 49
#define FRF_AB_PCIE_LPBKWDRV_H_WIDTH 1
#define FRF_AB_PCIE_LPBKWDRV_L_LBN 48
#define FRF_AB_PCIE_LPBKWDRV_L_WIDTH 1
#define FRF_AB_PCIE_LPBK_LBN 40
#define FRF_AB_PCIE_LPBK_WIDTH 8
#define FRF_AB_PCIE_PARLPBK_LBN 32
#define FRF_AB_PCIE_PARLPBK_WIDTH 8
#define FRF_AB_PCIE_RXTERMADJ_H_LBN 30
#define FRF_AB_PCIE_RXTERMADJ_H_WIDTH 2
#define FRF_AB_PCIE_RXTERMADJ_L_LBN 28
#define FRF_AB_PCIE_RXTERMADJ_L_WIDTH 2
#define FFE_AB_PCIE_RXTERMADJ_MIN15PCNT 3
#define FFE_AB_PCIE_RXTERMADJ_PL10PCNT 2
#define FFE_AB_PCIE_RXTERMADJ_MIN17PCNT 1
#define FFE_AB_PCIE_RXTERMADJ_NOMNL 0
#define FRF_AB_PCIE_TXTERMADJ_H_LBN 26
#define FRF_AB_PCIE_TXTERMADJ_H_WIDTH 2
#define FRF_AB_PCIE_TXTERMADJ_L_LBN 24
#define FRF_AB_PCIE_TXTERMADJ_L_WIDTH 2
#define FFE_AB_PCIE_TXTERMADJ_MIN15PCNT 3
#define FFE_AB_PCIE_TXTERMADJ_PL10PCNT 2
#define FFE_AB_PCIE_TXTERMADJ_MIN17PCNT 1
#define FFE_AB_PCIE_TXTERMADJ_NOMNL 0
#define FRF_AB_PCIE_RXEQCTL_H_LBN 18
#define FRF_AB_PCIE_RXEQCTL_H_WIDTH 2
#define FRF_AB_PCIE_RXEQCTL_L_LBN 16
#define FRF_AB_PCIE_RXEQCTL_L_WIDTH 2
#define FFE_AB_PCIE_RXEQCTL_OFF_ALT 3
#define FFE_AB_PCIE_RXEQCTL_OFF 2
#define FFE_AB_PCIE_RXEQCTL_MIN 1
#define FFE_AB_PCIE_RXEQCTL_MAX 0
#define FRF_AB_PCIE_HIDRV_LBN 8
#define FRF_AB_PCIE_HIDRV_WIDTH 8
#define FRF_AB_PCIE_LODRV_LBN 0
#define FRF_AB_PCIE_LODRV_WIDTH 8
/* PCIE_SD_CTL45_REG: PCIE SerDes control register 4 and 5 */
#define FR_AB_PCIE_SD_CTL45 0x00000330
#define FRF_AB_PCIE_DTX7_LBN 60
#define FRF_AB_PCIE_DTX7_WIDTH 4
#define FRF_AB_PCIE_DTX6_LBN 56
#define FRF_AB_PCIE_DTX6_WIDTH 4
#define FRF_AB_PCIE_DTX5_LBN 52
#define FRF_AB_PCIE_DTX5_WIDTH 4
#define FRF_AB_PCIE_DTX4_LBN 48
#define FRF_AB_PCIE_DTX4_WIDTH 4
#define FRF_AB_PCIE_DTX3_LBN 44
#define FRF_AB_PCIE_DTX3_WIDTH 4
#define FRF_AB_PCIE_DTX2_LBN 40
#define FRF_AB_PCIE_DTX2_WIDTH 4
#define FRF_AB_PCIE_DTX1_LBN 36
#define FRF_AB_PCIE_DTX1_WIDTH 4
#define FRF_AB_PCIE_DTX0_LBN 32
#define FRF_AB_PCIE_DTX0_WIDTH 4
#define FRF_AB_PCIE_DEQ7_LBN 28
#define FRF_AB_PCIE_DEQ7_WIDTH 4
#define FRF_AB_PCIE_DEQ6_LBN 24
#define FRF_AB_PCIE_DEQ6_WIDTH 4
#define FRF_AB_PCIE_DEQ5_LBN 20
#define FRF_AB_PCIE_DEQ5_WIDTH 4
#define FRF_AB_PCIE_DEQ4_LBN 16
#define FRF_AB_PCIE_DEQ4_WIDTH 4
#define FRF_AB_PCIE_DEQ3_LBN 12
#define FRF_AB_PCIE_DEQ3_WIDTH 4
#define FRF_AB_PCIE_DEQ2_LBN 8
#define FRF_AB_PCIE_DEQ2_WIDTH 4
#define FRF_AB_PCIE_DEQ1_LBN 4
#define FRF_AB_PCIE_DEQ1_WIDTH 4
#define FRF_AB_PCIE_DEQ0_LBN 0
#define FRF_AB_PCIE_DEQ0_WIDTH 4
/* PCIE_PCS_CTL_STAT_REG: PCIE PCS control and status register */
#define FR_AB_PCIE_PCS_CTL_STAT 0x00000340
#define FRF_AB_PCIE_PRBSERRCOUNT0_H_LBN 52
#define FRF_AB_PCIE_PRBSERRCOUNT0_H_WIDTH 4
#define FRF_AB_PCIE_PRBSERRCOUNT0_L_LBN 48
#define FRF_AB_PCIE_PRBSERRCOUNT0_L_WIDTH 4
#define FRF_AB_PCIE_PRBSERR_LBN 40
#define FRF_AB_PCIE_PRBSERR_WIDTH 8
#define FRF_AB_PCIE_PRBSERRH0_LBN 32
#define FRF_AB_PCIE_PRBSERRH0_WIDTH 8
#define FRF_AB_PCIE_FASTINIT_H_LBN 15
#define FRF_AB_PCIE_FASTINIT_H_WIDTH 1
#define FRF_AB_PCIE_FASTINIT_L_LBN 14
#define FRF_AB_PCIE_FASTINIT_L_WIDTH 1
#define FRF_AB_PCIE_CTCDISABLE_H_LBN 13
#define FRF_AB_PCIE_CTCDISABLE_H_WIDTH 1
#define FRF_AB_PCIE_CTCDISABLE_L_LBN 12
#define FRF_AB_PCIE_CTCDISABLE_L_WIDTH 1
#define FRF_AB_PCIE_PRBSSYNC_H_LBN 11
#define FRF_AB_PCIE_PRBSSYNC_H_WIDTH 1
#define FRF_AB_PCIE_PRBSSYNC_L_LBN 10
#define FRF_AB_PCIE_PRBSSYNC_L_WIDTH 1
#define FRF_AB_PCIE_PRBSERRACK_H_LBN 9
#define FRF_AB_PCIE_PRBSERRACK_H_WIDTH 1
#define FRF_AB_PCIE_PRBSERRACK_L_LBN 8
#define FRF_AB_PCIE_PRBSERRACK_L_WIDTH 1
#define FRF_AB_PCIE_PRBSSEL_LBN 0
#define FRF_AB_PCIE_PRBSSEL_WIDTH 8
/* DEBUG_DATA_OUT_REG: Live Debug and Debug 2 out ports */
#define FR_BB_DEBUG_DATA_OUT 0x00000350
#define FRF_BB_DEBUG2_PORT_LBN 25
#define FRF_BB_DEBUG2_PORT_WIDTH 15
#define FRF_BB_DEBUG1_PORT_LBN 0
#define FRF_BB_DEBUG1_PORT_WIDTH 25
/* EVQ_RPTR_REGP0: Event queue read pointer register */
#define FR_BZ_EVQ_RPTR_P0 0x00000400
#define FR_BZ_EVQ_RPTR_P0_STEP 8192
#define FR_BZ_EVQ_RPTR_P0_ROWS 1024
/* EVQ_RPTR_REG_KER: Event queue read pointer register */
#define FR_AA_EVQ_RPTR_KER 0x00011b00
#define FR_AA_EVQ_RPTR_KER_STEP 4
#define FR_AA_EVQ_RPTR_KER_ROWS 4
/* EVQ_RPTR_REG: Event queue read pointer register */
#define FR_BZ_EVQ_RPTR 0x00fa0000
#define FR_BZ_EVQ_RPTR_STEP 16
#define FR_BB_EVQ_RPTR_ROWS 4096
#define FR_CZ_EVQ_RPTR_ROWS 1024
/* EVQ_RPTR_REGP123: Event queue read pointer register */
#define FR_BB_EVQ_RPTR_P123 0x01000400
#define FR_BB_EVQ_RPTR_P123_STEP 8192
#define FR_BB_EVQ_RPTR_P123_ROWS 3072
#define FRF_AZ_EVQ_RPTR_VLD_LBN 15
#define FRF_AZ_EVQ_RPTR_VLD_WIDTH 1
#define FRF_AZ_EVQ_RPTR_LBN 0
#define FRF_AZ_EVQ_RPTR_WIDTH 15
/* TIMER_COMMAND_REGP0: Timer Command Registers */
#define FR_BZ_TIMER_COMMAND_P0 0x00000420
#define FR_BZ_TIMER_COMMAND_P0_STEP 8192
#define FR_BZ_TIMER_COMMAND_P0_ROWS 1024
/* TIMER_COMMAND_REG_KER: Timer Command Registers */
#define FR_AA_TIMER_COMMAND_KER 0x00000420
#define FR_AA_TIMER_COMMAND_KER_STEP 8192
#define FR_AA_TIMER_COMMAND_KER_ROWS 4
/* TIMER_COMMAND_REGP123: Timer Command Registers */
#define FR_BB_TIMER_COMMAND_P123 0x01000420
#define FR_BB_TIMER_COMMAND_P123_STEP 8192
#define FR_BB_TIMER_COMMAND_P123_ROWS 3072
#define FRF_CZ_TC_TIMER_MODE_LBN 14
#define FRF_CZ_TC_TIMER_MODE_WIDTH 2
#define FRF_AB_TC_TIMER_MODE_LBN 12
#define FRF_AB_TC_TIMER_MODE_WIDTH 2
#define FRF_CZ_TC_TIMER_VAL_LBN 0
#define FRF_CZ_TC_TIMER_VAL_WIDTH 14
#define FRF_AB_TC_TIMER_VAL_LBN 0
#define FRF_AB_TC_TIMER_VAL_WIDTH 12
/* DRV_EV_REG: Driver generated event register */
#define FR_AZ_DRV_EV 0x00000440
#define FRF_AZ_DRV_EV_QID_LBN 64
#define FRF_AZ_DRV_EV_QID_WIDTH 12
#define FRF_AZ_DRV_EV_DATA_LBN 0
#define FRF_AZ_DRV_EV_DATA_WIDTH 64
/* EVQ_CTL_REG: Event queue control register */
#define FR_AZ_EVQ_CTL 0x00000450
#define FRF_CZ_RX_EVQ_WAKEUP_MASK_LBN 15
#define FRF_CZ_RX_EVQ_WAKEUP_MASK_WIDTH 10
#define FRF_BB_RX_EVQ_WAKEUP_MASK_LBN 15
#define FRF_BB_RX_EVQ_WAKEUP_MASK_WIDTH 6
#define FRF_AZ_EVQ_OWNERR_CTL_LBN 14
#define FRF_AZ_EVQ_OWNERR_CTL_WIDTH 1
#define FRF_AZ_EVQ_FIFO_AF_TH_LBN 7
#define FRF_AZ_EVQ_FIFO_AF_TH_WIDTH 7
#define FRF_AZ_EVQ_FIFO_NOTAF_TH_LBN 0
#define FRF_AZ_EVQ_FIFO_NOTAF_TH_WIDTH 7
/* EVQ_CNT1_REG: Event counter 1 register */
#define FR_AZ_EVQ_CNT1 0x00000460
#define FRF_AZ_EVQ_CNT_PRE_FIFO_LBN 120
#define FRF_AZ_EVQ_CNT_PRE_FIFO_WIDTH 7
#define FRF_AZ_EVQ_CNT_TOBIU_LBN 100
#define FRF_AZ_EVQ_CNT_TOBIU_WIDTH 20
#define FRF_AZ_EVQ_TX_REQ_CNT_LBN 80
#define FRF_AZ_EVQ_TX_REQ_CNT_WIDTH 20
#define FRF_AZ_EVQ_RX_REQ_CNT_LBN 60
#define FRF_AZ_EVQ_RX_REQ_CNT_WIDTH 20
#define FRF_AZ_EVQ_EM_REQ_CNT_LBN 40
#define FRF_AZ_EVQ_EM_REQ_CNT_WIDTH 20
#define FRF_AZ_EVQ_CSR_REQ_CNT_LBN 20
#define FRF_AZ_EVQ_CSR_REQ_CNT_WIDTH 20
#define FRF_AZ_EVQ_ERR_REQ_CNT_LBN 0
#define FRF_AZ_EVQ_ERR_REQ_CNT_WIDTH 20
/* EVQ_CNT2_REG: Event counter 2 register */
#define FR_AZ_EVQ_CNT2 0x00000470
#define FRF_AZ_EVQ_UPD_REQ_CNT_LBN 104
#define FRF_AZ_EVQ_UPD_REQ_CNT_WIDTH 20
#define FRF_AZ_EVQ_CLR_REQ_CNT_LBN 84
#define FRF_AZ_EVQ_CLR_REQ_CNT_WIDTH 20
#define FRF_AZ_EVQ_RDY_CNT_LBN 80
#define FRF_AZ_EVQ_RDY_CNT_WIDTH 4
#define FRF_AZ_EVQ_WU_REQ_CNT_LBN 60
#define FRF_AZ_EVQ_WU_REQ_CNT_WIDTH 20
#define FRF_AZ_EVQ_WET_REQ_CNT_LBN 40
#define FRF_AZ_EVQ_WET_REQ_CNT_WIDTH 20
#define FRF_AZ_EVQ_INIT_REQ_CNT_LBN 20
#define FRF_AZ_EVQ_INIT_REQ_CNT_WIDTH 20
#define FRF_AZ_EVQ_TM_REQ_CNT_LBN 0
#define FRF_AZ_EVQ_TM_REQ_CNT_WIDTH 20
/* USR_EV_REG: Event mailbox register */
#define FR_CZ_USR_EV 0x00000540
#define FR_CZ_USR_EV_STEP 8192
#define FR_CZ_USR_EV_ROWS 1024
#define FRF_CZ_USR_EV_DATA_LBN 0
#define FRF_CZ_USR_EV_DATA_WIDTH 32
/* BUF_TBL_CFG_REG: Buffer table configuration register */
#define FR_AZ_BUF_TBL_CFG 0x00000600
#define FRF_AZ_BUF_TBL_MODE_LBN 3
#define FRF_AZ_BUF_TBL_MODE_WIDTH 1
/* SRM_RX_DC_CFG_REG: SRAM receive descriptor cache configuration register */
#define FR_AZ_SRM_RX_DC_CFG 0x00000610
#define FRF_AZ_SRM_CLK_TMP_EN_LBN 21
#define FRF_AZ_SRM_CLK_TMP_EN_WIDTH 1
#define FRF_AZ_SRM_RX_DC_BASE_ADR_LBN 0
#define FRF_AZ_SRM_RX_DC_BASE_ADR_WIDTH 21
/* SRM_TX_DC_CFG_REG: SRAM transmit descriptor cache configuration register */
#define FR_AZ_SRM_TX_DC_CFG 0x00000620
#define FRF_AZ_SRM_TX_DC_BASE_ADR_LBN 0
#define FRF_AZ_SRM_TX_DC_BASE_ADR_WIDTH 21
/* SRM_CFG_REG: SRAM configuration register */
#define FR_AZ_SRM_CFG 0x00000630
#define FRF_AZ_SRM_OOB_ADR_INTEN_LBN 5
#define FRF_AZ_SRM_OOB_ADR_INTEN_WIDTH 1
#define FRF_AZ_SRM_OOB_BUF_INTEN_LBN 4
#define FRF_AZ_SRM_OOB_BUF_INTEN_WIDTH 1
#define FRF_AZ_SRM_INIT_EN_LBN 3
#define FRF_AZ_SRM_INIT_EN_WIDTH 1
#define FRF_AZ_SRM_NUM_BANK_LBN 2
#define FRF_AZ_SRM_NUM_BANK_WIDTH 1
#define FRF_AZ_SRM_BANK_SIZE_LBN 0
#define FRF_AZ_SRM_BANK_SIZE_WIDTH 2
/* BUF_TBL_UPD_REG: Buffer table update register */
#define FR_AZ_BUF_TBL_UPD 0x00000650
#define FRF_AZ_BUF_UPD_CMD_LBN 63
#define FRF_AZ_BUF_UPD_CMD_WIDTH 1
#define FRF_AZ_BUF_CLR_CMD_LBN 62
#define FRF_AZ_BUF_CLR_CMD_WIDTH 1
#define FRF_AZ_BUF_CLR_END_ID_LBN 32
#define FRF_AZ_BUF_CLR_END_ID_WIDTH 20
#define FRF_AZ_BUF_CLR_START_ID_LBN 0
#define FRF_AZ_BUF_CLR_START_ID_WIDTH 20
/* SRM_UPD_EVQ_REG: Buffer table update register */
#define FR_AZ_SRM_UPD_EVQ 0x00000660
#define FRF_AZ_SRM_UPD_EVQ_ID_LBN 0
#define FRF_AZ_SRM_UPD_EVQ_ID_WIDTH 12
/* SRAM_PARITY_REG: SRAM parity register. */
#define FR_AZ_SRAM_PARITY 0x00000670
#define FRF_CZ_BYPASS_ECC_LBN 3
#define FRF_CZ_BYPASS_ECC_WIDTH 1
#define FRF_CZ_SEC_INT_LBN 2
#define FRF_CZ_SEC_INT_WIDTH 1
#define FRF_CZ_FORCE_SRAM_DOUBLE_ERR_LBN 1
#define FRF_CZ_FORCE_SRAM_DOUBLE_ERR_WIDTH 1
#define FRF_AB_FORCE_SRAM_PERR_LBN 0
#define FRF_AB_FORCE_SRAM_PERR_WIDTH 1
#define FRF_CZ_FORCE_SRAM_SINGLE_ERR_LBN 0
#define FRF_CZ_FORCE_SRAM_SINGLE_ERR_WIDTH 1
/* RX_CFG_REG: Receive configuration register */
#define FR_AZ_RX_CFG 0x00000800
#define FRF_CZ_RX_MIN_KBUF_SIZE_LBN 72
#define FRF_CZ_RX_MIN_KBUF_SIZE_WIDTH 14
#define FRF_CZ_RX_HDR_SPLIT_EN_LBN 71
#define FRF_CZ_RX_HDR_SPLIT_EN_WIDTH 1
#define FRF_CZ_RX_HDR_SPLIT_PLD_BUF_SIZE_LBN 62
#define FRF_CZ_RX_HDR_SPLIT_PLD_BUF_SIZE_WIDTH 9
#define FRF_CZ_RX_HDR_SPLIT_HDR_BUF_SIZE_LBN 53
#define FRF_CZ_RX_HDR_SPLIT_HDR_BUF_SIZE_WIDTH 9
#define FRF_CZ_RX_PRE_RFF_IPG_LBN 49
#define FRF_CZ_RX_PRE_RFF_IPG_WIDTH 4
#define FRF_BZ_RX_TCP_SUP_LBN 48
#define FRF_BZ_RX_TCP_SUP_WIDTH 1
#define FRF_BZ_RX_INGR_EN_LBN 47
#define FRF_BZ_RX_INGR_EN_WIDTH 1
#define FRF_BZ_RX_IP_HASH_LBN 46
#define FRF_BZ_RX_IP_HASH_WIDTH 1
#define FRF_BZ_RX_HASH_ALG_LBN 45
#define FRF_BZ_RX_HASH_ALG_WIDTH 1
#define FRF_BZ_RX_HASH_INSRT_HDR_LBN 44
#define FRF_BZ_RX_HASH_INSRT_HDR_WIDTH 1
#define FRF_BZ_RX_DESC_PUSH_EN_LBN 43
#define FRF_BZ_RX_DESC_PUSH_EN_WIDTH 1