3 * 10/100/1000 Base-T Ethernet Driver for the ET1301 and ET131x series MACs
5 * Copyright © 2005 Agere Systems Inc.
9 *------------------------------------------------------------------------------
11 * et1310_address_map.h - Contains the register mapping for the ET1310
13 *------------------------------------------------------------------------------
17 * This software is provided subject to the following terms and conditions,
18 * which you should read carefully before using the software. Using this
19 * software indicates your acceptance of these terms and conditions. If you do
20 * not agree with these terms and conditions, do not use the software.
22 * Copyright © 2005 Agere Systems Inc.
23 * All rights reserved.
25 * Redistribution and use in source or binary forms, with or without
26 * modifications, are permitted provided that the following conditions are met:
28 * . Redistributions of source code must retain the above copyright notice, this
29 * list of conditions and the following Disclaimer as comments in the code as
30 * well as in the documentation and/or other materials provided with the
33 * . Redistributions in binary form must reproduce the above copyright notice,
34 * this list of conditions and the following Disclaimer in the documentation
35 * and/or other materials provided with the distribution.
37 * . Neither the name of Agere Systems Inc. nor the names of the contributors
38 * may be used to endorse or promote products derived from this software
39 * without specific prior written permission.
43 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
44 * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
45 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY
46 * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
47 * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
48 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
49 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
50 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
51 * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
52 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
53 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
58 #ifndef _ET1310_ADDRESS_MAP_H_
59 #define _ET1310_ADDRESS_MAP_H_
62 /* START OF GLOBAL REGISTER ADDRESS MAP */
67 * Tx queue start address reg in global address map at address 0x0000
68 * tx queue end address reg in global address map at address 0x0004
69 * rx queue start address reg in global address map at address 0x0008
70 * rx queue end address reg in global address map at address 0x000C
74 * structure for power management control status reg in global address map
75 * located at address 0x0010
76 * jagcore_rx_rdy bit 9
77 * jagcore_tx_rdy bit 8
88 #define ET_PM_PHY_SW_COMA 0x40
89 #define ET_PMCSR_INIT 0x38
92 * Interrupt status reg at address 0x0018
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
111 * Interrupt mask register at address 0x001C
112 * Interrupt alias clear mask reg at address 0x0020
113 * Interrupt status alias reg at address 0x0024
115 * Same masks as above
119 * Software reset reg at address 0x0028
125 * 5: mac_stat_sw_reset
131 * SLV Timer reg at address 0x002C (low 24 bits)
135 * MSI Configuration reg at address 0x0030
138 #define ET_MSI_VECTOR 0x0000001F
139 #define ET_MSI_TC 0x00070000
142 * Loopback reg located at address 0x0034
145 #define ET_LOOP_MAC 0x00000001
146 #define ET_LOOP_DMA 0x00000002
149 * GLOBAL Module of JAGCore Address Mapping
150 * Located at address 0x0000
152 typedef struct _GLOBAL_t { /* Location: */
153 u32 txq_start_addr; /* 0x0000 */
154 u32 txq_end_addr; /* 0x0004 */
155 u32 rxq_start_addr; /* 0x0008 */
156 u32 rxq_end_addr; /* 0x000C */
157 u32 pm_csr; /* 0x0010 */
158 u32 unused; /* 0x0014 */
159 u32 int_status; /* 0x0018 */
160 u32 int_mask; /* 0x001C */
161 u32 int_alias_clr_en; /* 0x0020 */
162 u32 int_status_alias; /* 0x0024 */
163 u32 sw_reset; /* 0x0028 */
164 u32 slv_timer; /* 0x002C */
165 u32 msi_config; /* 0x0030 */
166 u32 loopback; /* 0x0034 */
167 u32 watchdog_timer; /* 0x0038 */
168 } GLOBAL_t, *PGLOBAL_t;
170 /* END OF GLOBAL REGISTER ADDRESS MAP */
173 /* START OF TXDMA REGISTER ADDRESS MAP */
176 * txdma control status reg at address 0x1000
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
187 * structure for txdma packet ring base address hi reg in txdma address map
188 * located at address 0x1004
189 * Defined earlier (u32)
193 * structure for txdma packet ring base address low reg in txdma address map
194 * located at address 0x1008
195 * Defined earlier (u32)
199 * structure for txdma packet ring number of descriptor reg in txdma address
200 * map. Located at address 0x100C
206 #define ET_DMA12_MASK 0x0FFF /* 12 bit mask for DMA12W types */
207 #define ET_DMA12_WRAP 0x1000
208 #define ET_DMA10_MASK 0x03FF /* 10 bit mask for DMA10W types */
209 #define ET_DMA10_WRAP 0x0400
210 #define ET_DMA4_MASK 0x000F /* 4 bit mask for DMA4W types */
211 #define ET_DMA4_WRAP 0x0010
213 #define INDEX12(x) ((x) & ET_DMA12_MASK)
214 #define INDEX10(x) ((x) & ET_DMA10_MASK)
215 #define INDEX4(x) ((x) & ET_DMA4_MASK)
217 extern inline void add_10bit(u32 *v, int n)
219 *v = INDEX10(*v + n) | (*v & ET_DMA10_WRAP);
222 extern inline void add_12bit(u32 *v, int n)
224 *v = INDEX12(*v + n) | (*v & ET_DMA12_WRAP);
228 * 10bit DMA with wrap
229 * txdma tx queue write address reg in txdma address map at 0x1010
230 * txdma tx queue write address external reg in txdma address map at 0x1014
231 * txdma tx queue read address reg in txdma address map at 0x1018
234 * txdma status writeback address hi reg in txdma address map at0x101C
235 * txdma status writeback address lo reg in txdma address map at 0x1020
237 * 10bit DMA with wrap
238 * txdma service request reg in txdma address map at 0x1024
239 * structure for txdma service complete reg in txdma address map at 0x1028
242 * txdma tx descriptor cache read index reg in txdma address map at 0x102C
243 * txdma tx descriptor cache write index reg in txdma address map at 0x1030
245 * txdma error reg in txdma address map at address 0x1034
255 * Tx DMA Module of JAGCore Address Mapping
256 * Located at address 0x1000
258 typedef struct _TXDMA_t { /* Location: */
259 u32 csr; /* 0x1000 */
260 u32 pr_base_hi; /* 0x1004 */
261 u32 pr_base_lo; /* 0x1008 */
262 u32 pr_num_des; /* 0x100C */
263 u32 txq_wr_addr; /* 0x1010 */
264 u32 txq_wr_addr_ext; /* 0x1014 */
265 u32 txq_rd_addr; /* 0x1018 */
266 u32 dma_wb_base_hi; /* 0x101C */
267 u32 dma_wb_base_lo; /* 0x1020 */
268 u32 service_request; /* 0x1024 */
269 u32 service_complete; /* 0x1028 */
270 u32 cache_rd_index; /* 0x102C */
271 u32 cache_wr_index; /* 0x1030 */
272 u32 TxDmaError; /* 0x1034 */
273 u32 DescAbortCount; /* 0x1038 */
274 u32 PayloadAbortCnt; /* 0x103c */
275 u32 WriteBackAbortCnt; /* 0x1040 */
276 u32 DescTimeoutCnt; /* 0x1044 */
277 u32 PayloadTimeoutCnt; /* 0x1048 */
278 u32 WriteBackTimeoutCnt; /* 0x104c */
279 u32 DescErrorCount; /* 0x1050 */
280 u32 PayloadErrorCnt; /* 0x1054 */
281 u32 WriteBackErrorCnt; /* 0x1058 */
282 u32 DroppedTLPCount; /* 0x105c */
283 u32 NewServiceComplete; /* 0x1060 */
284 u32 EthernetPacketCount; /* 0x1064 */
285 } TXDMA_t, *PTXDMA_t;
287 /* END OF TXDMA REGISTER ADDRESS MAP */
290 /* START OF RXDMA REGISTER ADDRESS MAP */
293 * structure for control status reg in rxdma address map
294 * Located at address 0x2000
296 typedef union _RXDMA_CSR_t {
299 #ifdef _BIT_FIELDS_HTOL
300 u32 unused2:14; /* bits 18-31 */
301 u32 halt_status:1; /* bit 17 */
302 u32 pkt_done_flush:1; /* bit 16 */
303 u32 pkt_drop_disable:1; /* bit 15 */
304 u32 unused1:1; /* bit 14 */
305 u32 fbr1_enable:1; /* bit 13 */
306 u32 fbr1_size:2; /* bits 11-12 */
307 u32 fbr0_enable:1; /* bit 10 */
308 u32 fbr0_size:2; /* bits 8-9 */
309 u32 dma_big_endian:1; /* bit 7 */
310 u32 pkt_big_endian:1; /* bit 6 */
311 u32 psr_big_endian:1; /* bit 5 */
312 u32 fbr_big_endian:1; /* bit 4 */
313 u32 tc:3; /* bits 1-3 */
314 u32 halt:1; /* bit 0 */
316 u32 halt:1; /* bit 0 */
317 u32 tc:3; /* bits 1-3 */
318 u32 fbr_big_endian:1; /* bit 4 */
319 u32 psr_big_endian:1; /* bit 5 */
320 u32 pkt_big_endian:1; /* bit 6 */
321 u32 dma_big_endian:1; /* bit 7 */
322 u32 fbr0_size:2; /* bits 8-9 */
323 u32 fbr0_enable:1; /* bit 10 */
324 u32 fbr1_size:2; /* bits 11-12 */
325 u32 fbr1_enable:1; /* bit 13 */
326 u32 unused1:1; /* bit 14 */
327 u32 pkt_drop_disable:1; /* bit 15 */
328 u32 pkt_done_flush:1; /* bit 16 */
329 u32 halt_status:1; /* bit 17 */
330 u32 unused2:14; /* bits 18-31 */
333 } RXDMA_CSR_t, *PRXDMA_CSR_t;
336 * structure for dma writeback lo reg in rxdma address map
337 * located at address 0x2004
338 * Defined earlier (u32)
342 * structure for dma writeback hi reg in rxdma address map
343 * located at address 0x2008
344 * Defined earlier (u32)
348 * structure for number of packets done reg in rxdma address map
349 * located at address 0x200C
356 * structure for max packet time reg in rxdma address map
357 * located at address 0x2010
364 * structure for rx queue read address reg in rxdma address map
365 * located at address 0x2014
366 * Defined earlier (u32)
370 * structure for rx queue read address external reg in rxdma address map
371 * located at address 0x2018
372 * Defined earlier (u32)
376 * structure for rx queue write address reg in rxdma address map
377 * located at address 0x201C
378 * Defined earlier (u32)
382 * structure for packet status ring base address lo reg in rxdma address map
383 * located at address 0x2020
384 * Defined earlier (u32)
388 * structure for packet status ring base address hi reg in rxdma address map
389 * located at address 0x2024
390 * Defined earlier (u32)
394 * structure for packet status ring number of descriptors reg in rxdma address
395 * map. Located at address 0x2028
402 * structure for packet status ring available offset reg in rxdma address map
403 * located at address 0x202C
411 * structure for packet status ring full offset reg in rxdma address map
412 * located at address 0x2030
420 * structure for packet status ring access index reg in rxdma address map
421 * located at address 0x2034
428 * structure for packet status ring minimum descriptors reg in rxdma address
429 * map. Located at address 0x2038
436 * structure for free buffer ring base lo address reg in rxdma address map
437 * located at address 0x203C
438 * Defined earlier (u32)
442 * structure for free buffer ring base hi address reg in rxdma address map
443 * located at address 0x2040
444 * Defined earlier (u32)
448 * structure for free buffer ring number of descriptors reg in rxdma address
449 * map. Located at address 0x2044
456 * structure for free buffer ring 0 available offset reg in rxdma address map
457 * located at address 0x2048
458 * Defined earlier (u32)
462 * structure for free buffer ring 0 full offset reg in rxdma address map
463 * located at address 0x204C
464 * Defined earlier (u32)
468 * structure for free buffer cache 0 full offset reg in rxdma address map
469 * located at address 0x2050
476 * structure for free buffer ring 0 minimum descriptor reg in rxdma address map
477 * located at address 0x2054
484 * structure for free buffer ring 1 base address lo reg in rxdma address map
485 * located at address 0x2058 - 0x205C
486 * Defined earlier (RXDMA_FBR_BASE_LO_t and RXDMA_FBR_BASE_HI_t)
490 * structure for free buffer ring 1 number of descriptors reg in rxdma address
491 * map. Located at address 0x2060
492 * Defined earlier (RXDMA_FBR_NUM_DES_t)
496 * structure for free buffer ring 1 available offset reg in rxdma address map
497 * located at address 0x2064
498 * Defined Earlier (RXDMA_FBR_AVAIL_OFFSET_t)
502 * structure for free buffer ring 1 full offset reg in rxdma address map
503 * located at address 0x2068
504 * Defined Earlier (RXDMA_FBR_FULL_OFFSET_t)
508 * structure for free buffer cache 1 read index reg in rxdma address map
509 * located at address 0x206C
510 * Defined Earlier (RXDMA_FBC_RD_INDEX_t)
514 * structure for free buffer ring 1 minimum descriptor reg in rxdma address map
515 * located at address 0x2070
516 * Defined Earlier (RXDMA_FBR_MIN_DES_t)
520 * Rx DMA Module of JAGCore Address Mapping
521 * Located at address 0x2000
523 typedef struct _RXDMA_t { /* Location: */
524 RXDMA_CSR_t csr; /* 0x2000 */
525 u32 dma_wb_base_lo; /* 0x2004 */
526 u32 dma_wb_base_hi; /* 0x2008 */
527 u32 num_pkt_done; /* 0x200C */
528 u32 max_pkt_time; /* 0x2010 */
529 u32 rxq_rd_addr; /* 0x2014 */
530 u32 rxq_rd_addr_ext; /* 0x2018 */
531 u32 rxq_wr_addr; /* 0x201C */
532 u32 psr_base_lo; /* 0x2020 */
533 u32 psr_base_hi; /* 0x2024 */
534 u32 psr_num_des; /* 0x2028 */
535 u32 psr_avail_offset; /* 0x202C */
536 u32 psr_full_offset; /* 0x2030 */
537 u32 psr_access_index; /* 0x2034 */
538 u32 psr_min_des; /* 0x2038 */
539 u32 fbr0_base_lo; /* 0x203C */
540 u32 fbr0_base_hi; /* 0x2040 */
541 u32 fbr0_num_des; /* 0x2044 */
542 u32 fbr0_avail_offset; /* 0x2048 */
543 u32 fbr0_full_offset; /* 0x204C */
544 u32 fbr0_rd_index; /* 0x2050 */
545 u32 fbr0_min_des; /* 0x2054 */
546 u32 fbr1_base_lo; /* 0x2058 */
547 u32 fbr1_base_hi; /* 0x205C */
548 u32 fbr1_num_des; /* 0x2060 */
549 u32 fbr1_avail_offset; /* 0x2064 */
550 u32 fbr1_full_offset; /* 0x2068 */
551 u32 fbr1_rd_index; /* 0x206C */
552 u32 fbr1_min_des; /* 0x2070 */
553 } RXDMA_t, *PRXDMA_t;
555 /* END OF RXDMA REGISTER ADDRESS MAP */
558 /* START OF TXMAC REGISTER ADDRESS MAP */
561 * structure for control reg in txmac address map
562 * located at address 0x3000
564 typedef union _TXMAC_CTL_t {
567 #ifdef _BIT_FIELDS_HTOL
568 u32 unused:24; /* bits 8-31 */
569 u32 cklseg_diable:1; /* bit 7 */
570 u32 ckbcnt_disable:1; /* bit 6 */
571 u32 cksegnum:1; /* bit 5 */
572 u32 async_disable:1; /* bit 4 */
573 u32 fc_disable:1; /* bit 3 */
574 u32 mcif_disable:1; /* bit 2 */
575 u32 mif_disable:1; /* bit 1 */
576 u32 txmac_en:1; /* bit 0 */
578 u32 txmac_en:1; /* bit 0 */
579 u32 mif_disable:1; /* bit 1 mac interface */
580 u32 mcif_disable:1; /* bit 2 mem. contr. interface */
581 u32 fc_disable:1; /* bit 3 */
582 u32 async_disable:1; /* bit 4 */
583 u32 cksegnum:1; /* bit 5 */
584 u32 ckbcnt_disable:1; /* bit 6 */
585 u32 cklseg_diable:1; /* bit 7 */
586 u32 unused:24; /* bits 8-31 */
589 } TXMAC_CTL_t, *PTXMAC_CTL_t;
592 * structure for shadow pointer reg in txmac address map
593 * located at address 0x3004
601 * structure for error count reg in txmac address map
602 * located at address 0x3008
604 typedef union _TXMAC_ERR_CNT_t {
607 #ifdef _BIT_FIELDS_HTOL
608 u32 unused:20; /* bits 12-31 */
609 u32 reserved:4; /* bits 8-11 */
610 u32 txq_underrun:4; /* bits 4-7 */
611 u32 fifo_underrun:4; /* bits 0-3 */
613 u32 fifo_underrun:4; /* bits 0-3 */
614 u32 txq_underrun:4; /* bits 4-7 */
615 u32 reserved:4; /* bits 8-11 */
616 u32 unused:20; /* bits 12-31 */
619 } TXMAC_ERR_CNT_t, *PTXMAC_ERR_CNT_t;
622 * structure for max fill reg in txmac address map
623 * located at address 0x300C
629 * structure for cf parameter reg in txmac address map
630 * located at address 0x3010
636 * structure for tx test reg in txmac address map
637 * located at address 0x3014
642 * 10-0: txq test pointer
646 * structure for error reg in txmac address map
647 * located at address 0x3018
649 typedef union _TXMAC_ERR_t {
652 #ifdef _BIT_FIELDS_HTOL
653 u32 unused2:23; /* bits 9-31 */
654 u32 fifo_underrun:1; /* bit 8 */
655 u32 unused1:2; /* bits 6-7 */
656 u32 ctrl2_err:1; /* bit 5 */
657 u32 txq_underrun:1; /* bit 4 */
658 u32 bcnt_err:1; /* bit 3 */
659 u32 lseg_err:1; /* bit 2 */
660 u32 segnum_err:1; /* bit 1 */
661 u32 seg0_err:1; /* bit 0 */
663 u32 seg0_err:1; /* bit 0 */
664 u32 segnum_err:1; /* bit 1 */
665 u32 lseg_err:1; /* bit 2 */
666 u32 bcnt_err:1; /* bit 3 */
667 u32 txq_underrun:1; /* bit 4 */
668 u32 ctrl2_err:1; /* bit 5 */
669 u32 unused1:2; /* bits 6-7 */
670 u32 fifo_underrun:1; /* bit 8 */
671 u32 unused2:23; /* bits 9-31 */
674 } TXMAC_ERR_t, *PTXMAC_ERR_t;
677 * structure for error interrupt reg in txmac address map
678 * located at address 0x301C
680 typedef union _TXMAC_ERR_INT_t {
683 #ifdef _BIT_FIELDS_HTOL
684 u32 unused2:23; /* bits 9-31 */
685 u32 fifo_underrun:1; /* bit 8 */
686 u32 unused1:2; /* bits 6-7 */
687 u32 ctrl2_err:1; /* bit 5 */
688 u32 txq_underrun:1; /* bit 4 */
689 u32 bcnt_err:1; /* bit 3 */
690 u32 lseg_err:1; /* bit 2 */
691 u32 segnum_err:1; /* bit 1 */
692 u32 seg0_err:1; /* bit 0 */
694 u32 seg0_err:1; /* bit 0 */
695 u32 segnum_err:1; /* bit 1 */
696 u32 lseg_err:1; /* bit 2 */
697 u32 bcnt_err:1; /* bit 3 */
698 u32 txq_underrun:1; /* bit 4 */
699 u32 ctrl2_err:1; /* bit 5 */
700 u32 unused1:2; /* bits 6-7 */
701 u32 fifo_underrun:1; /* bit 8 */
702 u32 unused2:23; /* bits 9-31 */
705 } TXMAC_ERR_INT_t, *PTXMAC_ERR_INT_t;
708 * structure for error interrupt reg in txmac address map
709 * located at address 0x3020
717 * Tx MAC Module of JAGCore Address Mapping
719 typedef struct _TXMAC_t { /* Location: */
720 TXMAC_CTL_t ctl; /* 0x3000 */
721 u32 shadow_ptr; /* 0x3004 */
722 TXMAC_ERR_CNT_t err_cnt; /* 0x3008 */
723 u32 max_fill; /* 0x300C */
724 u32 cf_param; /* 0x3010 */
725 u32 tx_test; /* 0x3014 */
726 TXMAC_ERR_t err; /* 0x3018 */
727 TXMAC_ERR_INT_t err_int; /* 0x301C */
728 u32 bp_ctrl; /* 0x3020 */
729 } TXMAC_t, *PTXMAC_t;
731 /* END OF TXMAC REGISTER ADDRESS MAP */
733 /* START OF RXMAC REGISTER ADDRESS MAP */
736 * structure for rxmac control reg in rxmac address map
737 * located at address 0x4000
739 typedef union _RXMAC_CTRL_t {
742 #ifdef _BIT_FIELDS_HTOL
743 u32 reserved:25; /* bits 7-31 */
744 u32 rxmac_int_disable:1; /* bit 6 */
745 u32 async_disable:1; /* bit 5 */
746 u32 mif_disable:1; /* bit 4 */
747 u32 wol_disable:1; /* bit 3 */
748 u32 pkt_filter_disable:1; /* bit 2 */
749 u32 mcif_disable:1; /* bit 1 */
750 u32 rxmac_en:1; /* bit 0 */
752 u32 rxmac_en:1; /* bit 0 */
753 u32 mcif_disable:1; /* bit 1 */
754 u32 pkt_filter_disable:1; /* bit 2 */
755 u32 wol_disable:1; /* bit 3 */
756 u32 mif_disable:1; /* bit 4 */
757 u32 async_disable:1; /* bit 5 */
758 u32 rxmac_int_disable:1; /* bit 6 */
759 u32 reserved:25; /* bits 7-31 */
762 } RXMAC_CTRL_t, *PRXMAC_CTRL_t;
765 * structure for Wake On Lan Control and CRC 0 reg in rxmac address map
766 * located at address 0x4004
768 typedef union _RXMAC_WOL_CTL_CRC0_t {
771 #ifdef _BIT_FIELDS_HTOL
772 u32 crc0:16; /* bits 16-31 */
773 u32 reserve:4; /* bits 12-15 */
774 u32 ignore_pp:1; /* bit 11 */
775 u32 ignore_mp:1; /* bit 10 */
776 u32 clr_intr:1; /* bit 9 */
777 u32 ignore_link_chg:1; /* bit 8 */
778 u32 ignore_uni:1; /* bit 7 */
779 u32 ignore_multi:1; /* bit 6 */
780 u32 ignore_broad:1; /* bit 5 */
781 u32 valid_crc4:1; /* bit 4 */
782 u32 valid_crc3:1; /* bit 3 */
783 u32 valid_crc2:1; /* bit 2 */
784 u32 valid_crc1:1; /* bit 1 */
785 u32 valid_crc0:1; /* bit 0 */
787 u32 valid_crc0:1; /* bit 0 */
788 u32 valid_crc1:1; /* bit 1 */
789 u32 valid_crc2:1; /* bit 2 */
790 u32 valid_crc3:1; /* bit 3 */
791 u32 valid_crc4:1; /* bit 4 */
792 u32 ignore_broad:1; /* bit 5 */
793 u32 ignore_multi:1; /* bit 6 */
794 u32 ignore_uni:1; /* bit 7 */
795 u32 ignore_link_chg:1; /* bit 8 */
796 u32 clr_intr:1; /* bit 9 */
797 u32 ignore_mp:1; /* bit 10 */
798 u32 ignore_pp:1; /* bit 11 */
799 u32 reserve:4; /* bits 12-15 */
800 u32 crc0:16; /* bits 16-31 */
803 } RXMAC_WOL_CTL_CRC0_t, *PRXMAC_WOL_CTL_CRC0_t;
806 * structure for CRC 1 and CRC 2 reg in rxmac address map
807 * located at address 0x4008
809 typedef union _RXMAC_WOL_CRC12_t {
812 #ifdef _BIT_FIELDS_HTOL
813 u32 crc2:16; /* bits 16-31 */
814 u32 crc1:16; /* bits 0-15 */
816 u32 crc1:16; /* bits 0-15 */
817 u32 crc2:16; /* bits 16-31 */
820 } RXMAC_WOL_CRC12_t, *PRXMAC_WOL_CRC12_t;
823 * structure for CRC 3 and CRC 4 reg in rxmac address map
824 * located at address 0x400C
826 typedef union _RXMAC_WOL_CRC34_t {
829 #ifdef _BIT_FIELDS_HTOL
830 u32 crc4:16; /* bits 16-31 */
831 u32 crc3:16; /* bits 0-15 */
833 u32 crc3:16; /* bits 0-15 */
834 u32 crc4:16; /* bits 16-31 */
837 } RXMAC_WOL_CRC34_t, *PRXMAC_WOL_CRC34_t;
840 * structure for Wake On Lan Source Address Lo reg in rxmac address map
841 * located at address 0x4010
843 typedef union _RXMAC_WOL_SA_LO_t {
846 #ifdef _BIT_FIELDS_HTOL
847 u32 sa3:8; /* bits 24-31 */
848 u32 sa4:8; /* bits 16-23 */
849 u32 sa5:8; /* bits 8-15 */
850 u32 sa6:8; /* bits 0-7 */
852 u32 sa6:8; /* bits 0-7 */
853 u32 sa5:8; /* bits 8-15 */
854 u32 sa4:8; /* bits 16-23 */
855 u32 sa3:8; /* bits 24-31 */
858 } RXMAC_WOL_SA_LO_t, *PRXMAC_WOL_SA_LO_t;
861 * structure for Wake On Lan Source Address Hi reg in rxmac address map
862 * located at address 0x4014
864 typedef union _RXMAC_WOL_SA_HI_t {
867 #ifdef _BIT_FIELDS_HTOL
868 u32 reserved:16; /* bits 16-31 */
869 u32 sa1:8; /* bits 8-15 */
870 u32 sa2:8; /* bits 0-7 */
872 u32 sa2:8; /* bits 0-7 */
873 u32 sa1:8; /* bits 8-15 */
874 u32 reserved:16; /* bits 16-31 */
877 } RXMAC_WOL_SA_HI_t, *PRXMAC_WOL_SA_HI_t;
880 * structure for Wake On Lan mask reg in rxmac address map
881 * located at address 0x4018 - 0x4064
882 * Defined earlier (u32)
886 * structure for Unicast Paket Filter Address 1 reg in rxmac address map
887 * located at address 0x4068
889 typedef union _RXMAC_UNI_PF_ADDR1_t {
892 #ifdef _BIT_FIELDS_HTOL
893 u32 addr1_3:8; /* bits 24-31 */
894 u32 addr1_4:8; /* bits 16-23 */
895 u32 addr1_5:8; /* bits 8-15 */
896 u32 addr1_6:8; /* bits 0-7 */
898 u32 addr1_6:8; /* bits 0-7 */
899 u32 addr1_5:8; /* bits 8-15 */
900 u32 addr1_4:8; /* bits 16-23 */
901 u32 addr1_3:8; /* bits 24-31 */
904 } RXMAC_UNI_PF_ADDR1_t, *PRXMAC_UNI_PF_ADDR1_t;
907 * structure for Unicast Paket Filter Address 2 reg in rxmac address map
908 * located at address 0x406C
910 typedef union _RXMAC_UNI_PF_ADDR2_t {
913 #ifdef _BIT_FIELDS_HTOL
914 u32 addr2_3:8; /* bits 24-31 */
915 u32 addr2_4:8; /* bits 16-23 */
916 u32 addr2_5:8; /* bits 8-15 */
917 u32 addr2_6:8; /* bits 0-7 */
919 u32 addr2_6:8; /* bits 0-7 */
920 u32 addr2_5:8; /* bits 8-15 */
921 u32 addr2_4:8; /* bits 16-23 */
922 u32 addr2_3:8; /* bits 24-31 */
925 } RXMAC_UNI_PF_ADDR2_t, *PRXMAC_UNI_PF_ADDR2_t;
928 * structure for Unicast Paket Filter Address 1 & 2 reg in rxmac address map
929 * located at address 0x4070
931 typedef union _RXMAC_UNI_PF_ADDR3_t {
934 #ifdef _BIT_FIELDS_HTOL
935 u32 addr2_1:8; /* bits 24-31 */
936 u32 addr2_2:8; /* bits 16-23 */
937 u32 addr1_1:8; /* bits 8-15 */
938 u32 addr1_2:8; /* bits 0-7 */
940 u32 addr1_2:8; /* bits 0-7 */
941 u32 addr1_1:8; /* bits 8-15 */
942 u32 addr2_2:8; /* bits 16-23 */
943 u32 addr2_1:8; /* bits 24-31 */
946 } RXMAC_UNI_PF_ADDR3_t, *PRXMAC_UNI_PF_ADDR3_t;
949 * structure for Multicast Hash reg in rxmac address map
950 * located at address 0x4074 - 0x4080
951 * Defined earlier (u32)
955 * structure for Packet Filter Control reg in rxmac address map
956 * located at address 0x4084
958 typedef union _RXMAC_PF_CTRL_t {
961 #ifdef _BIT_FIELDS_HTOL
962 u32 unused2:9; /* bits 23-31 */
963 u32 min_pkt_size:7; /* bits 16-22 */
964 u32 unused1:12; /* bits 4-15 */
965 u32 filter_frag_en:1; /* bit 3 */
966 u32 filter_uni_en:1; /* bit 2 */
967 u32 filter_multi_en:1; /* bit 1 */
968 u32 filter_broad_en:1; /* bit 0 */
970 u32 filter_broad_en:1; /* bit 0 */
971 u32 filter_multi_en:1; /* bit 1 */
972 u32 filter_uni_en:1; /* bit 2 */
973 u32 filter_frag_en:1; /* bit 3 */
974 u32 unused1:12; /* bits 4-15 */
975 u32 min_pkt_size:7; /* bits 16-22 */
976 u32 unused2:9; /* bits 23-31 */
979 } RXMAC_PF_CTRL_t, *PRXMAC_PF_CTRL_t;
982 * structure for Memory Controller Interface Control Max Segment reg in rxmac
983 * address map. Located at address 0x4088
985 typedef union _RXMAC_MCIF_CTRL_MAX_SEG_t {
988 #ifdef _BIT_FIELDS_HTOL
989 u32 reserved:22; /* bits 10-31 */
990 u32 max_size:8; /* bits 2-9 */
991 u32 fc_en:1; /* bit 1 */
992 u32 seg_en:1; /* bit 0 */
994 u32 seg_en:1; /* bit 0 */
995 u32 fc_en:1; /* bit 1 */
996 u32 max_size:8; /* bits 2-9 */
997 u32 reserved:22; /* bits 10-31 */
1000 } RXMAC_MCIF_CTRL_MAX_SEG_t, *PRXMAC_MCIF_CTRL_MAX_SEG_t;
1003 * structure for Memory Controller Interface Water Mark reg in rxmac address
1004 * map. Located at address 0x408C
1006 typedef union _RXMAC_MCIF_WATER_MARK_t {
1009 #ifdef _BIT_FIELDS_HTOL
1010 u32 reserved2:6; /* bits 26-31 */
1011 u32 mark_hi:10; /* bits 16-25 */
1012 u32 reserved1:6; /* bits 10-15 */
1013 u32 mark_lo:10; /* bits 0-9 */
1015 u32 mark_lo:10; /* bits 0-9 */
1016 u32 reserved1:6; /* bits 10-15 */
1017 u32 mark_hi:10; /* bits 16-25 */
1018 u32 reserved2:6; /* bits 26-31 */
1021 } RXMAC_MCIF_WATER_MARK_t, *PRXMAC_MCIF_WATER_MARK_t;
1024 * structure for Rx Queue Dialog reg in rxmac address map.
1025 * located at address 0x4090
1027 typedef union _RXMAC_RXQ_DIAG_t {
1030 #ifdef _BIT_FIELDS_HTOL
1031 u32 reserved2:6; /* bits 26-31 */
1032 u32 rd_ptr:10; /* bits 16-25 */
1033 u32 reserved1:6; /* bits 10-15 */
1034 u32 wr_ptr:10; /* bits 0-9 */
1036 u32 wr_ptr:10; /* bits 0-9 */
1037 u32 reserved1:6; /* bits 10-15 */
1038 u32 rd_ptr:10; /* bits 16-25 */
1039 u32 reserved2:6; /* bits 26-31 */
1042 } RXMAC_RXQ_DIAG_t, *PRXMAC_RXQ_DIAG_t;
1045 * structure for space availiable reg in rxmac address map.
1046 * located at address 0x4094
1048 typedef union _RXMAC_SPACE_AVAIL_t {
1051 #ifdef _BIT_FIELDS_HTOL
1052 u32 reserved2:15; /* bits 17-31 */
1053 u32 space_avail_en:1; /* bit 16 */
1054 u32 reserved1:6; /* bits 10-15 */
1055 u32 space_avail:10; /* bits 0-9 */
1057 u32 space_avail:10; /* bits 0-9 */
1058 u32 reserved1:6; /* bits 10-15 */
1059 u32 space_avail_en:1; /* bit 16 */
1060 u32 reserved2:15; /* bits 17-31 */
1063 } RXMAC_SPACE_AVAIL_t, *PRXMAC_SPACE_AVAIL_t;
1066 * structure for management interface reg in rxmac address map.
1067 * located at address 0x4098
1069 typedef union _RXMAC_MIF_CTL_t {
1072 #ifdef _BIT_FIELDS_HTOL
1073 u32 reserve:14; /* bits 18-31 */
1074 u32 drop_pkt_en:1; /* bit 17 */
1075 u32 drop_pkt_mask:17; /* bits 0-16 */
1077 u32 drop_pkt_mask:17; /* bits 0-16 */
1078 u32 drop_pkt_en:1; /* bit 17 */
1079 u32 reserve:14; /* bits 18-31 */
1082 } RXMAC_MIF_CTL_t, *PRXMAC_MIF_CTL_t;
1085 * structure for Error reg in rxmac address map.
1086 * located at address 0x409C
1088 typedef union _RXMAC_ERROR_REG_t {
1091 #ifdef _BIT_FIELDS_HTOL
1092 u32 reserve:28; /* bits 4-31 */
1093 u32 mif:1; /* bit 3 */
1094 u32 async:1; /* bit 2 */
1095 u32 pkt_filter:1; /* bit 1 */
1096 u32 mcif:1; /* bit 0 */
1098 u32 mcif:1; /* bit 0 */
1099 u32 pkt_filter:1; /* bit 1 */
1100 u32 async:1; /* bit 2 */
1101 u32 mif:1; /* bit 3 */
1102 u32 reserve:28; /* bits 4-31 */
1105 } RXMAC_ERROR_REG_t, *PRXMAC_ERROR_REG_t;
1108 * Rx MAC Module of JAGCore Address Mapping
1110 typedef struct _RXMAC_t { /* Location: */
1111 RXMAC_CTRL_t ctrl; /* 0x4000 */
1112 RXMAC_WOL_CTL_CRC0_t crc0; /* 0x4004 */
1113 RXMAC_WOL_CRC12_t crc12; /* 0x4008 */
1114 RXMAC_WOL_CRC34_t crc34; /* 0x400C */
1115 RXMAC_WOL_SA_LO_t sa_lo; /* 0x4010 */
1116 RXMAC_WOL_SA_HI_t sa_hi; /* 0x4014 */
1117 u32 mask0_word0; /* 0x4018 */
1118 u32 mask0_word1; /* 0x401C */
1119 u32 mask0_word2; /* 0x4020 */
1120 u32 mask0_word3; /* 0x4024 */
1121 u32 mask1_word0; /* 0x4028 */
1122 u32 mask1_word1; /* 0x402C */
1123 u32 mask1_word2; /* 0x4030 */
1124 u32 mask1_word3; /* 0x4034 */
1125 u32 mask2_word0; /* 0x4038 */
1126 u32 mask2_word1; /* 0x403C */
1127 u32 mask2_word2; /* 0x4040 */
1128 u32 mask2_word3; /* 0x4044 */
1129 u32 mask3_word0; /* 0x4048 */
1130 u32 mask3_word1; /* 0x404C */
1131 u32 mask3_word2; /* 0x4050 */
1132 u32 mask3_word3; /* 0x4054 */
1133 u32 mask4_word0; /* 0x4058 */
1134 u32 mask4_word1; /* 0x405C */
1135 u32 mask4_word2; /* 0x4060 */
1136 u32 mask4_word3; /* 0x4064 */
1137 RXMAC_UNI_PF_ADDR1_t uni_pf_addr1; /* 0x4068 */
1138 RXMAC_UNI_PF_ADDR2_t uni_pf_addr2; /* 0x406C */
1139 RXMAC_UNI_PF_ADDR3_t uni_pf_addr3; /* 0x4070 */
1140 u32 multi_hash1; /* 0x4074 */
1141 u32 multi_hash2; /* 0x4078 */
1142 u32 multi_hash3; /* 0x407C */
1143 u32 multi_hash4; /* 0x4080 */
1144 RXMAC_PF_CTRL_t pf_ctrl; /* 0x4084 */
1145 RXMAC_MCIF_CTRL_MAX_SEG_t mcif_ctrl_max_seg; /* 0x4088 */
1146 RXMAC_MCIF_WATER_MARK_t mcif_water_mark; /* 0x408C */
1147 RXMAC_RXQ_DIAG_t rxq_diag; /* 0x4090 */
1148 RXMAC_SPACE_AVAIL_t space_avail; /* 0x4094 */
1150 RXMAC_MIF_CTL_t mif_ctrl; /* 0x4098 */
1151 RXMAC_ERROR_REG_t err_reg; /* 0x409C */
1152 } RXMAC_t, *PRXMAC_t;
1154 /* END OF TXMAC REGISTER ADDRESS MAP */
1157 /* START OF MAC REGISTER ADDRESS MAP */
1160 * structure for configuration #1 reg in mac address map.
1161 * located at address 0x5000
1181 #define CFG1_LOOPBACK 0x00000100
1182 #define CFG1_RX_FLOW 0x00000020
1183 #define CFG1_TX_FLOW 0x00000010
1184 #define CFG1_RX_ENABLE 0x00000004
1185 #define CFG1_TX_ENABLE 0x00000001
1186 #define CFG1_WAIT 0x0000000A /* RX & TX syncd */
1189 * structure for configuration #2 reg in mac address map.
1190 * located at address 0x5004
1206 * structure for Interpacket gap reg in mac address map.
1207 * located at address 0x5008
1210 * 30-24: non B2B ipg 1
1212 * 22-16: non B2B ipg 2
1213 * 15-8: Min ifg enforce
1216 * structure for half duplex reg in mac address map.
1217 * located at address 0x500C
1219 * 23-20: Alt BEB trunc
1220 * 19: Alt BEB enable
1224 * 15-12: re-xmit max
1226 * 9-0: collision window
1230 * structure for Maximum Frame Length reg in mac address map.
1231 * located at address 0x5010: bits 0-15 hold the length.
1235 * structure for Reserve 1 reg in mac address map.
1236 * located at address 0x5014 - 0x5018
1237 * Defined earlier (u32)
1241 * structure for Test reg in mac address map.
1242 * located at address 0x501C
1243 * test: bits 0-2, rest unused
1247 * structure for MII Management Configuration reg in mac address map.
1248 * located at address 0x5020
1250 * 31: reset MII mgmt
1252 * 5: scan auto increment
1253 * 4: preamble supress
1255 * 2-0: mgmt clock reset
1259 * structure for MII Management Command reg in mac address map.
1260 * located at address 0x5024
1266 * structure for MII Management Address reg in mac address map.
1267 * located at address 0x5028
1274 #define MII_ADDR(phy,reg) ((phy) << 8 | (reg))
1277 * structure for MII Management Control reg in mac address map.
1278 * located at address 0x502C
1284 * structure for MII Management Status reg in mac address map.
1285 * located at address 0x5030
1291 * structure for MII Management Indicators reg in mac address map.
1292 * located at address 0x5034
1299 #define MGMT_BUSY 0x00000001 /* busy */
1300 #define MGMT_WAIT 0x00000005 /* busy | not valid */
1303 * structure for Interface Control reg in mac address map.
1304 * located at address 0x5038
1306 * 31: reset if module
1319 * 8: disable link fail
1322 * 0: enable jabber protection
1326 * structure for Interface Status reg in mac address map.
1327 * located at address 0x503C
1329 typedef union _MAC_IF_STAT_t {
1332 #ifdef _BIT_FIELDS_HTOL
1333 u32 reserved:22; /* bits 10-31 */
1334 u32 excess_defer:1; /* bit 9 */
1335 u32 clash:1; /* bit 8 */
1336 u32 phy_jabber:1; /* bit 7 */
1337 u32 phy_link_ok:1; /* bit 6 */
1338 u32 phy_full_duplex:1; /* bit 5 */
1339 u32 phy_speed:1; /* bit 4 */
1340 u32 pe100x_link_fail:1; /* bit 3 */
1341 u32 pe10t_loss_carrie:1; /* bit 2 */
1342 u32 pe10t_sqe_error:1; /* bit 1 */
1343 u32 pe10t_jabber:1; /* bit 0 */
1345 u32 pe10t_jabber:1; /* bit 0 */
1346 u32 pe10t_sqe_error:1; /* bit 1 */
1347 u32 pe10t_loss_carrie:1; /* bit 2 */
1348 u32 pe100x_link_fail:1; /* bit 3 */
1349 u32 phy_speed:1; /* bit 4 */
1350 u32 phy_full_duplex:1; /* bit 5 */
1351 u32 phy_link_ok:1; /* bit 6 */
1352 u32 phy_jabber:1; /* bit 7 */
1353 u32 clash:1; /* bit 8 */
1354 u32 excess_defer:1; /* bit 9 */
1355 u32 reserved:22; /* bits 10-31 */
1358 } MAC_IF_STAT_t, *PMAC_IF_STAT_t;
1361 * structure for Mac Station Address, Part 1 reg in mac address map.
1362 * located at address 0x5040
1364 typedef union _MAC_STATION_ADDR1_t {
1367 #ifdef _BIT_FIELDS_HTOL
1368 u32 Octet6:8; /* bits 24-31 */
1369 u32 Octet5:8; /* bits 16-23 */
1370 u32 Octet4:8; /* bits 8-15 */
1371 u32 Octet3:8; /* bits 0-7 */
1373 u32 Octet3:8; /* bits 0-7 */
1374 u32 Octet4:8; /* bits 8-15 */
1375 u32 Octet5:8; /* bits 16-23 */
1376 u32 Octet6:8; /* bits 24-31 */
1379 } MAC_STATION_ADDR1_t, *PMAC_STATION_ADDR1_t;
1382 * structure for Mac Station Address, Part 2 reg in mac address map.
1383 * located at address 0x5044
1385 typedef union _MAC_STATION_ADDR2_t {
1388 #ifdef _BIT_FIELDS_HTOL
1389 u32 Octet2:8; /* bits 24-31 */
1390 u32 Octet1:8; /* bits 16-23 */
1391 u32 reserved:16; /* bits 0-15 */
1393 u32 reserved:16; /* bit 0-15 */
1394 u32 Octet1:8; /* bits 16-23 */
1395 u32 Octet2:8; /* bits 24-31 */
1398 } MAC_STATION_ADDR2_t, *PMAC_STATION_ADDR2_t;
1401 * MAC Module of JAGCore Address Mapping
1403 typedef struct _MAC_t { /* Location: */
1404 u32 cfg1; /* 0x5000 */
1405 u32 cfg2; /* 0x5004 */
1406 u32 ipg; /* 0x5008 */
1407 u32 hfdp; /* 0x500C */
1408 u32 max_fm_len; /* 0x5010 */
1409 u32 rsv1; /* 0x5014 */
1410 u32 rsv2; /* 0x5018 */
1411 u32 mac_test; /* 0x501C */
1412 u32 mii_mgmt_cfg; /* 0x5020 */
1413 u32 mii_mgmt_cmd; /* 0x5024 */
1414 u32 mii_mgmt_addr; /* 0x5028 */
1415 u32 mii_mgmt_ctrl; /* 0x502C */
1416 u32 mii_mgmt_stat; /* 0x5030 */
1417 u32 mii_mgmt_indicator; /* 0x5034 */
1418 u32 if_ctrl; /* 0x5038 */
1419 MAC_IF_STAT_t if_stat; /* 0x503C */
1420 MAC_STATION_ADDR1_t station_addr_1; /* 0x5040 */
1421 MAC_STATION_ADDR2_t station_addr_2; /* 0x5044 */
1424 /* END OF MAC REGISTER ADDRESS MAP */
1426 /* START OF MAC STAT REGISTER ADDRESS MAP */
1429 * structure for Carry Register One and it's Mask Register reg located in mac
1430 * stat address map address 0x6130 and 0x6138.
1460 * structure for Carry Register Two Mask Register reg in mac stat address map.
1461 * located at address 0x613C
1487 * MAC STATS Module of JAGCore Address Mapping
1489 typedef struct _MAC_STAT_t { /* Location: */
1490 u32 pad[32]; /* 0x6000 - 607C */
1492 /* Tx/Rx 0-64 Byte Frame Counter */
1493 u32 TR64; /* 0x6080 */
1495 /* Tx/Rx 65-127 Byte Frame Counter */
1496 u32 TR127; /* 0x6084 */
1498 /* Tx/Rx 128-255 Byte Frame Counter */
1499 u32 TR255; /* 0x6088 */
1501 /* Tx/Rx 256-511 Byte Frame Counter */
1502 u32 TR511; /* 0x608C */
1504 /* Tx/Rx 512-1023 Byte Frame Counter */
1505 u32 TR1K; /* 0x6090 */
1507 /* Tx/Rx 1024-1518 Byte Frame Counter */
1508 u32 TRMax; /* 0x6094 */
1510 /* Tx/Rx 1519-1522 Byte Good VLAN Frame Count */
1511 u32 TRMgv; /* 0x6098 */
1513 /* Rx Byte Counter */
1514 u32 RByt; /* 0x609C */
1516 /* Rx Packet Counter */
1517 u32 RPkt; /* 0x60A0 */
1519 /* Rx FCS Error Counter */
1520 u32 RFcs; /* 0x60A4 */
1522 /* Rx Multicast Packet Counter */
1523 u32 RMca; /* 0x60A8 */
1525 /* Rx Broadcast Packet Counter */
1526 u32 RBca; /* 0x60AC */
1528 /* Rx Control Frame Packet Counter */
1529 u32 RxCf; /* 0x60B0 */
1531 /* Rx Pause Frame Packet Counter */
1532 u32 RxPf; /* 0x60B4 */
1534 /* Rx Unknown OP Code Counter */
1535 u32 RxUo; /* 0x60B8 */
1537 /* Rx Alignment Error Counter */
1538 u32 RAln; /* 0x60BC */
1540 /* Rx Frame Length Error Counter */
1541 u32 RFlr; /* 0x60C0 */
1543 /* Rx Code Error Counter */
1544 u32 RCde; /* 0x60C4 */
1546 /* Rx Carrier Sense Error Counter */
1547 u32 RCse; /* 0x60C8 */
1549 /* Rx Undersize Packet Counter */
1550 u32 RUnd; /* 0x60CC */
1552 /* Rx Oversize Packet Counter */
1553 u32 ROvr; /* 0x60D0 */
1555 /* Rx Fragment Counter */
1556 u32 RFrg; /* 0x60D4 */
1558 /* Rx Jabber Counter */
1559 u32 RJbr; /* 0x60D8 */
1562 u32 RDrp; /* 0x60DC */
1564 /* Tx Byte Counter */
1565 u32 TByt; /* 0x60E0 */
1567 /* Tx Packet Counter */
1568 u32 TPkt; /* 0x60E4 */
1570 /* Tx Multicast Packet Counter */
1571 u32 TMca; /* 0x60E8 */
1573 /* Tx Broadcast Packet Counter */
1574 u32 TBca; /* 0x60EC */
1576 /* Tx Pause Control Frame Counter */
1577 u32 TxPf; /* 0x60F0 */
1579 /* Tx Deferral Packet Counter */
1580 u32 TDfr; /* 0x60F4 */
1582 /* Tx Excessive Deferral Packet Counter */
1583 u32 TEdf; /* 0x60F8 */
1585 /* Tx Single Collision Packet Counter */
1586 u32 TScl; /* 0x60FC */
1588 /* Tx Multiple Collision Packet Counter */
1589 u32 TMcl; /* 0x6100 */
1591 /* Tx Late Collision Packet Counter */
1592 u32 TLcl; /* 0x6104 */
1594 /* Tx Excessive Collision Packet Counter */
1595 u32 TXcl; /* 0x6108 */
1597 /* Tx Total Collision Packet Counter */
1598 u32 TNcl; /* 0x610C */
1600 /* Tx Pause Frame Honored Counter */
1601 u32 TPfh; /* 0x6110 */
1603 /* Tx Drop Frame Counter */
1604 u32 TDrp; /* 0x6114 */
1606 /* Tx Jabber Frame Counter */
1607 u32 TJbr; /* 0x6118 */
1609 /* Tx FCS Error Counter */
1610 u32 TFcs; /* 0x611C */
1612 /* Tx Control Frame Counter */
1613 u32 TxCf; /* 0x6120 */
1615 /* Tx Oversize Frame Counter */
1616 u32 TOvr; /* 0x6124 */
1618 /* Tx Undersize Frame Counter */
1619 u32 TUnd; /* 0x6128 */
1621 /* Tx Fragments Frame Counter */
1622 u32 TFrg; /* 0x612C */
1624 /* Carry Register One Register */
1625 u32 Carry1; /* 0x6130 */
1627 /* Carry Register Two Register */
1628 u32 Carry2; /* 0x6134 */
1630 /* Carry Register One Mask Register */
1631 u32 Carry1M; /* 0x6138 */
1633 /* Carry Register Two Mask Register */
1634 u32 Carry2M; /* 0x613C */
1635 } MAC_STAT_t, *PMAC_STAT_t;
1637 /* END OF MAC STAT REGISTER ADDRESS MAP */
1640 /* START OF MMC REGISTER ADDRESS MAP */
1643 * Main Memory Controller Control reg in mmc address map.
1644 * located at address 0x7000
1647 #define ET_MMC_ENABLE 1
1648 #define ET_MMC_ARB_DISABLE 2
1649 #define ET_MMC_RXMAC_DISABLE 4
1650 #define ET_MMC_TXMAC_DISABLE 8
1651 #define ET_MMC_TXDMA_DISABLE 16
1652 #define ET_MMC_RXDMA_DISABLE 32
1653 #define ET_MMC_FORCE_CE 64
1656 * Main Memory Controller Host Memory Access Address reg in mmc
1657 * address map. Located at address 0x7004. Top 16 bits hold the address bits
1660 #define ET_SRAM_REQ_ACCESS 1
1661 #define ET_SRAM_WR_ACCESS 2
1662 #define ET_SRAM_IS_CTRL 4
1665 * structure for Main Memory Controller Host Memory Access Data reg in mmc
1666 * address map. Located at address 0x7008 - 0x7014
1667 * Defined earlier (u32)
1671 * Memory Control Module of JAGCore Address Mapping
1673 typedef struct _MMC_t { /* Location: */
1674 u32 mmc_ctrl; /* 0x7000 */
1675 u32 sram_access; /* 0x7004 */
1676 u32 sram_word1; /* 0x7008 */
1677 u32 sram_word2; /* 0x700C */
1678 u32 sram_word3; /* 0x7010 */
1679 u32 sram_word4; /* 0x7014 */
1682 /* END OF MMC REGISTER ADDRESS MAP */
1685 /* START OF EXP ROM REGISTER ADDRESS MAP */
1688 * Expansion ROM Module of JAGCore Address Mapping
1691 /* Take this out until it is not empty */
1693 typedef struct _EXP_ROM_t {
1695 } EXP_ROM_t, *PEXP_ROM_t;
1698 /* END OF EXP ROM REGISTER ADDRESS MAP */
1702 * JAGCore Address Mapping
1704 typedef struct _ADDRESS_MAP_t {
1706 /* unused section of global address map */
1707 u8 unused_global[4096 - sizeof(GLOBAL_t)];
1709 /* unused section of txdma address map */
1710 u8 unused_txdma[4096 - sizeof(TXDMA_t)];
1712 /* unused section of rxdma address map */
1713 u8 unused_rxdma[4096 - sizeof(RXDMA_t)];
1715 /* unused section of txmac address map */
1716 u8 unused_txmac[4096 - sizeof(TXMAC_t)];
1718 /* unused section of rxmac address map */
1719 u8 unused_rxmac[4096 - sizeof(RXMAC_t)];
1721 /* unused section of mac address map */
1722 u8 unused_mac[4096 - sizeof(MAC_t)];
1724 /* unused section of mac stat address map */
1725 u8 unused_mac_stat[4096 - sizeof(MAC_STAT_t)];
1727 /* unused section of mmc address map */
1728 u8 unused_mmc[4096 - sizeof(MMC_t)];
1729 /* unused section of address map */
1730 u8 unused_[1015808];
1732 /* Take this out until it is not empty */
1737 u8 unused_exp_rom[4096]; /* MGS-size TBD */
1738 u8 unused__[524288]; /* unused section of address map */
1739 } ADDRESS_MAP_t, *PADDRESS_MAP_t;
1741 #endif /* _ET1310_ADDRESS_MAP_H_ */