blob: f3ab01fc363c8deb6261e185097ac6c04f7e84aa (
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
|
/* SPDX-License-Identifier: GPL-2.0 */
/* Marvell MCS driver
*
* Copyright (C) 2022 Marvell.
*/
#ifndef MCS_REG_H
#define MCS_REG_H
#include <linux/bits.h>
/* Registers */
#define MCSX_IP_MODE 0x900c8ull
#define MCSX_MCS_TOP_SLAVE_PORT_RESET(a) ({ \
u64 offset; \
\
offset = 0x408ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xa28ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_MCS_TOP_SLAVE_CHANNEL_CFG(a) ({ \
u64 offset; \
\
offset = 0x808ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xa68ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_MIL_GLOBAL ({ \
u64 offset; \
\
offset = 0x80000ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x60000ull; \
offset; })
#define MCSX_MIL_RX_LMACX_CFG(a) ({ \
u64 offset; \
\
offset = 0x900a8ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x700a8ull; \
offset += (a) * 0x800ull; \
offset; })
#define MCSX_HIL_GLOBAL ({ \
u64 offset; \
\
offset = 0xc0000ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xa0000ull; \
offset; })
#define MCSX_LINK_LMACX_CFG(a) ({ \
u64 offset; \
\
offset = 0x90000ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x70000ull; \
offset += (a) * 0x800ull; \
offset; })
#define MCSX_MIL_RX_GBL_STATUS ({ \
u64 offset; \
\
offset = 0x800c8ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x600c8ull; \
offset; })
#define MCSX_MIL_IP_GBL_STATUS ({ \
u64 offset; \
\
offset = 0x800d0ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x600d0ull; \
offset; })
/* PAB */
#define MCSX_PAB_RX_SLAVE_PORT_CFGX(a) ({ \
u64 offset; \
\
offset = 0x1718ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x280ull; \
offset += (a) * 0x40ull; \
offset; })
#define MCSX_PAB_TX_SLAVE_PORT_CFGX(a) (0x2930ull + (a) * 0x40ull)
/* PEX registers */
#define MCSX_PEX_RX_SLAVE_VLAN_CFGX(a) (0x3b58ull + (a) * 0x8ull)
#define MCSX_PEX_TX_SLAVE_VLAN_CFGX(a) (0x46f8ull + (a) * 0x8ull)
#define MCSX_PEX_TX_SLAVE_CUSTOM_TAG_REL_MODE_SEL(a) (0x788ull + (a) * 0x8ull)
#define MCSX_PEX_TX_SLAVE_PORT_CONFIG(a) (0x4738ull + (a) * 0x8ull)
#define MCSX_PEX_RX_SLAVE_PORT_CFGX(a) (0x3b98ull + (a) * 0x8ull)
#define MCSX_PEX_RX_SLAVE_RULE_ETYPE_CFGX(a) ({ \
u64 offset; \
\
offset = 0x3fc0ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x558ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_PEX_RX_SLAVE_RULE_DAX(a) ({ \
u64 offset; \
\
offset = 0x4000ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x598ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_PEX_RX_SLAVE_RULE_DA_RANGE_MINX(a) ({ \
u64 offset; \
\
offset = 0x4040ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x5d8ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_PEX_RX_SLAVE_RULE_DA_RANGE_MAXX(a) ({ \
u64 offset; \
\
offset = 0x4048ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x5e0ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_PEX_RX_SLAVE_RULE_COMBO_MINX(a) ({ \
u64 offset; \
\
offset = 0x4080ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x648ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_PEX_RX_SLAVE_RULE_COMBO_MAXX(a) ({ \
u64 offset; \
\
offset = 0x4088ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x650ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_PEX_RX_SLAVE_RULE_COMBO_ETX(a) ({ \
u64 offset; \
\
offset = 0x4090ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x658ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_PEX_RX_SLAVE_RULE_MAC ({ \
u64 offset; \
\
offset = 0x40e0ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x6d8ull; \
offset; })
#define MCSX_PEX_RX_SLAVE_RULE_ENABLE ({ \
u64 offset; \
\
offset = 0x40e8ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x6e0ull; \
offset; })
#define MCSX_PEX_TX_SLAVE_RULE_ETYPE_CFGX(a) ({ \
u64 offset; \
\
offset = 0x4b60ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x7d8ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_PEX_TX_SLAVE_RULE_DAX(a) ({ \
u64 offset; \
\
offset = 0x4ba0ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x818ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_PEX_TX_SLAVE_RULE_DA_RANGE_MINX(a) ({ \
u64 offset; \
\
offset = 0x4be0ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x858ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_PEX_TX_SLAVE_RULE_DA_RANGE_MAXX(a) ({ \
u64 offset; \
\
offset = 0x4be8ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x860ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_PEX_TX_SLAVE_RULE_COMBO_MINX(a) ({ \
u64 offset; \
\
offset = 0x4c20ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x8c8ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_PEX_TX_SLAVE_RULE_COMBO_MAXX(a) ({ \
u64 offset; \
\
offset = 0x4c28ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x8d0ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_PEX_TX_SLAVE_RULE_COMBO_ETX(a) ({ \
u64 offset; \
\
offset = 0x4c30ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x8d8ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_PEX_TX_SLAVE_RULE_MAC ({ \
u64 offset; \
\
offset = 0x4c80ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x958ull; \
offset; })
#define MCSX_PEX_TX_SLAVE_RULE_ENABLE ({ \
u64 offset; \
\
offset = 0x4c88ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x960ull; \
offset; })
#define MCSX_PEX_RX_SLAVE_PEX_CONFIGURATION ({ \
u64 offset; \
\
offset = 0x3b50ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x4c0ull; \
offset; })
/* CNF10K-B */
#define MCSX_PEX_RX_SLAVE_CUSTOM_TAGX(a) (0x4c8ull + (a) * 0x8ull)
#define MCSX_PEX_TX_SLAVE_CUSTOM_TAGX(a) (0x748ull + (a) * 0x8ull)
#define MCSX_PEX_RX_SLAVE_ETYPE_ENABLE 0x6e8ull
#define MCSX_PEX_TX_SLAVE_ETYPE_ENABLE 0x968ull
/* BEE */
#define MCSX_BBE_RX_SLAVE_PADDING_CTL 0xe08ull
#define MCSX_BBE_TX_SLAVE_PADDING_CTL 0x12f8ull
#define MCSX_BBE_RX_SLAVE_CAL_ENTRY 0x180ull
#define MCSX_BBE_RX_SLAVE_CAL_LEN 0x188ull
#define MCSX_PAB_RX_SLAVE_FIFO_SKID_CFGX(a) (0x290ull + (a) * 0x40ull)
#define MCSX_BBE_RX_SLAVE_DFIFO_OVERFLOW_0 0xe20
#define MCSX_BBE_TX_SLAVE_DFIFO_OVERFLOW_0 0x1298
#define MCSX_BBE_RX_SLAVE_PLFIFO_OVERFLOW_0 0xe40
#define MCSX_BBE_TX_SLAVE_PLFIFO_OVERFLOW_0 0x12b8
#define MCSX_BBE_RX_SLAVE_BBE_INT ({ \
u64 offset; \
\
offset = 0xe00ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x160ull; \
offset; })
#define MCSX_BBE_RX_SLAVE_BBE_INT_ENB ({ \
u64 offset; \
\
offset = 0xe08ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x168ull; \
offset; })
#define MCSX_BBE_RX_SLAVE_BBE_INT_INTR_RW ({ \
u64 offset; \
\
offset = 0xe08ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x178ull; \
offset; })
#define MCSX_BBE_TX_SLAVE_BBE_INT ({ \
u64 offset; \
\
offset = 0x1278ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x1e0ull; \
offset; })
#define MCSX_BBE_TX_SLAVE_BBE_INT_INTR_RW ({ \
u64 offset; \
\
offset = 0x1278ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x1f8ull; \
offset; })
#define MCSX_BBE_TX_SLAVE_BBE_INT_ENB ({ \
u64 offset; \
\
offset = 0x1280ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x1e8ull; \
offset; })
#define MCSX_PAB_RX_SLAVE_PAB_INT ({ \
u64 offset; \
\
offset = 0x16f0ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x260ull; \
offset; })
#define MCSX_PAB_RX_SLAVE_PAB_INT_ENB ({ \
u64 offset; \
\
offset = 0x16f8ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x268ull; \
offset; })
#define MCSX_PAB_RX_SLAVE_PAB_INT_INTR_RW ({ \
u64 offset; \
\
offset = 0x16f8ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x278ull; \
offset; })
#define MCSX_PAB_TX_SLAVE_PAB_INT ({ \
u64 offset; \
\
offset = 0x2908ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x380ull; \
offset; })
#define MCSX_PAB_TX_SLAVE_PAB_INT_ENB ({ \
u64 offset; \
\
offset = 0x2910ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x388ull; \
offset; })
#define MCSX_PAB_TX_SLAVE_PAB_INT_INTR_RW ({ \
u64 offset; \
\
offset = 0x16f8ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x398ull; \
offset; })
/* CPM registers */
#define MCSX_CPM_RX_SLAVE_FLOWID_TCAM_DATAX(a, b) ({ \
u64 offset; \
\
offset = 0x30740ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x3bf8ull; \
offset += (a) * 0x8ull + (b) * 0x20ull; \
offset; })
#define MCSX_CPM_RX_SLAVE_FLOWID_TCAM_MASKX(a, b) ({ \
u64 offset; \
\
offset = 0x34740ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x43f8ull; \
offset += (a) * 0x8ull + (b) * 0x20ull; \
offset; })
#define MCSX_CPM_RX_SLAVE_FLOWID_TCAM_ENA_0 ({ \
u64 offset; \
\
offset = 0x30700ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x3bd8ull; \
offset; })
#define MCSX_CPM_RX_SLAVE_SC_CAMX(a, b) ({ \
u64 offset; \
\
offset = 0x38780ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x4c08ull; \
offset += (a) * 0x8ull + (b) * 0x10ull; \
offset; })
#define MCSX_CPM_RX_SLAVE_SC_CAM_ENA(a) ({ \
u64 offset; \
\
offset = 0x38740ull + (a) * 0x8ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x4bf8ull; \
offset; })
#define MCSX_CPM_RX_SLAVE_SECY_MAP_MEMX(a) ({ \
u64 offset; \
\
offset = 0x23ee0ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xbd0ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CPM_RX_SLAVE_SECY_PLCY_MEM_0X(a) ({ \
u64 offset; \
\
offset = (0x246e0ull + (a) * 0x10ull); \
if (mcs->hw->mcs_blks > 1) \
offset = (0xdd0ull + (a) * 0x8ull); \
offset; })
#define MCSX_CPM_RX_SLAVE_SA_KEY_LOCKOUTX(a) ({ \
u64 offset; \
\
offset = 0x23E90ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xbb0ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CPM_RX_SLAVE_SA_MAP_MEMX(a) ({ \
u64 offset; \
\
offset = 0x256e0ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xfd0ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CPM_RX_SLAVE_SA_PLCY_MEMX(a, b) ({ \
u64 offset; \
\
offset = 0x27700ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x17d8ull; \
offset += (a) * 0x8ull + (b) * 0x40ull; \
offset; })
#define MCSX_CPM_RX_SLAVE_SA_PN_TABLE_MEMX(a) ({ \
u64 offset; \
\
offset = 0x2f700ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x37d8; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CPM_RX_SLAVE_XPN_THRESHOLD ({ \
u64 offset; \
\
offset = 0x23e40ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xb90ull; \
offset; })
#define MCSX_CPM_RX_SLAVE_PN_THRESHOLD ({ \
u64 offset; \
\
offset = 0x23e48ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xb98ull; \
offset; })
#define MCSX_CPM_RX_SLAVE_PN_THRESH_REACHEDX(a) ({ \
u64 offset; \
\
offset = 0x23e50ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xba0ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CPM_RX_SLAVE_FLOWID_TCAM_ENA_1 0x30708ull
#define MCSX_CPM_RX_SLAVE_SECY_PLCY_MEM_1X(a) (0x246e8ull + (a) * 0x10ull)
/* TX registers */
#define MCSX_CPM_TX_SLAVE_FLOWID_TCAM_DATAX(a, b) ({ \
u64 offset; \
\
offset = 0x51d50ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xa7c0ull; \
offset += (a) * 0x8ull + (b) * 0x20ull; \
offset; })
#define MCSX_CPM_TX_SLAVE_FLOWID_TCAM_MASKX(a, b) ({ \
u64 offset; \
\
offset = 0x55d50ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xafc0ull; \
offset += (a) * 0x8ull + (b) * 0x20ull; \
offset; })
#define MCSX_CPM_TX_SLAVE_FLOWID_TCAM_ENA_0 ({ \
u64 offset; \
\
offset = 0x51d10ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xa7a0ull; \
offset; })
#define MCSX_CPM_TX_SLAVE_SECY_MAP_MEM_0X(a) ({ \
u64 offset; \
\
offset = 0x3e508ull + (a) * 0x8ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x5550ull + (a) * 0x10ull; \
offset; })
#define MCSX_CPM_TX_SLAVE_SECY_PLCY_MEMX(a) ({ \
u64 offset; \
\
offset = 0x3ed08ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x5950ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CPM_TX_SLAVE_SA_KEY_LOCKOUTX(a) ({ \
u64 offset; \
\
offset = 0x3e4c0ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x5538ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CPM_TX_SLAVE_SA_MAP_MEM_0X(a) ({ \
u64 offset; \
\
offset = 0x3fd10ull + (a) * 0x10ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x6150ull + (a) * 0x8ull; \
offset; })
#define MCSX_CPM_TX_SLAVE_SA_PLCY_MEMX(a, b) ({ \
u64 offset; \
\
offset = 0x40d10ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x63a0ull; \
offset += (a) * 0x8ull + (b) * 0x80ull; \
offset; })
#define MCSX_CPM_TX_SLAVE_SA_PN_TABLE_MEMX(a) ({ \
u64 offset; \
\
offset = 0x50d10ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xa3a0ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CPM_TX_SLAVE_XPN_THRESHOLD ({ \
u64 offset; \
\
offset = 0x3e4b0ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x5528ull; \
offset; })
#define MCSX_CPM_TX_SLAVE_PN_THRESHOLD ({ \
u64 offset; \
\
offset = 0x3e4b8ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x5530ull; \
offset; })
#define MCSX_CPM_TX_SLAVE_SA_MAP_MEM_1X(a) (0x3fd18ull + (a) * 0x10ull)
#define MCSX_CPM_TX_SLAVE_SECY_MAP_MEM_1X(a) (0x5558ull + (a) * 0x10ull)
#define MCSX_CPM_TX_SLAVE_FLOWID_TCAM_ENA_1 0x51d18ull
#define MCSX_CPM_TX_SLAVE_TX_SA_ACTIVEX(a) (0x5b50 + (a) * 0x8ull)
#define MCSX_CPM_TX_SLAVE_SA_INDEX0_VLDX(a) (0x5d50 + (a) * 0x8ull)
#define MCSX_CPM_TX_SLAVE_SA_INDEX1_VLDX(a) (0x5f50 + (a) * 0x8ull)
#define MCSX_CPM_TX_SLAVE_AUTO_REKEY_ENABLE_0 0x5500ull
/* CSE */
#define MCSX_CSE_RX_MEM_SLAVE_IFINCTLBCPKTSX(a) ({ \
u64 offset; \
\
offset = 0x9e80ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xc218ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_RX_MEM_SLAVE_IFINCTLMCPKTSX(a) ({ \
u64 offset; \
\
offset = 0x9680ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xc018ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_RX_MEM_SLAVE_IFINCTLOCTETSX(a) ({ \
u64 offset; \
\
offset = 0x6e80ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xbc18ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_RX_MEM_SLAVE_IFINCTLUCPKTSX(a) ({ \
u64 offset; \
\
offset = 0x8e80ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xbe18ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_RX_MEM_SLAVE_IFINUNCTLBCPKTSX(a) ({ \
u64 offset; \
\
offset = 0x8680ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xca18ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_RX_MEM_SLAVE_IFINUNCTLMCPKTSX(a) ({ \
u64 offset; \
\
offset = 0x7e80ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xc818ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_RX_MEM_SLAVE_IFINUNCTLOCTETSX(a) ({ \
u64 offset; \
\
offset = 0x6680ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xc418ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_RX_MEM_SLAVE_IFINUNCTLUCPKTSX(a) ({ \
u64 offset; \
\
offset = 0x7680ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xc618ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_RX_MEM_SLAVE_INOCTETSSECYDECRYPTEDX(a) ({ \
u64 offset; \
\
offset = 0x5e80ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xdc18ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_RX_MEM_SLAVE_INOCTETSSECYVALIDATEX(a)({ \
u64 offset; \
\
offset = 0x5680ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xda18ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_RX_MEM_SLAVE_INPKTSCTRLPORTDISABLEDX(a) ({ \
u64 offset; \
\
offset = 0xd680ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xce18ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_RX_MEM_SLAVE_INPKTSFLOWIDTCAMHITX(a) ({ \
u64 offset; \
\
offset = 0x16a80ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xec78ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_RX_MEM_SLAVE_INPKTSFLOWIDTCAMMISSX(a) ({ \
u64 offset; \
\
offset = 0x16680ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xec38ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_RX_MEM_SLAVE_INPKTSPARSEERRX(a) ({ \
u64 offset; \
\
offset = 0x16880ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xec18ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_RX_MEM_SLAVE_INPKTSSCCAMHITX(a) ({ \
u64 offset; \
\
offset = 0xfe80ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xde18ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_RX_MEM_SLAVE_INPKTSSCINVALIDX(a) ({ \
u64 offset; \
\
offset = 0x10680ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xe418ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_RX_MEM_SLAVE_INPKTSSCNOTVALIDX(a) ({ \
u64 offset; \
\
offset = 0x10e80ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xe218ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_RX_MEM_SLAVE_INPKTSSECYBADTAGX(a) ({ \
u64 offset; \
\
offset = 0xae80ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xd418ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_RX_MEM_SLAVE_INPKTSSECYNOSAX(a) ({ \
u64 offset; \
\
offset = 0xc680ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xd618ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_RX_MEM_SLAVE_INPKTSSECYNOSAERRORX(a) ({ \
u64 offset; \
\
offset = 0xce80ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xd818ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_RX_MEM_SLAVE_INPKTSSECYTAGGEDCTLX(a) ({ \
u64 offset; \
\
offset = 0xbe80ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xcc18ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_RX_SLAVE_CTRL ({ \
u64 offset; \
\
offset = 0x52a0ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x9c0ull; \
offset; })
#define MCSX_CSE_RX_SLAVE_STATS_CLEAR ({ \
u64 offset; \
\
offset = 0x52b8ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x9d8ull; \
offset; })
#define MCSX_CSE_RX_MEM_SLAVE_INOCTETSSCDECRYPTEDX(a) (0xe680ull + (a) * 0x8ull)
#define MCSX_CSE_RX_MEM_SLAVE_INOCTETSSCVALIDATEX(a) (0xde80ull + (a) * 0x8ull)
#define MCSX_CSE_RX_MEM_SLAVE_INPKTSSECYUNTAGGEDORNOTAGX(a) (0xa680ull + (a) * 0x8ull)
#define MCSX_CSE_RX_MEM_SLAVE_INPKTSSECYNOTAGX(a) (0xd218 + (a) * 0x8ull)
#define MCSX_CSE_RX_MEM_SLAVE_INPKTSSECYUNTAGGEDX(a) (0xd018ull + (a) * 0x8ull)
#define MCSX_CSE_RX_MEM_SLAVE_INPKTSSCUNCHECKEDOROKX(a) (0xee80ull + (a) * 0x8ull)
#define MCSX_CSE_RX_MEM_SLAVE_INPKTSSECYCTLX(a) (0xb680ull + (a) * 0x8ull)
#define MCSX_CSE_RX_MEM_SLAVE_INPKTSSCLATEORDELAYEDX(a) (0xf680ull + (a) * 0x8ull)
#define MCSX_CSE_RX_MEM_SLAVE_INPKTSSAINVALIDX(a) (0x12680ull + (a) * 0x8ull)
#define MCSX_CSE_RX_MEM_SLAVE_INPKTSSANOTUSINGSAERRORX(a) (0x15680ull + (a) * 0x8ull)
#define MCSX_CSE_RX_MEM_SLAVE_INPKTSSANOTVALIDX(a) (0x13680ull + (a) * 0x8ull)
#define MCSX_CSE_RX_MEM_SLAVE_INPKTSSAOKX(a) (0x11680ull + (a) * 0x8ull)
#define MCSX_CSE_RX_MEM_SLAVE_INPKTSSAUNUSEDSAX(a) (0x14680ull + (a) * 0x8ull)
#define MCSX_CSE_RX_MEM_SLAVE_INPKTSEARLYPREEMPTERRX(a) (0xec58ull + (a) * 0x8ull)
#define MCSX_CSE_RX_MEM_SLAVE_INPKTSSCOKX(a) (0xea18ull + (a) * 0x8ull)
#define MCSX_CSE_RX_MEM_SLAVE_INPKTSSCDELAYEDX(a) (0xe618ull + (a) * 0x8ull)
/* CSE TX */
#define MCSX_CSE_TX_MEM_SLAVE_IFOUTCOMMONOCTETSX(a) (0x18440ull + (a) * 0x8ull)
#define MCSX_CSE_TX_MEM_SLAVE_IFOUTCTLBCPKTSX(a) ({ \
u64 offset; \
\
offset = 0x1c440ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xf478ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_TX_MEM_SLAVE_IFOUTCTLMCPKTSX(a) ({ \
u64 offset; \
\
offset = 0x1bc40ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xf278ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_TX_MEM_SLAVE_IFOUTCTLOCTETSX(a) ({ \
u64 offset; \
\
offset = 0x19440ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xee78ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_TX_MEM_SLAVE_IFOUTCTLUCPKTSX(a) ({ \
u64 offset; \
\
offset = 0x1b440ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xf078ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_TX_MEM_SLAVE_IFOUTUNCTLBCPKTSX(a) ({ \
u64 offset; \
\
offset = 0x1ac40ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xfc78ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_TX_MEM_SLAVE_IFOUTUNCTLMCPKTSX(a) ({ \
u64 offset; \
\
offset = 0x1a440ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xfa78ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_TX_MEM_SLAVE_IFOUTUNCTLOCTETSX(a) ({ \
u64 offset; \
\
offset = 0x18c40ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xf678ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_TX_MEM_SLAVE_IFOUTUNCTLUCPKTSX(a) ({ \
u64 offset; \
\
offset = 0x19c40ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xf878ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_TX_MEM_SLAVE_OUTOCTETSSECYENCRYPTEDX(a) ({ \
u64 offset; \
\
offset = 0x17c40ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x10878ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_TX_MEM_SLAVE_OUTOCTETSSECYPROTECTEDX(a) ({ \
u64 offset; \
\
offset = 0x17440ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x10678ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_TX_MEM_SLAVE_OUTPKTSCTRLPORTDISABLEDX(a) ({ \
u64 offset; \
\
offset = 0x1e440ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xfe78ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_TX_MEM_SLAVE_OUTPKTSFLOWIDTCAMHITX(a) ({ \
u64 offset; \
\
offset = 0x23240ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x10ed8ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_TX_MEM_SLAVE_OUTPKTSFLOWIDTCAMMISSX(a) ({ \
u64 offset; \
\
offset = 0x22c40ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x10e98ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_TX_MEM_SLAVE_OUTPKTSPARSEERRX(a) ({ \
u64 offset; \
\
offset = 0x22e40ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x10e78ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_TX_MEM_SLAVE_OUTPKTSSCENCRYPTEDX(a) ({ \
u64 offset; \
\
offset = 0x20440ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x10c78ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_TX_MEM_SLAVE_OUTPKTSSCPROTECTEDX(a) ({ \
u64 offset; \
\
offset = 0x1fc40ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x10a78ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_TX_MEM_SLAVE_OUTPKTSSECTAGINSERTIONERRX(a) ({ \
u64 offset; \
\
offset = 0x23040ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x110d8ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_TX_MEM_SLAVE_OUTPKTSSECYNOACTIVESAX(a) ({ \
u64 offset; \
\
offset = 0x1dc40ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x10278ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_TX_MEM_SLAVE_OUTPKTSSECYTOOLONGX(a) ({ \
u64 offset; \
\
offset = 0x1d440ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x10478ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_TX_MEM_SLAVE_OUTPKTSSECYUNTAGGEDX(a) ({ \
u64 offset; \
\
offset = 0x1cc40ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x10078ull; \
offset += (a) * 0x8ull; \
offset; })
#define MCSX_CSE_TX_SLAVE_CTRL ({ \
u64 offset; \
\
offset = 0x54a0ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xa00ull; \
offset; })
#define MCSX_CSE_TX_SLAVE_STATS_CLEAR ({ \
u64 offset; \
\
offset = 0x54b8ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xa18ull; \
offset; })
#define MCSX_CSE_TX_MEM_SLAVE_OUTOCTETSSCENCRYPTEDX(a) (0x1f440ull + (a) * 0x8ull)
#define MCSX_CSE_TX_MEM_SLAVE_OUTOCTETSSCPROTECTEDX(a) (0x1ec40ull + (a) * 0x8ull)
#define MCSX_CSE_TX_MEM_SLAVE_OUTPKTSEARLYPREEMPTERRX(a) (0x10eb8ull + (a) * 0x8ull)
#define MCSX_CSE_TX_MEM_SLAVE_OUTPKTSSAENCRYPTEDX(a) (0x21c40ull + (a) * 0x8ull)
#define MCSX_CSE_TX_MEM_SLAVE_OUTPKTSSAPROTECTEDX(a) (0x20c40ull + (a) * 0x8ull)
#define MCSX_IP_INT ({ \
u64 offset; \
\
offset = 0x80028ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x60028ull; \
offset; })
#define MCSX_IP_INT_ENA_W1S ({ \
u64 offset; \
\
offset = 0x80040ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x60040ull; \
offset; })
#define MCSX_IP_INT_ENA_W1C ({ \
u64 offset; \
\
offset = 0x80038ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x60038ull; \
offset; })
#define MCSX_TOP_SLAVE_INT_SUM ({ \
u64 offset; \
\
offset = 0xc20ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xab8ull; \
offset; })
#define MCSX_TOP_SLAVE_INT_SUM_ENB ({ \
u64 offset; \
\
offset = 0xc28ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xac0ull; \
offset; })
#define MCSX_CPM_RX_SLAVE_RX_INT ({ \
u64 offset; \
\
offset = 0x23c00ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x0ad8ull; \
offset; })
#define MCSX_CPM_RX_SLAVE_RX_INT_ENB ({ \
u64 offset; \
\
offset = 0x23c08ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0xae0ull; \
offset; })
#define MCSX_CPM_TX_SLAVE_TX_INT ({ \
u64 offset; \
\
offset = 0x3d490ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x54a0ull; \
offset; })
#define MCSX_CPM_TX_SLAVE_TX_INT_ENB ({ \
u64 offset; \
\
offset = 0x3d498ull; \
if (mcs->hw->mcs_blks > 1) \
offset = 0x54a8ull; \
offset; })
#endif
|