blob: 611bdef2402b527ae66a119debafc993887b7014 (
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
|
/*
* Copyright (C) Freescale Semicondutor, Inc. 2006. All rights reserved.
*
* Author: Shlomi Gridish <gridish@freescale.com>
*
* Description:
* Internal header file for UCC Gigabit Ethernet unit routines.
*
* Changelog:
* Jun 28, 2006 Li Yang <LeoLi@freescale.com>
* - Rearrange code and style fixes
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*/
#ifndef __UCC_GETH_H__
#define __UCC_GETH_H__
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/fsl_devices.h>
#include <asm/immap_qe.h>
#include <asm/qe.h>
#include <asm/ucc.h>
#include <asm/ucc_fast.h>
#include "ucc_geth_mii.h"
#define DRV_DESC "QE UCC Gigabit Ethernet Controller"
#define DRV_NAME "ucc_geth"
#define DRV_VERSION "1.1"
#define NUM_TX_QUEUES 8
#define NUM_RX_QUEUES 8
#define NUM_BDS_IN_PREFETCHED_BDS 4
#define TX_IP_OFFSET_ENTRY_MAX 8
#define NUM_OF_PADDRS 4
#define ENET_INIT_PARAM_MAX_ENTRIES_RX 9
#define ENET_INIT_PARAM_MAX_ENTRIES_TX 8
struct ucc_geth {
struct ucc_fast uccf;
u8 res0[0x100 - sizeof(struct ucc_fast)];
u32 maccfg1; /* mac configuration reg. 1 */
u32 maccfg2; /* mac configuration reg. 2 */
u32 ipgifg; /* interframe gap reg. */
u32 hafdup; /* half-duplex reg. */
u8 res1[0x10];
u8 miimng[0x18]; /* MII management structure moved to _mii.h */
u32 ifctl; /* interface control reg */
u32 ifstat; /* interface statux reg */
u32 macstnaddr1; /* mac station address part 1 reg */
u32 macstnaddr2; /* mac station address part 2 reg */
u8 res2[0x8];
u32 uempr; /* UCC Ethernet Mac parameter reg */
u32 utbipar; /* UCC tbi address reg */
u16 uescr; /* UCC Ethernet statistics control reg */
u8 res3[0x180 - 0x15A];
u32 tx64; /* Total number of frames (including bad
frames) transmitted that were exactly of the
minimal length (64 for un tagged, 68 for
tagged, or with length exactly equal to the
parameter MINLength */
u32 tx127; /* Total number of frames (including bad
frames) transmitted that were between
MINLength (Including FCS length==4) and 127
octets */
u32 tx255; /* Total number of frames (including bad
frames) transmitted that were between 128
(Including FCS length==4) and 255 octets */
u32 rx64; /* Total number of frames received including
bad frames that were exactly of the mninimal
length (64 bytes) */
u32 rx127; /* Total number of frames (including bad
frames) received that were between MINLength
(Including FCS length==4) and 127 octets */
u32 rx255; /* Total number of frames (including bad
frames) received that were between 128
(Including FCS length==4) and 255 octets */
u32 txok; /* Total number of octets residing in frames
that where involved in succesfull
transmission */
u16 txcf; /* Total number of PAUSE control frames
transmitted by this MAC */
u8 res4[0x2];
u32 tmca; /* Total number of frames that were transmitted
succesfully with the group address bit set
that are not broadcast frames */
u32 tbca; /* Total number of frames transmitted
succesfully that had destination address
field equal to the broadcast address */
u32 rxfok; /* Total number of frames received OK */
u32 rxbok; /* Total number of octets received OK */
u32 rbyt; /* Total number of octets received including
octets in bad frames. Must be implemented in
HW because it includes octets in frames that
never even reach the UCC */
u32 rmca; /* Total number of frames that were received
succesfully with the group address bit set
that are not broadcast frames */
u32 rbca; /* Total number of frames received succesfully
that had destination address equal to the
broadcast address */
u32 scar; /* Statistics carry register */
u32 scam; /* Statistics caryy mask register */
u8 res5[0x200 - 0x1c4];
} __attribute__ ((packed));
/* UCC GETH TEMODR Register */
#define TEMODER_TX_RMON_STATISTICS_ENABLE 0x0100 /* enable Tx statistics
*/
#define TEMODER_SCHEDULER_ENABLE 0x2000 /* enable scheduler */
#define TEMODER_IP_CHECKSUM_GENERATE 0x0400 /* generate IPv4
checksums */
#define TEMODER_PERFORMANCE_OPTIMIZATION_MODE1 0x0200 /* enable performance
optimization
enhancement (mode1) */
#define TEMODER_RMON_STATISTICS 0x0100 /* enable tx statistics
*/
#define TEMODER_NUM_OF_QUEUES_SHIFT (15-15) /* Number of queues <<
shift */
/* UCC GETH TEMODR Register */
#define REMODER_RX_RMON_STATISTICS_ENABLE 0x00001000 /* enable Rx
statistics */
#define REMODER_RX_EXTENDED_FEATURES 0x80000000 /* enable
extended
features */
#define REMODER_VLAN_OPERATION_TAGGED_SHIFT (31-9 ) /* vlan operation
tagged << shift */
#define REMODER_VLAN_OPERATION_NON_TAGGED_SHIFT (31-10) /* vlan operation non
tagged << shift */
#define REMODER_RX_QOS_MODE_SHIFT (31-15) /* rx QoS mode << shift
*/
#define REMODER_RMON_STATISTICS 0x00001000 /* enable rx
statistics */
#define REMODER_RX_EXTENDED_FILTERING 0x00000800 /* extended
filtering
vs.
mpc82xx-like
filtering */
#define REMODER_NUM_OF_QUEUES_SHIFT (31-23) /* Number of queues <<
shift */
#define REMODER_DYNAMIC_MAX_FRAME_LENGTH 0x00000008 /* enable
dynamic max
frame length
*/
#define REMODER_DYNAMIC_MIN_FRAME_LENGTH 0x00000004 /* enable
dynamic min
frame length
*/
#define REMODER_IP_CHECKSUM_CHECK 0x00000002 /* check IPv4
checksums */
#define REMODER_IP_ADDRESS_ALIGNMENT 0x00000001 /* align ip
address to
4-byte
boundary */
/* UCC GETH Event Register */
#define UCCE_TXB (UCC_GETH_UCCE_TXB7 | UCC_GETH_UCCE_TXB6 | \
UCC_GETH_UCCE_TXB5 | UCC_GETH_UCCE_TXB4 | \
UCC_GETH_UCCE_TXB3 | UCC_GETH_UCCE_TXB2 | \
UCC_GETH_UCCE_TXB1 | UCC_GETH_UCCE_TXB0)
#define UCCE_RXB (UCC_GETH_UCCE_RXB7 | UCC_GETH_UCCE_RXB6 | \
UCC_GETH_UCCE_RXB5 | UCC_GETH_UCCE_RXB4 | \
UCC_GETH_UCCE_RXB3 | UCC_GETH_UCCE_RXB2 | \
UCC_GETH_UCCE_RXB1 | UCC_GETH_UCCE_RXB0)
#define UCCE_RXF (UCC_GETH_UCCE_RXF7 | UCC_GETH_UCCE_RXF6 | \
UCC_GETH_UCCE_RXF5 | UCC_GETH_UCCE_RXF4 | \
UCC_GETH_UCCE_RXF3 | UCC_GETH_UCCE_RXF2 | \
UCC_GETH_UCCE_RXF1 | UCC_GETH_UCCE_RXF0)
#define UCCE_OTHER (UCC_GETH_UCCE_SCAR | UCC_GETH_UCCE_GRA | \
UCC_GETH_UCCE_CBPR | UCC_GETH_UCCE_BSY | \
UCC_GETH_UCCE_RXC | UCC_GETH_UCCE_TXC | UCC_GETH_UCCE_TXE)
#define UCCE_RX_EVENTS (UCCE_RXF | UCC_GETH_UCCE_BSY)
#define UCCE_TX_EVENTS (UCCE_TXB | UCC_GETH_UCCE_TXE)
/* UCC GETH MACCFG1 (MAC Configuration 1 Register) */
#define MACCFG1_FLOW_RX 0x00000020 /* Flow Control
Rx */
#define MACCFG1_FLOW_TX 0x00000010 /* Flow Control
Tx */
#define MACCFG1_ENABLE_SYNCHED_RX 0x00000008 /* Rx Enable
synchronized
to Rx stream
*/
#define MACCFG1_ENABLE_RX 0x00000004 /* Enable Rx */
#define MACCFG1_ENABLE_SYNCHED_TX 0x00000002 /* Tx Enable
synchronized
to Tx stream
*/
#define MACCFG1_ENABLE_TX 0x00000001 /* Enable Tx */
/* UCC GETH MACCFG2 (MAC Configuration 2 Register) */
#define MACCFG2_PREL_SHIFT (31 - 19) /* Preamble
Length <<
shift */
#define MACCFG2_PREL_MASK 0x0000f000 /* Preamble
Length mask */
#define MACCFG2_SRP 0x00000080 /* Soft Receive
Preamble */
#define MACCFG2_STP 0x00000040 /* Soft
Transmit
Preamble */
#define MACCFG2_RESERVED_1 0x00000020 /* Reserved -
must be set
to 1 */
#define MACCFG2_LC 0x00000010 /* Length Check
*/
#define MACCFG2_MPE 0x00000008 /* Magic packet
detect */
#define MACCFG2_FDX 0x00000001 /* Full Duplex */
#define MACCFG2_FDX_MASK 0x00000001 /* Full Duplex
mask */
#define MACCFG2_PAD_CRC 0x00000004
#define MACCFG2_CRC_EN 0x00000002
#define MACCFG2_PAD_AND_CRC_MODE_NONE 0x00000000 /* Neither
Padding
short frames
nor CRC */
#define MACCFG2_PAD_AND_CRC_MODE_CRC_ONLY 0x00000002 /* Append CRC
only */
#define MACCFG2_PAD_AND_CRC_MODE_PAD_AND_CRC 0x00000004
#define MACCFG2_INTERFACE_MODE_NIBBLE 0x00000100 /* nibble mode
(MII/RMII/RGMII
10/100bps) */
#define MACCFG2_INTERFACE_MODE_BYTE 0x00000200 /* byte mode
(GMII/TBI/RTB/RGMII
1000bps ) */
#define MACCFG2_INTERFACE_MODE_MASK 0x00000300 /* mask
covering all
relevant
bits */
/* UCC GETH IPGIFG (Inter-frame Gap / Inter-Frame Gap Register) */
#define IPGIFG_NON_BACK_TO_BACK_IFG_PART1_SHIFT (31 - 7) /* Non
back-to-back
inter frame
gap part 1.
<< shift */
#define IPGIFG_NON_BACK_TO_BACK_IFG_PART2_SHIFT (31 - 15) /* Non
back-to-back
inter frame
gap part 2.
<< shift */
#define IPGIFG_MINIMUM_IFG_ENFORCEMENT_SHIFT (31 - 23) /* Mimimum IFG
Enforcement
<< shift */
#define IPGIFG_BACK_TO_BACK_IFG_SHIFT (31 - 31) /* back-to-back
inter frame
gap << shift
*/
#define IPGIFG_NON_BACK_TO_BACK_IFG_PART1_MAX 127 /* Non back-to-back
inter frame gap part
1. max val */
#define IPGIFG_NON_BACK_TO_BACK_IFG_PART2_MAX 127 /* Non back-to-back
inter frame gap part
2. max val */
#define IPGIFG_MINIMUM_IFG_ENFORCEMENT_MAX 255 /* Mimimum IFG
Enforcement max val */
#define IPGIFG_BACK_TO_BACK_IFG_MAX 127 /* back-to-back inter
frame gap max val */
#define IPGIFG_NBTB_CS_IPG_MASK 0x7F000000
#define IPGIFG_NBTB_IPG_MASK 0x007F0000
#define IPGIFG_MIN_IFG_MASK 0x0000FF00
#define IPGIFG_BTB_IPG_MASK 0x0000007F
/* UCC GETH HAFDUP (Half Duplex Register) */
#define HALFDUP_ALT_BEB_TRUNCATION_SHIFT (31 - 11) /* Alternate
Binary
Exponential
Backoff
Truncation
<< shift */
#define HALFDUP_ALT_BEB_TRUNCATION_MAX 0xf /* Alternate Binary
Exponential Backoff
Truncation max val */
#define HALFDUP_ALT_BEB 0x00080000 /* Alternate
Binary
Exponential
Backoff */
#define HALFDUP_BACK_PRESSURE_NO_BACKOFF 0x00040000 /* Back
pressure no
backoff */
#define HALFDUP_NO_BACKOFF 0x00020000 /* No Backoff */
#define HALFDUP_EXCESSIVE_DEFER 0x00010000 /* Excessive
Defer */
#define HALFDUP_MAX_RETRANSMISSION_SHIFT (31 - 19) /* Maximum
Retransmission
<< shift */
#define HALFDUP_MAX_RETRANSMISSION_MAX 0xf /* Maximum
Retransmission max
val */
#define HALFDUP_COLLISION_WINDOW_SHIFT (31 - 31) /* Collision
Window <<
shift */
#define HALFDUP_COLLISION_WINDOW_MAX 0x3f /* Collision Window max
val */
#define HALFDUP_ALT_BEB_TR_MASK 0x00F00000
#define HALFDUP_RETRANS_MASK 0x0000F000
#define HALFDUP_COL_WINDOW_MASK 0x0000003F
/* UCC GETH UCCS (Ethernet Status Register) */
#define UCCS_BPR 0x02 /* Back pressure (in
half duplex mode) */
#define UCCS_PAU 0x02 /* Pause state (in full
duplex mode) */
#define UCCS_MPD 0x01 /* Magic Packet
Detected */
/* UCC GETH IFSTAT (Interface Status Register) */
#define IFSTAT_EXCESS_DEFER 0x00000200 /* Excessive
transmission
defer */
/* UCC GETH MACSTNADDR1 (Station Address Part 1 Register) */
#define MACSTNADDR1_OCTET_6_SHIFT (31 - 7) /* Station
address 6th
octet <<
shift */
#define MACSTNADDR1_OCTET_5_SHIFT (31 - 15) /* Station
address 5th
octet <<
shift */
#define MACSTNADDR1_OCTET_4_SHIFT (31 - 23) /* Station
address 4th
octet <<
shift */
#define MACSTNADDR1_OCTET_3_SHIFT (31 - 31) /* Station
address 3rd
octet <<
shift */
/* UCC GETH MACSTNADDR2 (Station Address Part 2 Register) */
#define MACSTNADDR2_OCTET_2_SHIFT (31 - 7) /* Station
address 2nd
octet <<
shift */
#define MACSTNADDR2_OCTET_1_SHIFT (31 - 15) /* Station
address 1st
octet <<
shift */
/* UCC GETH UEMPR (Ethernet Mac Parameter Register) */
#define UEMPR_PAUSE_TIME_VALUE_SHIFT (31 - 15) /* Pause time
value <<
shift */
#define UEMPR_EXTENDED_PAUSE_TIME_VALUE_SHIFT (31 - 31) /* Extended
pause time
value <<
shift */
/* UCC GETH UTBIPAR (Ten Bit Interface Physical Address Register) */
#define UTBIPAR_PHY_ADDRESS_SHIFT (31 - 31) /* Phy address
<< shift */
#define UTBIPAR_PHY_ADDRESS_MASK 0x0000001f /* Phy address
mask */
/* UCC GETH UESCR (Ethernet Statistics Control Register) */
#define UESCR_AUTOZ 0x8000 /* Automatically zero
addressed
statistical counter
values */
#define UESCR_CLRCNT 0x4000 /* Clear all statistics
counters */
#define UESCR_MAXCOV_SHIFT (15 - 7) /* Max
Coalescing
Value <<
shift */
#define UESCR_SCOV_SHIFT (15 - 15) /* Status
Coalescing
Value <<
shift */
/* UCC GETH UDSR (Data Synchronization Register) */
#define UDSR_MAGIC 0x067E
struct ucc_geth_thread_data_tx {
u8 res0[104];
} __attribute__ ((packed));
struct ucc_geth_thread_data_rx {
u8 res0[40];
} __attribute__ ((packed));
/* Send Queue Queue-Descriptor */
struct ucc_geth_send_queue_qd {
u32 bd_ring_base; /* pointer to BD ring base address */
u8 res0[0x8];
u32 last_bd_completed_address;/* initialize to last entry in BD ring */
u8 res1[0x30];
} __attribute__ ((packed));
struct ucc_geth_send_queue_mem_region {
struct ucc_geth_send_queue_qd sqqd[NUM_TX_QUEUES];
} __attribute__ ((packed));
struct ucc_geth_thread_tx_pram {
u8 res0[64];
} __attribute__ ((packed));
struct ucc_geth_thread_rx_pram {
u8 res0[128];
} __attribute__ ((packed));
#define THREAD_RX_PRAM_ADDITIONAL_FOR_EXTENDED_FILTERING 64
#define THREAD_RX_PRAM_ADDITIONAL_FOR_EXTENDED_FILTERING_8 64
#define THREAD_RX_PRAM_ADDITIONAL_FOR_EXTENDED_FILTERING_16 96
struct ucc_geth_scheduler {
u16 cpucount0; /* CPU packet counter */
u16 cpucount1; /* CPU packet counter */
u16 cecount0; /* QE packet counter */
u16 cecount1; /* QE packet counter */
u16 cpucount2; /* CPU packet counter */
u16 cpucount3; /* CPU packet counter */
u16 cecount2; /* QE packet counter */
u16 cecount3; /* QE packet counter */
u16 cpucount4; /* CPU packet counter */
u16 cpucount5; /* CPU packet counter */
u16 cecount4; /* QE packet counter */
u16 cecount5; /* QE packet counter */
u16 cpucount6; /* CPU packet counter */
u16 cpucount7; /* CPU packet counter */
u16 cecount6; /* QE packet counter */
u16 cecount7; /* QE packet counter */
u32 weightstatus[NUM_TX_QUEUES]; /* accumulated weight factor */
u32 rtsrshadow; /* temporary variable handled by QE */
u32 time; /* temporary variable handled by QE */
u32 ttl; /* temporary variable handled by QE */
u32 mblinterval; /* max burst length interval */
u16 nortsrbytetime; /* normalized value of byte time in tsr units */
u8 fracsiz; /* radix 2 log value of denom. of
NorTSRByteTime */
u8 res0[1];
u8 strictpriorityq; /* Strict Priority Mask register */
u8 txasap; /* Transmit ASAP register */
u8 extrabw; /* Extra BandWidth register */
u8 oldwfqmask; /* temporary variable handled by QE */
u8 weightfactor[NUM_TX_QUEUES];
/**< weight factor for queues */
u32 minw; /* temporary variable handled by QE */
u8 res1[0x70 - 0x64];
} __attribute__ ((packed));
struct ucc_geth_tx_firmware_statistics_pram {
u32 sicoltx; /* single collision */
u32 mulcoltx; /* multiple collision */
u32 latecoltxfr; /* late collision */
u32 frabortduecol; /* frames aborted due to transmit collision */
u32 frlostinmactxer; /* frames lost due to internal MAC error
transmission that are not counted on any
other counter */
u32 carriersenseertx; /* carrier sense error */
u32 frtxok; /* frames transmitted OK */
u32 txfrexcessivedefer; /* frames with defferal time greater than
specified threshold */
u32 txpkts256; /* total packets (including bad) between 256
and 511 octets */
u32 txpkts512; /* total packets (including bad) between 512
and 1023 octets */
u32 txpkts1024; /* total packets (including bad) between 1024
and 1518 octets */
u32 txpktsjumbo; /* total packets (including bad) between 1024
and MAXLength octets */
} __attribute__ ((packed));
struct ucc_geth_rx_firmware_statistics_pram {
u32 frrxfcser; /* frames with crc error */
u32 fraligner; /* frames with alignment error */
u32 inrangelenrxer; /* in range length error */
u32 outrangelenrxer; /* out of range length error */
u32 frtoolong; /* frame too long */
u32 runt; /* runt */
u32 verylongevent; /* very long event */
u32 symbolerror; /* symbol error */
u32 dropbsy; /* drop because of BD not ready */
u8 res0[0x8];
u32 mismatchdrop; /* drop because of MAC filtering (e.g. address
or type mismatch) */
u32 underpkts; /* total frames less than 64 octets */
u32 pkts256; /* total frames (including bad) between 256 and
511 octets */
u32 pkts512; /* total frames (including bad) between 512 and
1023 octets */
u32 pkts1024; /* total frames (including bad) between 1024
and 1518 octets */
u32 pktsjumbo; /* total frames (including bad) between 1024
and MAXLength octets */
u32 frlossinmacer; /* frames lost because of internal MAC error
that is not counted in any other counter */
u32 pausefr; /* pause frames */
u8 res1[0x4];
u32 removevlan; /* total frames that had their VLAN tag removed
*/
u32 replacevlan; /* total frames that had their VLAN tag
replaced */
u32 insertvlan; /* total frames that had their VLAN tag
inserted */
} __attribute__ ((packed));
struct ucc_geth_rx_interrupt_coalescing_entry {
u32
|