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#ifndef _ET1310_ADDRESS_MAP_H_
59#define _ET1310_ADDRESS_MAP_H_
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#define ET_PM_PHY_SW_COMA 0x40
89#define ET_PMCSR_INIT 0x38
90
91
92
93
94
95#define ET_INTR_TXDMA_ISR 0x00000008
96#define ET_INTR_TXDMA_ERR 0x00000010
97#define ET_INTR_RXDMA_XFR_DONE 0x00000020
98#define ET_INTR_RXDMA_FB_R0_LOW 0x00000040
99#define ET_INTR_RXDMA_FB_R1_LOW 0x00000080
100#define ET_INTR_RXDMA_STAT_LOW 0x00000100
101#define ET_INTR_RXDMA_ERR 0x00000200
102#define ET_INTR_WATCHDOG 0x00004000
103#define ET_INTR_WOL 0x00008000
104#define ET_INTR_PHY 0x00010000
105#define ET_INTR_TXMAC 0x00020000
106#define ET_INTR_RXMAC 0x00040000
107#define ET_INTR_MAC_STAT 0x00080000
108#define ET_INTR_SLV_TIMEOUT 0x00100000
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#define ET_MSI_VECTOR 0x0000001F
139#define ET_MSI_TC 0x00070000
140
141
142
143
144
145#define ET_LOOP_MAC 0x00000001
146#define ET_LOOP_DMA 0x00000002
147
148
149
150
151
152typedef struct _GLOBAL_t {
153 u32 txq_start_addr;
154 u32 txq_end_addr;
155 u32 rxq_start_addr;
156 u32 rxq_end_addr;
157 u32 pm_csr;
158 u32 unused;
159 u32 int_status;
160 u32 int_mask;
161 u32 int_alias_clr_en;
162 u32 int_status_alias;
163 u32 sw_reset;
164 u32 slv_timer;
165 u32 msi_config;
166 u32 loopback;
167 u32 watchdog_timer;
168} GLOBAL_t, *PGLOBAL_t;
169
170
171
172
173
174
175
176
177
178
179#define ET_TXDMA_CSR_HALT 0x00000001
180#define ET_TXDMA_DROP_TLP 0x00000002
181#define ET_TXDMA_CACHE_THRS 0x000000F0
182#define ET_TXDMA_CACHE_SHIFT 4
183#define ET_TXDMA_SNGL_EPKT 0x00000100
184#define ET_TXDMA_CLASS 0x00001E00
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202typedef union _TXDMA_PR_NUM_DES_t {
203 u32 value;
204 struct {
205#ifdef _BIT_FIELDS_HTOL
206 u32 unused:22;
207 u32 pr_ndes:10;
208#else
209 u32 pr_ndes:10;
210 u32 unused:22;
211#endif
212 } bits;
213} TXDMA_PR_NUM_DES_t, *PTXDMA_PR_NUM_DES_t;
214
215
216#define ET_DMA10_MASK 0x3FF
217#define ET_DMA10_WRAP 0x400
218#define ET_DMA4_MASK 0x00F
219#define ET_DMA4_WRAP 0x010
220
221#define INDEX10(x) ((x) & ET_DMA10_MASK)
222#define INDEX4(x) ((x) & ET_DMA4_MASK)
223
224extern inline void add_10bit(u32 *v, int n)
225{
226 *v = INDEX10(*v + n) | (*v & ET_DMA10_WRAP);
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
260typedef struct _TXDMA_t {
261 u32 csr;
262 u32 pr_base_hi;
263 u32 pr_base_lo;
264 TXDMA_PR_NUM_DES_t pr_num_des;
265 u32 txq_wr_addr;
266 u32 txq_wr_addr_ext;
267 u32 txq_rd_addr;
268 u32 dma_wb_base_hi;
269 u32 dma_wb_base_lo;
270 u32 service_request;
271 u32 service_complete;
272 u32 cache_rd_index;
273 u32 cache_wr_index;
274 u32 TxDmaError;
275 u32 DescAbortCount;
276 u32 PayloadAbortCnt;
277 u32 WriteBackAbortCnt;
278 u32 DescTimeoutCnt;
279 u32 PayloadTimeoutCnt;
280 u32 WriteBackTimeoutCnt;
281 u32 DescErrorCount;
282 u32 PayloadErrorCnt;
283 u32 WriteBackErrorCnt;
284 u32 DroppedTLPCount;
285 u32 NewServiceComplete;
286 u32 EthernetPacketCount;
287} TXDMA_t, *PTXDMA_t;
288
289
290
291
292
293
294
295
296
297
298typedef union _RXDMA_CSR_t {
299 u32 value;
300 struct {
301#ifdef _BIT_FIELDS_HTOL
302 u32 unused2:14;
303 u32 halt_status:1;
304 u32 pkt_done_flush:1;
305 u32 pkt_drop_disable:1;
306 u32 unused1:1;
307 u32 fbr1_enable:1;
308 u32 fbr1_size:2;
309 u32 fbr0_enable:1;
310 u32 fbr0_size:2;
311 u32 dma_big_endian:1;
312 u32 pkt_big_endian:1;
313 u32 psr_big_endian:1;
314 u32 fbr_big_endian:1;
315 u32 tc:3;
316 u32 halt:1;
317#else
318 u32 halt:1;
319 u32 tc:3;
320 u32 fbr_big_endian:1;
321 u32 psr_big_endian:1;
322 u32 pkt_big_endian:1;
323 u32 dma_big_endian:1;
324 u32 fbr0_size:2;
325 u32 fbr0_enable:1;
326 u32 fbr1_size:2;
327 u32 fbr1_enable:1;
328 u32 unused1:1;
329 u32 pkt_drop_disable:1;
330 u32 pkt_done_flush:1;
331 u32 halt_status:1;
332 u32 unused2:14;
333#endif
334 } bits;
335} RXDMA_CSR_t, *PRXDMA_CSR_t;
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353typedef union _RXDMA_NUM_PKT_DONE_t {
354 u32 value;
355 struct {
356#ifdef _BIT_FIELDS_HTOL
357 u32 unused:24;
358 u32 num_done:8;
359#else
360 u32 num_done:8;
361 u32 unused:24;
362#endif
363 } bits;
364} RXDMA_NUM_PKT_DONE_t, *PRXDMA_NUM_PKT_DONE_t;
365
366
367
368
369
370typedef union _RXDMA_MAX_PKT_TIME_t {
371 u32 value;
372 struct {
373#ifdef _BIT_FIELDS_HTOL
374 u32 unused:14;
375 u32 time_done:18;
376#else
377 u32 time_done:18;
378 u32 unused:14;
379#endif
380 } bits;
381} RXDMA_MAX_PKT_TIME_t, *PRXDMA_MAX_PKT_TIME_t;
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
417typedef union _RXDMA_PSR_NUM_DES_t {
418 u32 value;
419 struct {
420#ifdef _BIT_FIELDS_HTOL
421 u32 unused:20;
422 u32 psr_ndes:12;
423#else
424 u32 psr_ndes:12;
425 u32 unused:20;
426#endif
427 } bits;
428} RXDMA_PSR_NUM_DES_t, *PRXDMA_PSR_NUM_DES_t;
429
430
431
432
433
434typedef union _RXDMA_PSR_AVAIL_OFFSET_t {
435 u32 value;
436 struct {
437#ifdef _BIT_FIELDS_HTOL
438 u32 unused:19;
439 u32 psr_avail_wrap:1;
440 u32 psr_avail:12;
441#else
442 u32 psr_avail:12;
443 u32 psr_avail_wrap:1;
444 u32 unused:19;
445#endif
446 } bits;
447} RXDMA_PSR_AVAIL_OFFSET_t, *PRXDMA_PSR_AVAIL_OFFSET_t;
448
449
450
451
452
453typedef union _RXDMA_PSR_FULL_OFFSET_t {
454 u32 value;
455 struct {
456#ifdef _BIT_FIELDS_HTOL
457 u32 unused:19;
458 u32 psr_full_wrap:1;
459 u32 psr_full:12;
460#else
461 u32 psr_full:12;
462 u32 psr_full_wrap:1;
463 u32 unused:19;
464#endif
465 } bits;
466} RXDMA_PSR_FULL_OFFSET_t, *PRXDMA_PSR_FULL_OFFSET_t;
467
468
469
470
471
472typedef union _RXDMA_PSR_ACCESS_INDEX_t {
473 u32 value;
474 struct {
475#ifdef _BIT_FIELDS_HTOL
476 u32 unused:27;
477 u32 psr_ai:5;
478#else
479 u32 psr_ai:5;
480 u32 unused:27;
481#endif
482 } bits;
483} RXDMA_PSR_ACCESS_INDEX_t, *PRXDMA_PSR_ACCESS_INDEX_t;
484
485
486
487
488
489typedef union _RXDMA_PSR_MIN_DES_t {
490 u32 value;
491 struct {
492#ifdef _BIT_FIELDS_HTOL
493 u32 unused:20;
494 u32 psr_min:12;
495#else
496 u32 psr_min:12;
497 u32 unused:20;
498#endif
499 } bits;
500} RXDMA_PSR_MIN_DES_t, *PRXDMA_PSR_MIN_DES_t;
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518typedef union _RXDMA_FBR_NUM_DES_t {
519 u32 value;
520 struct {
521#ifdef _BIT_FIELDS_HTOL
522 u32 unused:22;
523 u32 fbr_ndesc:10;
524#else
525 u32 fbr_ndesc:10;
526 u32 unused:22;
527#endif
528 } bits;
529} RXDMA_FBR_NUM_DES_t, *PRXDMA_FBR_NUM_DES_t;
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547typedef union _RXDMA_FBC_RD_INDEX_t {
548 u32 value;
549 struct {
550#ifdef _BIT_FIELDS_HTOL
551 u32 unused:27;
552 u32 fbc_rdi:5;
553#else
554 u32 fbc_rdi:5;
555 u32 unused:27;
556#endif
557 } bits;
558} RXDMA_FBC_RD_INDEX_t, *PRXDMA_FBC_RD_INDEX_t;
559
560
561
562
563
564typedef union _RXDMA_FBR_MIN_DES_t {
565 u32 value;
566 struct {
567#ifdef _BIT_FIELDS_HTOL
568 u32 unused:22;
569 u32 fbr_min:10;
570#else
571 u32 fbr_min:10;
572 u32 unused:22;
573#endif
574 } bits;
575} RXDMA_FBR_MIN_DES_t, *PRXDMA_FBR_MIN_DES_t;
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
617typedef struct _RXDMA_t {
618 RXDMA_CSR_t csr;
619 u32 dma_wb_base_lo;
620 u32 dma_wb_base_hi;
621 RXDMA_NUM_PKT_DONE_t num_pkt_done;
622 RXDMA_MAX_PKT_TIME_t max_pkt_time;
623 u32 rxq_rd_addr;
624 u32 rxq_rd_addr_ext;
625 u32 rxq_wr_addr;
626 u32 psr_base_lo;
627 u32 psr_base_hi;
628 RXDMA_PSR_NUM_DES_t psr_num_des;
629 RXDMA_PSR_AVAIL_OFFSET_t psr_avail_offset;
630 RXDMA_PSR_FULL_OFFSET_t psr_full_offset;
631 RXDMA_PSR_ACCESS_INDEX_t psr_access_index;
632 RXDMA_PSR_MIN_DES_t psr_min_des;
633 u32 fbr0_base_lo;
634 u32 fbr0_base_hi;
635 RXDMA_FBR_NUM_DES_t fbr0_num_des;
636 u32 fbr0_avail_offset;
637 u32 fbr0_full_offset;
638 RXDMA_FBC_RD_INDEX_t fbr0_rd_index;
639 RXDMA_FBR_MIN_DES_t fbr0_min_des;
640 u32 fbr1_base_lo;
641 u32 fbr1_base_hi;
642 RXDMA_FBR_NUM_DES_t fbr1_num_des;
643 u32 fbr1_avail_offset;
644 u32 fbr1_full_offset;
645 RXDMA_FBC_RD_INDEX_t fbr1_rd_index;
646 RXDMA_FBR_MIN_DES_t fbr1_min_des;
647} RXDMA_t, *PRXDMA_t;
648
649
650
651
652
653
654
655
656
657
658typedef union _TXMAC_CTL_t {
659 u32 value;
660 struct {
661#ifdef _BIT_FIELDS_HTOL
662 u32 unused:24;
663 u32 cklseg_diable:1;
664 u32 ckbcnt_disable:1;
665 u32 cksegnum:1;
666 u32 async_disable:1;
667 u32 fc_disable:1;
668 u32 mcif_disable:1;
669 u32 mif_disable:1;
670 u32 txmac_en:1;
671#else
672 u32 txmac_en:1;
673 u32 mif_disable:1;
674 u32 mcif_disable:1;
675 u32 fc_disable:1;
676 u32 async_disable:1;
677 u32 cksegnum:1;
678 u32 ckbcnt_disable:1;
679 u32 cklseg_diable:1;
680 u32 unused:24;
681#endif
682 } bits;
683} TXMAC_CTL_t, *PTXMAC_CTL_t;
684
685
686
687
688
689typedef union _TXMAC_SHADOW_PTR_t {
690 u32 value;
691 struct {
692#ifdef _BIT_FIELDS_HTOL
693 u32 reserved2:5;
694 u32 txq_rd_ptr:11;
695 u32 reserved:5;
696 u32 txq_wr_ptr:11;
697#else
698 u32 txq_wr_ptr:11;
699 u32 reserved:5;
700 u32 txq_rd_ptr:11;
701 u32 reserved2:5;
702#endif
703 } bits;
704} TXMAC_SHADOW_PTR_t, *PTXMAC_SHADOW_PTR_t;
705
706
707
708
709
710typedef union _TXMAC_ERR_CNT_t {
711 u32 value;
712 struct {
713#ifdef _BIT_FIELDS_HTOL
714 u32 unused:20;
715 u32 reserved:4;
716 u32 txq_underrun:4;
717 u32 fifo_underrun:4;
718#else
719 u32 fifo_underrun:4;
720 u32 txq_underrun:4;
721 u32 reserved:4;
722 u32 unused:20;
723#endif
724 } bits;
725} TXMAC_ERR_CNT_t, *PTXMAC_ERR_CNT_t;
726
727
728
729
730
731typedef union _TXMAC_MAX_FILL_t {
732 u32 value;
733 struct {
734#ifdef _BIT_FIELDS_HTOL
735 u32 unused:20;
736 u32 max_fill:12;
737#else
738 u32 max_fill:12;
739 u32 unused:20;
740#endif
741 } bits;
742} TXMAC_MAX_FILL_t, *PTXMAC_MAX_FILL_t;
743
744
745
746
747
748typedef union _TXMAC_CF_PARAM_t {
749 u32 value;
750 struct {
751#ifdef _BIT_FIELDS_HTOL
752 u32 cfep:16;
753 u32 cfpt:16;
754#else
755 u32 cfpt:16;
756 u32 cfep:16;
757#endif
758 } bits;
759} TXMAC_CF_PARAM_t, *PTXMAC_CF_PARAM_t;
760
761
762
763
764
765typedef union _TXMAC_TXTEST_t {
766 u32 value;
767 struct {
768#ifdef _BIT_FIELDS_HTOL
769 u32 unused2:15;
770 u32 reserved1:1;
771 u32 txtest_en:1;
772 u32 unused1:4;
773 u32 txqtest_ptr:11;
774#else
775 u32 txqtest_ptr:11;
776 u32 unused1:4;
777 u32 txtest_en:1;
778 u32 reserved1:1;
779 u32 unused2:15;
780#endif
781 } bits;
782} TXMAC_TXTEST_t, *PTXMAC_TXTEST_t;
783
784
785
786
787
788typedef union _TXMAC_ERR_t {
789 u32 value;
790 struct {
791#ifdef _BIT_FIELDS_HTOL
792 u32 unused2:23;
793 u32 fifo_underrun:1;
794 u32 unused1:2;
795 u32 ctrl2_err:1;
796 u32 txq_underrun:1;
797 u32 bcnt_err:1;
798 u32 lseg_err:1;
799 u32 segnum_err:1;
800 u32 seg0_err:1;
801#else
802 u32 seg0_err:1;
803 u32 segnum_err:1;
804 u32 lseg_err:1;
805 u32 bcnt_err:1;
806 u32 txq_underrun:1;
807 u32 ctrl2_err:1;
808 u32 unused1:2;
809 u32 fifo_underrun:1;
810 u32 unused2:23;
811#endif
812 } bits;
813} TXMAC_ERR_t, *PTXMAC_ERR_t;
814
815
816
817
818
819typedef union _TXMAC_ERR_INT_t {
820 u32 value;
821 struct {
822#ifdef _BIT_FIELDS_HTOL
823 u32 unused2:23;
824 u32 fifo_underrun:1;
825 u32 unused1:2;
826 u32 ctrl2_err:1;
827 u32 txq_underrun:1;
828 u32 bcnt_err:1;
829 u32 lseg_err:1;
830 u32 segnum_err:1;
831 u32 seg0_err:1;
832#else
833 u32 seg0_err:1;
834 u32 segnum_err:1;
835 u32 lseg_err:1;
836 u32 bcnt_err:1;
837 u32 txq_underrun:1;
838 u32 ctrl2_err:1;
839 u32 unused1:2;
840 u32 fifo_underrun:1;
841 u32 unused2:23;
842#endif
843 } bits;
844} TXMAC_ERR_INT_t, *PTXMAC_ERR_INT_t;
845
846
847
848
849
850typedef union _TXMAC_CP_CTRL_t {
851 u32 value;
852 struct {
853#ifdef _BIT_FIELDS_HTOL
854 u32 unused:30;
855 u32 bp_req:1;
856 u32 bp_xonxoff:1;
857#else
858 u32 bp_xonxoff:1;
859 u32 bp_req:1;
860 u32 unused:30;
861#endif
862 } bits;
863} TXMAC_BP_CTRL_t, *PTXMAC_BP_CTRL_t;
864
865
866
867
868typedef struct _TXMAC_t {
869 TXMAC_CTL_t ctl;
870 TXMAC_SHADOW_PTR_t shadow_ptr;
871 TXMAC_ERR_CNT_t err_cnt;
872 TXMAC_MAX_FILL_t max_fill;
873 TXMAC_CF_PARAM_t cf_param;
874 TXMAC_TXTEST_t tx_test;
875 TXMAC_ERR_t err;
876 TXMAC_ERR_INT_t err_int;
877 TXMAC_BP_CTRL_t bp_ctrl;
878} TXMAC_t, *PTXMAC_t;
879
880
881
882
883
884
885
886
887
888typedef union _RXMAC_CTRL_t {
889 u32 value;
890 struct {
891#ifdef _BIT_FIELDS_HTOL
892 u32 reserved:25;
893 u32 rxmac_int_disable:1;
894 u32 async_disable:1;
895 u32 mif_disable:1;
896 u32 wol_disable:1;
897 u32 pkt_filter_disable:1;
898 u32 mcif_disable:1;
899 u32 rxmac_en:1;
900#else
901 u32 rxmac_en:1;
902 u32 mcif_disable:1;
903 u32 pkt_filter_disable:1;
904 u32 wol_disable:1;
905 u32 mif_disable:1;
906 u32 async_disable:1;
907 u32 rxmac_int_disable:1;
908 u32 reserved:25;
909#endif
910 } bits;
911} RXMAC_CTRL_t, *PRXMAC_CTRL_t;
912
913
914
915
916
917typedef union _RXMAC_WOL_CTL_CRC0_t {
918 u32 value;
919 struct {
920#ifdef _BIT_FIELDS_HTOL
921 u32 crc0:16;
922 u32 reserve:4;
923 u32 ignore_pp:1;
924 u32 ignore_mp:1;
925 u32 clr_intr:1;
926 u32 ignore_link_chg:1;
927 u32 ignore_uni:1;
928 u32 ignore_multi:1;
929 u32 ignore_broad:1;
930 u32 valid_crc4:1;
931 u32 valid_crc3:1;
932 u32 valid_crc2:1;
933 u32 valid_crc1:1;
934 u32 valid_crc0:1;
935#else
936 u32 valid_crc0:1;
937 u32 valid_crc1:1;
938 u32 valid_crc2:1;
939 u32 valid_crc3:1;
940 u32 valid_crc4:1;
941 u32 ignore_broad:1;
942 u32 ignore_multi:1;
943 u32 ignore_uni:1;
944 u32 ignore_link_chg:1;
945 u32 clr_intr:1;
946 u32 ignore_mp:1;
947 u32 ignore_pp:1;
948 u32 reserve:4;
949 u32 crc0:16;
950#endif
951 } bits;
952} RXMAC_WOL_CTL_CRC0_t, *PRXMAC_WOL_CTL_CRC0_t;
953
954
955
956
957
958typedef union _RXMAC_WOL_CRC12_t {
959 u32 value;
960 struct {
961#ifdef _BIT_FIELDS_HTOL
962 u32 crc2:16;
963 u32 crc1:16;
964#else
965 u32 crc1:16;
966 u32 crc2:16;
967#endif
968 } bits;
969} RXMAC_WOL_CRC12_t, *PRXMAC_WOL_CRC12_t;
970
971
972
973
974
975typedef union _RXMAC_WOL_CRC34_t {
976 u32 value;
977 struct {
978#ifdef _BIT_FIELDS_HTOL
979 u32 crc4:16;
980 u32 crc3:16;
981#else
982 u32 crc3:16;
983 u32 crc4:16;
984#endif
985 } bits;
986} RXMAC_WOL_CRC34_t, *PRXMAC_WOL_CRC34_t;
987
988
989
990
991
992typedef union _RXMAC_WOL_SA_LO_t {
993 u32 value;
994 struct {
995#ifdef _BIT_FIELDS_HTOL
996 u32 sa3:8;
997 u32 sa4:8;
998 u32 sa5:8;
999 u32 sa6:8;
1000#else
1001 u32 sa6:8;
1002 u32 sa5:8;
1003 u32 sa4:8;
1004 u32 sa3:8;
1005#endif
1006 } bits;
1007} RXMAC_WOL_SA_LO_t, *PRXMAC_WOL_SA_LO_t;
1008
1009
1010
1011
1012
1013typedef union _RXMAC_WOL_SA_HI_t {
1014 u32 value;
1015 struct {
1016#ifdef _BIT_FIELDS_HTOL
1017 u32 reserved:16;
1018 u32 sa1:8;
1019 u32 sa2:8;
1020#else
1021 u32 sa2:8;
1022 u32 sa1:8;
1023 u32 reserved:16;
1024#endif
1025 } bits;
1026} RXMAC_WOL_SA_HI_t, *PRXMAC_WOL_SA_HI_t;
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038typedef union _RXMAC_UNI_PF_ADDR1_t {
1039 u32 value;
1040 struct {
1041#ifdef _BIT_FIELDS_HTOL
1042 u32 addr1_3:8;
1043 u32 addr1_4:8;
1044 u32 addr1_5:8;
1045 u32 addr1_6:8;
1046#else
1047 u32 addr1_6:8;
1048 u32 addr1_5:8;
1049 u32 addr1_4:8;
1050 u32 addr1_3:8;
1051#endif
1052 } bits;
1053} RXMAC_UNI_PF_ADDR1_t, *PRXMAC_UNI_PF_ADDR1_t;
1054
1055
1056
1057
1058
1059typedef union _RXMAC_UNI_PF_ADDR2_t {
1060 u32 value;
1061 struct {
1062#ifdef _BIT_FIELDS_HTOL
1063 u32 addr2_3:8;
1064 u32 addr2_4:8;
1065 u32 addr2_5:8;
1066 u32 addr2_6:8;
1067#else
1068 u32 addr2_6:8;
1069 u32 addr2_5:8;
1070 u32 addr2_4:8;
1071 u32 addr2_3:8;
1072#endif
1073 } bits;
1074} RXMAC_UNI_PF_ADDR2_t, *PRXMAC_UNI_PF_ADDR2_t;
1075
1076
1077
1078
1079
1080typedef union _RXMAC_UNI_PF_ADDR3_t {
1081 u32 value;
1082 struct {
1083#ifdef _BIT_FIELDS_HTOL
1084 u32 addr2_1:8;
1085 u32 addr2_2:8;
1086 u32 addr1_1:8;
1087 u32 addr1_2:8;
1088#else
1089 u32 addr1_2:8;
1090 u32 addr1_1:8;
1091 u32 addr2_2:8;
1092 u32 addr2_1:8;
1093#endif
1094 } bits;
1095} RXMAC_UNI_PF_ADDR3_t, *PRXMAC_UNI_PF_ADDR3_t;
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107typedef union _RXMAC_PF_CTRL_t {
1108 u32 value;
1109 struct {
1110#ifdef _BIT_FIELDS_HTOL
1111 u32 unused2:9;
1112 u32 min_pkt_size:7;
1113 u32 unused1:12;
1114 u32 filter_frag_en:1;
1115 u32 filter_uni_en:1;
1116 u32 filter_multi_en:1;
1117 u32 filter_broad_en:1;
1118#else
1119 u32 filter_broad_en:1;
1120 u32 filter_multi_en:1;
1121 u32 filter_uni_en:1;
1122 u32 filter_frag_en:1;
1123 u32 unused1:12;
1124 u32 min_pkt_size:7;
1125 u32 unused2:9;
1126#endif
1127 } bits;
1128} RXMAC_PF_CTRL_t, *PRXMAC_PF_CTRL_t;
1129
1130
1131
1132
1133
1134typedef union _RXMAC_MCIF_CTRL_MAX_SEG_t {
1135 u32 value;
1136 struct {
1137#ifdef _BIT_FIELDS_HTOL
1138 u32 reserved:22;
1139 u32 max_size:8;
1140 u32 fc_en:1;
1141 u32 seg_en:1;
1142#else
1143 u32 seg_en:1;
1144 u32 fc_en:1;
1145 u32 max_size:8;
1146 u32 reserved:22;
1147#endif
1148 } bits;
1149} RXMAC_MCIF_CTRL_MAX_SEG_t, *PRXMAC_MCIF_CTRL_MAX_SEG_t;
1150
1151
1152
1153
1154
1155typedef union _RXMAC_MCIF_WATER_MARK_t {
1156 u32 value;
1157 struct {
1158#ifdef _BIT_FIELDS_HTOL
1159 u32 reserved2:6;
1160 u32 mark_hi:10;
1161 u32 reserved1:6;
1162 u32 mark_lo:10;
1163#else
1164 u32 mark_lo:10;
1165 u32 reserved1:6;
1166 u32 mark_hi:10;
1167 u32 reserved2:6;
1168#endif
1169 } bits;
1170} RXMAC_MCIF_WATER_MARK_t, *PRXMAC_MCIF_WATER_MARK_t;
1171
1172
1173
1174
1175
1176typedef union _RXMAC_RXQ_DIAG_t {
1177 u32 value;
1178 struct {
1179#ifdef _BIT_FIELDS_HTOL
1180 u32 reserved2:6;
1181 u32 rd_ptr:10;
1182 u32 reserved1:6;
1183 u32 wr_ptr:10;
1184#else
1185 u32 wr_ptr:10;
1186 u32 reserved1:6;
1187 u32 rd_ptr:10;
1188 u32 reserved2:6;
1189#endif
1190 } bits;
1191} RXMAC_RXQ_DIAG_t, *PRXMAC_RXQ_DIAG_t;
1192
1193
1194
1195
1196
1197typedef union _RXMAC_SPACE_AVAIL_t {
1198 u32 value;
1199 struct {
1200#ifdef _BIT_FIELDS_HTOL
1201 u32 reserved2:15;
1202 u32 space_avail_en:1;
1203 u32 reserved1:6;
1204 u32 space_avail:10;
1205#else
1206 u32 space_avail:10;
1207 u32 reserved1:6;
1208 u32 space_avail_en:1;
1209 u32 reserved2:15;
1210#endif
1211 } bits;
1212} RXMAC_SPACE_AVAIL_t, *PRXMAC_SPACE_AVAIL_t;
1213
1214
1215
1216
1217
1218typedef union _RXMAC_MIF_CTL_t {
1219 u32 value;
1220 struct {
1221#ifdef _BIT_FIELDS_HTOL
1222 u32 reserve:14;
1223 u32 drop_pkt_en:1;
1224 u32 drop_pkt_mask:17;
1225#else
1226 u32 drop_pkt_mask:17;
1227 u32 drop_pkt_en:1;
1228 u32 reserve:14;
1229#endif
1230 } bits;
1231} RXMAC_MIF_CTL_t, *PRXMAC_MIF_CTL_t;
1232
1233
1234
1235
1236
1237typedef union _RXMAC_ERROR_REG_t {
1238 u32 value;
1239 struct {
1240#ifdef _BIT_FIELDS_HTOL
1241 u32 reserve:28;
1242 u32 mif:1;
1243 u32 async:1;
1244 u32 pkt_filter:1;
1245 u32 mcif:1;
1246#else
1247 u32 mcif:1;
1248 u32 pkt_filter:1;
1249 u32 async:1;
1250 u32 mif:1;
1251 u32 reserve:28;
1252#endif
1253 } bits;
1254} RXMAC_ERROR_REG_t, *PRXMAC_ERROR_REG_t;
1255
1256
1257
1258
1259typedef struct _RXMAC_t {
1260 RXMAC_CTRL_t ctrl;
1261 RXMAC_WOL_CTL_CRC0_t crc0;
1262 RXMAC_WOL_CRC12_t crc12;
1263 RXMAC_WOL_CRC34_t crc34;
1264 RXMAC_WOL_SA_LO_t sa_lo;
1265 RXMAC_WOL_SA_HI_t sa_hi;
1266 u32 mask0_word0;
1267 u32 mask0_word1;
1268 u32 mask0_word2;
1269 u32 mask0_word3;
1270 u32 mask1_word0;
1271 u32 mask1_word1;
1272 u32 mask1_word2;
1273 u32 mask1_word3;
1274 u32 mask2_word0;
1275 u32 mask2_word1;
1276 u32 mask2_word2;
1277 u32 mask2_word3;
1278 u32 mask3_word0;
1279 u32 mask3_word1;
1280 u32 mask3_word2;
1281 u32 mask3_word3;
1282 u32 mask4_word0;
1283 u32 mask4_word1;
1284 u32 mask4_word2;
1285 u32 mask4_word3;
1286 RXMAC_UNI_PF_ADDR1_t uni_pf_addr1;
1287 RXMAC_UNI_PF_ADDR2_t uni_pf_addr2;
1288 RXMAC_UNI_PF_ADDR3_t uni_pf_addr3;
1289 u32 multi_hash1;
1290 u32 multi_hash2;
1291 u32 multi_hash3;
1292 u32 multi_hash4;
1293 RXMAC_PF_CTRL_t pf_ctrl;
1294 RXMAC_MCIF_CTRL_MAX_SEG_t mcif_ctrl_max_seg;
1295 RXMAC_MCIF_WATER_MARK_t mcif_water_mark;
1296 RXMAC_RXQ_DIAG_t rxq_diag;
1297 RXMAC_SPACE_AVAIL_t space_avail;
1298
1299 RXMAC_MIF_CTL_t mif_ctrl;
1300 RXMAC_ERROR_REG_t err_reg;
1301} RXMAC_t, *PRXMAC_t;
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312typedef union _MAC_CFG1_t {
1313 u32 value;
1314 struct {
1315#ifdef _BIT_FIELDS_HTOL
1316 u32 soft_reset:1;
1317 u32 sim_reset:1;
1318 u32 reserved3:10;
1319 u32 reset_rx_mc:1;
1320 u32 reset_tx_mc:1;
1321 u32 reset_rx_fun:1;
1322 u32 reset_tx_fun:1;
1323 u32 reserved2:7;
1324 u32 loop_back:1;
1325 u32 reserved1:2;
1326 u32 rx_flow:1;
1327 u32 tx_flow:1;
1328 u32 syncd_rx_en:1;
1329 u32 rx_enable:1;
1330 u32 syncd_tx_en:1;
1331 u32 tx_enable:1;
1332#else
1333 u32 tx_enable:1;
1334 u32 syncd_tx_en:1;
1335 u32 rx_enable:1;
1336 u32 syncd_rx_en:1;
1337 u32 tx_flow:1;
1338 u32 rx_flow:1;
1339 u32 reserved1:2;
1340 u32 loop_back:1;
1341 u32 reserved2:7;
1342 u32 reset_tx_fun:1;
1343 u32 reset_rx_fun:1;
1344 u32 reset_tx_mc:1;
1345 u32 reset_rx_mc:1;
1346 u32 reserved3:10;
1347 u32 sim_reset:1;
1348 u32 soft_reset:1;
1349#endif
1350 } bits;
1351} MAC_CFG1_t, *PMAC_CFG1_t;
1352
1353
1354
1355
1356
1357typedef union _MAC_CFG2_t {
1358 u32 value;
1359 struct {
1360#ifdef _BIT_FIELDS_HTOL
1361 u32 reserved3:16;
1362 u32 preamble_len:4;
1363 u32 reserved2:2;
1364 u32 if_mode:2;
1365 u32 reserved1:2;
1366 u32 huge_frame:1;
1367 u32 len_check:1;
1368 u32 undefined:1;
1369 u32 pad_crc:1;
1370 u32 crc_enable:1;
1371 u32 full_duplex:1;
1372#else
1373 u32 full_duplex:1;
1374 u32 crc_enable:1;
1375 u32 pad_crc:1;
1376 u32 undefined:1;
1377 u32 len_check:1;
1378 u32 huge_frame:1;
1379 u32 reserved1:2;
1380 u32 if_mode:2;
1381 u32 reserved2:2;
1382 u32 preamble_len:4;
1383 u32 reserved3:16;
1384#endif
1385 } bits;
1386} MAC_CFG2_t, *PMAC_CFG2_t;
1387
1388
1389
1390
1391
1392typedef union _MAC_IPG_t {
1393 u32 value;
1394 struct {
1395#ifdef _BIT_FIELDS_HTOL
1396 u32 reserved:1;
1397 u32 non_B2B_ipg_1:7;
1398 u32 undefined2:1;
1399 u32 non_B2B_ipg_2:7;
1400 u32 min_ifg_enforce:8;
1401 u32 undefined1:1;
1402 u32 B2B_ipg:7;
1403#else
1404 u32 B2B_ipg:7;
1405 u32 undefined1:1;
1406 u32 min_ifg_enforce:8;
1407 u32 non_B2B_ipg_2:7;
1408 u32 undefined2:1;
1409 u32 non_B2B_ipg_1:7;
1410 u32 reserved:1;
1411#endif
1412 } bits;
1413} MAC_IPG_t, *PMAC_IPG_t;
1414
1415
1416
1417
1418
1419typedef union _MAC_HFDP_t {
1420 u32 value;
1421 struct {
1422#ifdef _BIT_FIELDS_HTOL
1423 u32 reserved2:8;
1424 u32 alt_beb_trunc:4;
1425 u32 alt_beb_enable:1;
1426 u32 bp_no_backoff:1;
1427 u32 no_backoff:1;
1428 u32 excess_defer:1;
1429 u32 rexmit_max:4;
1430 u32 reserved1:2;
1431 u32 coll_window:10;
1432#else
1433 u32 coll_window:10;
1434 u32 reserved1:2;
1435 u32 rexmit_max:4;
1436 u32 excess_defer:1;
1437 u32 no_backoff:1;
1438 u32 bp_no_backoff:1;
1439 u32 alt_beb_enable:1;
1440 u32 alt_beb_trunc:4;
1441 u32 reserved2:8;
1442#endif
1443 } bits;
1444} MAC_HFDP_t, *PMAC_HFDP_t;
1445
1446
1447
1448
1449
1450typedef union _MAC_MAX_FM_LEN_t {
1451 u32 value;
1452 struct {
1453#ifdef _BIT_FIELDS_HTOL
1454 u32 reserved:16;
1455 u32 max_len:16;
1456#else
1457 u32 max_len:16;
1458 u32 reserved:16;
1459#endif
1460 } bits;
1461} MAC_MAX_FM_LEN_t, *PMAC_MAX_FM_LEN_t;
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473typedef union _MAC_TEST_t {
1474 u32 value;
1475 struct {
1476#ifdef _BIT_FIELDS_HTOL
1477 u32 unused:29;
1478 u32 mac_test:3;
1479#else
1480 u32 mac_test:3;
1481 u32 unused:29;
1482#endif
1483 } bits;
1484} MAC_TEST_t, *PMAC_TEST_t;
1485
1486
1487
1488
1489
1490typedef union _MII_MGMT_CFG_t {
1491 u32 value;
1492 struct {
1493#ifdef _BIT_FIELDS_HTOL
1494 u32 reset_mii_mgmt:1;
1495 u32 reserved:25;
1496 u32 scan_auto_incremt:1;
1497 u32 preamble_suppress:1;
1498 u32 undefined:1;
1499 u32 mgmt_clk_reset:3;
1500#else
1501 u32 mgmt_clk_reset:3;
1502 u32 undefined:1;
1503 u32 preamble_suppress:1;
1504 u32 scan_auto_incremt:1;
1505 u32 reserved:25;
1506 u32 reset_mii_mgmt:1;
1507#endif
1508 } bits;
1509} MII_MGMT_CFG_t, *PMII_MGMT_CFG_t;
1510
1511
1512
1513
1514
1515typedef union _MII_MGMT_CMD_t {
1516 u32 value;
1517 struct {
1518#ifdef _BIT_FIELDS_HTOL
1519 u32 reserved:30;
1520 u32 scan_cycle:1;
1521 u32 read_cycle:1;
1522#else
1523 u32 read_cycle:1;
1524 u32 scan_cycle:1;
1525 u32 reserved:30;
1526#endif
1527 } bits;
1528} MII_MGMT_CMD_t, *PMII_MGMT_CMD_t;
1529
1530
1531
1532
1533
1534typedef union _MII_MGMT_ADDR_t {
1535 u32 value;
1536 struct {
1537#ifdef _BIT_FIELDS_HTOL
1538 u32 reserved2:19;
1539 u32 phy_addr:5;
1540 u32 reserved1:3;
1541 u32 reg_addr:5;
1542#else
1543 u32 reg_addr:5;
1544 u32 reserved1:3;
1545 u32 phy_addr:5;
1546 u32 reserved2:19;
1547#endif
1548 } bits;
1549} MII_MGMT_ADDR_t, *PMII_MGMT_ADDR_t;
1550
1551
1552
1553
1554
1555typedef union _MII_MGMT_CTRL_t {
1556 u32 value;
1557 struct {
1558#ifdef _BIT_FIELDS_HTOL
1559 u32 reserved:16;
1560 u32 phy_ctrl:16;
1561#else
1562 u32 phy_ctrl:16;
1563 u32 reserved:16;
1564#endif
1565 } bits;
1566} MII_MGMT_CTRL_t, *PMII_MGMT_CTRL_t;
1567
1568
1569
1570
1571
1572typedef union _MII_MGMT_STAT_t {
1573 u32 value;
1574 struct {
1575#ifdef _BIT_FIELDS_HTOL
1576 u32 reserved:16;
1577 u32 phy_stat:16;
1578#else
1579 u32 phy_stat:16;
1580 u32 reserved:16;
1581#endif
1582 } bits;
1583} MII_MGMT_STAT_t, *PMII_MGMT_STAT_t;
1584
1585
1586
1587
1588
1589typedef union _MII_MGMT_INDICATOR_t {
1590 u32 value;
1591 struct {
1592#ifdef _BIT_FIELDS_HTOL
1593 u32 reserved:29;
1594 u32 not_valid:1;
1595 u32 scanning:1;
1596 u32 busy:1;
1597#else
1598 u32 busy:1;
1599 u32 scanning:1;
1600 u32 not_valid:1;
1601 u32 reserved:29;
1602#endif
1603 } bits;
1604} MII_MGMT_INDICATOR_t, *PMII_MGMT_INDICATOR_t;
1605
1606
1607
1608
1609
1610typedef union _MAC_IF_CTRL_t {
1611 u32 value;
1612 struct {
1613#ifdef _BIT_FIELDS_HTOL
1614 u32 reset_if_module:1;
1615 u32 reserved4:3;
1616 u32 tbi_mode:1;
1617 u32 ghd_mode:1;
1618 u32 lhd_mode:1;
1619 u32 phy_mode:1;
1620 u32 reset_per_mii:1;
1621 u32 reserved3:6;
1622 u32 speed:1;
1623 u32 reset_pe100x:1;
1624 u32 reserved2:4;
1625 u32 force_quiet:1;
1626 u32 no_cipher:1;
1627 u32 disable_link_fail:1;
1628 u32 reset_gpsi:1;
1629 u32 reserved1:6;
1630 u32 enab_jab_protect:1;
1631#else
1632 u32 enab_jab_protect:1;
1633 u32 reserved1:6;
1634 u32 reset_gpsi:1;
1635 u32 disable_link_fail:1;
1636 u32 no_cipher:1;
1637 u32 force_quiet:1;
1638 u32 reserved2:4;
1639 u32 reset_pe100x:1;
1640 u32 speed:1;
1641 u32 reserved3:6;
1642 u32 reset_per_mii:1;
1643 u32 phy_mode:1;
1644 u32 lhd_mode:1;
1645 u32 ghd_mode:1;
1646 u32 tbi_mode:1;
1647 u32 reserved4:3;
1648 u32 reset_if_module:1;
1649#endif
1650 } bits;
1651} MAC_IF_CTRL_t, *PMAC_IF_CTRL_t;
1652
1653
1654
1655
1656
1657typedef union _MAC_IF_STAT_t {
1658 u32 value;
1659 struct {
1660#ifdef _BIT_FIELDS_HTOL
1661 u32 reserved:22;
1662 u32 excess_defer:1;
1663 u32 clash:1;
1664 u32 phy_jabber:1;
1665 u32 phy_link_ok:1;
1666 u32 phy_full_duplex:1;
1667 u32 phy_speed:1;
1668 u32 pe100x_link_fail:1;
1669 u32 pe10t_loss_carrie:1;
1670 u32 pe10t_sqe_error:1;
1671 u32 pe10t_jabber:1;
1672#else
1673 u32 pe10t_jabber:1;
1674 u32 pe10t_sqe_error:1;
1675 u32 pe10t_loss_carrie:1;
1676 u32 pe100x_link_fail:1;
1677 u32 phy_speed:1;
1678 u32 phy_full_duplex:1;
1679 u32 phy_link_ok:1;
1680 u32 phy_jabber:1;
1681 u32 clash:1;
1682 u32 excess_defer:1;
1683 u32 reserved:22;
1684#endif
1685 } bits;
1686} MAC_IF_STAT_t, *PMAC_IF_STAT_t;
1687
1688
1689
1690
1691
1692typedef union _MAC_STATION_ADDR1_t {
1693 u32 value;
1694 struct {
1695#ifdef _BIT_FIELDS_HTOL
1696 u32 Octet6:8;
1697 u32 Octet5:8;
1698 u32 Octet4:8;
1699 u32 Octet3:8;
1700#else
1701 u32 Octet3:8;
1702 u32 Octet4:8;
1703 u32 Octet5:8;
1704 u32 Octet6:8;
1705#endif
1706 } bits;
1707} MAC_STATION_ADDR1_t, *PMAC_STATION_ADDR1_t;
1708
1709
1710
1711
1712
1713typedef union _MAC_STATION_ADDR2_t {
1714 u32 value;
1715 struct {
1716#ifdef _BIT_FIELDS_HTOL
1717 u32 Octet2:8;
1718 u32 Octet1:8;
1719 u32 reserved:16;
1720#else
1721 u32 reserved:16;
1722 u32 Octet1:8;
1723 u32 Octet2:8;
1724#endif
1725 } bits;
1726} MAC_STATION_ADDR2_t, *PMAC_STATION_ADDR2_t;
1727
1728
1729
1730
1731typedef struct _MAC_t {
1732 MAC_CFG1_t cfg1;
1733 MAC_CFG2_t cfg2;
1734 MAC_IPG_t ipg;
1735 MAC_HFDP_t hfdp;
1736 MAC_MAX_FM_LEN_t max_fm_len;
1737 u32 rsv1;
1738 u32 rsv2;
1739 MAC_TEST_t mac_test;
1740 MII_MGMT_CFG_t mii_mgmt_cfg;
1741 MII_MGMT_CMD_t mii_mgmt_cmd;
1742 MII_MGMT_ADDR_t mii_mgmt_addr;
1743 MII_MGMT_CTRL_t mii_mgmt_ctrl;
1744 MII_MGMT_STAT_t mii_mgmt_stat;
1745 MII_MGMT_INDICATOR_t mii_mgmt_indicator;
1746 MAC_IF_CTRL_t if_ctrl;
1747 MAC_IF_STAT_t if_stat;
1748 MAC_STATION_ADDR1_t station_addr_1;
1749 MAC_STATION_ADDR2_t station_addr_2;
1750} MAC_t, *PMAC_t;
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760typedef union _MAC_STAT_REG_1_t {
1761 u32 value;
1762 struct {
1763#ifdef _BIT_FIELDS_HTOL
1764 u32 tr64:1;
1765 u32 tr127:1;
1766 u32 tr255:1;
1767 u32 tr511:1;
1768 u32 tr1k:1;
1769 u32 trmax:1;
1770 u32 trmgv:1;
1771 u32 unused:8;
1772 u32 rbyt:1;
1773 u32 rpkt:1;
1774 u32 rfcs:1;
1775 u32 rmca:1;
1776 u32 rbca:1;
1777 u32 rxcf:1;
1778 u32 rxpf:1;
1779 u32 rxuo:1;
1780 u32 raln:1;
1781 u32 rflr:1;
1782 u32 rcde:1;
1783 u32 rcse:1;
1784 u32 rund:1;
1785 u32 rovr:1;
1786 u32 rfrg:1;
1787 u32 rjbr:1;
1788 u32 rdrp:1;
1789#else
1790 u32 rdrp:1;
1791 u32 rjbr:1;
1792 u32 rfrg:1;
1793 u32 rovr:1;
1794 u32 rund:1;
1795 u32 rcse:1;
1796 u32 rcde:1;
1797 u32 rflr:1;
1798 u32 raln:1;
1799 u32 rxuo:1;
1800 u32 rxpf:1;
1801 u32 rxcf:1;
1802 u32 rbca:1;
1803 u32 rmca:1;
1804 u32 rfcs:1;
1805 u32 rpkt:1;
1806 u32 rbyt:1;
1807 u32 unused:8;
1808 u32 trmgv:1;
1809 u32 trmax:1;
1810 u32 tr1k:1;
1811 u32 tr511:1;
1812 u32 tr255:1;
1813 u32 tr127:1;
1814 u32 tr64:1;
1815#endif
1816 } bits;
1817} MAC_STAT_REG_1_t, *PMAC_STAT_REG_1_t;
1818
1819
1820
1821
1822
1823typedef union _MAC_STAT_REG_2_t {
1824 u32 value;
1825 struct {
1826#ifdef _BIT_FIELDS_HTOL
1827 u32 unused:12;
1828 u32 tjbr:1;
1829 u32 tfcs:1;
1830 u32 txcf:1;
1831 u32 tovr:1;
1832 u32 tund:1;
1833 u32 tfrg:1;
1834 u32 tbyt:1;
1835 u32 tpkt:1;
1836 u32 tmca:1;
1837 u32 tbca:1;
1838 u32 txpf:1;
1839 u32 tdfr:1;
1840 u32 tedf:1;
1841 u32 tscl:1;
1842 u32 tmcl:1;
1843 u32 tlcl:1;
1844 u32 txcl:1;
1845 u32 tncl:1;
1846 u32 tpfh:1;
1847 u32 tdrp:1;
1848#else
1849 u32 tdrp:1;
1850 u32 tpfh:1;
1851 u32 tncl:1;
1852 u32 txcl:1;
1853 u32 tlcl:1;
1854 u32 tmcl:1;
1855 u32 tscl:1;
1856 u32 tedf:1;
1857 u32 tdfr:1;
1858 u32 txpf:1;
1859 u32 tbca:1;
1860 u32 tmca:1;
1861 u32 tpkt:1;
1862 u32 tbyt:1;
1863 u32 tfrg:1;
1864 u32 tund:1;
1865 u32 tovr:1;
1866 u32 txcf:1;
1867 u32 tfcs:1;
1868 u32 tjbr:1;
1869 u32 unused:12;
1870#endif
1871 } bits;
1872} MAC_STAT_REG_2_t, *PMAC_STAT_REG_2_t;
1873
1874
1875
1876
1877typedef struct _MAC_STAT_t {
1878 u32 pad[32];
1879
1880
1881 u32 TR64;
1882
1883
1884 u32 TR127;
1885
1886
1887 u32 TR255;
1888
1889
1890 u32 TR511;
1891
1892
1893 u32 TR1K;
1894
1895
1896 u32 TRMax;
1897
1898
1899 u32 TRMgv;
1900
1901
1902 u32 RByt;
1903
1904
1905 u32 RPkt;
1906
1907
1908 u32 RFcs;
1909
1910
1911 u32 RMca;
1912
1913
1914 u32 RBca;
1915
1916
1917 u32 RxCf;
1918
1919
1920 u32 RxPf;
1921
1922
1923 u32 RxUo;
1924
1925
1926 u32 RAln;
1927
1928
1929 u32 RFlr;
1930
1931
1932 u32 RCde;
1933
1934
1935 u32 RCse;
1936
1937
1938 u32 RUnd;
1939
1940
1941 u32 ROvr;
1942
1943
1944 u32 RFrg;
1945
1946
1947 u32 RJbr;
1948
1949
1950 u32 RDrp;
1951
1952
1953 u32 TByt;
1954
1955
1956 u32 TPkt;
1957
1958
1959 u32 TMca;
1960
1961
1962 u32 TBca;
1963
1964
1965 u32 TxPf;
1966
1967
1968 u32 TDfr;
1969
1970
1971 u32 TEdf;
1972
1973
1974 u32 TScl;
1975
1976
1977 u32 TMcl;
1978
1979
1980 u32 TLcl;
1981
1982
1983 u32 TXcl;
1984
1985
1986 u32 TNcl;
1987
1988
1989 u32 TPfh;
1990
1991
1992 u32 TDrp;
1993
1994
1995 u32 TJbr;
1996
1997
1998 u32 TFcs;
1999
2000
2001 u32 TxCf;
2002
2003
2004 u32 TOvr;
2005
2006
2007 u32 TUnd;
2008
2009
2010 u32 TFrg;
2011
2012
2013 MAC_STAT_REG_1_t Carry1;
2014
2015
2016 MAC_STAT_REG_2_t Carry2;
2017
2018
2019 MAC_STAT_REG_1_t Carry1M;
2020
2021
2022 MAC_STAT_REG_2_t Carry2M;
2023} MAC_STAT_t, *PMAC_STAT_t;
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035#define ET_MMC_ENABLE 1
2036#define ET_MMC_ARB_DISABLE 2
2037#define ET_MMC_RXMAC_DISABLE 4
2038#define ET_MMC_TXMAC_DISABLE 8
2039#define ET_MMC_TXDMA_DISABLE 16
2040#define ET_MMC_RXDMA_DISABLE 32
2041#define ET_MMC_FORCE_CE 64
2042
2043
2044
2045
2046
2047
2048#define ET_SRAM_REQ_ACCESS 1
2049#define ET_SRAM_WR_ACCESS 2
2050#define ET_SRAM_IS_CTRL 4
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061typedef struct _MMC_t {
2062 u32 mmc_ctrl;
2063 u32 sram_access;
2064 u32 sram_word1;
2065 u32 sram_word2;
2066 u32 sram_word3;
2067 u32 sram_word4;
2068} MMC_t, *PMMC_t;
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080#if 0
2081typedef struct _EXP_ROM_t {
2082
2083} EXP_ROM_t, *PEXP_ROM_t;
2084#endif
2085
2086
2087
2088
2089
2090
2091
2092typedef struct _ADDRESS_MAP_t {
2093 GLOBAL_t global;
2094
2095 u8 unused_global[4096 - sizeof(GLOBAL_t)];
2096 TXDMA_t txdma;
2097
2098 u8 unused_txdma[4096 - sizeof(TXDMA_t)];
2099 RXDMA_t rxdma;
2100
2101 u8 unused_rxdma[4096 - sizeof(RXDMA_t)];
2102 TXMAC_t txmac;
2103
2104 u8 unused_txmac[4096 - sizeof(TXMAC_t)];
2105 RXMAC_t rxmac;
2106
2107 u8 unused_rxmac[4096 - sizeof(RXMAC_t)];
2108 MAC_t mac;
2109
2110 u8 unused_mac[4096 - sizeof(MAC_t)];
2111 MAC_STAT_t macStat;
2112
2113 u8 unused_mac_stat[4096 - sizeof(MAC_STAT_t)];
2114 MMC_t mmc;
2115
2116 u8 unused_mmc[4096 - sizeof(MMC_t)];
2117
2118 u8 unused_[1015808];
2119
2120
2121#if 0
2122 EXP_ROM_t exp_rom;
2123#endif
2124
2125 u8 unused_exp_rom[4096];
2126 u8 unused__[524288];
2127} ADDRESS_MAP_t, *PADDRESS_MAP_t;
2128
2129#endif
2130