summaryrefslogtreecommitdiffstats
path: root/sys/contrib/octeon-sdk/cvmx-mixx-defs.h
blob: c5d02741f23b426b3ea9b214d4ccfd1ca782dc4a (plain)
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
/***********************license start***************
 * Copyright (c) 2003-2010  Cavium Networks (support@cavium.com). All rights
 * reserved.
 *
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 *
 *   * Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *
 *   * Redistributions in binary form must reproduce the above
 *     copyright notice, this list of conditions and the following
 *     disclaimer in the documentation and/or other materials provided
 *     with the distribution.

 *   * Neither the name of Cavium Networks nor the names of
 *     its contributors may be used to endorse or promote products
 *     derived from this software without specific prior written
 *     permission.

 * This Software, including technical data, may be subject to U.S. export  control
 * laws, including the U.S. Export Administration Act and its  associated
 * regulations, and may be subject to export or import  regulations in other
 * countries.

 * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
 * AND WITH ALL FAULTS AND CAVIUM  NETWORKS MAKES NO PROMISES, REPRESENTATIONS OR
 * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO
 * THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY REPRESENTATION OR
 * DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT DEFECTS, AND CAVIUM
 * SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES OF TITLE,
 * MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF
 * VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR
 * CORRESPONDENCE TO DESCRIPTION. THE ENTIRE  RISK ARISING OUT OF USE OR
 * PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
 ***********************license end**************************************/


/**
 * cvmx-mixx-defs.h
 *
 * Configuration and status register (CSR) type definitions for
 * Octeon mixx.
 *
 * This file is auto generated. Do not edit.
 *
 * <hr>$Revision$<hr>
 *
 */
#ifndef __CVMX_MIXX_TYPEDEFS_H__
#define __CVMX_MIXX_TYPEDEFS_H__

#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
static inline uint64_t CVMX_MIXX_BIST(unsigned long offset)
{
	if (!(
	      (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) ||
	      (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) ||
	      (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1)))))
		cvmx_warn("CVMX_MIXX_BIST(%lu) is invalid on this chip\n", offset);
	return CVMX_ADD_IO_SEG(0x0001070000100078ull) + ((offset) & 1) * 2048;
}
#else
#define CVMX_MIXX_BIST(offset) (CVMX_ADD_IO_SEG(0x0001070000100078ull) + ((offset) & 1) * 2048)
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
static inline uint64_t CVMX_MIXX_CTL(unsigned long offset)
{
	if (!(
	      (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) ||
	      (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) ||
	      (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1)))))
		cvmx_warn("CVMX_MIXX_CTL(%lu) is invalid on this chip\n", offset);
	return CVMX_ADD_IO_SEG(0x0001070000100020ull) + ((offset) & 1) * 2048;
}
#else
#define CVMX_MIXX_CTL(offset) (CVMX_ADD_IO_SEG(0x0001070000100020ull) + ((offset) & 1) * 2048)
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
static inline uint64_t CVMX_MIXX_INTENA(unsigned long offset)
{
	if (!(
	      (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) ||
	      (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) ||
	      (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1)))))
		cvmx_warn("CVMX_MIXX_INTENA(%lu) is invalid on this chip\n", offset);
	return CVMX_ADD_IO_SEG(0x0001070000100050ull) + ((offset) & 1) * 2048;
}
#else
#define CVMX_MIXX_INTENA(offset) (CVMX_ADD_IO_SEG(0x0001070000100050ull) + ((offset) & 1) * 2048)
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
static inline uint64_t CVMX_MIXX_IRCNT(unsigned long offset)
{
	if (!(
	      (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) ||
	      (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) ||
	      (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1)))))
		cvmx_warn("CVMX_MIXX_IRCNT(%lu) is invalid on this chip\n", offset);
	return CVMX_ADD_IO_SEG(0x0001070000100030ull) + ((offset) & 1) * 2048;
}
#else
#define CVMX_MIXX_IRCNT(offset) (CVMX_ADD_IO_SEG(0x0001070000100030ull) + ((offset) & 1) * 2048)
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
static inline uint64_t CVMX_MIXX_IRHWM(unsigned long offset)
{
	if (!(
	      (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) ||
	      (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) ||
	      (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1)))))
		cvmx_warn("CVMX_MIXX_IRHWM(%lu) is invalid on this chip\n", offset);
	return CVMX_ADD_IO_SEG(0x0001070000100028ull) + ((offset) & 1) * 2048;
}
#else
#define CVMX_MIXX_IRHWM(offset) (CVMX_ADD_IO_SEG(0x0001070000100028ull) + ((offset) & 1) * 2048)
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
static inline uint64_t CVMX_MIXX_IRING1(unsigned long offset)
{
	if (!(
	      (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) ||
	      (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) ||
	      (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1)))))
		cvmx_warn("CVMX_MIXX_IRING1(%lu) is invalid on this chip\n", offset);
	return CVMX_ADD_IO_SEG(0x0001070000100010ull) + ((offset) & 1) * 2048;
}
#else
#define CVMX_MIXX_IRING1(offset) (CVMX_ADD_IO_SEG(0x0001070000100010ull) + ((offset) & 1) * 2048)
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
static inline uint64_t CVMX_MIXX_IRING2(unsigned long offset)
{
	if (!(
	      (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) ||
	      (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) ||
	      (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1)))))
		cvmx_warn("CVMX_MIXX_IRING2(%lu) is invalid on this chip\n", offset);
	return CVMX_ADD_IO_SEG(0x0001070000100018ull) + ((offset) & 1) * 2048;
}
#else
#define CVMX_MIXX_IRING2(offset) (CVMX_ADD_IO_SEG(0x0001070000100018ull) + ((offset) & 1) * 2048)
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
static inline uint64_t CVMX_MIXX_ISR(unsigned long offset)
{
	if (!(
	      (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) ||
	      (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) ||
	      (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1)))))
		cvmx_warn("CVMX_MIXX_ISR(%lu) is invalid on this chip\n", offset);
	return CVMX_ADD_IO_SEG(0x0001070000100048ull) + ((offset) & 1) * 2048;
}
#else
#define CVMX_MIXX_ISR(offset) (CVMX_ADD_IO_SEG(0x0001070000100048ull) + ((offset) & 1) * 2048)
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
static inline uint64_t CVMX_MIXX_ORCNT(unsigned long offset)
{
	if (!(
	      (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) ||
	      (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) ||
	      (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1)))))
		cvmx_warn("CVMX_MIXX_ORCNT(%lu) is invalid on this chip\n", offset);
	return CVMX_ADD_IO_SEG(0x0001070000100040ull) + ((offset) & 1) * 2048;
}
#else
#define CVMX_MIXX_ORCNT(offset) (CVMX_ADD_IO_SEG(0x0001070000100040ull) + ((offset) & 1) * 2048)
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
static inline uint64_t CVMX_MIXX_ORHWM(unsigned long offset)
{
	if (!(
	      (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) ||
	      (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) ||
	      (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1)))))
		cvmx_warn("CVMX_MIXX_ORHWM(%lu) is invalid on this chip\n", offset);
	return CVMX_ADD_IO_SEG(0x0001070000100038ull) + ((offset) & 1) * 2048;
}
#else
#define CVMX_MIXX_ORHWM(offset) (CVMX_ADD_IO_SEG(0x0001070000100038ull) + ((offset) & 1) * 2048)
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
static inline uint64_t CVMX_MIXX_ORING1(unsigned long offset)
{
	if (!(
	      (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) ||
	      (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) ||
	      (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1)))))
		cvmx_warn("CVMX_MIXX_ORING1(%lu) is invalid on this chip\n", offset);
	return CVMX_ADD_IO_SEG(0x0001070000100000ull) + ((offset) & 1) * 2048;
}
#else
#define CVMX_MIXX_ORING1(offset) (CVMX_ADD_IO_SEG(0x0001070000100000ull) + ((offset) & 1) * 2048)
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
static inline uint64_t CVMX_MIXX_ORING2(unsigned long offset)
{
	if (!(
	      (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) ||
	      (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) ||
	      (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1)))))
		cvmx_warn("CVMX_MIXX_ORING2(%lu) is invalid on this chip\n", offset);
	return CVMX_ADD_IO_SEG(0x0001070000100008ull) + ((offset) & 1) * 2048;
}
#else
#define CVMX_MIXX_ORING2(offset) (CVMX_ADD_IO_SEG(0x0001070000100008ull) + ((offset) & 1) * 2048)
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
static inline uint64_t CVMX_MIXX_REMCNT(unsigned long offset)
{
	if (!(
	      (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 1))) ||
	      (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0))) ||
	      (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1)))))
		cvmx_warn("CVMX_MIXX_REMCNT(%lu) is invalid on this chip\n", offset);
	return CVMX_ADD_IO_SEG(0x0001070000100058ull) + ((offset) & 1) * 2048;
}
#else
#define CVMX_MIXX_REMCNT(offset) (CVMX_ADD_IO_SEG(0x0001070000100058ull) + ((offset) & 1) * 2048)
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
static inline uint64_t CVMX_MIXX_TSCTL(unsigned long offset)
{
	if (!(
	      (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1)))))
		cvmx_warn("CVMX_MIXX_TSCTL(%lu) is invalid on this chip\n", offset);
	return CVMX_ADD_IO_SEG(0x0001070000100068ull) + ((offset) & 1) * 2048;
}
#else
#define CVMX_MIXX_TSCTL(offset) (CVMX_ADD_IO_SEG(0x0001070000100068ull) + ((offset) & 1) * 2048)
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
static inline uint64_t CVMX_MIXX_TSTAMP(unsigned long offset)
{
	if (!(
	      (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 1)))))
		cvmx_warn("CVMX_MIXX_TSTAMP(%lu) is invalid on this chip\n", offset);
	return CVMX_ADD_IO_SEG(0x0001070000100060ull) + ((offset) & 1) * 2048;
}
#else
#define CVMX_MIXX_TSTAMP(offset) (CVMX_ADD_IO_SEG(0x0001070000100060ull) + ((offset) & 1) * 2048)
#endif

/**
 * cvmx_mix#_bist
 *
 * MIX_BIST = MIX BIST Register
 *
 * Description:
 *  NOTE: To read the MIX_BIST register, a device would issue an IOBLD64 directed at the MIO.
 */
union cvmx_mixx_bist
{
	uint64_t u64;
	struct cvmx_mixx_bist_s
	{
#if __BYTE_ORDER == __BIG_ENDIAN
	uint64_t reserved_6_63                : 58;
	uint64_t opfdat                       : 1;  /**< Bist Results for AGO OPF Buffer RAM
                                                         - 0: GOOD (or bist in progress/never run)
                                                         - 1: BAD */
	uint64_t mrgdat                       : 1;  /**< Bist Results for AGI MRG Buffer RAM
                                                         - 0: GOOD (or bist in progress/never run)
                                                         - 1: BAD */
	uint64_t mrqdat                       : 1;  /**< Bist Results for NBR CSR RdReq RAM
                                                         - 0: GOOD (or bist in progress/never run)
                                                         - 1: BAD */
	uint64_t ipfdat                       : 1;  /**< Bist Results for MIX Inbound Packet RAM
                                                         - 0: GOOD (or bist in progress/never run)
                                                         - 1: BAD */
	uint64_t irfdat                       : 1;  /**< Bist Results for MIX I-Ring Entry RAM
                                                         - 0: GOOD (or bist in progress/never run)
                                                         - 1: BAD */
	uint64_t orfdat                       : 1;  /**< Bist Results for MIX O-Ring Entry RAM
                                                         - 0: GOOD (or bist in progress/never run)
                                                         - 1: BAD */
#else
	uint64_t orfdat                       : 1;
	uint64_t irfdat                       : 1;
	uint64_t ipfdat                       : 1;
	uint64_t mrqdat                       : 1;
	uint64_t mrgdat                       : 1;
	uint64_t opfdat                       : 1;
	uint64_t reserved_6_63                : 58;
#endif
	} s;
	struct cvmx_mixx_bist_cn52xx
	{
#if __BYTE_ORDER == __BIG_ENDIAN
	uint64_t reserved_4_63                : 60;
	uint64_t mrqdat                       : 1;  /**< Bist Results for NBR CSR RdReq RAM
                                                         - 0: GOOD (or bist in progress/never run)
                                                         - 1: BAD */
	uint64_t ipfdat                       : 1;  /**< Bist Results for MIX Inbound Packet RAM
                                                         - 0: GOOD (or bist in progress/never run)
                                                         - 1: BAD */
	uint64_t irfdat                       : 1;  /**< Bist Results for MIX I-Ring Entry RAM
                                                         - 0: GOOD (or bist in progress/never run)
                                                         - 1: BAD */
	uint64_t orfdat                       : 1;  /**< Bist Results for MIX O-Ring Entry RAM
                                                         - 0: GOOD (or bist in progress/never run)
                                                         - 1: BAD */
#else
	uint64_t orfdat                       : 1;
	uint64_t irfdat                       : 1;
	uint64_t ipfdat                       : 1;
	uint64_t mrqdat                       : 1;
	uint64_t reserved_4_63                : 60;
#endif
	} cn52xx;
	struct cvmx_mixx_bist_cn52xx          cn52xxp1;
	struct cvmx_mixx_bist_cn52xx          cn56xx;
	struct cvmx_mixx_bist_cn52xx          cn56xxp1;
	struct cvmx_mixx_bist_s               cn63xx;
	struct cvmx_mixx_bist_s               cn63xxp1;
};
typedef union cvmx_mixx_bist cvmx_mixx_bist_t;

/**
 * cvmx_mix#_ctl
 *
 * MIX_CTL = MIX Control Register
 *
 * Description:
 *  NOTE: To write to the MIX_CTL register, a device would issue an IOBST directed at the MIO.
 *        To read the MIX_CTL register, a device would issue an IOBLD64 directed at the MIO.
 */
union cvmx_mixx_ctl
{
	uint64_t u64;
	struct cvmx_mixx_ctl_s
	{
#if __BYTE_ORDER == __BIG_ENDIAN
	uint64_t reserved_12_63               : 52;
	uint64_t ts_thresh                    : 4;  /**< TimeStamp Interrupt Threshold
                                                         When the \#of pending Timestamp interrupts (MIX_TSCTL[TSCNT]
                                                         is greater than MIX_CTL[TS_THRESH], then a programmable
                                                         TimeStamp Interrupt is issued (see MIX_INTR[TS]
                                                         MIX_INTENA[TSENA]).
                                                         SWNOTE: For o63, since the implementation only supports
                                                         4 oustanding timestamp interrupts, this field should
                                                         only be programmed from [0..3]. */
	uint64_t crc_strip                    : 1;  /**< HW CRC Strip Enable
                                                         When enabled, the last 4 bytes(CRC) of the ingress packet
                                                         are not included in cumulative packet byte length.
                                                         In other words, the cumulative LEN field for all
                                                         I-Ring Buffer Entries associated with a given ingress
                                                         packet will be 4 bytes less (so that the final 4B HW CRC
                                                         packet data is not processed by software). */
	uint64_t busy                         : 1;  /**< MIX Busy Status bit
                                                         MIX will assert busy status any time there are:
                                                           1) L2/DRAM reads in-flight (NCB-arb to read
                                                              response)
                                                           2) L2/DRAM writes in-flight (NCB-arb to write
                                                              data is sent.
                                                           3) L2/DRAM write commits in-flight (NCB-arb to write
                                                              commit response).
                                                         NOTE: After MIX_CTL[EN]=0, the MIX will eventually
                                                         complete any "inflight" transactions, at which point the
                                                         BUSY will de-assert. */
	uint64_t en                           : 1;  /**< MIX Enable bit
                                                         When EN=0, MIX will no longer arbitrate for
                                                         any new L2/DRAM read/write requests on the NCB Bus.
                                                         MIX will complete any requests that are currently
                                                         pended for the NCB Bus. */
	uint64_t reset                        : 1;  /**< MIX Soft Reset
                                                          When SW writes a '1' to MIX_CTL[RESET], the
                                                          MII-MIX/AGL logic will execute a soft reset.
                                                          NOTE: During a soft reset, CSR accesses are not effected.
                                                          However, the values of the CSR fields will be effected by
                                                          soft reset (except MIX_CTL[RESET] itself).
                                                          NOTE: After power-on, the MII-AGL/MIX are held in reset
                                                          until the MIX_CTL[RESET] is written to zero.
                                                          The intended "soft reset" sequence is: (please also
                                                          refer to HRM Section 12.6.2 on MIX/AGL Block Reset).
                                                             1) Write MIX_CTL[EN]=0
                                                                [To prevent any NEW transactions from being started]
                                                             2) Wait for MIX_CTL[BUSY]=0
                                                                [To indicate that all inflight transactions have
                                                                 completed]
                                                             3) Write MIX_CTL[RESET]=1, followed by a MIX_CTL CSR read
                                                                and wait for the result.
                                                             4) Re-Initialize the MIX/AGL just as would be done
                                                                for a hard reset.
                                                         NOTE: Once the MII has been soft-reset, please refer to HRM Section
                                                         12.6.1 MIX/AGL BringUp Sequence to complete the MIX/AGL
                                                         re-initialization sequence. */
	uint64_t lendian                      : 1;  /**< Packet Little Endian Mode
                                                         (0: Big Endian Mode/1: Little Endian Mode)
                                                         When the mode is set, MIX will byte-swap packet data
                                                         loads/stores at the MIX/NCB boundary. */
	uint64_t nbtarb                       : 1;  /**< MIX CB-Request Arbitration Mode.
                                                         When set to zero, the arbiter is fixed priority with
                                                         the following priority scheme:
                                                             Highest Priority: I-Ring Packet Write Request
                                                                               O-Ring Packet Read Request
                                                                               I-Ring Entry Write Request
                                                                               I-Ring Entry Read Request
                                                                               O-Ring Entry Read Request
                                                         When set to one, the arbiter is round robin. */
	uint64_t mrq_hwm                      : 2;  /**< MIX CB-Request FIFO Programmable High Water Mark.
                                                         The MRQ contains 16 CB-Requests which are CSR Rd/Wr
                                                         Requests. If the MRQ backs up with "HWM" entries,
                                                         then new CB-Requests are 'stalled'.
                                                            [0]: HWM = 11
                                                            [1]: HWM = 10
                                                            [2]: HWM = 9
                                                            [3]: HWM = 8
                                                         NOTE: This must only be written at power-on/boot time. */
#else
	uint64_t mrq_hwm                      : 2;
	uint64_t nbtarb                       : 1;
	uint64_t lendian                      : 1;
	uint64_t reset                        : 1;
	uint64_t en                           : 1;
	uint64_t busy                         : 1;
	uint64_t crc_strip                    : 1;
	uint64_t ts_thresh                    : 4;
	uint64_t reserved_12_63               : 52;
#endif
	} s;
	struct cvmx_mixx_ctl_cn52xx
	{
#if __BYTE_ORDER == __BIG_ENDIAN
	uint64_t reserved_8_63                : 56;
	uint64_t crc_strip                    : 1;  /**< HW CRC Strip Enable
                                                         When enabled, the last 4 bytes(CRC) of the ingress packet
                                                         are not included in cumulative packet byte length.
                                                         In other words, the cumulative LEN field for all
                                                         I-Ring Buffer Entries associated with a given ingress
                                                         packet will be 4 bytes less (so that the final 4B HW CRC
                                                         packet data is not processed by software). */
	uint64_t busy                         : 1;  /**< MIX Busy Status bit
                                                         MIX will assert busy status any time there are:
                                                           1) L2/DRAM reads in-flight (NCB-arb to read
                                                              response)
                                                           2) L2/DRAM writes in-flight (NCB-arb to write
                                                              data is sent.
                                                           3) L2/DRAM write commits in-flight (NCB-arb to write
                                                              commit response).
                                                         NOTE: After MIX_CTL[EN]=0, the MIX will eventually
                                                         complete any "inflight" transactions, at which point the
                                                         BUSY will de-assert. */
	uint64_t en                           : 1;  /**< MIX Enable bit
                                                         When EN=0, MIX will no longer arbitrate for
                                                         any new L2/DRAM read/write requests on the NCB Bus.
                                                         MIX will complete any requests that are currently
                                                         pended for the NCB Bus. */
	uint64_t reset                        : 1;  /**< MIX Soft Reset
                                                          When SW writes a '1' to MIX_CTL[RESET], the
                                                          MII-MIX/AGL logic will execute a soft reset.
                                                          NOTE: During a soft reset, CSR accesses are not effected.
                                                          However, the values of the CSR fields will be effected by
                                                          soft reset (except MIX_CTL[RESET] itself).
                                                          NOTE: After power-on, the MII-AGL/MIX are held in reset
                                                          until the MIX_CTL[RESET] is written to zero.
                                                          The intended "soft reset" sequence is: (please also
                                                          refer to HRM Section 12.6.2 on MIX/AGL Block Reset).
                                                             1) Write MIX_CTL[EN]=0
                                                                [To prevent any NEW transactions from being started]
                                                             2) Wait for MIX_CTL[BUSY]=0
                                                                [To indicate that all inflight transactions have
                                                                 completed]
                                                             3) Write MIX_CTL[RESET]=1, followed by a MIX_CTL CSR read
                                                                and wait for the result.
                                                             4) Re-Initialize the MIX/AGL just as would be done
                                                                for a hard reset.
                                                         NOTE: Once the MII has been soft-reset, please refer to HRM Section
                                                         12.6.1 MIX/AGL BringUp Sequence to complete the MIX/AGL
                                                         re-initialization sequence. */
	uint64_t lendian                      : 1;  /**< Packet Little Endian Mode
                                                         (0: Big Endian Mode/1: Little Endian Mode)
                                                         When the mode is set, MIX will byte-swap packet data
                                                         loads/stores at the MIX/NCB boundary. */
	uint64_t nbtarb                       : 1;  /**< MIX CB-Request Arbitration Mode.
                                                         When set to zero, the arbiter is fixed priority with
                                                         the following priority scheme:
                                                             Highest Priority: I-Ring Packet Write Request
                                                                               O-Ring Packet Read Request
                                                                               I-Ring Entry Write Request
                                                                               I-Ring Entry Read Request
                                                                               O-Ring Entry Read Request
                                                         When set to one, the arbiter is round robin. */
	uint64_t mrq_hwm                      : 2;  /**< MIX CB-Request FIFO Programmable High Water Mark.
                                                         The MRQ contains 16 CB-Requests which are CSR Rd/Wr
                                                         Requests. If the MRQ backs up with "HWM" entries,
                                                         then new CB-Requests are 'stalled'.
                                                            [0]: HWM = 11
                                                            [1]: HWM = 10
                                                            [2]: HWM = 9
                                                            [3]: HWM = 8
                                                         NOTE: This must only be written at power-on/boot time. */
#else
	uint64_t mrq_hwm                      : 2;
	uint64_t nbtarb                       : 1;
	uint64_t lendian                      : 1;
	uint64_t reset                        : 1;
	uint64_t en                           : 1;
	uint64_t busy                         : 1;
	uint64_t crc_strip                    : 1;
	uint64_t reserved_8_63                : 56;
#endif
	} cn52xx;
	struct cvmx_mixx_ctl_cn52xx           cn52xxp1;
	struct cvmx_mixx_ctl_cn52xx           cn56xx;
	struct cvmx_mixx_ctl_cn52xx           cn56xxp1;
	struct cvmx_mixx_ctl_s                cn63xx;
	struct cvmx_mixx_ctl_s                cn63xxp1;
};
typedef union cvmx_mixx_ctl cvmx_mixx_ctl_t;

/**
 * cvmx_mix#_intena
 *
 * MIX_INTENA = MIX Local Interrupt Enable Mask Register
 *
 * Description:
 *  NOTE: To write to the MIX_INTENA register, a device would issue an IOBST directed at the MIO.
 *        To read the MIX_INTENA register, a device would issue an IOBLD64 directed at the MIO.
 */
union cvmx_mixx_intena
{
	uint64_t u64;
	struct cvmx_mixx_intena_s
	{
#if __BYTE_ORDER == __BIG_ENDIAN
	uint64_t reserved_8_63                : 56;
	uint64_t tsena                        : 1;  /**< TimeStamp Interrupt Enable
                                                         If both the global interrupt mask bits (CIU_INTx_EN*[MII])
                                                         and this local interrupt mask bit is set, than an
                                                         interrupt is reported for an Outbound Ring with Timestamp
                                                         event (see: MIX_ISR[TS]). */
	uint64_t orunena                      : 1;  /**< ORCNT UnderFlow Detected Enable
                                                         If both the global interrupt mask bits (CIU_INTx_EN*[MII])
                                                         and this local interrupt mask bit is set, than an
                                                         interrupt is reported for an ORCNT underflow condition
                                                         MIX_ISR[ORUN]. */
	uint64_t irunena                      : 1;  /**< IRCNT UnderFlow Interrupt Enable
                                                         If both the global interrupt mask bits (CIU_INTx_EN*[MII])
                                                         and this local interrupt mask bit is set, than an
                                                         interrupt is reported for an IRCNT underflow condition
                                                         MIX_ISR[IRUN]. */
	uint64_t data_drpena                  : 1;  /**< Data was dropped due to RX FIFO full Interrupt
                                                         enable. If both the global interrupt mask bits
                                                         (CIU_INTx_EN*[MII]) and the local interrupt mask
                                                         bit(DATA_DRPENA) is set, than an interrupt is
                                                         reported for this event. */
	uint64_t ithena                       : 1;  /**< Inbound Ring Threshold Exceeded Interrupt Enable
                                                         If both the global interrupt mask bits (CIU_INTx_EN*[MII])
                                                         and this local interrupt mask bit is set, than an
                                                         interrupt is reported for an Inbound Ring Threshold
                                                         Exceeded event(IRTHRESH). */
	uint64_t othena                       : 1;  /**< Outbound Ring Threshold Exceeded Interrupt Enable
                                                         If both the global interrupt mask bits (CIU_INTx_EN*[MII])
                                                         and this local interrupt mask bit is set, than an
                                                         interrupt is reported for an Outbound Ring Threshold
                                                         Exceeded event(ORTHRESH). */
	uint64_t ivfena                       : 1;  /**< Inbound DoorBell(IDBELL) Overflow Detected
                                                         If both the global interrupt mask bits (CIU_INTx_EN*[MII])
                                                         and this local interrupt mask bit is set, than an
                                                         interrupt is reported for an Inbound Doorbell Overflow
                                                         event(IDBOVF). */
	uint64_t ovfena                       : 1;  /**< Outbound DoorBell(ODBELL) Overflow Interrupt Enable
                                                         If both the global interrupt mask bits (CIU_INTx_EN*[MII])
                                                         and this local interrupt mask bit is set, than an
                                                         interrupt is reported for an Outbound Doorbell Overflow
                                                         event(ODBOVF). */
#else
	uint64_t ovfena                       : 1;
	uint64_t ivfena                       : 1;
	uint64_t othena                       : 1;
	uint64_t ithena                       : 1;
	uint64_t data_drpena                  : 1;
	uint64_t irunena                      : 1;
	uint64_t orunena                      : 1;
	uint64_t tsena                        : 1;
	uint64_t reserved_8_63                : 56;
#endif
	} s;
	struct cvmx_mixx_intena_cn52xx
	{
#if __BYTE_ORDER == __BIG_ENDIAN
	uint64_t reserved_7_63                : 57;
	uint64_t orunena                      : 1;  /**< ORCNT UnderFlow Detected
                                                         If both the global interrupt mask bits (CIU_INTx_EN*[MII])
                                                         and this local interrupt mask bit is set, than an
                                                         interrupt is reported for an ORCNT underflow condition
                                                         MIX_ISR[ORUN]. */
	uint64_t irunena                      : 1;  /**< IRCNT UnderFlow Interrupt Enable
                                                         If both the global interrupt mask bits (CIU_INTx_EN*[MII])
                                                         and this local interrupt mask bit is set, than an
                                                         interrupt is reported for an IRCNT underflow condition
                                                         MIX_ISR[IRUN]. */
	uint64_t data_drpena                  : 1;  /**< Data was dropped due to RX FIFO full Interrupt
                                                         enable. If both the global interrupt mask bits
                                                         (CIU_INTx_EN*[MII]) and the local interrupt mask
                                                         bit(DATA_DRPENA) is set, than an interrupt is
                                                         reported for this event. */
	uint64_t ithena                       : 1;  /**< Inbound Ring Threshold Exceeded Interrupt Enable
                                                         If both the global interrupt mask bits (CIU_INTx_EN*[MII])
                                                         and this local interrupt mask bit is set, than an
                                                         interrupt is reported for an Inbound Ring Threshold
                                                         Exceeded event(IRTHRESH). */
	uint64_t othena                       : 1;  /**< Outbound Ring Threshold Exceeded Interrupt Enable
                                                         If both the global interrupt mask bits (CIU_INTx_EN*[MII])
                                                         and this local interrupt mask bit is set, than an
                                                         interrupt is reported for an Outbound Ring Threshold
                                                         Exceeded event(ORTHRESH). */
	uint64_t ivfena                       : 1;  /**< Inbound DoorBell(IDBELL) Overflow Detected
                                                         If both the global interrupt mask bits (CIU_INTx_EN*[MII])
                                                         and this local interrupt mask bit is set, than an
                                                         interrupt is reported for an Inbound Doorbell Overflow
                                                         event(IDBOVF). */
	uint64_t ovfena                       : 1;  /**< Outbound DoorBell(ODBELL) Overflow Interrupt Enable
                                                         If both the global interrupt mask bits (CIU_INTx_EN*[MII])
                                                         and this local interrupt mask bit is set, than an
                                                         interrupt is reported for an Outbound Doorbell Overflow
                                                         event(ODBOVF). */
#else
	uint64_t ovfena                       : 1;
	uint64_t ivfena                       : 1;
	uint64_t othena                       : 1;
	uint64_t ithena                       : 1;
	uint64_t data_drpena                  : 1;
	uint64_t irunena                      : 1;
	uint64_t orunena                      : 1;
	uint64_t reserved_7_63                : 57;
#endif
	} cn52xx;
	struct cvmx_mixx_intena_cn52xx        cn52xxp1;
	struct cvmx_mixx_intena_cn52xx        cn56xx;
	struct cvmx_mixx_intena_cn52xx        cn56xxp1;
	struct cvmx_mixx_intena_s             cn63xx;
	struct cvmx_mixx_intena_s             cn63xxp1;
};
typedef union cvmx_mixx_intena cvmx_mixx_intena_t;

/**
 * cvmx_mix#_ircnt
 *
 * MIX_IRCNT = MIX I-Ring Pending Packet Counter
 *
 * Description:
 *  NOTE: To write to the MIX_IRCNT register, a device would issue an IOBST directed at the MIO.
 *        To read the MIX_IRCNT register, a device would issue an IOBLD64 directed at the MIO.
 */
union cvmx_mixx_ircnt
{
	uint64_t u64;
	struct cvmx_mixx_ircnt_s
	{
#if __BYTE_ORDER == __BIG_ENDIAN
	uint64_t reserved_20_63               : 44;
	uint64_t ircnt                        : 20; /**< Pending \# of I-Ring Packets.
                                                         Whenever HW writes a completion code of Done, Trunc,
                                                         CRCErr or Err, it increments the IRCNT (to indicate
                                                         to SW the \# of pending Input packets in system memory).
                                                         NOTE: The HW guarantees that the completion code write
                                                         is always visible in system memory BEFORE it increments
                                                         the IRCNT.
                                                         Reads of IRCNT return the current inbound packet count.
                                                         Writes of IRCNT decrement the count by the value
                                                         written.
                                                         This register is used to generate interrupts to alert
                                                         SW of pending inbound MIX packets in system memory.
                                                         NOTE: In the case of inbound packets that span multiple
                                                         I-Ring entries, SW must keep track of the \# of I-Ring Entries
                                                         associated with a given inbound packet to reclaim the
                                                         proper \# of I-Ring Entries for re-use. */
#else
	uint64_t ircnt                        : 20;
	uint64_t reserved_20_63               : 44;
#endif
	} s;
	struct cvmx_mixx_ircnt_s              cn52xx;
	struct cvmx_mixx_ircnt_s              cn52xxp1;
	struct cvmx_mixx_ircnt_s              cn56xx;
	struct cvmx_mixx_ircnt_s              cn56xxp1;
	struct cvmx_mixx_ircnt_s              cn63xx;
	struct cvmx_mixx_ircnt_s              cn63xxp1;
};
typedef union cvmx_mixx_ircnt cvmx_mixx_ircnt_t;

/**
 * cvmx_mix#_irhwm
 *
 * MIX_IRHWM = MIX I-Ring High-Water Mark Threshold Register
 *
 * Description:
 *  NOTE: To write to the MIX_IHWM register, a device would issue an IOBST directed at the MIO.
 *        To read the MIX_IHWM register, a device would issue an IOBLD64 directed at the MIO.
 */
union cvmx_mixx_irhwm
{
	uint64_t u64;
	struct cvmx_mixx_irhwm_s
	{
#if __BYTE_ORDER == __BIG_ENDIAN
	uint64_t reserved_40_63               : 24;
	uint64_t ibplwm                       : 20; /**< I-Ring BackPressure Low Water Mark Threshold.
                                                         When the \#of available I-Ring Entries (IDBELL)
                                                         is less than IBPLWM, the AGL-MAC will:
                                                           a) In full-duplex mode: send periodic PAUSE packets.
                                                           b) In half-duplex mode: Force collisions.
                                                         This programmable mechanism is provided as a means
                                                         to backpressure input traffic 'early' enough (so
                                                         that packets are not 'dropped' by OCTEON). */
	uint64_t irhwm                        : 20; /**< I-Ring Entry High Water Mark Threshold.
                                                         Used to determine when the \# of Inbound packets
                                                         in system memory(MIX_IRCNT[IRCNT]) exceeds this IRHWM
                                                         threshold.
                                                         NOTE: The power-on value of the CIU_INTx_EN*[MII]
                                                         interrupt enable bits is zero and must be enabled
                                                         to allow interrupts to be reported. */
#else
	uint64_t irhwm                        : 20;
	uint64_t ibplwm                       : 20;
	uint64_t reserved_40_63               : 24;
#endif
	} s;
	struct cvmx_mixx_irhwm_s              cn52xx;
	struct cvmx_mixx_irhwm_s              cn52xxp1;
	struct cvmx_mixx_irhwm_s              cn56xx;
	struct cvmx_mixx_irhwm_s              cn56xxp1;
	struct cvmx_mixx_irhwm_s              cn63xx;
	struct cvmx_mixx_irhwm_s              cn63xxp1;
};
typedef union cvmx_mixx_irhwm cvmx_mixx_irhwm_t;

/**
 * cvmx_mix#_iring1
 *
 * MIX_IRING1 = MIX Inbound Ring Register \#1
 *
 * Description:
 *  NOTE: To write to the MIX_IRING1 register, a device would issue an IOBST directed at the MIO.
 *        To read the MIX_IRING1 register, a device would issue an IOBLD64 directed at the MIO.
 */
union cvmx_mixx_iring1
{
	uint64_t u64;
	struct cvmx_mixx_iring1_s
	{
#if __BYTE_ORDER == __BIG_ENDIAN
	uint64_t reserved_60_63               : 4;
	uint64_t isize                        : 20; /**< Represents the Inbound Ring Buffer's Size(in 8B
                                                         words). The ring can be as large as 1M entries.
                                                         NOTE: This CSR MUST BE setup written by SW poweron
                                                         (when IDBELL/IRCNT=0). */
	uint64_t ibase                        : 37; /**< Represents the 8B-aligned base address of the first
                                                         Inbound Ring entry in system memory.
                                                         NOTE: SW MUST ONLY write to this register during
                                                         power-on/boot code. */
	uint64_t reserved_0_2                 : 3;
#else
	uint64_t reserved_0_2                 : 3;
	uint64_t ibase                        : 37;
	uint64_t isize                        : 20;
	uint64_t reserved_60_63               : 4;
#endif
	} s;
	struct cvmx_mixx_iring1_cn52xx
	{
#if __BYTE_ORDER == __BIG_ENDIAN
	uint64_t reserved_60_63               : 4;
	uint64_t isize                        : 20; /**< Represents the Inbound Ring Buffer's Size(in 8B
                                                         words). The ring can be as large as 1M entries.
                                                         NOTE: This CSR MUST BE setup written by SW poweron
                                                         (when IDBELL/IRCNT=0). */
	uint64_t reserved_36_39               : 4;
	uint64_t ibase                        : 33; /**< Represents the 8B-aligned base address of the first
                                                         Inbound Ring entry in system memory.
                                                         NOTE: SW MUST ONLY write to this register during
                                                         power-on/boot code. */
	uint64_t reserved_0_2                 : 3;
#else
	uint64_t reserved_0_2                 : 3;
	uint64_t ibase                        : 33;
	uint64_t reserved_36_39               : 4;
	uint64_t isize                        : 20;
	uint64_t reserved_60_63               : 4;
#endif
	} cn52xx;
	struct cvmx_mixx_iring1_cn52xx        cn52xxp1;
	struct cvmx_mixx_iring1_cn52xx        cn56xx;
	struct cvmx_mixx_iring1_cn52xx        cn56xxp1;
	struct cvmx_mixx_iring1_s             cn63xx;
	struct cvmx_mixx_iring1_s             cn63xxp1;
};
typedef union cvmx_mixx_iring1 cvmx_mixx_iring1_t;

/**
 * cvmx_mix#_iring2
 *
 * MIX_IRING2 = MIX Inbound Ring Register \#2
 *
 * Description:
 *  NOTE: To write to the MIX_IRING2 register, a device would issue an IOBST directed at the MIO.
 *        To read the MIX_IRING2 register, a device would issue an IOBLD64 directed at the MIO.
 */
union cvmx_mixx_iring2
{
	uint64_t u64;
	struct cvmx_mixx_iring2_s
	{
#if __BYTE_ORDER == __BIG_ENDIAN
	uint64_t reserved_52_63               : 12;
	uint64_t itlptr                       : 20; /**< The Inbound Ring Tail Pointer selects the I-Ring
                                                         Entry that the HW will process next. After the HW
                                                         completes receiving an inbound packet, it increments
                                                         the I-Ring Tail Pointer. [NOTE: The I-Ring Tail
                                                         Pointer HW increment is always modulo ISIZE.
                                                         NOTE: This field is 'read-only' to SW. */
	uint64_t reserved_20_31               : 12;
	uint64_t idbell                       : 20; /**< Represents the cumulative total of pending
                                                         Inbound Ring Buffer Entries. Each I-Ring
                                                         Buffer Entry contains 1) an L2/DRAM byte pointer
                                                         along with a 2) a Byte Length.
                                                         After SW inserts a new entry into the I-Ring Buffer,
                                                         it "rings the doorbell for the inbound ring". When
                                                         the MIX HW receives the doorbell ring, it advances
                                                         the doorbell count for the I-Ring.
                                                         SW must never cause the doorbell count for the
                                                         I-Ring to exceed the size of the I-ring(ISIZE).
                                                         A read of the CSR indicates the current doorbell
                                                         count. */
#else
	uint64_t idbell                       : 20;
	uint64_t reserved_20_31               : 12;
	uint64_t itlptr                       : 20;
	uint64_t reserved_52_63               : 12;
#endif
	} s;
	struct cvmx_mixx_iring2_s             cn52xx;
	struct cvmx_mixx_iring2_s             cn52xxp1;
	struct cvmx_mixx_iring2_s             cn56xx;
	struct cvmx_mixx_iring2_s             cn56xxp1;
	struct cvmx_mixx_iring2_s             cn63xx;
	struct cvmx_mixx_iring2_s             cn63xxp1;
};
typedef union cvmx_mixx_iring2 cvmx_mixx_iring2_t;

/**
 * cvmx_mix#_isr
 *
 * MIX_ISR = MIX Interrupt/Status Register
 *
 * Description:
 *  NOTE: To write to the MIX_ISR register, a device would issue an IOBST directed at the MIO.
 *        To read the MIX_ISR register, a device would issue an IOBLD64 directed at the MIO.
 */
union cvmx_mixx_isr
{
	uint64_t u64;
	struct cvmx_mixx_isr_s
	{
#if __BYTE_ORDER == __BIG_ENDIAN
	uint64_t reserved_8_63                : 56;
	uint64_t ts                           : 1;  /**< TimeStamp Interrupt
                                                         When the \#of pending Timestamp Interrupts (MIX_TSCTL[TSCNT])
                                                         is greater than the TimeStamp Interrupt Threshold
                                                         (MIX_CTL[TS_THRESH]) value this interrupt bit is set.
                                                         If both the global interrupt mask bits (CIU_INTx_EN*[MII])
                                                         and this local interrupt mask bit is set, than an
                                                         interrupt is reported for an Outbound Ring with Timestamp
                                                         event (see: MIX_INTENA[TSENA]). */
	uint64_t orun                         : 1;  /**< ORCNT UnderFlow Detected
                                                         If SW writes a larger value than what is currently
                                                         in the MIX_ORCNT[ORCNT], then HW will report the
                                                         underflow condition.
                                                         NOTE: The MIX_ORCNT[IOCNT] will clamp to to zero.
                                                         NOTE: If an ORUN underflow condition is detected,
                                                         the integrity of the MIX/AGL HW state has
                                                         been compromised. To recover, SW must issue a
                                                         software reset sequence (see: MIX_CTL[RESET] */
	uint64_t irun                         : 1;  /**< IRCNT UnderFlow Detected
                                                         If SW writes a larger value than what is currently
                                                         in the MIX_IRCNT[IRCNT], then HW will report the
                                                         underflow condition.
                                                         NOTE: The MIX_IRCNT[IRCNT] will clamp to to zero.
                                                         NOTE: If an IRUN underflow condition is detected,
                                                         the integrity of the MIX/AGL HW state has
                                                         been compromised. To recover, SW must issue a
                                                         software reset sequence (see: MIX_CTL[RESET] */
	uint64_t data_drp                     : 1;  /**< Data was dropped due to RX FIFO full
                                                         If this does occur, the DATA_DRP is set and the
                                                         CIU_INTx_SUM0,4[MII] bits are set.
                                                         If both the global interrupt mask bits (CIU_INTx_EN*[MII])
                                                         and the local interrupt mask bit(DATA_DRPENA) is set, than an
                                                         interrupt is reported for this event. */
	uint64_t irthresh                     : 1;  /**< Inbound Ring Packet Threshold Exceeded
                                                         When the pending \#inbound packets in system
                                                         memory(IRCNT) has exceeded a programmable threshold
                                                         (IRHWM), then this bit is set. If this does occur,
                                                         the IRTHRESH is set and the CIU_INTx_SUM0,4[MII] bits
                                                         are set if ((MIX_ISR & MIX_INTENA) != 0)).
                                                         If both the global interrupt mask bits (CIU_INTx_EN*[MII])
                                                         and the local interrupt mask bit(ITHENA) is set, than an
                                                         interrupt is reported for this event. */
	uint64_t orthresh                     : 1;  /**< Outbound Ring Packet Threshold Exceeded
                                                         When the pending \#outbound packets in system
                                                         memory(ORCNT) has exceeded a programmable threshold
                                                         (ORHWM), then this bit is set. If this does occur,
                                                         the ORTHRESH is set and the CIU_INTx_SUM0,4[MII] bits
                                                         are set if ((MIX_ISR & MIX_INTENA) != 0)).
                                                         If both the global interrupt mask bits (CIU_INTx_EN*[MII])
                                                         and the local interrupt mask bit(OTHENA) is set, than an
                                                         interrupt is reported for this event. */
	uint64_t idblovf                      : 1;  /**< Inbound DoorBell(IDBELL) Overflow Detected
                                                         If SW attempts to write to the MIX_IRING2[IDBELL]
                                                         with a value greater than the remaining \#of
                                                         I-Ring Buffer Entries (MIX_REMCNT[IREMCNT]), then
                                                         the following occurs:
                                                         1) The  MIX_IRING2[IDBELL] write is IGNORED
                                                         2) The ODBLOVF is set and the CIU_INTx_SUM0,4[MII]
                                                            bits are set if ((MIX_ISR & MIX_INTENA) != 0)).
                                                         If both the global interrupt mask bits (CIU_INTx_EN*[MII])
                                                         and the local interrupt mask bit(IVFENA) is set, than an
                                                         interrupt is reported for this event.
                                                         SW should keep track of the \#I-Ring Entries in use
                                                         (ie: cumulative \# of IDBELL writes),  and ensure that
                                                         future IDBELL writes don't exceed the size of the
                                                         I-Ring Buffer (MIX_IRING2[ISIZE]).
                                                         SW must reclaim I-Ring Entries by keeping track of the
                                                         \#IRing-Entries, and writing to the MIX_IRCNT[IRCNT].
                                                         NOTE: The MIX_IRCNT[IRCNT] register represents the
                                                         total \#packets(not IRing Entries) and SW must further
                                                         keep track of the \# of I-Ring Entries associated with
                                                         each packet as they are processed.
                                                         NOTE: There is no recovery from an IDBLOVF Interrupt.
                                                         If it occurs, it's an indication that SW has
                                                         overwritten the I-Ring buffer, and the only recourse
                                                         is a HW reset. */
	uint64_t odblovf                      : 1;  /**< Outbound DoorBell(ODBELL) Overflow Detected
                                                         If SW attempts to write to the MIX_ORING2[ODBELL]
                                                         with a value greater than the remaining \#of
                                                         O-Ring Buffer Entries (MIX_REMCNT[OREMCNT]), then
                                                         the following occurs:
                                                         1) The  MIX_ORING2[ODBELL] write is IGNORED
                                                         2) The ODBLOVF is set and the CIU_INTx_SUM0,4[MII]
                                                            bits are set if ((MIX_ISR & MIX_INTENA) != 0)).
                                                         If both the global interrupt mask bits (CIU_INTx_EN*[MII])
                                                         and the local interrupt mask bit(OVFENA) is set, than an
                                                         interrupt is reported for this event.
                                                         SW should keep track of the \#I-Ring Entries in use
                                                         (ie: cumulative \# of ODBELL writes),  and ensure that
                                                         future ODBELL writes don't exceed the size of the
                                                         O-Ring Buffer (MIX_ORING2[OSIZE]).
                                                         SW must reclaim O-Ring Entries by writing to the
                                                         MIX_ORCNT[ORCNT]. .
                                                         NOTE: There is no recovery from an ODBLOVF Interrupt.
                                                         If it occurs, it's an indication that SW has
                                                         overwritten the O-Ring buffer, and the only recourse
                                                         is a HW reset. */
#else
	uint64_t odblovf                      : 1;
	uint64_t idblovf                      : 1;
	uint64_t orthresh                     : 1;
	uint64_t irthresh                     : 1;
	uint64_t data_drp                     : 1;
	uint64_t irun                         : 1;
	uint64_t orun                         : 1;
	uint64_t ts                           : 1;
	uint64_t reserved_8_63                : 56;
#endif
	} s;
	struct cvmx_mixx_isr_cn52xx
	{
#if __BYTE_ORDER == __BIG_ENDIAN
	uint64_t reserved_7_63                : 57;
	uint64_t orun                         : 1;  /**< ORCNT UnderFlow Detected
                                                         If SW writes a larger value than what is currently
                                                         in the MIX_ORCNT[ORCNT], then HW will report the
                                                         underflow condition.
                                                         NOTE: The MIX_ORCNT[IOCNT] will clamp to to zero.
                                                         NOTE: If an ORUN underflow condition is detected,
                                                         the integrity of the MIX/AGL HW state has
                                                         been compromised. To recover, SW must issue a
                                                         software reset sequence (see: MIX_CTL[RESET] */
	uint64_t irun                         : 1;  /**< IRCNT UnderFlow Detected
                                                         If SW writes a larger value than what is currently
                                                         in the MIX_IRCNT[IRCNT], then HW will report the
                                                         underflow condition.
                                                         NOTE: The MIX_IRCNT[IRCNT] will clamp to to zero.
                                                         NOTE: If an IRUN underflow condition is detected,
                                                         the integrity of the MIX/AGL HW state has
                                                         been compromised. To recover, SW must issue a
                                                         software reset sequence (see: MIX_CTL[RESET] */
	uint64_t data_drp                     : 1;  /**< Data was dropped due to RX FIFO full
                                                         If this does occur, the DATA_DRP is set and the
                                                         CIU_INTx_SUM0,4[MII] bits are set.
                                                         If both the global interrupt mask bits (CIU_INTx_EN*[MII])
                                                         and the local interrupt mask bit(DATA_DRPENA) is set, than an
                                                         interrupt is reported for this event. */
	uint64_t irthresh                     : 1;  /**< Inbound Ring Packet Threshold Exceeded
                                                         When the pending \#inbound packets in system
                                                         memory(IRCNT) has exceeded a programmable threshold
                                                         (IRHWM), then this bit is set. If this does occur,
                                                         the IRTHRESH is set and the CIU_INTx_SUM0,4[MII] bits
                                                         are set if ((MIX_ISR & MIX_INTENA) != 0)).
                                                         If both the global interrupt mask bits (CIU_INTx_EN*[MII])
                                                         and the local interrupt mask bit(ITHENA) is set, than an
                                                         interrupt is reported for this event. */
	uint64_t orthresh                     : 1;  /**< Outbound Ring Packet Threshold Exceeded
                                                         When the pending \#outbound packets in system
                                                         memory(ORCNT) has exceeded a programmable threshold
                                                         (ORHWM), then this bit is set. If this does occur,
                                                         the ORTHRESH is set and the CIU_INTx_SUM0,4[MII] bits
                                                         are set if ((MIX_ISR & MIX_INTENA) != 0)).
                                                         If both the global interrupt mask bits (CIU_INTx_EN*[MII])
                                                         and the local interrupt mask bit(OTHENA) is set, than an
                                                         interrupt is reported for this event. */
	uint64_t idblovf                      : 1;  /**< Inbound DoorBell(IDBELL) Overflow Detected
                                                         If SW attempts to write to the MIX_IRING2[IDBELL]
                                                         with a value greater than the remaining \#of
                                                         I-Ring Buffer Entries (MIX_REMCNT[IREMCNT]), then
                                                         the following occurs:
                                                         1) The  MIX_IRING2[IDBELL] write is IGNORED
                                                         2) The ODBLOVF is set and the CIU_INTx_SUM0,4[MII]
                                                            bits are set if ((MIX_ISR & MIX_INTENA) != 0)).
                                                         If both the global interrupt mask bits (CIU_INTx_EN*[MII])
                                                         and the local interrupt mask bit(IVFENA) is set, than an
                                                         interrupt is reported for this event.
                                                         SW should keep track of the \#I-Ring Entries in use
                                                         (ie: cumulative \# of IDBELL writes),  and ensure that
                                                         future IDBELL writes don't exceed the size of the
                                                         I-Ring Buffer (MIX_IRING2[ISIZE]).
                                                         SW must reclaim I-Ring Entries by keeping track of the
                                                         \#IRing-Entries, and writing to the MIX_IRCNT[IRCNT].
                                                         NOTE: The MIX_IRCNT[IRCNT] register represents the
                                                         total \#packets(not IRing Entries) and SW must further
                                                         keep track of the \# of I-Ring Entries associated with
                                                         each packet as they are processed.
                                                         NOTE: There is no recovery from an IDBLOVF Interrupt.
                                                         If it occurs, it's an indication that SW has
                                                         overwritten the I-Ring buffer, and the only recourse
                                                         is a HW reset. */
	uint64_t odblovf                      : 1;  /**< Outbound DoorBell(ODBELL) Overflow Detected
                                                         If SW attempts to write to the MIX_ORING2[ODBELL]
                                                         with a value greater than the remaining \#of
                                                         O-Ring Buffer Entries (MIX_REMCNT[OREMCNT]), then
                                                         the following occurs:
                                                         1) The  MIX_ORING2[ODBELL] write is IGNORED
                                                         2) The ODBLOVF is set and the CIU_INTx_SUM0,4[MII]
                                                            bits are set if ((MIX_ISR & MIX_INTENA) != 0)).
                                                         If both the global interrupt mask bits (CIU_INTx_EN*[MII])
                                                         and the local interrupt mask bit(OVFENA) is set, than an
                                                         interrupt is reported for this event.
                                                         SW should keep track of the \#I-Ring Entries in use
                                                         (ie: cumulative \# of ODBELL writes),  and ensure that
                                                         future ODBELL writes don't exceed the size of the
                                                         O-Ring Buffer (MIX_ORING2[OSIZE]).
                                                         SW must reclaim O-Ring Entries by writing to the
                                                         MIX_ORCNT[ORCNT]. .
                                                         NOTE: There is no recovery from an ODBLOVF Interrupt.
                                                         If it occurs, it's an indication that SW has
                                                         overwritten the O-Ring buffer, and the only recourse
                                                         is a HW reset. */
#else
	uint64_t odblovf                      : 1;
	uint64_t idblovf                      : 1;
	uint64_t orthresh                     : 1;
	uint64_t irthresh                     : 1;
	uint64_t data_drp                     : 1;
	uint64_t irun                         : 1;
	uint64_t orun                         : 1;
	uint64_t reserved_7_63                : 57;
#endif
	} cn52xx;
	struct cvmx_mixx_isr_cn52xx           cn52xxp1;
	struct cvmx_mixx_isr_cn52xx           cn56xx;
	struct cvmx_mixx_isr_cn52xx           cn56xxp1;
	struct cvmx_mixx_isr_s                cn63xx;
	struct cvmx_mixx_isr_s                cn63xxp1;
};
typedef union cvmx_mixx_isr cvmx_mixx_isr_t;

/**
 * cvmx_mix#_orcnt
 *
 * MIX_ORCNT = MIX O-Ring Packets Sent Counter
 *
 * Description:
 *  NOTE: To write to the MIX_ORCNT register, a device would issue an IOBST directed at the MIO.
 *        To read the MIX_ORCNT register, a device would issue an IOBLD64 directed at the MIO.
 */
union cvmx_mixx_orcnt
{
	uint64_t u64;
	struct cvmx_mixx_orcnt_s
	{
#if __BYTE_ORDER == __BIG_ENDIAN
	uint64_t reserved_20_63               : 44;
	uint64_t orcnt                        : 20; /**< Pending \# of O-Ring Packets.
                                                         Whenever HW removes a packet from the O-Ring, it
                                                         increments the ORCNT (to indicate to SW the \# of
                                                         Output packets in system memory that can be reclaimed).
                                                         Reads of ORCNT return the current count.
                                                         Writes of ORCNT decrement the count by the value
                                                         written.
                                                         This register is used to generate interrupts to alert
                                                         SW of pending outbound MIX packets that have been
                                                         removed from system memory. (see MIX_ISR[ORTHRESH]
                                                         description for more details).
                                                         NOTE: For outbound packets, the \# of O-Ring Packets
                                                         is equal to the \# of O-Ring Entries. */
#else
	uint64_t orcnt                        : 20;
	uint64_t reserved_20_63               : 44;
#endif
	} s;
	struct cvmx_mixx_orcnt_s              cn52xx;
	struct cvmx_mixx_orcnt_s              cn52xxp1;
	struct cvmx_mixx_orcnt_s              cn56xx;
	struct cvmx_mixx_orcnt_s              cn56xxp1;
	struct cvmx_mixx_orcnt_s              cn63xx;
	struct cvmx_mixx_orcnt_s              cn63xxp1;
};
typedef union cvmx_mixx_orcnt cvmx_mixx_orcnt_t;

/**
 * cvmx_mix#_orhwm
 *
 * MIX_ORHWM = MIX O-Ring High-Water Mark Threshold Register
 *
 * Description:
 *  NOTE: To write to the MIX_ORHWM register, a device would issue an IOBST directed at the MIO.
 *        To read the MIX_ORHWM register, a device would issue an IOBLD64 directed at the MIO.
 */
union cvmx_mixx_orhwm
{
	uint64_t u64;
	struct cvmx_mixx_orhwm_s
	{
#if __BYTE_ORDER == __BIG_ENDIAN
	uint64_t reserved_20_63               : 44;
	uint64_t orhwm                        : 20; /**< O-Ring Entry High Water Mark Threshold.
                                                         Used to determine when the \# of Outbound packets
                                                         in system memory that can be reclaimed
                                                         (MIX_ORCNT[ORCNT]) exceeds this ORHWM threshold.
                                                         NOTE: The power-on value of the CIU_INTx_EN*[MII]
                                                         interrupt enable bits is zero and must be enabled
                                                         to allow interrupts to be reported. */
#else
	uint64_t orhwm                        : 20;
	uint64_t reserved_20_63               : 44;
#endif
	} s;
	struct cvmx_mixx_orhwm_s              cn52xx;
	struct cvmx_mixx_orhwm_s              cn52xxp1;
	struct cvmx_mixx_orhwm_s              cn56xx;
	struct cvmx_mixx_orhwm_s              cn56xxp1;
	struct cvmx_mixx_orhwm_s              cn63xx;
	struct cvmx_mixx_orhwm_s              cn63xxp1;
};
typedef union cvmx_mixx_orhwm cvmx_mixx_orhwm_t;

/**
 * cvmx_mix#_oring1
 *
 * MIX_ORING1 = MIX Outbound Ring Register \#1
 *
 * Description:
 *  NOTE: To write to the MIX_ORING1 register, a device would issue an IOBST directed at the MIO.
 *        To read the MIX_ORING1 register, a device would issue an IOBLD64 directed at the MIO.
 */
union cvmx_mixx_oring1
{
	uint64_t u64;
	struct cvmx_mixx_oring1_s
	{
#if __BYTE_ORDER == __BIG_ENDIAN
	uint64_t reserved_60_63               : 4;
	uint64_t osize                        : 20; /**< Represents the Outbound Ring Buffer's Size(in 8B
                                                         words). The ring can be as large as 1M entries.
                                                         NOTE: This CSR MUST BE setup written by SW poweron
                                                         (when ODBELL/ORCNT=0). */
	uint64_t obase                        : 37; /**< Represents the 8B-aligned base address of the first
                                                         Outbound Ring(O-Ring) Entry in system memory.
                                                         NOTE: SW MUST ONLY write to this register during
                                                         power-on/boot code. */
	uint64_t reserved_0_2                 : 3;
#else
	uint64_t reserved_0_2                 : 3;
	uint64_t obase                        : 37;
	uint64_t osize                        : 20;
	uint64_t reserved_60_63               : 4;
#endif
	} s;
	struct cvmx_mixx_oring1_cn52xx
	{
#if __BYTE_ORDER == __BIG_ENDIAN
	uint64_t reserved_60_63               : 4;
	uint64_t osize                        : 20; /**< Represents the Outbound Ring Buffer's Size(in 8B
                                                         words). The ring can be as large as 1M entries.
                                                         NOTE: This CSR MUST BE setup written by SW poweron
                                                         (when ODBELL/ORCNT=0). */
	uint64_t reserved_36_39               : 4;
	uint64_t obase                        : 33; /**< Represents the 8B-aligned base address of the first
                                                         Outbound Ring(O-Ring) Entry in system memory.
                                                         NOTE: SW MUST ONLY write to this register during
                                                         power-on/boot code. */
	uint64_t reserved_0_2                 : 3;
#else
	uint64_t reserved_0_2                 : 3;
	uint64_t obase                        : 33;
	uint64_t reserved_36_39               : 4;
	uint64_t osize                        : 20;
	uint64_t reserved_60_63               : 4;
#endif
	} cn52xx;
	struct cvmx_mixx_oring1_cn52xx        cn52xxp1;
	struct cvmx_mixx_oring1_cn52xx        cn56xx;
	struct cvmx_mixx_oring1_cn52xx        cn56xxp1;
	struct cvmx_mixx_oring1_s             cn63xx;
	struct cvmx_mixx_oring1_s             cn63xxp1;
};
typedef union cvmx_mixx_oring1 cvmx_mixx_oring1_t;

/**
 * cvmx_mix#_oring2
 *
 * MIX_ORING2 = MIX Outbound Ring Register \#2
 *
 * Description:
 *  NOTE: To write to the MIX_ORING2 register, a device would issue an IOBST directed at the MIO.
 *        To read the MIX_ORING2 register, a device would issue an IOBLD64 directed at the MIO.
 */
union cvmx_mixx_oring2
{
	uint64_t u64;
	struct cvmx_mixx_oring2_s
	{
#if __BYTE_ORDER == __BIG_ENDIAN
	uint64_t reserved_52_63               : 12;
	uint64_t otlptr                       : 20; /**< The Outbound Ring Tail Pointer selects the O-Ring
                                                         Entry that the HW will process next. After the HW
                                                         completes sending an outbound packet, it increments
                                                         the O-Ring Tail Pointer. [NOTE: The O-Ring Tail
                                                         Pointer HW increment is always modulo
                                                         MIX_ORING2[OSIZE].
                                                         NOTE: This field is 'read-only' to SW. */
	uint64_t reserved_20_31               : 12;
	uint64_t odbell                       : 20; /**< Represents the cumulative total of pending
                                                         Outbound Ring(O-Ring) Buffer Entries. Each O-Ring
                                                         Buffer Entry contains 1) an L2/DRAM byte pointer
                                                         along with a 2) a Byte Length.
                                                         After SW inserts new entries into the O-Ring Buffer,
                                                         it "rings the doorbell with the count of the newly
                                                         inserted entries". When the MIX HW receives the
                                                         doorbell ring, it increments the current doorbell
                                                         count by the CSR write value.
                                                         SW must never cause the doorbell count for the
                                                         O-Ring to exceed the size of the ring(OSIZE).
                                                         A read of the CSR indicates the current doorbell
                                                         count. */
#else
	uint64_t odbell                       : 20;
	uint64_t reserved_20_31               : 12;
	uint64_t otlptr                       : 20;
	uint64_t reserved_52_63               : 12;
#endif
	} s;
	struct cvmx_mixx_oring2_s             cn52xx;
	struct cvmx_mixx_oring2_s             cn52xxp1;
	struct cvmx_mixx_oring2_s             cn56xx;
	struct cvmx_mixx_oring2_s             cn56xxp1;
	struct cvmx_mixx_oring2_s             cn63xx;
	struct cvmx_mixx_oring2_s             cn63xxp1;
};
typedef union cvmx_mixx_oring2 cvmx_mixx_oring2_t;

/**
 * cvmx_mix#_remcnt
 *
 * MIX_REMCNT = MIX Ring Buffer Remainder Counts (useful for HW debug only)
 *
 * Description:
 *  NOTE: To read the MIX_REMCNT register, a device would issue an IOBLD64 directed at the MIO.
 */
union cvmx_mixx_remcnt
{
	uint64_t u64;
	struct cvmx_mixx_remcnt_s
	{
#if __BYTE_ORDER == __BIG_ENDIAN
	uint64_t reserved_52_63               : 12;
	uint64_t iremcnt                      : 20; /**< Remaining I-Ring Buffer Count
                                                         Reflects the \# of unused/remaining I-Ring Entries
                                                         that HW  currently detects in the I-Ring Buffer.
                                                         HW uses this value to detect I-Ring Doorbell overflows.
                                                         (see: MIX_ISR[IDBLOVF])
                                                         When SW writes the MIX_IRING1[ISIZE], the IREMCNT
                                                         is loaded with MIX_IRING2[ISIZE] value. (NOTE: ISIZE should only
                                                         be written at power-on, when it's known that there are
                                                         no I-Ring Entries currently in use by HW).
                                                         When SW writes to the IDBELL register, the IREMCNT
                                                         is decremented by the CSR write value.
                                                         When HW issues an IRing Write Request(onto NCB Bus),
                                                         the IREMCNT is incremented by 1. */
	uint64_t reserved_20_31               : 12;
	uint64_t oremcnt                      : 20; /**< Remaining O-Ring Buffer Count
                                                         Reflects the \# of unused/remaining O-Ring Entries
                                                         that HW  currently detects in the O-Ring Buffer.
                                                         HW uses this value to detect O-Ring Doorbell overflows.
                                                         (see: MIX_ISR[ODBLOVF])
                                                         When SW writes the MIX_IRING1[OSIZE], the OREMCNT
                                                         is loaded with MIX_ORING2[OSIZE] value. (NOTE: OSIZE should only
                                                         be written at power-on, when it's known that there are
                                                         no O-Ring Entries currently in use by HW).
                                                         When SW writes to the ODBELL register, the OREMCNT
                                                         is decremented by the CSR write value.
                                                         When SW writes to MIX_[OREMCNT], the OREMCNT is decremented
                                                         by the CSR write value. */
#else
	uint64_t oremcnt                      : 20;
	uint64_t reserved_20_31               : 12;
	uint64_t iremcnt                      : 20;
	uint64_t reserved_52_63               : 12;
#endif
	} s;
	struct cvmx_mixx_remcnt_s             cn52xx;
	struct cvmx_mixx_remcnt_s             cn52xxp1;
	struct cvmx_mixx_remcnt_s             cn56xx;
	struct cvmx_mixx_remcnt_s             cn56xxp1;
	struct cvmx_mixx_remcnt_s             cn63xx;
	struct cvmx_mixx_remcnt_s             cn63xxp1;
};
typedef union cvmx_mixx_remcnt cvmx_mixx_remcnt_t;

/**
 * cvmx_mix#_tsctl
 *
 * MIX_TSCTL = MIX TimeStamp Control Register
 *
 * Description:
 *  NOTE: To read the MIX_TSCTL register, a device would issue an IOBLD64 directed at the MIO.
 *
 * Notes:
 * SW can read the MIX_TSCTL register to determine the \#pending timestamp interrupts(TSCNT)
 * as well as the \#outstanding timestamp requests in flight(TSTOT), as well as the \#of available
 * timestamp entries (TSAVL) in the timestamp fifo.
 * A write to the MIX_TSCTL register will advance the MIX*_TSTAMP fifo head ptr by 1, and
 * also decrements the MIX*_TSCTL[TSCNT] and MIX*_TSCTL[TSTOT] pending count(s) by 1.
 * For example, if SW reads MIX*_TSCTL[TSCNT]=2 (2 pending timestamp interrupts), it would immediately
 * issue this sequence:
 *      1) MIX*_TSTAMP[TSTAMP] read followed by MIX*_TSCTL write
 *            [gets timestamp value/pops timestamp fifo and decrements pending count(s) by 1]
 *      2) MIX*_TSTAMP[TSTAMP] read followed by MIX*_TSCTL write
 *            [gets timestamp value/pops timestamp fifo and decrements pending count(s) by 1]
 *
 * SWNOTE: A MIX_TSCTL write when MIX_TSCTL[TSCNT]=0 (ie: TimeStamp Fifo empty), then the write is ignored.
 */
union cvmx_mixx_tsctl
{
	uint64_t u64;
	struct cvmx_mixx_tsctl_s
	{
#if __BYTE_ORDER == __BIG_ENDIAN
	uint64_t reserved_21_63               : 43;
	uint64_t tsavl                        : 5;  /**< # of MIX TimeStamp Entries Available for use
                                                         For o63: TSAVL MAX=4 (implementation
                                                         depth of timestamp fifo)
                                                         TSAVL = [IMPLEMENTATION_DEPTH=4(MAX) - TSCNT] */
	uint64_t reserved_13_15               : 3;
	uint64_t tstot                        : 5;  /**< # of pending MIX TimeStamp Requests in-flight
                                                         For o63: TSTOT must never exceed MAX=4 (implementation
                                                         depth of timestamp fifo) */
	uint64_t reserved_5_7                 : 3;
	uint64_t tscnt                        : 5;  /**< # of pending MIX TimeStamp Interrupts
                                                         For o63: TSCNT must never exceed MAX=4 (implementation
                                                         depth of timestamp fifo) */
#else
	uint64_t tscnt                        : 5;
	uint64_t reserved_5_7                 : 3;
	uint64_t tstot                        : 5;
	uint64_t reserved_13_15               : 3;
	uint64_t tsavl                        : 5;
	uint64_t reserved_21_63               : 43;
#endif
	} s;
	struct cvmx_mixx_tsctl_s              cn63xx;
	struct cvmx_mixx_tsctl_s              cn63xxp1;
};
typedef union cvmx_mixx_tsctl cvmx_mixx_tsctl_t;

/**
 * cvmx_mix#_tstamp
 *
 * MIX_TSTAMP = MIX TimeStamp Register
 *
 * Description:
 *  NOTE: To read the MIX_TSTAMP register, a device would issue an IOBLD64 directed at the MIO.
 */
union cvmx_mixx_tstamp
{
	uint64_t u64;
	struct cvmx_mixx_tstamp_s
	{
#if __BYTE_ORDER == __BIG_ENDIAN
	uint64_t tstamp                       : 64; /**< MIX TimeStamp Value
                                                          When SW sets up an ORING Entry with [47]=1(TSTAMP),
                                                          The packet is tagged with a specal SOP w/TSTAMP flag
                                                          as it is sent to the AGL.
                                                          Later the AGL will send "sample" strobe(s) to capture
                                                          a global 64bit timestamp value followed by a "commit"
                                                          strobe which writes the last sampled value into the
                                                          outbound Timestamp fifo (max depth=4) and increments
                                                          the MIX_TSCTL[TSCNT] register to indicate the total
                                                          \#of pending Timestamp interrupts.
                                                          If the \#pending Timestamp interrupts (MIX_TSCTL[TSCNT])
                                                          is greater than the MIX_CTL[TS_THRESH] value, then
                                                          a programmable interrupt is also triggered (see:
                                                          MIX_ISR[TS] MIX_INTENA[TSENA]).
                                                          SW will then read the MIX*_TSTAMP[TSTAMP]
                                                          register value, and MUST THEN write the MIX_TSCTL
                                                          register, which will decrement MIX_TSCTL[TSCNT] register,
                                                          to indicate that a single timestamp interrupt has
                                                          been serviced.
                                                          NOTE: The MIO-MIX HW tracks upto MAX=4 outstanding
                                                          timestamped outbound packets at a time. All subsequent
                                                          ORING Entries w/SOP-TSTAMP will be stalled until
                                                          SW can service the 4 outstanding interrupts.
                                                          SW can read the MIX_TSCTL register to determine the
                                                          \#pending timestamp interrupts(TSCNT) as well as the
                                                          \#outstanding timestamp requests in flight(TSTOT), as
                                                          well as the \#of available timestamp entries (TSAVL).
                                                         SW NOTE: A MIX_TSTAMP read when MIX_TSCTL[TSCNT]=0, will
                                                         result in a return value of all zeroes. SW should only
                                                         read this register when MIX_ISR[TS]=1 (or when
                                                         MIX_TSCTL[TSCNT] != 0) to retrieve the timestamp value
                                                         recorded by HW. If SW reads the TSTAMP when HW has not
                                                         recorded a valid timestamp, then an  all zeroes value is
                                                         returned. */
#else
	uint64_t tstamp                       : 64;
#endif
	} s;
	struct cvmx_mixx_tstamp_s             cn63xx;
	struct cvmx_mixx_tstamp_s             cn63xxp1;
};
typedef union cvmx_mixx_tstamp cvmx_mixx_tstamp_t;

#endif
OpenPOWER on IntegriCloud