summaryrefslogtreecommitdiffstats
path: root/sys/contrib/octeon-sdk/cvmx-tim-defs.h
blob: 351f10cb7c15754e97d51112436c45ac4b0f1f92 (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
/***********************license start***************
 * Copyright (c) 2003-2012  Cavium Inc. (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 Inc. 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 INC. 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-tim-defs.h
 *
 * Configuration and status register (CSR) type definitions for
 * Octeon tim.
 *
 * This file is auto generated. Do not edit.
 *
 * <hr>$Revision$<hr>
 *
 */
#ifndef __CVMX_TIM_DEFS_H__
#define __CVMX_TIM_DEFS_H__

#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
#define CVMX_TIM_BIST_RESULT CVMX_TIM_BIST_RESULT_FUNC()
static inline uint64_t CVMX_TIM_BIST_RESULT_FUNC(void)
{
	if (!(OCTEON_IS_MODEL(OCTEON_CN68XX)))
		cvmx_warn("CVMX_TIM_BIST_RESULT not supported on this chip\n");
	return CVMX_ADD_IO_SEG(0x0001180058000020ull);
}
#else
#define CVMX_TIM_BIST_RESULT (CVMX_ADD_IO_SEG(0x0001180058000020ull))
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
#define CVMX_TIM_DBG2 CVMX_TIM_DBG2_FUNC()
static inline uint64_t CVMX_TIM_DBG2_FUNC(void)
{
	if (!(OCTEON_IS_MODEL(OCTEON_CN68XX)))
		cvmx_warn("CVMX_TIM_DBG2 not supported on this chip\n");
	return CVMX_ADD_IO_SEG(0x00011800580000A0ull);
}
#else
#define CVMX_TIM_DBG2 (CVMX_ADD_IO_SEG(0x00011800580000A0ull))
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
#define CVMX_TIM_DBG3 CVMX_TIM_DBG3_FUNC()
static inline uint64_t CVMX_TIM_DBG3_FUNC(void)
{
	if (!(OCTEON_IS_MODEL(OCTEON_CN68XX)))
		cvmx_warn("CVMX_TIM_DBG3 not supported on this chip\n");
	return CVMX_ADD_IO_SEG(0x00011800580000A8ull);
}
#else
#define CVMX_TIM_DBG3 (CVMX_ADD_IO_SEG(0x00011800580000A8ull))
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
#define CVMX_TIM_ECC_CFG CVMX_TIM_ECC_CFG_FUNC()
static inline uint64_t CVMX_TIM_ECC_CFG_FUNC(void)
{
	if (!(OCTEON_IS_MODEL(OCTEON_CN68XX)))
		cvmx_warn("CVMX_TIM_ECC_CFG not supported on this chip\n");
	return CVMX_ADD_IO_SEG(0x0001180058000018ull);
}
#else
#define CVMX_TIM_ECC_CFG (CVMX_ADD_IO_SEG(0x0001180058000018ull))
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
#define CVMX_TIM_FR_RN_TT CVMX_TIM_FR_RN_TT_FUNC()
static inline uint64_t CVMX_TIM_FR_RN_TT_FUNC(void)
{
	if (!(OCTEON_IS_MODEL(OCTEON_CN68XX)))
		cvmx_warn("CVMX_TIM_FR_RN_TT not supported on this chip\n");
	return CVMX_ADD_IO_SEG(0x0001180058000010ull);
}
#else
#define CVMX_TIM_FR_RN_TT (CVMX_ADD_IO_SEG(0x0001180058000010ull))
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
#define CVMX_TIM_GPIO_EN CVMX_TIM_GPIO_EN_FUNC()
static inline uint64_t CVMX_TIM_GPIO_EN_FUNC(void)
{
	if (!(OCTEON_IS_MODEL(OCTEON_CN68XX)))
		cvmx_warn("CVMX_TIM_GPIO_EN not supported on this chip\n");
	return CVMX_ADD_IO_SEG(0x0001180058000080ull);
}
#else
#define CVMX_TIM_GPIO_EN (CVMX_ADD_IO_SEG(0x0001180058000080ull))
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
#define CVMX_TIM_INT0 CVMX_TIM_INT0_FUNC()
static inline uint64_t CVMX_TIM_INT0_FUNC(void)
{
	if (!(OCTEON_IS_MODEL(OCTEON_CN68XX)))
		cvmx_warn("CVMX_TIM_INT0 not supported on this chip\n");
	return CVMX_ADD_IO_SEG(0x0001180058000030ull);
}
#else
#define CVMX_TIM_INT0 (CVMX_ADD_IO_SEG(0x0001180058000030ull))
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
#define CVMX_TIM_INT0_EN CVMX_TIM_INT0_EN_FUNC()
static inline uint64_t CVMX_TIM_INT0_EN_FUNC(void)
{
	if (!(OCTEON_IS_MODEL(OCTEON_CN68XX)))
		cvmx_warn("CVMX_TIM_INT0_EN not supported on this chip\n");
	return CVMX_ADD_IO_SEG(0x0001180058000038ull);
}
#else
#define CVMX_TIM_INT0_EN (CVMX_ADD_IO_SEG(0x0001180058000038ull))
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
#define CVMX_TIM_INT0_EVENT CVMX_TIM_INT0_EVENT_FUNC()
static inline uint64_t CVMX_TIM_INT0_EVENT_FUNC(void)
{
	if (!(OCTEON_IS_MODEL(OCTEON_CN68XX)))
		cvmx_warn("CVMX_TIM_INT0_EVENT not supported on this chip\n");
	return CVMX_ADD_IO_SEG(0x0001180058000040ull);
}
#else
#define CVMX_TIM_INT0_EVENT (CVMX_ADD_IO_SEG(0x0001180058000040ull))
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
#define CVMX_TIM_INT_ECCERR CVMX_TIM_INT_ECCERR_FUNC()
static inline uint64_t CVMX_TIM_INT_ECCERR_FUNC(void)
{
	if (!(OCTEON_IS_MODEL(OCTEON_CN68XX)))
		cvmx_warn("CVMX_TIM_INT_ECCERR not supported on this chip\n");
	return CVMX_ADD_IO_SEG(0x0001180058000060ull);
}
#else
#define CVMX_TIM_INT_ECCERR (CVMX_ADD_IO_SEG(0x0001180058000060ull))
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
#define CVMX_TIM_INT_ECCERR_EN CVMX_TIM_INT_ECCERR_EN_FUNC()
static inline uint64_t CVMX_TIM_INT_ECCERR_EN_FUNC(void)
{
	if (!(OCTEON_IS_MODEL(OCTEON_CN68XX)))
		cvmx_warn("CVMX_TIM_INT_ECCERR_EN not supported on this chip\n");
	return CVMX_ADD_IO_SEG(0x0001180058000068ull);
}
#else
#define CVMX_TIM_INT_ECCERR_EN (CVMX_ADD_IO_SEG(0x0001180058000068ull))
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
#define CVMX_TIM_INT_ECCERR_EVENT0 CVMX_TIM_INT_ECCERR_EVENT0_FUNC()
static inline uint64_t CVMX_TIM_INT_ECCERR_EVENT0_FUNC(void)
{
	if (!(OCTEON_IS_MODEL(OCTEON_CN68XX)))
		cvmx_warn("CVMX_TIM_INT_ECCERR_EVENT0 not supported on this chip\n");
	return CVMX_ADD_IO_SEG(0x0001180058000070ull);
}
#else
#define CVMX_TIM_INT_ECCERR_EVENT0 (CVMX_ADD_IO_SEG(0x0001180058000070ull))
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
#define CVMX_TIM_INT_ECCERR_EVENT1 CVMX_TIM_INT_ECCERR_EVENT1_FUNC()
static inline uint64_t CVMX_TIM_INT_ECCERR_EVENT1_FUNC(void)
{
	if (!(OCTEON_IS_MODEL(OCTEON_CN68XX)))
		cvmx_warn("CVMX_TIM_INT_ECCERR_EVENT1 not supported on this chip\n");
	return CVMX_ADD_IO_SEG(0x0001180058000078ull);
}
#else
#define CVMX_TIM_INT_ECCERR_EVENT1 (CVMX_ADD_IO_SEG(0x0001180058000078ull))
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
#define CVMX_TIM_MEM_DEBUG0 CVMX_TIM_MEM_DEBUG0_FUNC()
static inline uint64_t CVMX_TIM_MEM_DEBUG0_FUNC(void)
{
	if (!(OCTEON_IS_MODEL(OCTEON_CN3XXX) || OCTEON_IS_MODEL(OCTEON_CN5XXX) || OCTEON_IS_MODEL(OCTEON_CN61XX) || OCTEON_IS_MODEL(OCTEON_CN63XX) || OCTEON_IS_MODEL(OCTEON_CN66XX) || OCTEON_IS_MODEL(OCTEON_CNF71XX)))
		cvmx_warn("CVMX_TIM_MEM_DEBUG0 not supported on this chip\n");
	return CVMX_ADD_IO_SEG(0x0001180058001100ull);
}
#else
#define CVMX_TIM_MEM_DEBUG0 (CVMX_ADD_IO_SEG(0x0001180058001100ull))
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
#define CVMX_TIM_MEM_DEBUG1 CVMX_TIM_MEM_DEBUG1_FUNC()
static inline uint64_t CVMX_TIM_MEM_DEBUG1_FUNC(void)
{
	if (!(OCTEON_IS_MODEL(OCTEON_CN3XXX) || OCTEON_IS_MODEL(OCTEON_CN5XXX) || OCTEON_IS_MODEL(OCTEON_CN61XX) || OCTEON_IS_MODEL(OCTEON_CN63XX) || OCTEON_IS_MODEL(OCTEON_CN66XX) || OCTEON_IS_MODEL(OCTEON_CNF71XX)))
		cvmx_warn("CVMX_TIM_MEM_DEBUG1 not supported on this chip\n");
	return CVMX_ADD_IO_SEG(0x0001180058001108ull);
}
#else
#define CVMX_TIM_MEM_DEBUG1 (CVMX_ADD_IO_SEG(0x0001180058001108ull))
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
#define CVMX_TIM_MEM_DEBUG2 CVMX_TIM_MEM_DEBUG2_FUNC()
static inline uint64_t CVMX_TIM_MEM_DEBUG2_FUNC(void)
{
	if (!(OCTEON_IS_MODEL(OCTEON_CN3XXX) || OCTEON_IS_MODEL(OCTEON_CN5XXX) || OCTEON_IS_MODEL(OCTEON_CN61XX) || OCTEON_IS_MODEL(OCTEON_CN63XX) || OCTEON_IS_MODEL(OCTEON_CN66XX) || OCTEON_IS_MODEL(OCTEON_CNF71XX)))
		cvmx_warn("CVMX_TIM_MEM_DEBUG2 not supported on this chip\n");
	return CVMX_ADD_IO_SEG(0x0001180058001110ull);
}
#else
#define CVMX_TIM_MEM_DEBUG2 (CVMX_ADD_IO_SEG(0x0001180058001110ull))
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
#define CVMX_TIM_MEM_RING0 CVMX_TIM_MEM_RING0_FUNC()
static inline uint64_t CVMX_TIM_MEM_RING0_FUNC(void)
{
	if (!(OCTEON_IS_MODEL(OCTEON_CN3XXX) || OCTEON_IS_MODEL(OCTEON_CN5XXX) || OCTEON_IS_MODEL(OCTEON_CN61XX) || OCTEON_IS_MODEL(OCTEON_CN63XX) || OCTEON_IS_MODEL(OCTEON_CN66XX) || OCTEON_IS_MODEL(OCTEON_CNF71XX)))
		cvmx_warn("CVMX_TIM_MEM_RING0 not supported on this chip\n");
	return CVMX_ADD_IO_SEG(0x0001180058001000ull);
}
#else
#define CVMX_TIM_MEM_RING0 (CVMX_ADD_IO_SEG(0x0001180058001000ull))
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
#define CVMX_TIM_MEM_RING1 CVMX_TIM_MEM_RING1_FUNC()
static inline uint64_t CVMX_TIM_MEM_RING1_FUNC(void)
{
	if (!(OCTEON_IS_MODEL(OCTEON_CN3XXX) || OCTEON_IS_MODEL(OCTEON_CN5XXX) || OCTEON_IS_MODEL(OCTEON_CN61XX) || OCTEON_IS_MODEL(OCTEON_CN63XX) || OCTEON_IS_MODEL(OCTEON_CN66XX) || OCTEON_IS_MODEL(OCTEON_CNF71XX)))
		cvmx_warn("CVMX_TIM_MEM_RING1 not supported on this chip\n");
	return CVMX_ADD_IO_SEG(0x0001180058001008ull);
}
#else
#define CVMX_TIM_MEM_RING1 (CVMX_ADD_IO_SEG(0x0001180058001008ull))
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
#define CVMX_TIM_REG_BIST_RESULT CVMX_TIM_REG_BIST_RESULT_FUNC()
static inline uint64_t CVMX_TIM_REG_BIST_RESULT_FUNC(void)
{
	if (!(OCTEON_IS_MODEL(OCTEON_CN3XXX) || OCTEON_IS_MODEL(OCTEON_CN5XXX) || OCTEON_IS_MODEL(OCTEON_CN61XX) || OCTEON_IS_MODEL(OCTEON_CN63XX) || OCTEON_IS_MODEL(OCTEON_CN66XX) || OCTEON_IS_MODEL(OCTEON_CNF71XX)))
		cvmx_warn("CVMX_TIM_REG_BIST_RESULT not supported on this chip\n");
	return CVMX_ADD_IO_SEG(0x0001180058000080ull);
}
#else
#define CVMX_TIM_REG_BIST_RESULT (CVMX_ADD_IO_SEG(0x0001180058000080ull))
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
#define CVMX_TIM_REG_ERROR CVMX_TIM_REG_ERROR_FUNC()
static inline uint64_t CVMX_TIM_REG_ERROR_FUNC(void)
{
	if (!(OCTEON_IS_MODEL(OCTEON_CN3XXX) || OCTEON_IS_MODEL(OCTEON_CN5XXX) || OCTEON_IS_MODEL(OCTEON_CN61XX) || OCTEON_IS_MODEL(OCTEON_CN63XX) || OCTEON_IS_MODEL(OCTEON_CN66XX) || OCTEON_IS_MODEL(OCTEON_CNF71XX)))
		cvmx_warn("CVMX_TIM_REG_ERROR not supported on this chip\n");
	return CVMX_ADD_IO_SEG(0x0001180058000088ull);
}
#else
#define CVMX_TIM_REG_ERROR (CVMX_ADD_IO_SEG(0x0001180058000088ull))
#endif
#define CVMX_TIM_REG_FLAGS (CVMX_ADD_IO_SEG(0x0001180058000000ull))
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
#define CVMX_TIM_REG_INT_MASK CVMX_TIM_REG_INT_MASK_FUNC()
static inline uint64_t CVMX_TIM_REG_INT_MASK_FUNC(void)
{
	if (!(OCTEON_IS_MODEL(OCTEON_CN3XXX) || OCTEON_IS_MODEL(OCTEON_CN5XXX) || OCTEON_IS_MODEL(OCTEON_CN61XX) || OCTEON_IS_MODEL(OCTEON_CN63XX) || OCTEON_IS_MODEL(OCTEON_CN66XX) || OCTEON_IS_MODEL(OCTEON_CNF71XX)))
		cvmx_warn("CVMX_TIM_REG_INT_MASK not supported on this chip\n");
	return CVMX_ADD_IO_SEG(0x0001180058000090ull);
}
#else
#define CVMX_TIM_REG_INT_MASK (CVMX_ADD_IO_SEG(0x0001180058000090ull))
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
#define CVMX_TIM_REG_READ_IDX CVMX_TIM_REG_READ_IDX_FUNC()
static inline uint64_t CVMX_TIM_REG_READ_IDX_FUNC(void)
{
	if (!(OCTEON_IS_MODEL(OCTEON_CN3XXX) || OCTEON_IS_MODEL(OCTEON_CN5XXX) || OCTEON_IS_MODEL(OCTEON_CN61XX) || OCTEON_IS_MODEL(OCTEON_CN63XX) || OCTEON_IS_MODEL(OCTEON_CN66XX) || OCTEON_IS_MODEL(OCTEON_CNF71XX)))
		cvmx_warn("CVMX_TIM_REG_READ_IDX not supported on this chip\n");
	return CVMX_ADD_IO_SEG(0x0001180058000008ull);
}
#else
#define CVMX_TIM_REG_READ_IDX (CVMX_ADD_IO_SEG(0x0001180058000008ull))
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
static inline uint64_t CVMX_TIM_RINGX_CTL0(unsigned long offset)
{
	if (!(
	      (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset <= 63)))))
		cvmx_warn("CVMX_TIM_RINGX_CTL0(%lu) is invalid on this chip\n", offset);
	return CVMX_ADD_IO_SEG(0x0001180058002000ull) + ((offset) & 63) * 8;
}
#else
#define CVMX_TIM_RINGX_CTL0(offset) (CVMX_ADD_IO_SEG(0x0001180058002000ull) + ((offset) & 63) * 8)
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
static inline uint64_t CVMX_TIM_RINGX_CTL1(unsigned long offset)
{
	if (!(
	      (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset <= 63)))))
		cvmx_warn("CVMX_TIM_RINGX_CTL1(%lu) is invalid on this chip\n", offset);
	return CVMX_ADD_IO_SEG(0x0001180058002400ull) + ((offset) & 63) * 8;
}
#else
#define CVMX_TIM_RINGX_CTL1(offset) (CVMX_ADD_IO_SEG(0x0001180058002400ull) + ((offset) & 63) * 8)
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
static inline uint64_t CVMX_TIM_RINGX_CTL2(unsigned long offset)
{
	if (!(
	      (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset <= 63)))))
		cvmx_warn("CVMX_TIM_RINGX_CTL2(%lu) is invalid on this chip\n", offset);
	return CVMX_ADD_IO_SEG(0x0001180058002800ull) + ((offset) & 63) * 8;
}
#else
#define CVMX_TIM_RINGX_CTL2(offset) (CVMX_ADD_IO_SEG(0x0001180058002800ull) + ((offset) & 63) * 8)
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
static inline uint64_t CVMX_TIM_RINGX_DBG0(unsigned long offset)
{
	if (!(
	      (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset <= 63)))))
		cvmx_warn("CVMX_TIM_RINGX_DBG0(%lu) is invalid on this chip\n", offset);
	return CVMX_ADD_IO_SEG(0x0001180058003000ull) + ((offset) & 63) * 8;
}
#else
#define CVMX_TIM_RINGX_DBG0(offset) (CVMX_ADD_IO_SEG(0x0001180058003000ull) + ((offset) & 63) * 8)
#endif
#if CVMX_ENABLE_CSR_ADDRESS_CHECKING
static inline uint64_t CVMX_TIM_RINGX_DBG1(unsigned long offset)
{
	if (!(
	      (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset <= 63)))))
		cvmx_warn("CVMX_TIM_RINGX_DBG1(%lu) is invalid on this chip\n", offset);
	return CVMX_ADD_IO_SEG(0x0001180058001200ull) + ((offset) & 63) * 8;
}
#else
#define CVMX_TIM_RINGX_DBG1(offset) (CVMX_ADD_IO_SEG(0x0001180058001200ull) + ((offset) & 63) * 8)
#endif

/**
 * cvmx_tim_bist_result
 *
 * Notes:
 * Access to the internal BiST results
 * Each bit is the BiST result of an individual memory (per bit, 0=pass and 1=fail).
 */
union cvmx_tim_bist_result {
	uint64_t u64;
	struct cvmx_tim_bist_result_s {
#ifdef __BIG_ENDIAN_BITFIELD
	uint64_t reserved_3_63                : 61;
	uint64_t wqe_fifo                     : 1;  /**< BIST result of the NCB_WQE FIFO (0=pass, !0=fail) */
	uint64_t lslr_fifo                    : 1;  /**< BIST result of the NCB_LSLR FIFO (0=pass, !0=fail) */
	uint64_t rds_mem                      : 1;  /**< BIST result of the RDS memory (0=pass, !0=fail) */
#else
	uint64_t rds_mem                      : 1;
	uint64_t lslr_fifo                    : 1;
	uint64_t wqe_fifo                     : 1;
	uint64_t reserved_3_63                : 61;
#endif
	} s;
	struct cvmx_tim_bist_result_s         cn68xx;
	struct cvmx_tim_bist_result_s         cn68xxp1;
};
typedef union cvmx_tim_bist_result cvmx_tim_bist_result_t;

/**
 * cvmx_tim_dbg2
 */
union cvmx_tim_dbg2 {
	uint64_t u64;
	struct cvmx_tim_dbg2_s {
#ifdef __BIG_ENDIAN_BITFIELD
	uint64_t mem_alloc_reg                : 8;  /**< NCB Load Memory Allocation status */
	uint64_t reserved_51_55               : 5;
	uint64_t gnt_fifo_level               : 3;  /**< NCB GRANT FIFO level */
	uint64_t reserved_45_47               : 3;
	uint64_t rwf_fifo_level               : 5;  /**< NCB requests FIFO level */
	uint64_t wqe_fifo_level               : 8;  /**< NCB WQE LD FIFO level */
	uint64_t reserved_16_31               : 16;
	uint64_t fsm3_state                   : 4;  /**< FSM 3 current state */
	uint64_t fsm2_state                   : 4;  /**< FSM 2 current state */
	uint64_t fsm1_state                   : 4;  /**< FSM 1 current state */
	uint64_t fsm0_state                   : 4;  /**< FSM 0 current state */
#else
	uint64_t fsm0_state                   : 4;
	uint64_t fsm1_state                   : 4;
	uint64_t fsm2_state                   : 4;
	uint64_t fsm3_state                   : 4;
	uint64_t reserved_16_31               : 16;
	uint64_t wqe_fifo_level               : 8;
	uint64_t rwf_fifo_level               : 5;
	uint64_t reserved_45_47               : 3;
	uint64_t gnt_fifo_level               : 3;
	uint64_t reserved_51_55               : 5;
	uint64_t mem_alloc_reg                : 8;
#endif
	} s;
	struct cvmx_tim_dbg2_s                cn68xx;
	struct cvmx_tim_dbg2_s                cn68xxp1;
};
typedef union cvmx_tim_dbg2 cvmx_tim_dbg2_t;

/**
 * cvmx_tim_dbg3
 */
union cvmx_tim_dbg3 {
	uint64_t u64;
	struct cvmx_tim_dbg3_s {
#ifdef __BIG_ENDIAN_BITFIELD
	uint64_t rings_pending_vec            : 64; /**< Pending rings vector. Indicates which ring in TIM are
                                                         pending traversal. Bit 0 represents ring 0 while bit 63
                                                         represents ring 63. */
#else
	uint64_t rings_pending_vec            : 64;
#endif
	} s;
	struct cvmx_tim_dbg3_s                cn68xx;
	struct cvmx_tim_dbg3_s                cn68xxp1;
};
typedef union cvmx_tim_dbg3 cvmx_tim_dbg3_t;

/**
 * cvmx_tim_ecc_cfg
 */
union cvmx_tim_ecc_cfg {
	uint64_t u64;
	struct cvmx_tim_ecc_cfg_s {
#ifdef __BIG_ENDIAN_BITFIELD
	uint64_t reserved_3_63                : 61;
	uint64_t ecc_flp_syn                  : 2;  /**< ECC Flip Syndrome. Flip the ECC's syndrome for testing
                                                         purposes, to test SBE and DBE ECC interrupts. */
	uint64_t ecc_en                       : 1;  /**< Enable ECC correction of the Ring Data Structre memory.
                                                         ECC is enabled by default. */
#else
	uint64_t ecc_en                       : 1;
	uint64_t ecc_flp_syn                  : 2;
	uint64_t reserved_3_63                : 61;
#endif
	} s;
	struct cvmx_tim_ecc_cfg_s             cn68xx;
	struct cvmx_tim_ecc_cfg_s             cn68xxp1;
};
typedef union cvmx_tim_ecc_cfg cvmx_tim_ecc_cfg_t;

/**
 * cvmx_tim_fr_rn_tt
 *
 * Notes:
 * For every 64 entries in a bucket interval should be at
 * least 1us.
 * Minimal recommended value for Threshold register is 1us
 */
union cvmx_tim_fr_rn_tt {
	uint64_t u64;
	struct cvmx_tim_fr_rn_tt_s {
#ifdef __BIG_ENDIAN_BITFIELD
	uint64_t reserved_54_63               : 10;
	uint64_t thld_gp                      : 22; /**< Free Running Timer Threshold. Defines the reset value
                                                         for the free running timer when it reaches zero during
                                                         it's count down. This threshold only applies to the
                                                         timer that is driven by GPIO edge as defined at
                                                         TIM_REG_FLAGS.GPIO_EDGE
                                                         ***NOTE: Added in pass 2.0 */
	uint64_t reserved_22_31               : 10;
	uint64_t fr_rn_tt                     : 22; /**< Free Running Timer Threshold. Defines the reset value
                                                         for the free running timer when it reaches zero during
                                                         it's count down.
                                                         FR_RN_TT will be used in both cases where free running
                                                         clock is driven externally or internally.
                                                         Interval programming guidelines:
                                                         For every 64 entries in a bucket interval should be at
                                                         least 1us.
                                                         Minimal recommended value for FR_RN_TT is 1us. */
#else
	uint64_t fr_rn_tt                     : 22;
	uint64_t reserved_22_31               : 10;
	uint64_t thld_gp                      : 22;
	uint64_t reserved_54_63               : 10;
#endif
	} s;
	struct cvmx_tim_fr_rn_tt_s            cn68xx;
	struct cvmx_tim_fr_rn_tt_cn68xxp1 {
#ifdef __BIG_ENDIAN_BITFIELD
	uint64_t reserved_22_63               : 42;
	uint64_t fr_rn_tt                     : 22; /**< Free Running Timer Threshold. Defines the reset value
                                                         for the free running timer when it reaches zero during
                                                         it's count down.
                                                         FR_RN_TT will be used in both cases where free running
                                                         clock is driven externally or internally.
                                                         Interval programming guidelines:
                                                         For every 64 entries in a bucket interval should be at
                                                         least 1us.
                                                         Minimal recommended value for FR_RN_TT is 1us. */
#else
	uint64_t fr_rn_tt                     : 22;
	uint64_t reserved_22_63               : 42;
#endif
	} cn68xxp1;
};
typedef union cvmx_tim_fr_rn_tt cvmx_tim_fr_rn_tt_t;

/**
 * cvmx_tim_gpio_en
 */
union cvmx_tim_gpio_en {
	uint64_t u64;
	struct cvmx_tim_gpio_en_s {
#ifdef __BIG_ENDIAN_BITFIELD
	uint64_t gpio_en                      : 64; /**< Each bit correspond to rings [63:0] respectively.
                                                         This register reflects the values written to
                                                         TIM_RING63..0_CTL1.ENA_GPIO
                                                         ***NOTE: Added in pass 2.0 for debug only. RESERVED */
#else
	uint64_t gpio_en                      : 64;
#endif
	} s;
	struct cvmx_tim_gpio_en_s             cn68xx;
};
typedef union cvmx_tim_gpio_en cvmx_tim_gpio_en_t;

/**
 * cvmx_tim_int0
 *
 * Notes:
 * A ring is in error if its interval has elapsed more than once without having been serviced. This is
 * usually a programming error where number of entries in the bucket is too large for the interval
 * specified for the ring.
 * Any bit in the INT field should be cleared by writing '1' to it.
 */
union cvmx_tim_int0 {
	uint64_t u64;
	struct cvmx_tim_int0_s {
#ifdef __BIG_ENDIAN_BITFIELD
	uint64_t int0                         : 64; /**< Interrupt bit per ring. Each bit indicates the
                                                         ring number in error. Each bit in this reg is set
                                                         regardless of TIM_INT0_EN value. */
#else
	uint64_t int0                         : 64;
#endif
	} s;
	struct cvmx_tim_int0_s                cn68xx;
	struct cvmx_tim_int0_s                cn68xxp1;
};
typedef union cvmx_tim_int0 cvmx_tim_int0_t;

/**
 * cvmx_tim_int0_en
 *
 * Notes:
 * When bit at TIM_INT0_EN is set it enables the corresponding TIM_INTO's bit for interrupt generation
 * If enable bit is cleared the corresponding bit at TIM_INT0 will still be set.
 * Interrupt to the cores is generated by : |(TIM_INT0 & TIM_INT0_EN0)
 */
union cvmx_tim_int0_en {
	uint64_t u64;
	struct cvmx_tim_int0_en_s {
#ifdef __BIG_ENDIAN_BITFIELD
	uint64_t int0_en                      : 64; /**< Bit enable corresponding to TIM_INT0. */
#else
	uint64_t int0_en                      : 64;
#endif
	} s;
	struct cvmx_tim_int0_en_s             cn68xx;
	struct cvmx_tim_int0_en_s             cn68xxp1;
};
typedef union cvmx_tim_int0_en cvmx_tim_int0_en_t;

/**
 * cvmx_tim_int0_event
 */
union cvmx_tim_int0_event {
	uint64_t u64;
	struct cvmx_tim_int0_event_s {
#ifdef __BIG_ENDIAN_BITFIELD
	uint64_t reserved_6_63                : 58;
	uint64_t ring_id                      : 6;  /**< The first Ring ID where an interrupt occurred. */
#else
	uint64_t ring_id                      : 6;
	uint64_t reserved_6_63                : 58;
#endif
	} s;
	struct cvmx_tim_int0_event_s          cn68xx;
	struct cvmx_tim_int0_event_s          cn68xxp1;
};
typedef union cvmx_tim_int0_event cvmx_tim_int0_event_t;

/**
 * cvmx_tim_int_eccerr
 *
 * Notes:
 * Each bit in this reg is set regardless of TIM_INT_ECCERR_EN value.
 *
 */
union cvmx_tim_int_eccerr {
	uint64_t u64;
	struct cvmx_tim_int_eccerr_s {
#ifdef __BIG_ENDIAN_BITFIELD
	uint64_t reserved_2_63                : 62;
	uint64_t dbe                          : 1;  /**< TIM RDS memory had a Double Bit Error */
	uint64_t sbe                          : 1;  /**< TIM RDS memory had a Single Bit Error */
#else
	uint64_t sbe                          : 1;
	uint64_t dbe                          : 1;
	uint64_t reserved_2_63                : 62;
#endif
	} s;
	struct cvmx_tim_int_eccerr_s          cn68xx;
	struct cvmx_tim_int_eccerr_s          cn68xxp1;
};
typedef union cvmx_tim_int_eccerr cvmx_tim_int_eccerr_t;

/**
 * cvmx_tim_int_eccerr_en
 *
 * Notes:
 * When mask bit is set, the corresponding bit in TIM_INT_ECCERR is enabled. If mask bit is cleared the
 * corresponding bit in TIM_INT_ECCERR will still be set but interrupt will not be reported.
 */
union cvmx_tim_int_eccerr_en {
	uint64_t u64;
	struct cvmx_tim_int_eccerr_en_s {
#ifdef __BIG_ENDIAN_BITFIELD
	uint64_t reserved_2_63                : 62;
	uint64_t dbe_en                       : 1;  /**< Bit mask corresponding to TIM_REG_ECCERR.DBE */
	uint64_t sbe_en                       : 1;  /**< Bit mask corresponding to TIM_REG_ECCERR.SBE */
#else
	uint64_t sbe_en                       : 1;
	uint64_t dbe_en                       : 1;
	uint64_t reserved_2_63                : 62;
#endif
	} s;
	struct cvmx_tim_int_eccerr_en_s       cn68xx;
	struct cvmx_tim_int_eccerr_en_s       cn68xxp1;
};
typedef union cvmx_tim_int_eccerr_en cvmx_tim_int_eccerr_en_t;

/**
 * cvmx_tim_int_eccerr_event0
 */
union cvmx_tim_int_eccerr_event0 {
	uint64_t u64;
	struct cvmx_tim_int_eccerr_event0_s {
#ifdef __BIG_ENDIAN_BITFIELD
	uint64_t reserved_15_63               : 49;
	uint64_t synd                         : 7;  /**< ECC Syndrome */
	uint64_t add                          : 8;  /**< Memory address where the Error occurred. */
#else
	uint64_t add                          : 8;
	uint64_t synd                         : 7;
	uint64_t reserved_15_63               : 49;
#endif
	} s;
	struct cvmx_tim_int_eccerr_event0_s   cn68xx;
	struct cvmx_tim_int_eccerr_event0_s   cn68xxp1;
};
typedef union cvmx_tim_int_eccerr_event0 cvmx_tim_int_eccerr_event0_t;

/**
 * cvmx_tim_int_eccerr_event1
 */
union cvmx_tim_int_eccerr_event1 {
	uint64_t u64;
	struct cvmx_tim_int_eccerr_event1_s {
#ifdef __BIG_ENDIAN_BITFIELD
	uint64_t reserved_55_63               : 9;
	uint64_t org_ecc                      : 7;  /**< Original ECC bits where the error occured. */
	uint64_t org_rds_dat                  : 48; /**< Memory original data where the error occured. */
#else
	uint64_t org_rds_dat                  : 48;
	uint64_t org_ecc                      : 7;
	uint64_t reserved_55_63               : 9;
#endif
	} s;
	struct cvmx_tim_int_eccerr_event1_s   cn68xx;
	struct cvmx_tim_int_eccerr_event1_s   cn68xxp1;
};
typedef union cvmx_tim_int_eccerr_event1 cvmx_tim_int_eccerr_event1_t;

/**
 * cvmx_tim_mem_debug0
 *
 * Notes:
 * Internal per-ring state intended for debug use only - tim.ctl[47:0]
 * This CSR is a memory of 16 entries, and thus, the TIM_REG_READ_IDX CSR must be written before any
 * CSR read operations to this address can be performed.
 */
union cvmx_tim_mem_debug0 {
	uint64_t u64;
	struct cvmx_tim_mem_debug0_s {
#ifdef __BIG_ENDIAN_BITFIELD
	uint64_t reserved_48_63               : 16;
	uint64_t ena                          : 1;  /**< Ring timer enable */
	uint64_t reserved_46_46               : 1;
	uint64_t count                        : 22; /**< Time offset for the ring
                                                         Set to INTERVAL and counts down by 1 every 1024
                                                         cycles when ENA==1. The HW forces a bucket
                                                         traversal (and resets COUNT to INTERVAL) whenever
                                                         the decrement would cause COUNT to go negative.
                                                         COUNT is unpredictable whenever ENA==0.
                                                         COUNT is reset to INTERVAL whenever TIM_MEM_RING1
                                                         is written for the ring. */
	uint64_t reserved_22_23               : 2;
	uint64_t interval                     : 22; /**< Timer interval - 1 */
#else
	uint64_t interval                     : 22;
	uint64_t reserved_22_23               : 2;
	uint64_t count                        : 22;
	uint64_t reserved_46_46               : 1;
	uint64_t ena                          : 1;
	uint64_t reserved_48_63               : 16;
#endif
	} s;
	struct cvmx_tim_mem_debug0_s          cn30xx;
	struct cvmx_tim_mem_debug0_s          cn31xx;
	struct cvmx_tim_mem_debug0_s          cn38xx;
	struct cvmx_tim_mem_debug0_s          cn38xxp2;
	struct cvmx_tim_mem_debug0_s          cn50xx;
	struct cvmx_tim_mem_debug0_s          cn52xx;
	struct cvmx_tim_mem_debug0_s          cn52xxp1;
	struct cvmx_tim_mem_debug0_s          cn56xx;
	struct cvmx_tim_mem_debug0_s          cn56xxp1;
	struct cvmx_tim_mem_debug0_s          cn58xx;
	struct cvmx_tim_mem_debug0_s          cn58xxp1;
	struct cvmx_tim_mem_debug0_s          cn61xx;
	struct cvmx_tim_mem_debug0_s          cn63xx;
	struct cvmx_tim_mem_debug0_s          cn63xxp1;
	struct cvmx_tim_mem_debug0_s          cn66xx;
	struct cvmx_tim_mem_debug0_s          cnf71xx;
};
typedef union cvmx_tim_mem_debug0 cvmx_tim_mem_debug0_t;

/**
 * cvmx_tim_mem_debug1
 *
 * Notes:
 * Internal per-ring state intended for debug use only - tim.sta[63:0]
 * This CSR is a memory of 16 entries, and thus, the TIM_REG_READ_IDX CSR must be written before any
 * CSR read operations to this address can be performed.
 */
union cvmx_tim_mem_debug1 {
	uint64_t u64;
	struct cvmx_tim_mem_debug1_s {
#ifdef __BIG_ENDIAN_BITFIELD
	uint64_t bucket                       : 13; /**< Current bucket[12:0]
                                                         Reset to 0 whenever TIM_MEM_RING0 is written for
                                                         the ring. Incremented (modulo BSIZE) once per
                                                         bucket traversal.
                                                         See TIM_MEM_DEBUG2[BUCKET]. */
	uint64_t base                         : 31; /**< Pointer[35:5] to bucket[0] */
	uint64_t bsize                        : 20; /**< Number of buckets - 1 */
#else
	uint64_t bsize                        : 20;
	uint64_t base                         : 31;
	uint64_t bucket                       : 13;
#endif
	} s;
	struct cvmx_tim_mem_debug1_s          cn30xx;
	struct cvmx_tim_mem_debug1_s          cn31xx;
	struct cvmx_tim_mem_debug1_s          cn38xx;
	struct cvmx_tim_mem_debug1_s          cn38xxp2;
	struct cvmx_tim_mem_debug1_s          cn50xx;
	struct cvmx_tim_mem_debug1_s          cn52xx;
	struct cvmx_tim_mem_debug1_s          cn52xxp1;
	struct cvmx_tim_mem_debug1_s          cn56xx;
	struct cvmx_tim_mem_debug1_s          cn56xxp1;
	struct cvmx_tim_mem_debug1_s          cn58xx;
	struct cvmx_tim_mem_debug1_s          cn58xxp1;
	struct cvmx_tim_mem_debug1_s          cn61xx;
	struct cvmx_tim_mem_debug1_s          cn63xx;
	struct cvmx_tim_mem_debug1_s          cn63xxp1;
	struct cvmx_tim_mem_debug1_s          cn66xx;
	struct cvmx_tim_mem_debug1_s          cnf71xx;
};
typedef union cvmx_tim_mem_debug1 cvmx_tim_mem_debug1_t;

/**
 * cvmx_tim_mem_debug2
 *
 * Notes:
 * Internal per-ring state intended for debug use only - tim.sta[95:64]
 * This CSR is a memory of 16 entries, and thus, the TIM_REG_READ_IDX CSR must be written before any
 * CSR read operations to this address can be performed.
 */
union cvmx_tim_mem_debug2 {
	uint64_t u64;
	struct cvmx_tim_mem_debug2_s {
#ifdef __BIG_ENDIAN_BITFIELD
	uint64_t reserved_24_63               : 40;
	uint64_t cpool                        : 3;  /**< Free list used to free chunks */
	uint64_t csize                        : 13; /**< Number of words per chunk */
	uint64_t reserved_7_7                 : 1;
	uint64_t bucket                       : 7;  /**< Current bucket[19:13]
                                                         See TIM_MEM_DEBUG1[BUCKET]. */
#else
	uint64_t bucket                       : 7;
	uint64_t reserved_7_7                 : 1;
	uint64_t csize                        : 13;
	uint64_t cpool                        : 3;
	uint64_t reserved_24_63               : 40;
#endif
	} s;
	struct cvmx_tim_mem_debug2_s          cn30xx;
	struct cvmx_tim_mem_debug2_s          cn31xx;
	struct cvmx_tim_mem_debug2_s          cn38xx;
	struct cvmx_tim_mem_debug2_s          cn38xxp2;
	struct cvmx_tim_mem_debug2_s          cn50xx;
	struct cvmx_tim_mem_debug2_s          cn52xx;
	struct cvmx_tim_mem_debug2_s          cn52xxp1;
	struct cvmx_tim_mem_debug2_s          cn56xx;
	struct cvmx_tim_mem_debug2_s          cn56xxp1;
	struct cvmx_tim_mem_debug2_s          cn58xx;
	struct cvmx_tim_mem_debug2_s          cn58xxp1;
	struct cvmx_tim_mem_debug2_s          cn61xx;
	struct cvmx_tim_mem_debug2_s          cn63xx;
	struct cvmx_tim_mem_debug2_s          cn63xxp1;
	struct cvmx_tim_mem_debug2_s          cn66xx;
	struct cvmx_tim_mem_debug2_s          cnf71xx;
};
typedef union cvmx_tim_mem_debug2 cvmx_tim_mem_debug2_t;

/**
 * cvmx_tim_mem_ring0
 *
 * Notes:
 * TIM_MEM_RING0 must not be written for a ring when TIM_MEM_RING1[ENA] is set for the ring.
 * Every write to TIM_MEM_RING0 clears the current bucket for the ring. (The current bucket is
 * readable via TIM_MEM_DEBUG2[BUCKET],TIM_MEM_DEBUG1[BUCKET].)
 * BASE is a 32-byte aligned pointer[35:0].  Only pointer[35:5] are stored because pointer[4:0] = 0.
 * This CSR is a memory of 16 entries, and thus, the TIM_REG_READ_IDX CSR must be written before any
 * CSR read operations to this address can be performed.
 */
union cvmx_tim_mem_ring0 {
	uint64_t u64;
	struct cvmx_tim_mem_ring0_s {
#ifdef __BIG_ENDIAN_BITFIELD
	uint64_t reserved_55_63               : 9;
	uint64_t first_bucket                 : 31; /**< Pointer[35:5] to bucket[0] */
	uint64_t num_buckets                  : 20; /**< Number of buckets - 1 */
	uint64_t ring                         : 4;  /**< Ring ID */
#else
	uint64_t ring                         : 4;
	uint64_t num_buckets                  : 20;
	uint64_t first_bucket                 : 31;
	uint64_t reserved_55_63               : 9;
#endif
	} s;
	struct cvmx_tim_mem_ring0_s           cn30xx;
	struct cvmx_tim_mem_ring0_s           cn31xx;
	struct cvmx_tim_mem_ring0_s           cn38xx;
	struct cvmx_tim_mem_ring0_s           cn38xxp2;
	struct cvmx_tim_mem_ring0_s           cn50xx;
	struct cvmx_tim_mem_ring0_s           cn52xx;
	struct cvmx_tim_mem_ring0_s           cn52xxp1;
	struct cvmx_tim_mem_ring0_s           cn56xx;
	struct cvmx_tim_mem_ring0_s           cn56xxp1;
	struct cvmx_tim_mem_ring0_s           cn58xx;
	struct cvmx_tim_mem_ring0_s           cn58xxp1;
	struct cvmx_tim_mem_ring0_s           cn61xx;
	struct cvmx_tim_mem_ring0_s           cn63xx;
	struct cvmx_tim_mem_ring0_s           cn63xxp1;
	struct cvmx_tim_mem_ring0_s           cn66xx;
	struct cvmx_tim_mem_ring0_s           cnf71xx;
};
typedef union cvmx_tim_mem_ring0 cvmx_tim_mem_ring0_t;

/**
 * cvmx_tim_mem_ring1
 *
 * Notes:
 * After a 1->0 transition on ENA, the HW will still complete a bucket traversal for the ring
 * if it was pending or active prior to the transition. (SW must delay to ensure the completion
 * of the traversal before reprogramming the ring.)
 * Every write to TIM_MEM_RING1 resets the current time offset for the ring to the INTERVAL value.
 * (The current time offset for the ring is readable via TIM_MEM_DEBUG0[COUNT].)
 * CSIZE must be at least 16.  It is illegal to program CSIZE to a value that is less than 16.
 * This CSR is a memory of 16 entries, and thus, the TIM_REG_READ_IDX CSR must be written before any
 * CSR read operations to this address can be performed.
 */
union cvmx_tim_mem_ring1 {
	uint64_t u64;
	struct cvmx_tim_mem_ring1_s {
#ifdef __BIG_ENDIAN_BITFIELD
	uint64_t reserved_43_63               : 21;
	uint64_t enable                       : 1;  /**< Ring timer enable
                                                         When clear, the ring is disabled and TIM
                                                         will not traverse any new buckets for the ring. */
	uint64_t pool                         : 3;  /**< Free list used to free chunks */
	uint64_t words_per_chunk              : 13; /**< Number of words per chunk */
	uint64_t interval                     : 22; /**< Timer interval - 1, measured in 1024 cycle ticks */
	uint64_t ring                         : 4;  /**< Ring ID */
#else
	uint64_t ring                         : 4;
	uint64_t interval                     : 22;
	uint64_t words_per_chunk              : 13;
	uint64_t pool                         : 3;
	uint64_t enable                       : 1;
	uint64_t reserved_43_63               : 21;
#endif
	} s;
	struct cvmx_tim_mem_ring1_s           cn30xx;
	struct cvmx_tim_mem_ring1_s           cn31xx;
	struct cvmx_tim_mem_ring1_s           cn38xx;
	struct cvmx_tim_mem_ring1_s           cn38xxp2;
	struct cvmx_tim_mem_ring1_s           cn50xx;
	struct cvmx_tim_mem_ring1_s           cn52xx;
	struct cvmx_tim_mem_ring1_s           cn52xxp1;
	struct cvmx_tim_mem_ring1_s           cn56xx;
	struct cvmx_tim_mem_ring1_s           cn56xxp1;
	struct cvmx_tim_mem_ring1_s           cn58xx;
	struct cvmx_tim_mem_ring1_s           cn58xxp1;
	struct cvmx_tim_mem_ring1_s           cn61xx;
	struct cvmx_tim_mem_ring1_s           cn63xx;
	struct cvmx_tim_mem_ring1_s           cn63xxp1;
	struct cvmx_tim_mem_ring1_s           cn66xx;
	struct cvmx_tim_mem_ring1_s           cnf71xx;
};
typedef union cvmx_tim_mem_ring1 cvmx_tim_mem_ring1_t;

/**
 * cvmx_tim_reg_bist_result
 *
 * Notes:
 * Access to the internal BiST results
 * Each bit is the BiST result of an individual memory (per bit, 0=pass and 1=fail).
 */
union cvmx_tim_reg_bist_result {
	uint64_t u64;
	struct cvmx_tim_reg_bist_result_s {
#ifdef __BIG_ENDIAN_BITFIELD
	uint64_t reserved_4_63                : 60;
	uint64_t sta                          : 2;  /**< BiST result of the STA   memories (0=pass, !0=fail) */
	uint64_t ncb                          : 1;  /**< BiST result of the NCB   memories (0=pass, !0=fail) */
	uint64_t ctl                          : 1;  /**< BiST result of the CTL   memories (0=pass, !0=fail) */
#else
	uint64_t ctl                          : 1;
	uint64_t ncb                          : 1;
	uint64_t sta                          : 2;
	uint64_t reserved_4_63                : 60;
#endif
	} s;
	struct cvmx_tim_reg_bist_result_s     cn30xx;
	struct cvmx_tim_reg_bist_result_s     cn31xx;
	struct cvmx_tim_reg_bist_result_s     cn38xx;
	struct cvmx_tim_reg_bist_result_s     cn38xxp2;
	struct cvmx_tim_reg_bist_result_s     cn50xx;
	struct cvmx_tim_reg_bist_result_s     cn52xx;
	struct cvmx_tim_reg_bist_result_s     cn52xxp1;
	struct cvmx_tim_reg_bist_result_s     cn56xx;
	struct cvmx_tim_reg_bist_result_s     cn56xxp1;
	struct cvmx_tim_reg_bist_result_s     cn58xx;
	struct cvmx_tim_reg_bist_result_s     cn58xxp1;
	struct cvmx_tim_reg_bist_result_s     cn61xx;
	struct cvmx_tim_reg_bist_result_s     cn63xx;
	struct cvmx_tim_reg_bist_result_s     cn63xxp1;
	struct cvmx_tim_reg_bist_result_s     cn66xx;
	struct cvmx_tim_reg_bist_result_s     cnf71xx;
};
typedef union cvmx_tim_reg_bist_result cvmx_tim_reg_bist_result_t;

/**
 * cvmx_tim_reg_error
 *
 * Notes:
 * A ring is in error if its interval has elapsed more than once without having been serviced.
 * During a CSR write to this register, the write data is used as a mask to clear the selected mask
 * bits (mask'[15:0] = mask[15:0] & ~write_data[15:0]).
 */
union cvmx_tim_reg_error {
	uint64_t u64;
	struct cvmx_tim_reg_error_s {
#ifdef __BIG_ENDIAN_BITFIELD
	uint64_t reserved_16_63               : 48;
	uint64_t mask                         : 16; /**< Bit mask indicating the rings in error */
#else
	uint64_t mask                         : 16;
	uint64_t reserved_16_63               : 48;
#endif
	} s;
	struct cvmx_tim_reg_error_s           cn30xx;
	struct cvmx_tim_reg_error_s           cn31xx;
	struct cvmx_tim_reg_error_s           cn38xx;
	struct cvmx_tim_reg_error_s           cn38xxp2;
	struct cvmx_tim_reg_error_s           cn50xx;
	struct cvmx_tim_reg_error_s           cn52xx;
	struct cvmx_tim_reg_error_s           cn52xxp1;
	struct cvmx_tim_reg_error_s           cn56xx;
	struct cvmx_tim_reg_error_s           cn56xxp1;
	struct cvmx_tim_reg_error_s           cn58xx;
	struct cvmx_tim_reg_error_s           cn58xxp1;
	struct cvmx_tim_reg_error_s           cn61xx;
	struct cvmx_tim_reg_error_s           cn63xx;
	struct cvmx_tim_reg_error_s           cn63xxp1;
	struct cvmx_tim_reg_error_s           cn66xx;
	struct cvmx_tim_reg_error_s           cnf71xx;
};
typedef union cvmx_tim_reg_error cvmx_tim_reg_error_t;

/**
 * cvmx_tim_reg_flags
 *
 * 13e20 reserved
 *
 *
 * Notes:
 * TIM has a counter that causes a periodic tick every 1024 cycles. This counter is shared by all
 * rings. (Each tick causes the HW to decrement the time offset (i.e. COUNT) for all enabled rings.)
 * When ENA_TIM==0, the HW stops this shared periodic counter, so there are no more ticks, and there
 * are no more new bucket traversals (for any ring).
 *
 * If ENA_TIM transitions 1->0, TIM will no longer create new bucket traversals, but there may
 * have been previous ones. If there are ring bucket traversals that were already pending but
 * not currently active (i.e. bucket traversals that need to be done by the HW, but haven't been yet)
 * during this ENA_TIM 1->0 transition, then these bucket traversals will remain pending until
 * ENA_TIM is later set to one. Bucket traversals that were already in progress will complete
 * after the 1->0 ENA_TIM transition, though.
 */
union cvmx_tim_reg_flags {
	uint64_t u64;
	struct cvmx_tim_reg_flags_s {
#ifdef __BIG_ENDIAN_BITFIELD
	uint64_t reserved_7_63                : 57;
	uint64_t gpio_edge                    : 2;  /**< Edge used for GPIO timing
                                                         2'b10 - TIM counts high to low transitions
                                                         2'b01 - TIM counts low to high transitions
                                                         2'b11 - TIM counts Both low to high and high to low
                                                         transitions */
	uint64_t ena_gpio                     : 1;  /**< Enable the external control of GPIO over the free
                                                         running timer.
                                                         When set, free running timer will be driven by GPIO.
                                                         Free running timer will count posedge or negedge of the
                                                         GPIO pin based on GPIO_EDGE register. */
	uint64_t ena_dfb                      : 1;  /**< Enable Don't Free Buffer. When set chunk buffer
                                                         would not be released by the TIM back to FPA. */
	uint64_t reset                        : 1;  /**< Reset oneshot pulse for free-running structures */
	uint64_t enable_dwb                   : 1;  /**< Enables non-zero DonwWriteBacks when set
                                                         When set, enables the use of
                                                         DontWriteBacks during the buffer freeing
                                                         operations. */
	uint64_t enable_timers                : 1;  /**< Enables the TIM section when set
                                                         When set, TIM is in normal operation.
                                                         When clear, time is effectively stopped for all
                                                         rings in TIM. */
#else
	uint64_t enable_timers                : 1;
	uint64_t enable_dwb                   : 1;
	uint64_t reset                        : 1;
	uint64_t ena_dfb                      : 1;
	uint64_t ena_gpio                     : 1;
	uint64_t gpio_edge                    : 2;
	uint64_t reserved_7_63                : 57;
#endif
	} s;
	struct cvmx_tim_reg_flags_cn30xx {
#ifdef __BIG_ENDIAN_BITFIELD
	uint64_t reserved_3_63                : 61;
	uint64_t reset                        : 1;  /**< Reset oneshot pulse for free-running structures */
	uint64_t enable_dwb                   : 1;  /**< Enables non-zero DonwWriteBacks when set
                                                         When set, enables the use of
                                                         DontWriteBacks during the buffer freeing
                                                         operations. */
	uint64_t enable_timers                : 1;  /**< Enables the TIM section when set
                                                         When set, TIM is in normal operation.
                                                         When clear, time is effectively stopped for all
                                                         rings in TIM. */
#else
	uint64_t enable_timers                : 1;
	uint64_t enable_dwb                   : 1;
	uint64_t reset                        : 1;
	uint64_t reserved_3_63                : 61;
#endif
	} cn30xx;
	struct cvmx_tim_reg_flags_cn30xx      cn31xx;
	struct cvmx_tim_reg_flags_cn30xx      cn38xx;
	struct cvmx_tim_reg_flags_cn30xx      cn38xxp2;
	struct cvmx_tim_reg_flags_cn30xx      cn50xx;
	struct cvmx_tim_reg_flags_cn30xx      cn52xx;
	struct cvmx_tim_reg_flags_cn30xx      cn52xxp1;
	struct cvmx_tim_reg_flags_cn30xx      cn56xx;
	struct cvmx_tim_reg_flags_cn30xx      cn56xxp1;
	struct cvmx_tim_reg_flags_cn30xx      cn58xx;
	struct cvmx_tim_reg_flags_cn30xx      cn58xxp1;
	struct cvmx_tim_reg_flags_cn30xx      cn61xx;
	struct cvmx_tim_reg_flags_cn30xx      cn63xx;
	struct cvmx_tim_reg_flags_cn30xx      cn63xxp1;
	struct cvmx_tim_reg_flags_cn30xx      cn66xx;
	struct cvmx_tim_reg_flags_s           cn68xx;
	struct cvmx_tim_reg_flags_s           cn68xxp1;
	struct cvmx_tim_reg_flags_cn30xx      cnf71xx;
};
typedef union cvmx_tim_reg_flags cvmx_tim_reg_flags_t;

/**
 * cvmx_tim_reg_int_mask
 *
 * Notes:
 * Note that this CSR is present only in chip revisions beginning with pass2.
 * When mask bit is set, the interrupt is enabled.
 */
union cvmx_tim_reg_int_mask {
	uint64_t u64;
	struct cvmx_tim_reg_int_mask_s {
#ifdef __BIG_ENDIAN_BITFIELD
	uint64_t reserved_16_63               : 48;
	uint64_t mask                         : 16; /**< Bit mask corresponding to TIM_REG_ERROR.MASK above */
#else
	uint64_t mask                         : 16;
	uint64_t reserved_16_63               : 48;
#endif
	} s;
	struct cvmx_tim_reg_int_mask_s        cn30xx;
	struct cvmx_tim_reg_int_mask_s        cn31xx;
	struct cvmx_tim_reg_int_mask_s        cn38xx;
	struct cvmx_tim_reg_int_mask_s        cn38xxp2;
	struct cvmx_tim_reg_int_mask_s        cn50xx;
	struct cvmx_tim_reg_int_mask_s        cn52xx;
	struct cvmx_tim_reg_int_mask_s        cn52xxp1;
	struct cvmx_tim_reg_int_mask_s        cn56xx;
	struct cvmx_tim_reg_int_mask_s        cn56xxp1;
	struct cvmx_tim_reg_int_mask_s        cn58xx;
	struct cvmx_tim_reg_int_mask_s        cn58xxp1;
	struct cvmx_tim_reg_int_mask_s        cn61xx;
	struct cvmx_tim_reg_int_mask_s        cn63xx;
	struct cvmx_tim_reg_int_mask_s        cn63xxp1;
	struct cvmx_tim_reg_int_mask_s        cn66xx;
	struct cvmx_tim_reg_int_mask_s        cnf71xx;
};
typedef union cvmx_tim_reg_int_mask cvmx_tim_reg_int_mask_t;

/**
 * cvmx_tim_reg_read_idx
 *
 * Notes:
 * Provides the read index during a CSR read operation to any of the CSRs that are physically stored
 * as memories.  The names of these CSRs begin with the prefix "TIM_MEM_".
 * IDX[7:0] is the read index.  INC[7:0] is an increment that is added to IDX[7:0] after any CSR read.
 * The intended use is to initially write this CSR such that IDX=0 and INC=1.  Then, the entire
 * contents of a CSR memory can be read with consecutive CSR read commands.
 */
union cvmx_tim_reg_read_idx {
	uint64_t u64;
	struct cvmx_tim_reg_read_idx_s {
#ifdef __BIG_ENDIAN_BITFIELD
	uint64_t reserved_16_63               : 48;
	uint64_t inc                          : 8;  /**< Increment to add to current index for next index */
	uint64_t index                        : 8;  /**< Index to use for next memory CSR read */
#else
	uint64_t index                        : 8;
	uint64_t inc                          : 8;
	uint64_t reserved_16_63               : 48;
#endif
	} s;
	struct cvmx_tim_reg_read_idx_s        cn30xx;
	struct cvmx_tim_reg_read_idx_s        cn31xx;
	struct cvmx_tim_reg_read_idx_s        cn38xx;
	struct cvmx_tim_reg_read_idx_s        cn38xxp2;
	struct cvmx_tim_reg_read_idx_s        cn50xx;
	struct cvmx_tim_reg_read_idx_s        cn52xx;
	struct cvmx_tim_reg_read_idx_s        cn52xxp1;
	struct cvmx_tim_reg_read_idx_s        cn56xx;
	struct cvmx_tim_reg_read_idx_s        cn56xxp1;
	struct cvmx_tim_reg_read_idx_s        cn58xx;
	struct cvmx_tim_reg_read_idx_s        cn58xxp1;
	struct cvmx_tim_reg_read_idx_s        cn61xx;
	struct cvmx_tim_reg_read_idx_s        cn63xx;
	struct cvmx_tim_reg_read_idx_s        cn63xxp1;
	struct cvmx_tim_reg_read_idx_s        cn66xx;
	struct cvmx_tim_reg_read_idx_s        cnf71xx;
};
typedef union cvmx_tim_reg_read_idx cvmx_tim_reg_read_idx_t;

/**
 * cvmx_tim_ring#_ctl0
 *
 * Notes:
 * This CSR is a memory of 64 entries
 * After a 1 to 0 transition on ENA, the HW will still complete a bucket traversal for the ring
 * if it was pending or active prior to the transition. (SW must delay to ensure the completion
 * of the traversal before reprogramming the ring.)
 */
union cvmx_tim_ringx_ctl0 {
	uint64_t u64;
	struct cvmx_tim_ringx_ctl0_s {
#ifdef __BIG_ENDIAN_BITFIELD
	uint64_t reserved_47_63               : 17;
	uint64_t ena                          : 1;  /**< Ring timer enable */
	uint64_t intc                         : 2;  /**< Interval count for Error. Defines how many intervals
                                                         could elapse from bucket expiration till actual
                                                         bucket traversal before HW asserts an error.
                                                         Typical value is 0,1,2. */
	uint64_t timercount                   : 22; /**< Timer Count represents the ring offset; how many timer
                                                         ticks have left till the interval expiration.
                                                         Typical initialization value should be Interval/Constant,
                                                         it is recommended that constant should be unique per ring
                                                         This will create an offset between the rings.
                                                         Once ENA is set,
                                                         TIMERCOUNT counts down timer ticks. When TIMERCOUNT
                                                         reaches zero, ring's interval expired and the HW forces
                                                         a bucket traversal (and resets TIMERCOUNT to INTERVAL)
                                                         TIMERCOUNT is unpredictable whenever ENA==0.
                                                         It is SW responsibility to set TIMERCOUNT before
                                                         TIM_RINGX_CTL0.ENA transitions from 0 to 1.
                                                         When the field is set to X it would take X+1 timer tick
                                                         for the interval to expire. */
	uint64_t interval                     : 22; /**< Timer interval. Measured in Timer Ticks, where timer
                                                         ticks are defined by TIM_FR_RN_TT.FR_RN_TT. */
#else
	uint64_t interval                     : 22;
	uint64_t timercount                   : 22;
	uint64_t intc                         : 2;
	uint64_t ena                          : 1;
	uint64_t reserved_47_63               : 17;
#endif
	} s;
	struct cvmx_tim_ringx_ctl0_s          cn68xx;
	struct cvmx_tim_ringx_ctl0_s          cn68xxp1;
};
typedef union cvmx_tim_ringx_ctl0 cvmx_tim_ringx_ctl0_t;

/**
 * cvmx_tim_ring#_ctl1
 *
 * Notes:
 * This CSR is a memory of 64 entries
 * ***NOTE: Added fields in pass 2.0
 */
union cvmx_tim_ringx_ctl1 {
	uint64_t u64;
	struct cvmx_tim_ringx_ctl1_s {
#ifdef __BIG_ENDIAN_BITFIELD
	uint64_t reserved_47_63               : 17;
	uint64_t ena_gpio                     : 1;  /**< When set, ring's timer tick will be generated by the
                                                         GPIO Timer. GPIO edge is defined by
                                                         TIM_REG_FLAGS.GPIO_EDGE
                                                         Default value zero means that timer ticks will
                                                         be genearated from the Internal Timer */
	uint64_t ena_prd                      : 1;  /**< Enable Periodic Mode which would disable the memory
                                                         write of zeros to num_entries and chunk_remainder
                                                         when a bucket is traveresed. */
	uint64_t ena_dwb                      : 1;  /**< When set, enables the use of Dont Write Back during
                                                         FPA buffer freeing operations */
	uint64_t ena_dfb                      : 1;  /**< Enable Don't Free Buffer. When set chunk buffer
                                                         would not be released by the TIM back to FPA. */
	uint64_t cpool                        : 3;  /**< FPA Free list to free chunks to. */
	uint64_t bucket                       : 20; /**< Current bucket. Should be set to zero by SW at
                                                         enable time.
                                                         Incremented once per bucket traversal. */
	uint64_t bsize                        : 20; /**< Number of buckets minus one. If BSIZE==0 there is
                                                         only one bucket in the ring. */
#else
	uint64_t bsize                        : 20;
	uint64_t bucket                       : 20;
	uint64_t cpool                        : 3;
	uint64_t ena_dfb                      : 1;
	uint64_t ena_dwb                      : 1;
	uint64_t ena_prd                      : 1;
	uint64_t ena_gpio                     : 1;
	uint64_t reserved_47_63               : 17;
#endif
	} s;
	struct cvmx_tim_ringx_ctl1_s          cn68xx;
	struct cvmx_tim_ringx_ctl1_cn68xxp1 {
#ifdef __BIG_ENDIAN_BITFIELD
	uint64_t reserved_43_63               : 21;
	uint64_t cpool                        : 3;  /**< FPA Free list to free chunks to. */
	uint64_t bucket                       : 20; /**< Current bucket. Should be set to zero by SW at
                                                         enable time.
                                                         Incremented once per bucket traversal. */
	uint64_t bsize                        : 20; /**< Number of buckets minus one. If BSIZE==0 there is
                                                         only one bucket in the ring. */
#else
	uint64_t bsize                        : 20;
	uint64_t bucket                       : 20;
	uint64_t cpool                        : 3;
	uint64_t reserved_43_63               : 21;
#endif
	} cn68xxp1;
};
typedef union cvmx_tim_ringx_ctl1 cvmx_tim_ringx_ctl1_t;

/**
 * cvmx_tim_ring#_ctl2
 *
 * Notes:
 * BASE is a 32-byte aligned pointer[35:0].  Only pointer[35:5] are stored because pointer[4:0] = 0.
 * This CSR is a memory of 64 entries
 */
union cvmx_tim_ringx_ctl2 {
	uint64_t u64;
	struct cvmx_tim_ringx_ctl2_s {
#ifdef __BIG_ENDIAN_BITFIELD
	uint64_t reserved_47_63               : 17;
	uint64_t csize                        : 13; /**< Number of words per chunk. CSIZE mod(16) should be
                                                         zero. */
	uint64_t reserved_31_33               : 3;
	uint64_t base                         : 31; /**< Pointer[35:5] to bucket[0] */
#else
	uint64_t base                         : 31;
	uint64_t reserved_31_33               : 3;
	uint64_t csize                        : 13;
	uint64_t reserved_47_63               : 17;
#endif
	} s;
	struct cvmx_tim_ringx_ctl2_s          cn68xx;
	struct cvmx_tim_ringx_ctl2_s          cn68xxp1;
};
typedef union cvmx_tim_ringx_ctl2 cvmx_tim_ringx_ctl2_t;

/**
 * cvmx_tim_ring#_dbg0
 */
union cvmx_tim_ringx_dbg0 {
	uint64_t u64;
	struct cvmx_tim_ringx_dbg0_s {
#ifdef __BIG_ENDIAN_BITFIELD
	uint64_t fr_rn_ht                     : 22; /**< Free Running Hardware Timer. Shared by all rings and is
                                                         used to generate the Timer Tick based on
                                                         FR_RN_TT. */
	uint64_t timercount                   : 22; /**< Timer Count represents the ring's offset.
                                                         Refer to TIM_RINGX_CTL0. */
	uint64_t cur_bucket                   : 20; /**< Current bucket. Indicates the ring's current bucket.
                                                         Refer to TIM_RINGX_CTL1.BUCKET. */
#else
	uint64_t cur_bucket                   : 20;
	uint64_t timercount                   : 22;
	uint64_t fr_rn_ht                     : 22;
#endif
	} s;
	struct cvmx_tim_ringx_dbg0_s          cn68xx;
	struct cvmx_tim_ringx_dbg0_s          cn68xxp1;
};
typedef union cvmx_tim_ringx_dbg0 cvmx_tim_ringx_dbg0_t;

/**
 * cvmx_tim_ring#_dbg1
 */
union cvmx_tim_ringx_dbg1 {
	uint64_t u64;
	struct cvmx_tim_ringx_dbg1_s {
#ifdef __BIG_ENDIAN_BITFIELD
	uint64_t reserved_2_63                : 62;
	uint64_t ring_esr                     : 2;  /**< Ring Expiration Status Register.
                                                         This register hold the expiration status of the ring.
                                                         2'b00 - Ring was recently traversed.
                                                         2'b01 - Interval expired. Ring is queued to be traversed.
                                                         2'b10 - 1st interval expiration while ring is queued to be
                                                         traversed.
                                                         2'b11 - 2nd interval expiration while ring is queued to be
                                                         traversed. */
#else
	uint64_t ring_esr                     : 2;
	uint64_t reserved_2_63                : 62;
#endif
	} s;
	struct cvmx_tim_ringx_dbg1_s          cn68xx;
	struct cvmx_tim_ringx_dbg1_s          cn68xxp1;
};
typedef union cvmx_tim_ringx_dbg1 cvmx_tim_ringx_dbg1_t;

#endif
OpenPOWER on IntegriCloud