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 * structure for Loopback reg in global address map
143 * located at address 0x0034
145 typedef union _LOOPBACK_t {
148 #ifdef _BIT_FIELDS_HTOL
149 u32 unused:30; /* bits 2-31 */
150 u32 dma_loopback:1; /* bit 1 */
151 u32 mac_loopback:1; /* bit 0 */
153 u32 mac_loopback:1; /* bit 0 */
154 u32 dma_loopback:1; /* bit 1 */
155 u32 unused:30; /* bits 2-31 */
158 } LOOPBACK_t, *PLOOPBACK_t;
161 * GLOBAL Module of JAGCore Address Mapping
162 * Located at address 0x0000
164 typedef struct _GLOBAL_t { /* Location: */
165 u32 txq_start_addr; /* 0x0000 */
166 u32 txq_end_addr; /* 0x0004 */
167 u32 rxq_start_addr; /* 0x0008 */
168 u32 rxq_end_addr; /* 0x000C */
169 u32 pm_csr; /* 0x0010 */
170 u32 unused; /* 0x0014 */
171 u32 int_status; /* 0x0018 */
172 u32 int_mask; /* 0x001C */
173 u32 int_alias_clr_en; /* 0x0020 */
174 u32 int_status_alias; /* 0x0024 */
175 u32 sw_reset; /* 0x0028 */
176 u32 slv_timer; /* 0x002C */
177 u32 msi_config; /* 0x0030 */
178 LOOPBACK_t loopback; /* 0x0034 */
179 u32 watchdog_timer; /* 0x0038 */
180 } GLOBAL_t, *PGLOBAL_t;
182 /* END OF GLOBAL REGISTER ADDRESS MAP */
185 /* START OF TXDMA REGISTER ADDRESS MAP */
188 * structure for txdma control status reg in txdma address map
189 * located at address 0x1000
191 typedef union _TXDMA_CSR_t {
194 #ifdef _BIT_FIELDS_HTOL
195 u32 unused2:19; /* bits 13-31 */
196 u32 traffic_class:4; /* bits 9-12 */
197 u32 sngl_epkt_mode:1; /* bit 8 */
198 u32 cache_thrshld:4; /* bits 4-7 */
199 u32 unused1:2; /* bits 2-3 */
200 u32 drop_TLP_disable:1; /* bit 1 */
201 u32 halt:1; /* bit 0 */
203 u32 halt:1; /* bit 0 */
204 u32 drop_TLP_disable:1; /* bit 1 */
205 u32 unused1:2; /* bits 2-3 */
206 u32 cache_thrshld:4; /* bits 4-7 */
207 u32 sngl_epkt_mode:1; /* bit 8 */
208 u32 traffic_class:4; /* bits 9-12 */
209 u32 unused2:19; /* bits 13-31 */
212 } TXDMA_CSR_t, *PTXDMA_CSR_t;
215 * structure for txdma packet ring base address hi reg in txdma address map
216 * located at address 0x1004
217 * Defined earlier (u32)
221 * structure for txdma packet ring base address low reg in txdma address map
222 * located at address 0x1008
223 * Defined earlier (u32)
227 * structure for txdma packet ring number of descriptor reg in txdma address
228 * map. Located at address 0x100C
230 typedef union _TXDMA_PR_NUM_DES_t {
233 #ifdef _BIT_FIELDS_HTOL
234 u32 unused:22; /* bits 10-31 */
235 u32 pr_ndes:10; /* bits 0-9 */
237 u32 pr_ndes:10; /* bits 0-9 */
238 u32 unused:22; /* bits 10-31 */
241 } TXDMA_PR_NUM_DES_t, *PTXDMA_PR_NUM_DES_t;
244 #define ET_DMA10_MASK 0x3FF /* 10 bit mask for DMA10W types */
245 #define ET_DMA10_WRAP 0x400
246 #define ET_DMA4_MASK 0x00F /* 4 bit mask for DMA4W types */
247 #define ET_DMA4_WRAP 0x010
249 #define INDEX10(x) ((x) & ET_DMA10_MASK)
250 #define INDEX4(x) ((x) & ET_DMA4_MASK)
252 extern inline void add_10bit(u32 *v, int n)
254 *v = INDEX10(*v + n);
258 * 10bit DMA with wrap
259 * txdma tx queue write address reg in txdma address map at 0x1010
260 * txdma tx queue write address external reg in txdma address map at 0x1014
261 * txdma tx queue read address reg in txdma address map at 0x1018
264 * txdma status writeback address hi reg in txdma address map at0x101C
265 * txdma status writeback address lo reg in txdma address map at 0x1020
267 * 10bit DMA with wrap
268 * txdma service request reg in txdma address map at 0x1024
269 * structure for txdma service complete reg in txdma address map at 0x1028
272 * txdma tx descriptor cache read index reg in txdma address map at 0x102C
273 * txdma tx descriptor cache write index reg in txdma address map at 0x1030
275 * txdma error reg in txdma address map at address 0x1034
278 typedef union _TXDMA_ERROR_t {
281 #ifdef _BIT_FIELDS_HTOL
282 u32 unused3:22; /* bits 10-31 */
283 u32 WrbkRewind:1; /* bit 9 */
284 u32 WrbkResend:1; /* bit 8 */
285 u32 unused2:2; /* bits 6-7 */
286 u32 DescrRewind:1; /* bit 5 */
287 u32 DescrResend:1; /* bit 4 */
288 u32 unused1:2; /* bits 2-3 */
289 u32 PyldRewind:1; /* bit 1 */
290 u32 PyldResend:1; /* bit 0 */
292 u32 PyldResend:1; /* bit 0 */
293 u32 PyldRewind:1; /* bit 1 */
294 u32 unused1:2; /* bits 2-3 */
295 u32 DescrResend:1; /* bit 4 */
296 u32 DescrRewind:1; /* bit 5 */
297 u32 unused2:2; /* bits 6-7 */
298 u32 WrbkResend:1; /* bit 8 */
299 u32 WrbkRewind:1; /* bit 9 */
300 u32 unused3:22; /* bits 10-31 */
303 } TXDMA_ERROR_t, *PTXDMA_ERROR_t;
306 * Tx DMA Module of JAGCore Address Mapping
307 * Located at address 0x1000
309 typedef struct _TXDMA_t { /* Location: */
310 TXDMA_CSR_t csr; /* 0x1000 */
311 u32 pr_base_hi; /* 0x1004 */
312 u32 pr_base_lo; /* 0x1008 */
313 TXDMA_PR_NUM_DES_t pr_num_des; /* 0x100C */
314 u32 txq_wr_addr; /* 0x1010 */
315 u32 txq_wr_addr_ext; /* 0x1014 */
316 u32 txq_rd_addr; /* 0x1018 */
317 u32 dma_wb_base_hi; /* 0x101C */
318 u32 dma_wb_base_lo; /* 0x1020 */
319 u32 service_request; /* 0x1024 */
320 u32 service_complete; /* 0x1028 */
321 u32 cache_rd_index; /* 0x102C */
322 u32 cache_wr_index; /* 0x1030 */
323 TXDMA_ERROR_t TxDmaError; /* 0x1034 */
324 u32 DescAbortCount; /* 0x1038 */
325 u32 PayloadAbortCnt; /* 0x103c */
326 u32 WriteBackAbortCnt; /* 0x1040 */
327 u32 DescTimeoutCnt; /* 0x1044 */
328 u32 PayloadTimeoutCnt; /* 0x1048 */
329 u32 WriteBackTimeoutCnt; /* 0x104c */
330 u32 DescErrorCount; /* 0x1050 */
331 u32 PayloadErrorCnt; /* 0x1054 */
332 u32 WriteBackErrorCnt; /* 0x1058 */
333 u32 DroppedTLPCount; /* 0x105c */
334 u32 NewServiceComplete; /* 0x1060 */
335 u32 EthernetPacketCount; /* 0x1064 */
336 } TXDMA_t, *PTXDMA_t;
338 /* END OF TXDMA REGISTER ADDRESS MAP */
341 /* START OF RXDMA REGISTER ADDRESS MAP */
344 * structure for control status reg in rxdma address map
345 * Located at address 0x2000
347 typedef union _RXDMA_CSR_t {
350 #ifdef _BIT_FIELDS_HTOL
351 u32 unused2:14; /* bits 18-31 */
352 u32 halt_status:1; /* bit 17 */
353 u32 pkt_done_flush:1; /* bit 16 */
354 u32 pkt_drop_disable:1; /* bit 15 */
355 u32 unused1:1; /* bit 14 */
356 u32 fbr1_enable:1; /* bit 13 */
357 u32 fbr1_size:2; /* bits 11-12 */
358 u32 fbr0_enable:1; /* bit 10 */
359 u32 fbr0_size:2; /* bits 8-9 */
360 u32 dma_big_endian:1; /* bit 7 */
361 u32 pkt_big_endian:1; /* bit 6 */
362 u32 psr_big_endian:1; /* bit 5 */
363 u32 fbr_big_endian:1; /* bit 4 */
364 u32 tc:3; /* bits 1-3 */
365 u32 halt:1; /* bit 0 */
367 u32 halt:1; /* bit 0 */
368 u32 tc:3; /* bits 1-3 */
369 u32 fbr_big_endian:1; /* bit 4 */
370 u32 psr_big_endian:1; /* bit 5 */
371 u32 pkt_big_endian:1; /* bit 6 */
372 u32 dma_big_endian:1; /* bit 7 */
373 u32 fbr0_size:2; /* bits 8-9 */
374 u32 fbr0_enable:1; /* bit 10 */
375 u32 fbr1_size:2; /* bits 11-12 */
376 u32 fbr1_enable:1; /* bit 13 */
377 u32 unused1:1; /* bit 14 */
378 u32 pkt_drop_disable:1; /* bit 15 */
379 u32 pkt_done_flush:1; /* bit 16 */
380 u32 halt_status:1; /* bit 17 */
381 u32 unused2:14; /* bits 18-31 */
384 } RXDMA_CSR_t, *PRXDMA_CSR_t;
387 * structure for dma writeback lo reg in rxdma address map
388 * located at address 0x2004
389 * Defined earlier (u32)
393 * structure for dma writeback hi reg in rxdma address map
394 * located at address 0x2008
395 * Defined earlier (u32)
399 * structure for number of packets done reg in rxdma address map
400 * located at address 0x200C
402 typedef union _RXDMA_NUM_PKT_DONE_t {
405 #ifdef _BIT_FIELDS_HTOL
406 u32 unused:24; /* bits 8-31 */
407 u32 num_done:8; /* bits 0-7 */
409 u32 num_done:8; /* bits 0-7 */
410 u32 unused:24; /* bits 8-31 */
413 } RXDMA_NUM_PKT_DONE_t, *PRXDMA_NUM_PKT_DONE_t;
416 * structure for max packet time reg in rxdma address map
417 * located at address 0x2010
419 typedef union _RXDMA_MAX_PKT_TIME_t {
422 #ifdef _BIT_FIELDS_HTOL
423 u32 unused:14; /* bits 18-31 */
424 u32 time_done:18; /* bits 0-17 */
426 u32 time_done:18; /* bits 0-17 */
427 u32 unused:14; /* bits 18-31 */
430 } RXDMA_MAX_PKT_TIME_t, *PRXDMA_MAX_PKT_TIME_t;
433 * structure for rx queue read address reg in rxdma address map
434 * located at address 0x2014
435 * Defined earlier (u32)
439 * structure for rx queue read address external reg in rxdma address map
440 * located at address 0x2018
441 * Defined earlier (u32)
445 * structure for rx queue write address reg in rxdma address map
446 * located at address 0x201C
447 * Defined earlier (u32)
451 * structure for packet status ring base address lo reg in rxdma address map
452 * located at address 0x2020
453 * Defined earlier (u32)
457 * structure for packet status ring base address hi reg in rxdma address map
458 * located at address 0x2024
459 * Defined earlier (u32)
463 * structure for packet status ring number of descriptors reg in rxdma address
464 * map. Located at address 0x2028
466 typedef union _RXDMA_PSR_NUM_DES_t {
469 #ifdef _BIT_FIELDS_HTOL
470 u32 unused:20; /* bits 12-31 */
471 u32 psr_ndes:12; /* bit 0-11 */
473 u32 psr_ndes:12; /* bit 0-11 */
474 u32 unused:20; /* bits 12-31 */
477 } RXDMA_PSR_NUM_DES_t, *PRXDMA_PSR_NUM_DES_t;
480 * structure for packet status ring available offset reg in rxdma address map
481 * located at address 0x202C
483 typedef union _RXDMA_PSR_AVAIL_OFFSET_t {
486 #ifdef _BIT_FIELDS_HTOL
487 u32 unused:19; /* bits 13-31 */
488 u32 psr_avail_wrap:1; /* bit 12 */
489 u32 psr_avail:12; /* bit 0-11 */
491 u32 psr_avail:12; /* bit 0-11 */
492 u32 psr_avail_wrap:1; /* bit 12 */
493 u32 unused:19; /* bits 13-31 */
496 } RXDMA_PSR_AVAIL_OFFSET_t, *PRXDMA_PSR_AVAIL_OFFSET_t;
499 * structure for packet status ring full offset reg in rxdma address map
500 * located at address 0x2030
502 typedef union _RXDMA_PSR_FULL_OFFSET_t {
505 #ifdef _BIT_FIELDS_HTOL
506 u32 unused:19; /* bits 13-31 */
507 u32 psr_full_wrap:1; /* bit 12 */
508 u32 psr_full:12; /* bit 0-11 */
510 u32 psr_full:12; /* bit 0-11 */
511 u32 psr_full_wrap:1; /* bit 12 */
512 u32 unused:19; /* bits 13-31 */
515 } RXDMA_PSR_FULL_OFFSET_t, *PRXDMA_PSR_FULL_OFFSET_t;
518 * structure for packet status ring access index reg in rxdma address map
519 * located at address 0x2034
521 typedef union _RXDMA_PSR_ACCESS_INDEX_t {
524 #ifdef _BIT_FIELDS_HTOL
525 u32 unused:27; /* bits 5-31 */
526 u32 psr_ai:5; /* bits 0-4 */
528 u32 psr_ai:5; /* bits 0-4 */
529 u32 unused:27; /* bits 5-31 */
532 } RXDMA_PSR_ACCESS_INDEX_t, *PRXDMA_PSR_ACCESS_INDEX_t;
535 * structure for packet status ring minimum descriptors reg in rxdma address
536 * map. Located at address 0x2038
538 typedef union _RXDMA_PSR_MIN_DES_t {
541 #ifdef _BIT_FIELDS_HTOL
542 u32 unused:20; /* bits 12-31 */
543 u32 psr_min:12; /* bits 0-11 */
545 u32 psr_min:12; /* bits 0-11 */
546 u32 unused:20; /* bits 12-31 */
549 } RXDMA_PSR_MIN_DES_t, *PRXDMA_PSR_MIN_DES_t;
552 * structure for free buffer ring base lo address reg in rxdma address map
553 * located at address 0x203C
554 * Defined earlier (u32)
558 * structure for free buffer ring base hi address reg in rxdma address map
559 * located at address 0x2040
560 * Defined earlier (u32)
564 * structure for free buffer ring number of descriptors reg in rxdma address
565 * map. Located at address 0x2044
567 typedef union _RXDMA_FBR_NUM_DES_t {
570 #ifdef _BIT_FIELDS_HTOL
571 u32 unused:22; /* bits 10-31 */
572 u32 fbr_ndesc:10; /* bits 0-9 */
574 u32 fbr_ndesc:10; /* bits 0-9 */
575 u32 unused:22; /* bits 10-31 */
578 } RXDMA_FBR_NUM_DES_t, *PRXDMA_FBR_NUM_DES_t;
581 * structure for free buffer ring 0 available offset reg in rxdma address map
582 * located at address 0x2048
583 * Defined earlier (u32)
587 * structure for free buffer ring 0 full offset reg in rxdma address map
588 * located at address 0x204C
589 * Defined earlier (u32)
593 * structure for free buffer cache 0 full offset reg in rxdma address map
594 * located at address 0x2050
596 typedef union _RXDMA_FBC_RD_INDEX_t {
599 #ifdef _BIT_FIELDS_HTOL
600 u32 unused:27; /* bits 5-31 */
601 u32 fbc_rdi:5; /* bit 0-4 */
603 u32 fbc_rdi:5; /* bit 0-4 */
604 u32 unused:27; /* bits 5-31 */
607 } RXDMA_FBC_RD_INDEX_t, *PRXDMA_FBC_RD_INDEX_t;
610 * structure for free buffer ring 0 minimum descriptor reg in rxdma address map
611 * located at address 0x2054
613 typedef union _RXDMA_FBR_MIN_DES_t {
616 #ifdef _BIT_FIELDS_HTOL
617 u32 unused:22; /* bits 10-31 */
618 u32 fbr_min:10; /* bits 0-9 */
620 u32 fbr_min:10; /* bits 0-9 */
621 u32 unused:22; /* bits 10-31 */
624 } RXDMA_FBR_MIN_DES_t, *PRXDMA_FBR_MIN_DES_t;
627 * structure for free buffer ring 1 base address lo reg in rxdma address map
628 * located at address 0x2058 - 0x205C
629 * Defined earlier (RXDMA_FBR_BASE_LO_t and RXDMA_FBR_BASE_HI_t)
633 * structure for free buffer ring 1 number of descriptors reg in rxdma address
634 * map. Located at address 0x2060
635 * Defined earlier (RXDMA_FBR_NUM_DES_t)
639 * structure for free buffer ring 1 available offset reg in rxdma address map
640 * located at address 0x2064
641 * Defined Earlier (RXDMA_FBR_AVAIL_OFFSET_t)
645 * structure for free buffer ring 1 full offset reg in rxdma address map
646 * located at address 0x2068
647 * Defined Earlier (RXDMA_FBR_FULL_OFFSET_t)
651 * structure for free buffer cache 1 read index reg in rxdma address map
652 * located at address 0x206C
653 * Defined Earlier (RXDMA_FBC_RD_INDEX_t)
657 * structure for free buffer ring 1 minimum descriptor reg in rxdma address map
658 * located at address 0x2070
659 * Defined Earlier (RXDMA_FBR_MIN_DES_t)
663 * Rx DMA Module of JAGCore Address Mapping
664 * Located at address 0x2000
666 typedef struct _RXDMA_t { /* Location: */
667 RXDMA_CSR_t csr; /* 0x2000 */
668 u32 dma_wb_base_lo; /* 0x2004 */
669 u32 dma_wb_base_hi; /* 0x2008 */
670 RXDMA_NUM_PKT_DONE_t num_pkt_done; /* 0x200C */
671 RXDMA_MAX_PKT_TIME_t max_pkt_time; /* 0x2010 */
672 u32 rxq_rd_addr; /* 0x2014 */
673 u32 rxq_rd_addr_ext; /* 0x2018 */
674 u32 rxq_wr_addr; /* 0x201C */
675 u32 psr_base_lo; /* 0x2020 */
676 u32 psr_base_hi; /* 0x2024 */
677 RXDMA_PSR_NUM_DES_t psr_num_des; /* 0x2028 */
678 RXDMA_PSR_AVAIL_OFFSET_t psr_avail_offset; /* 0x202C */
679 RXDMA_PSR_FULL_OFFSET_t psr_full_offset; /* 0x2030 */
680 RXDMA_PSR_ACCESS_INDEX_t psr_access_index; /* 0x2034 */
681 RXDMA_PSR_MIN_DES_t psr_min_des; /* 0x2038 */
682 u32 fbr0_base_lo; /* 0x203C */
683 u32 fbr0_base_hi; /* 0x2040 */
684 RXDMA_FBR_NUM_DES_t fbr0_num_des; /* 0x2044 */
685 u32 fbr0_avail_offset; /* 0x2048 */
686 u32 fbr0_full_offset; /* 0x204C */
687 RXDMA_FBC_RD_INDEX_t fbr0_rd_index; /* 0x2050 */
688 RXDMA_FBR_MIN_DES_t fbr0_min_des; /* 0x2054 */
689 u32 fbr1_base_lo; /* 0x2058 */
690 u32 fbr1_base_hi; /* 0x205C */
691 RXDMA_FBR_NUM_DES_t fbr1_num_des; /* 0x2060 */
692 u32 fbr1_avail_offset; /* 0x2064 */
693 u32 fbr1_full_offset; /* 0x2068 */
694 RXDMA_FBC_RD_INDEX_t fbr1_rd_index; /* 0x206C */
695 RXDMA_FBR_MIN_DES_t fbr1_min_des; /* 0x2070 */
696 } RXDMA_t, *PRXDMA_t;
698 /* END OF RXDMA REGISTER ADDRESS MAP */
701 /* START OF TXMAC REGISTER ADDRESS MAP */
704 * structure for control reg in txmac address map
705 * located at address 0x3000
707 typedef union _TXMAC_CTL_t {
710 #ifdef _BIT_FIELDS_HTOL
711 u32 unused:24; /* bits 8-31 */
712 u32 cklseg_diable:1; /* bit 7 */
713 u32 ckbcnt_disable:1; /* bit 6 */
714 u32 cksegnum:1; /* bit 5 */
715 u32 async_disable:1; /* bit 4 */
716 u32 fc_disable:1; /* bit 3 */
717 u32 mcif_disable:1; /* bit 2 */
718 u32 mif_disable:1; /* bit 1 */
719 u32 txmac_en:1; /* bit 0 */
721 u32 txmac_en:1; /* bit 0 */
722 u32 mif_disable:1; /* bit 1 mac interface */
723 u32 mcif_disable:1; /* bit 2 mem. contr. interface */
724 u32 fc_disable:1; /* bit 3 */
725 u32 async_disable:1; /* bit 4 */
726 u32 cksegnum:1; /* bit 5 */
727 u32 ckbcnt_disable:1; /* bit 6 */
728 u32 cklseg_diable:1; /* bit 7 */
729 u32 unused:24; /* bits 8-31 */
732 } TXMAC_CTL_t, *PTXMAC_CTL_t;
735 * structure for shadow pointer reg in txmac address map
736 * located at address 0x3004
738 typedef union _TXMAC_SHADOW_PTR_t {
741 #ifdef _BIT_FIELDS_HTOL
742 u32 reserved2:5; /* bits 27-31 */
743 u32 txq_rd_ptr:11; /* bits 16-26 */
744 u32 reserved:5; /* bits 11-15 */
745 u32 txq_wr_ptr:11; /* bits 0-10 */
747 u32 txq_wr_ptr:11; /* bits 0-10 */
748 u32 reserved:5; /* bits 11-15 */
749 u32 txq_rd_ptr:11; /* bits 16-26 */
750 u32 reserved2:5; /* bits 27-31 */
753 } TXMAC_SHADOW_PTR_t, *PTXMAC_SHADOW_PTR_t;
756 * structure for error count reg in txmac address map
757 * located at address 0x3008
759 typedef union _TXMAC_ERR_CNT_t {
762 #ifdef _BIT_FIELDS_HTOL
763 u32 unused:20; /* bits 12-31 */
764 u32 reserved:4; /* bits 8-11 */
765 u32 txq_underrun:4; /* bits 4-7 */
766 u32 fifo_underrun:4; /* bits 0-3 */
768 u32 fifo_underrun:4; /* bits 0-3 */
769 u32 txq_underrun:4; /* bits 4-7 */
770 u32 reserved:4; /* bits 8-11 */
771 u32 unused:20; /* bits 12-31 */
774 } TXMAC_ERR_CNT_t, *PTXMAC_ERR_CNT_t;
777 * structure for max fill reg in txmac address map
778 * located at address 0x300C
780 typedef union _TXMAC_MAX_FILL_t {
783 #ifdef _BIT_FIELDS_HTOL
784 u32 unused:20; /* bits 12-31 */
785 u32 max_fill:12; /* bits 0-11 */
787 u32 max_fill:12; /* bits 0-11 */
788 u32 unused:20; /* bits 12-31 */
791 } TXMAC_MAX_FILL_t, *PTXMAC_MAX_FILL_t;
794 * structure for cf parameter reg in txmac address map
795 * located at address 0x3010
797 typedef union _TXMAC_CF_PARAM_t {
800 #ifdef _BIT_FIELDS_HTOL
801 u32 cfep:16; /* bits 16-31 */
802 u32 cfpt:16; /* bits 0-15 */
804 u32 cfpt:16; /* bits 0-15 */
805 u32 cfep:16; /* bits 16-31 */
808 } TXMAC_CF_PARAM_t, *PTXMAC_CF_PARAM_t;
811 * structure for tx test reg in txmac address map
812 * located at address 0x3014
814 typedef union _TXMAC_TXTEST_t {
817 #ifdef _BIT_FIELDS_HTOL
818 u32 unused2:15; /* bits 17-31 */
819 u32 reserved1:1; /* bit 16 */
820 u32 txtest_en:1; /* bit 15 */
821 u32 unused1:4; /* bits 11-14 */
822 u32 txqtest_ptr:11; /* bits 0-11 */
824 u32 txqtest_ptr:11; /* bits 0-10 */
825 u32 unused1:4; /* bits 11-14 */
826 u32 txtest_en:1; /* bit 15 */
827 u32 reserved1:1; /* bit 16 */
828 u32 unused2:15; /* bits 17-31 */
831 } TXMAC_TXTEST_t, *PTXMAC_TXTEST_t;
834 * structure for error reg in txmac address map
835 * located at address 0x3018
837 typedef union _TXMAC_ERR_t {
840 #ifdef _BIT_FIELDS_HTOL
841 u32 unused2:23; /* bits 9-31 */
842 u32 fifo_underrun:1; /* bit 8 */
843 u32 unused1:2; /* bits 6-7 */
844 u32 ctrl2_err:1; /* bit 5 */
845 u32 txq_underrun:1; /* bit 4 */
846 u32 bcnt_err:1; /* bit 3 */
847 u32 lseg_err:1; /* bit 2 */
848 u32 segnum_err:1; /* bit 1 */
849 u32 seg0_err:1; /* bit 0 */
851 u32 seg0_err:1; /* bit 0 */
852 u32 segnum_err:1; /* bit 1 */
853 u32 lseg_err:1; /* bit 2 */
854 u32 bcnt_err:1; /* bit 3 */
855 u32 txq_underrun:1; /* bit 4 */
856 u32 ctrl2_err:1; /* bit 5 */
857 u32 unused1:2; /* bits 6-7 */
858 u32 fifo_underrun:1; /* bit 8 */
859 u32 unused2:23; /* bits 9-31 */
862 } TXMAC_ERR_t, *PTXMAC_ERR_t;
865 * structure for error interrupt reg in txmac address map
866 * located at address 0x301C
868 typedef union _TXMAC_ERR_INT_t {
871 #ifdef _BIT_FIELDS_HTOL
872 u32 unused2:23; /* bits 9-31 */
873 u32 fifo_underrun:1; /* bit 8 */
874 u32 unused1:2; /* bits 6-7 */
875 u32 ctrl2_err:1; /* bit 5 */
876 u32 txq_underrun:1; /* bit 4 */
877 u32 bcnt_err:1; /* bit 3 */
878 u32 lseg_err:1; /* bit 2 */
879 u32 segnum_err:1; /* bit 1 */
880 u32 seg0_err:1; /* bit 0 */
882 u32 seg0_err:1; /* bit 0 */
883 u32 segnum_err:1; /* bit 1 */
884 u32 lseg_err:1; /* bit 2 */
885 u32 bcnt_err:1; /* bit 3 */
886 u32 txq_underrun:1; /* bit 4 */
887 u32 ctrl2_err:1; /* bit 5 */
888 u32 unused1:2; /* bits 6-7 */
889 u32 fifo_underrun:1; /* bit 8 */
890 u32 unused2:23; /* bits 9-31 */
893 } TXMAC_ERR_INT_t, *PTXMAC_ERR_INT_t;
896 * structure for error interrupt reg in txmac address map
897 * located at address 0x3020
899 typedef union _TXMAC_CP_CTRL_t {
902 #ifdef _BIT_FIELDS_HTOL
903 u32 unused:30; /* bits 2-31 */
904 u32 bp_req:1; /* bit 1 */
905 u32 bp_xonxoff:1; /* bit 0 */
907 u32 bp_xonxoff:1; /* bit 0 */
908 u32 bp_req:1; /* bit 1 */
909 u32 unused:30; /* bits 2-31 */
912 } TXMAC_BP_CTRL_t, *PTXMAC_BP_CTRL_t;
915 * Tx MAC Module of JAGCore Address Mapping
917 typedef struct _TXMAC_t { /* Location: */
918 TXMAC_CTL_t ctl; /* 0x3000 */
919 TXMAC_SHADOW_PTR_t shadow_ptr; /* 0x3004 */
920 TXMAC_ERR_CNT_t err_cnt; /* 0x3008 */
921 TXMAC_MAX_FILL_t max_fill; /* 0x300C */
922 TXMAC_CF_PARAM_t cf_param; /* 0x3010 */
923 TXMAC_TXTEST_t tx_test; /* 0x3014 */
924 TXMAC_ERR_t err; /* 0x3018 */
925 TXMAC_ERR_INT_t err_int; /* 0x301C */
926 TXMAC_BP_CTRL_t bp_ctrl; /* 0x3020 */
927 } TXMAC_t, *PTXMAC_t;
929 /* END OF TXMAC REGISTER ADDRESS MAP */
931 /* START OF RXMAC REGISTER ADDRESS MAP */
934 * structure for rxmac control reg in rxmac address map
935 * located at address 0x4000
937 typedef union _RXMAC_CTRL_t {
940 #ifdef _BIT_FIELDS_HTOL
941 u32 reserved:25; /* bits 7-31 */
942 u32 rxmac_int_disable:1; /* bit 6 */
943 u32 async_disable:1; /* bit 5 */
944 u32 mif_disable:1; /* bit 4 */
945 u32 wol_disable:1; /* bit 3 */
946 u32 pkt_filter_disable:1; /* bit 2 */
947 u32 mcif_disable:1; /* bit 1 */
948 u32 rxmac_en:1; /* bit 0 */
950 u32 rxmac_en:1; /* bit 0 */
951 u32 mcif_disable:1; /* bit 1 */
952 u32 pkt_filter_disable:1; /* bit 2 */
953 u32 wol_disable:1; /* bit 3 */
954 u32 mif_disable:1; /* bit 4 */
955 u32 async_disable:1; /* bit 5 */
956 u32 rxmac_int_disable:1; /* bit 6 */
957 u32 reserved:25; /* bits 7-31 */
960 } RXMAC_CTRL_t, *PRXMAC_CTRL_t;
963 * structure for Wake On Lan Control and CRC 0 reg in rxmac address map
964 * located at address 0x4004
966 typedef union _RXMAC_WOL_CTL_CRC0_t {
969 #ifdef _BIT_FIELDS_HTOL
970 u32 crc0:16; /* bits 16-31 */
971 u32 reserve:4; /* bits 12-15 */
972 u32 ignore_pp:1; /* bit 11 */
973 u32 ignore_mp:1; /* bit 10 */
974 u32 clr_intr:1; /* bit 9 */
975 u32 ignore_link_chg:1; /* bit 8 */
976 u32 ignore_uni:1; /* bit 7 */
977 u32 ignore_multi:1; /* bit 6 */
978 u32 ignore_broad:1; /* bit 5 */
979 u32 valid_crc4:1; /* bit 4 */
980 u32 valid_crc3:1; /* bit 3 */
981 u32 valid_crc2:1; /* bit 2 */
982 u32 valid_crc1:1; /* bit 1 */
983 u32 valid_crc0:1; /* bit 0 */
985 u32 valid_crc0:1; /* bit 0 */
986 u32 valid_crc1:1; /* bit 1 */
987 u32 valid_crc2:1; /* bit 2 */
988 u32 valid_crc3:1; /* bit 3 */
989 u32 valid_crc4:1; /* bit 4 */
990 u32 ignore_broad:1; /* bit 5 */
991 u32 ignore_multi:1; /* bit 6 */
992 u32 ignore_uni:1; /* bit 7 */
993 u32 ignore_link_chg:1; /* bit 8 */
994 u32 clr_intr:1; /* bit 9 */
995 u32 ignore_mp:1; /* bit 10 */
996 u32 ignore_pp:1; /* bit 11 */
997 u32 reserve:4; /* bits 12-15 */
998 u32 crc0:16; /* bits 16-31 */
1001 } RXMAC_WOL_CTL_CRC0_t, *PRXMAC_WOL_CTL_CRC0_t;
1004 * structure for CRC 1 and CRC 2 reg in rxmac address map
1005 * located at address 0x4008
1007 typedef union _RXMAC_WOL_CRC12_t {
1010 #ifdef _BIT_FIELDS_HTOL
1011 u32 crc2:16; /* bits 16-31 */
1012 u32 crc1:16; /* bits 0-15 */
1014 u32 crc1:16; /* bits 0-15 */
1015 u32 crc2:16; /* bits 16-31 */
1018 } RXMAC_WOL_CRC12_t, *PRXMAC_WOL_CRC12_t;
1021 * structure for CRC 3 and CRC 4 reg in rxmac address map
1022 * located at address 0x400C
1024 typedef union _RXMAC_WOL_CRC34_t {
1027 #ifdef _BIT_FIELDS_HTOL
1028 u32 crc4:16; /* bits 16-31 */
1029 u32 crc3:16; /* bits 0-15 */
1031 u32 crc3:16; /* bits 0-15 */
1032 u32 crc4:16; /* bits 16-31 */
1035 } RXMAC_WOL_CRC34_t, *PRXMAC_WOL_CRC34_t;
1038 * structure for Wake On Lan Source Address Lo reg in rxmac address map
1039 * located at address 0x4010
1041 typedef union _RXMAC_WOL_SA_LO_t {
1044 #ifdef _BIT_FIELDS_HTOL
1045 u32 sa3:8; /* bits 24-31 */
1046 u32 sa4:8; /* bits 16-23 */
1047 u32 sa5:8; /* bits 8-15 */
1048 u32 sa6:8; /* bits 0-7 */
1050 u32 sa6:8; /* bits 0-7 */
1051 u32 sa5:8; /* bits 8-15 */
1052 u32 sa4:8; /* bits 16-23 */
1053 u32 sa3:8; /* bits 24-31 */
1056 } RXMAC_WOL_SA_LO_t, *PRXMAC_WOL_SA_LO_t;
1059 * structure for Wake On Lan Source Address Hi reg in rxmac address map
1060 * located at address 0x4014
1062 typedef union _RXMAC_WOL_SA_HI_t {
1065 #ifdef _BIT_FIELDS_HTOL
1066 u32 reserved:16; /* bits 16-31 */
1067 u32 sa1:8; /* bits 8-15 */
1068 u32 sa2:8; /* bits 0-7 */
1070 u32 sa2:8; /* bits 0-7 */
1071 u32 sa1:8; /* bits 8-15 */
1072 u32 reserved:16; /* bits 16-31 */
1075 } RXMAC_WOL_SA_HI_t, *PRXMAC_WOL_SA_HI_t;
1078 * structure for Wake On Lan mask reg in rxmac address map
1079 * located at address 0x4018 - 0x4064
1080 * Defined earlier (u32)
1084 * structure for Unicast Paket Filter Address 1 reg in rxmac address map
1085 * located at address 0x4068
1087 typedef union _RXMAC_UNI_PF_ADDR1_t {
1090 #ifdef _BIT_FIELDS_HTOL
1091 u32 addr1_3:8; /* bits 24-31 */
1092 u32 addr1_4:8; /* bits 16-23 */
1093 u32 addr1_5:8; /* bits 8-15 */
1094 u32 addr1_6:8; /* bits 0-7 */
1096 u32 addr1_6:8; /* bits 0-7 */
1097 u32 addr1_5:8; /* bits 8-15 */
1098 u32 addr1_4:8; /* bits 16-23 */
1099 u32 addr1_3:8; /* bits 24-31 */
1102 } RXMAC_UNI_PF_ADDR1_t, *PRXMAC_UNI_PF_ADDR1_t;
1105 * structure for Unicast Paket Filter Address 2 reg in rxmac address map
1106 * located at address 0x406C
1108 typedef union _RXMAC_UNI_PF_ADDR2_t {
1111 #ifdef _BIT_FIELDS_HTOL
1112 u32 addr2_3:8; /* bits 24-31 */
1113 u32 addr2_4:8; /* bits 16-23 */
1114 u32 addr2_5:8; /* bits 8-15 */
1115 u32 addr2_6:8; /* bits 0-7 */
1117 u32 addr2_6:8; /* bits 0-7 */
1118 u32 addr2_5:8; /* bits 8-15 */
1119 u32 addr2_4:8; /* bits 16-23 */
1120 u32 addr2_3:8; /* bits 24-31 */
1123 } RXMAC_UNI_PF_ADDR2_t, *PRXMAC_UNI_PF_ADDR2_t;
1126 * structure for Unicast Paket Filter Address 1 & 2 reg in rxmac address map
1127 * located at address 0x4070
1129 typedef union _RXMAC_UNI_PF_ADDR3_t {
1132 #ifdef _BIT_FIELDS_HTOL
1133 u32 addr2_1:8; /* bits 24-31 */
1134 u32 addr2_2:8; /* bits 16-23 */
1135 u32 addr1_1:8; /* bits 8-15 */
1136 u32 addr1_2:8; /* bits 0-7 */
1138 u32 addr1_2:8; /* bits 0-7 */
1139 u32 addr1_1:8; /* bits 8-15 */
1140 u32 addr2_2:8; /* bits 16-23 */
1141 u32 addr2_1:8; /* bits 24-31 */
1144 } RXMAC_UNI_PF_ADDR3_t, *PRXMAC_UNI_PF_ADDR3_t;
1147 * structure for Multicast Hash reg in rxmac address map
1148 * located at address 0x4074 - 0x4080
1149 * Defined earlier (u32)
1153 * structure for Packet Filter Control reg in rxmac address map
1154 * located at address 0x4084
1156 typedef union _RXMAC_PF_CTRL_t {
1159 #ifdef _BIT_FIELDS_HTOL
1160 u32 unused2:9; /* bits 23-31 */
1161 u32 min_pkt_size:7; /* bits 16-22 */
1162 u32 unused1:12; /* bits 4-15 */
1163 u32 filter_frag_en:1; /* bit 3 */
1164 u32 filter_uni_en:1; /* bit 2 */
1165 u32 filter_multi_en:1; /* bit 1 */
1166 u32 filter_broad_en:1; /* bit 0 */
1168 u32 filter_broad_en:1; /* bit 0 */
1169 u32 filter_multi_en:1; /* bit 1 */
1170 u32 filter_uni_en:1; /* bit 2 */
1171 u32 filter_frag_en:1; /* bit 3 */
1172 u32 unused1:12; /* bits 4-15 */
1173 u32 min_pkt_size:7; /* bits 16-22 */
1174 u32 unused2:9; /* bits 23-31 */
1177 } RXMAC_PF_CTRL_t, *PRXMAC_PF_CTRL_t;
1180 * structure for Memory Controller Interface Control Max Segment reg in rxmac
1181 * address map. Located at address 0x4088
1183 typedef union _RXMAC_MCIF_CTRL_MAX_SEG_t {
1186 #ifdef _BIT_FIELDS_HTOL
1187 u32 reserved:22; /* bits 10-31 */
1188 u32 max_size:8; /* bits 2-9 */
1189 u32 fc_en:1; /* bit 1 */
1190 u32 seg_en:1; /* bit 0 */
1192 u32 seg_en:1; /* bit 0 */
1193 u32 fc_en:1; /* bit 1 */
1194 u32 max_size:8; /* bits 2-9 */
1195 u32 reserved:22; /* bits 10-31 */
1198 } RXMAC_MCIF_CTRL_MAX_SEG_t, *PRXMAC_MCIF_CTRL_MAX_SEG_t;
1201 * structure for Memory Controller Interface Water Mark reg in rxmac address
1202 * map. Located at address 0x408C
1204 typedef union _RXMAC_MCIF_WATER_MARK_t {
1207 #ifdef _BIT_FIELDS_HTOL
1208 u32 reserved2:6; /* bits 26-31 */
1209 u32 mark_hi:10; /* bits 16-25 */
1210 u32 reserved1:6; /* bits 10-15 */
1211 u32 mark_lo:10; /* bits 0-9 */
1213 u32 mark_lo:10; /* bits 0-9 */
1214 u32 reserved1:6; /* bits 10-15 */
1215 u32 mark_hi:10; /* bits 16-25 */
1216 u32 reserved2:6; /* bits 26-31 */
1219 } RXMAC_MCIF_WATER_MARK_t, *PRXMAC_MCIF_WATER_MARK_t;
1222 * structure for Rx Queue Dialog reg in rxmac address map.
1223 * located at address 0x4090
1225 typedef union _RXMAC_RXQ_DIAG_t {
1228 #ifdef _BIT_FIELDS_HTOL
1229 u32 reserved2:6; /* bits 26-31 */
1230 u32 rd_ptr:10; /* bits 16-25 */
1231 u32 reserved1:6; /* bits 10-15 */
1232 u32 wr_ptr:10; /* bits 0-9 */
1234 u32 wr_ptr:10; /* bits 0-9 */
1235 u32 reserved1:6; /* bits 10-15 */
1236 u32 rd_ptr:10; /* bits 16-25 */
1237 u32 reserved2:6; /* bits 26-31 */
1240 } RXMAC_RXQ_DIAG_t, *PRXMAC_RXQ_DIAG_t;
1243 * structure for space availiable reg in rxmac address map.
1244 * located at address 0x4094
1246 typedef union _RXMAC_SPACE_AVAIL_t {
1249 #ifdef _BIT_FIELDS_HTOL
1250 u32 reserved2:15; /* bits 17-31 */
1251 u32 space_avail_en:1; /* bit 16 */
1252 u32 reserved1:6; /* bits 10-15 */
1253 u32 space_avail:10; /* bits 0-9 */
1255 u32 space_avail:10; /* bits 0-9 */
1256 u32 reserved1:6; /* bits 10-15 */
1257 u32 space_avail_en:1; /* bit 16 */
1258 u32 reserved2:15; /* bits 17-31 */
1261 } RXMAC_SPACE_AVAIL_t, *PRXMAC_SPACE_AVAIL_t;
1264 * structure for management interface reg in rxmac address map.
1265 * located at address 0x4098
1267 typedef union _RXMAC_MIF_CTL_t {
1270 #ifdef _BIT_FIELDS_HTOL
1271 u32 reserve:14; /* bits 18-31 */
1272 u32 drop_pkt_en:1; /* bit 17 */
1273 u32 drop_pkt_mask:17; /* bits 0-16 */
1275 u32 drop_pkt_mask:17; /* bits 0-16 */
1276 u32 drop_pkt_en:1; /* bit 17 */
1277 u32 reserve:14; /* bits 18-31 */
1280 } RXMAC_MIF_CTL_t, *PRXMAC_MIF_CTL_t;
1283 * structure for Error reg in rxmac address map.
1284 * located at address 0x409C
1286 typedef union _RXMAC_ERROR_REG_t {
1289 #ifdef _BIT_FIELDS_HTOL
1290 u32 reserve:28; /* bits 4-31 */
1291 u32 mif:1; /* bit 3 */
1292 u32 async:1; /* bit 2 */
1293 u32 pkt_filter:1; /* bit 1 */
1294 u32 mcif:1; /* bit 0 */
1296 u32 mcif:1; /* bit 0 */
1297 u32 pkt_filter:1; /* bit 1 */
1298 u32 async:1; /* bit 2 */
1299 u32 mif:1; /* bit 3 */
1300 u32 reserve:28; /* bits 4-31 */
1303 } RXMAC_ERROR_REG_t, *PRXMAC_ERROR_REG_t;
1306 * Rx MAC Module of JAGCore Address Mapping
1308 typedef struct _RXMAC_t { /* Location: */
1309 RXMAC_CTRL_t ctrl; /* 0x4000 */
1310 RXMAC_WOL_CTL_CRC0_t crc0; /* 0x4004 */
1311 RXMAC_WOL_CRC12_t crc12; /* 0x4008 */
1312 RXMAC_WOL_CRC34_t crc34; /* 0x400C */
1313 RXMAC_WOL_SA_LO_t sa_lo; /* 0x4010 */
1314 RXMAC_WOL_SA_HI_t sa_hi; /* 0x4014 */
1315 u32 mask0_word0; /* 0x4018 */
1316 u32 mask0_word1; /* 0x401C */
1317 u32 mask0_word2; /* 0x4020 */
1318 u32 mask0_word3; /* 0x4024 */
1319 u32 mask1_word0; /* 0x4028 */
1320 u32 mask1_word1; /* 0x402C */
1321 u32 mask1_word2; /* 0x4030 */
1322 u32 mask1_word3; /* 0x4034 */
1323 u32 mask2_word0; /* 0x4038 */
1324 u32 mask2_word1; /* 0x403C */
1325 u32 mask2_word2; /* 0x4040 */
1326 u32 mask2_word3; /* 0x4044 */
1327 u32 mask3_word0; /* 0x4048 */
1328 u32 mask3_word1; /* 0x404C */
1329 u32 mask3_word2; /* 0x4050 */
1330 u32 mask3_word3; /* 0x4054 */
1331 u32 mask4_word0; /* 0x4058 */
1332 u32 mask4_word1; /* 0x405C */
1333 u32 mask4_word2; /* 0x4060 */
1334 u32 mask4_word3; /* 0x4064 */
1335 RXMAC_UNI_PF_ADDR1_t uni_pf_addr1; /* 0x4068 */
1336 RXMAC_UNI_PF_ADDR2_t uni_pf_addr2; /* 0x406C */
1337 RXMAC_UNI_PF_ADDR3_t uni_pf_addr3; /* 0x4070 */
1338 u32 multi_hash1; /* 0x4074 */
1339 u32 multi_hash2; /* 0x4078 */
1340 u32 multi_hash3; /* 0x407C */
1341 u32 multi_hash4; /* 0x4080 */
1342 RXMAC_PF_CTRL_t pf_ctrl; /* 0x4084 */
1343 RXMAC_MCIF_CTRL_MAX_SEG_t mcif_ctrl_max_seg; /* 0x4088 */
1344 RXMAC_MCIF_WATER_MARK_t mcif_water_mark; /* 0x408C */
1345 RXMAC_RXQ_DIAG_t rxq_diag; /* 0x4090 */
1346 RXMAC_SPACE_AVAIL_t space_avail; /* 0x4094 */
1348 RXMAC_MIF_CTL_t mif_ctrl; /* 0x4098 */
1349 RXMAC_ERROR_REG_t err_reg; /* 0x409C */
1350 } RXMAC_t, *PRXMAC_t;
1352 /* END OF TXMAC REGISTER ADDRESS MAP */
1355 /* START OF MAC REGISTER ADDRESS MAP */
1358 * structure for configuration #1 reg in mac address map.
1359 * located at address 0x5000
1361 typedef union _MAC_CFG1_t {
1364 #ifdef _BIT_FIELDS_HTOL
1365 u32 soft_reset:1; /* bit 31 */
1366 u32 sim_reset:1; /* bit 30 */
1367 u32 reserved3:10; /* bits 20-29 */
1368 u32 reset_rx_mc:1; /* bit 19 */
1369 u32 reset_tx_mc:1; /* bit 18 */
1370 u32 reset_rx_fun:1; /* bit 17 */
1371 u32 reset_tx_fun:1; /* bit 16 */
1372 u32 reserved2:7; /* bits 9-15 */
1373 u32 loop_back:1; /* bit 8 */
1374 u32 reserved1:2; /* bits 6-7 */
1375 u32 rx_flow:1; /* bit 5 */
1376 u32 tx_flow:1; /* bit 4 */
1377 u32 syncd_rx_en:1; /* bit 3 */
1378 u32 rx_enable:1; /* bit 2 */
1379 u32 syncd_tx_en:1; /* bit 1 */
1380 u32 tx_enable:1; /* bit 0 */
1382 u32 tx_enable:1; /* bit 0 */
1383 u32 syncd_tx_en:1; /* bit 1 */
1384 u32 rx_enable:1; /* bit 2 */
1385 u32 syncd_rx_en:1; /* bit 3 */
1386 u32 tx_flow:1; /* bit 4 */
1387 u32 rx_flow:1; /* bit 5 */
1388 u32 reserved1:2; /* bits 6-7 */
1389 u32 loop_back:1; /* bit 8 */
1390 u32 reserved2:7; /* bits 9-15 */
1391 u32 reset_tx_fun:1; /* bit 16 */
1392 u32 reset_rx_fun:1; /* bit 17 */
1393 u32 reset_tx_mc:1; /* bit 18 */
1394 u32 reset_rx_mc:1; /* bit 19 */
1395 u32 reserved3:10; /* bits 20-29 */
1396 u32 sim_reset:1; /* bit 30 */
1397 u32 soft_reset:1; /* bit 31 */
1400 } MAC_CFG1_t, *PMAC_CFG1_t;
1403 * structure for configuration #2 reg in mac address map.
1404 * located at address 0x5004
1406 typedef union _MAC_CFG2_t {
1409 #ifdef _BIT_FIELDS_HTOL
1410 u32 reserved3:16; /* bits 16-31 */
1411 u32 preamble_len:4; /* bits 12-15 */
1412 u32 reserved2:2; /* bits 10-11 */
1413 u32 if_mode:2; /* bits 8-9 */
1414 u32 reserved1:2; /* bits 6-7 */
1415 u32 huge_frame:1; /* bit 5 */
1416 u32 len_check:1; /* bit 4 */
1417 u32 undefined:1; /* bit 3 */
1418 u32 pad_crc:1; /* bit 2 */
1419 u32 crc_enable:1; /* bit 1 */
1420 u32 full_duplex:1; /* bit 0 */
1422 u32 full_duplex:1; /* bit 0 */
1423 u32 crc_enable:1; /* bit 1 */
1424 u32 pad_crc:1; /* bit 2 */
1425 u32 undefined:1; /* bit 3 */
1426 u32 len_check:1; /* bit 4 */
1427 u32 huge_frame:1; /* bit 5 */
1428 u32 reserved1:2; /* bits 6-7 */
1429 u32 if_mode:2; /* bits 8-9 */
1430 u32 reserved2:2; /* bits 10-11 */
1431 u32 preamble_len:4; /* bits 12-15 */
1432 u32 reserved3:16; /* bits 16-31 */
1435 } MAC_CFG2_t, *PMAC_CFG2_t;
1438 * structure for Interpacket gap reg in mac address map.
1439 * located at address 0x5008
1441 typedef union _MAC_IPG_t {
1444 #ifdef _BIT_FIELDS_HTOL
1445 u32 reserved:1; /* bit 31 */
1446 u32 non_B2B_ipg_1:7; /* bits 24-30 */
1447 u32 undefined2:1; /* bit 23 */
1448 u32 non_B2B_ipg_2:7; /* bits 16-22 */
1449 u32 min_ifg_enforce:8; /* bits 8-15 */
1450 u32 undefined1:1; /* bit 7 */
1451 u32 B2B_ipg:7; /* bits 0-6 */
1453 u32 B2B_ipg:7; /* bits 0-6 */
1454 u32 undefined1:1; /* bit 7 */
1455 u32 min_ifg_enforce:8; /* bits 8-15 */
1456 u32 non_B2B_ipg_2:7; /* bits 16-22 */
1457 u32 undefined2:1; /* bit 23 */
1458 u32 non_B2B_ipg_1:7; /* bits 24-30 */
1459 u32 reserved:1; /* bit 31 */
1462 } MAC_IPG_t, *PMAC_IPG_t;
1465 * structure for half duplex reg in mac address map.
1466 * located at address 0x500C
1468 typedef union _MAC_HFDP_t {
1471 #ifdef _BIT_FIELDS_HTOL
1472 u32 reserved2:8; /* bits 24-31 */
1473 u32 alt_beb_trunc:4; /* bits 23-20 */
1474 u32 alt_beb_enable:1; /* bit 19 */
1475 u32 bp_no_backoff:1; /* bit 18 */
1476 u32 no_backoff:1; /* bit 17 */
1477 u32 excess_defer:1; /* bit 16 */
1478 u32 rexmit_max:4; /* bits 12-15 */
1479 u32 reserved1:2; /* bits 10-11 */
1480 u32 coll_window:10; /* bits 0-9 */
1482 u32 coll_window:10; /* bits 0-9 */
1483 u32 reserved1:2; /* bits 10-11 */
1484 u32 rexmit_max:4; /* bits 12-15 */
1485 u32 excess_defer:1; /* bit 16 */
1486 u32 no_backoff:1; /* bit 17 */
1487 u32 bp_no_backoff:1; /* bit 18 */
1488 u32 alt_beb_enable:1; /* bit 19 */
1489 u32 alt_beb_trunc:4; /* bits 23-20 */
1490 u32 reserved2:8; /* bits 24-31 */
1493 } MAC_HFDP_t, *PMAC_HFDP_t;
1496 * structure for Maximum Frame Length reg in mac address map.
1497 * located at address 0x5010
1499 typedef union _MAC_MAX_FM_LEN_t {
1502 #ifdef _BIT_FIELDS_HTOL
1503 u32 reserved:16; /* bits 16-31 */
1504 u32 max_len:16; /* bits 0-15 */
1506 u32 max_len:16; /* bits 0-15 */
1507 u32 reserved:16; /* bits 16-31 */
1510 } MAC_MAX_FM_LEN_t, *PMAC_MAX_FM_LEN_t;
1513 * structure for Reserve 1 reg in mac address map.
1514 * located at address 0x5014 - 0x5018
1515 * Defined earlier (u32)
1519 * structure for Test reg in mac address map.
1520 * located at address 0x501C
1522 typedef union _MAC_TEST_t {
1525 #ifdef _BIT_FIELDS_HTOL
1526 u32 unused:29; /* bits 3-31 */
1527 u32 mac_test:3; /* bits 0-2 */
1529 u32 mac_test:3; /* bits 0-2 */
1530 u32 unused:29; /* bits 3-31 */
1533 } MAC_TEST_t, *PMAC_TEST_t;
1536 * structure for MII Management Configuration reg in mac address map.
1537 * located at address 0x5020
1539 typedef union _MII_MGMT_CFG_t {
1542 #ifdef _BIT_FIELDS_HTOL
1543 u32 reset_mii_mgmt:1; /* bit 31 */
1544 u32 reserved:25; /* bits 6-30 */
1545 u32 scan_auto_incremt:1; /* bit 5 */
1546 u32 preamble_suppress:1; /* bit 4 */
1547 u32 undefined:1; /* bit 3 */
1548 u32 mgmt_clk_reset:3; /* bits 0-2 */
1550 u32 mgmt_clk_reset:3; /* bits 0-2 */
1551 u32 undefined:1; /* bit 3 */
1552 u32 preamble_suppress:1; /* bit 4 */
1553 u32 scan_auto_incremt:1; /* bit 5 */
1554 u32 reserved:25; /* bits 6-30 */
1555 u32 reset_mii_mgmt:1; /* bit 31 */
1558 } MII_MGMT_CFG_t, *PMII_MGMT_CFG_t;
1561 * structure for MII Management Command reg in mac address map.
1562 * located at address 0x5024
1564 typedef union _MII_MGMT_CMD_t {
1567 #ifdef _BIT_FIELDS_HTOL
1568 u32 reserved:30; /* bits 2-31 */
1569 u32 scan_cycle:1; /* bit 1 */
1570 u32 read_cycle:1; /* bit 0 */
1572 u32 read_cycle:1; /* bit 0 */
1573 u32 scan_cycle:1; /* bit 1 */
1574 u32 reserved:30; /* bits 2-31 */
1577 } MII_MGMT_CMD_t, *PMII_MGMT_CMD_t;
1580 * structure for MII Management Address reg in mac address map.
1581 * located at address 0x5028
1583 typedef union _MII_MGMT_ADDR_t {
1586 #ifdef _BIT_FIELDS_HTOL
1587 u32 reserved2:19; /* bit 13-31 */
1588 u32 phy_addr:5; /* bits 8-12 */
1589 u32 reserved1:3; /* bits 5-7 */
1590 u32 reg_addr:5; /* bits 0-4 */
1592 u32 reg_addr:5; /* bits 0-4 */
1593 u32 reserved1:3; /* bits 5-7 */
1594 u32 phy_addr:5; /* bits 8-12 */
1595 u32 reserved2:19; /* bit 13-31 */
1598 } MII_MGMT_ADDR_t, *PMII_MGMT_ADDR_t;
1601 * structure for MII Management Control reg in mac address map.
1602 * located at address 0x502C
1604 typedef union _MII_MGMT_CTRL_t {
1607 #ifdef _BIT_FIELDS_HTOL
1608 u32 reserved:16; /* bits 16-31 */
1609 u32 phy_ctrl:16; /* bits 0-15 */
1611 u32 phy_ctrl:16; /* bits 0-15 */
1612 u32 reserved:16; /* bits 16-31 */
1615 } MII_MGMT_CTRL_t, *PMII_MGMT_CTRL_t;
1618 * structure for MII Management Status reg in mac address map.
1619 * located at address 0x5030
1621 typedef union _MII_MGMT_STAT_t {
1624 #ifdef _BIT_FIELDS_HTOL
1625 u32 reserved:16; /* bits 16-31 */
1626 u32 phy_stat:16; /* bits 0-15 */
1628 u32 phy_stat:16; /* bits 0-15 */
1629 u32 reserved:16; /* bits 16-31 */
1632 } MII_MGMT_STAT_t, *PMII_MGMT_STAT_t;
1635 * structure for MII Management Indicators reg in mac address map.
1636 * located at address 0x5034
1638 typedef union _MII_MGMT_INDICATOR_t {
1641 #ifdef _BIT_FIELDS_HTOL
1642 u32 reserved:29; /* bits 3-31 */
1643 u32 not_valid:1; /* bit 2 */
1644 u32 scanning:1; /* bit 1 */
1645 u32 busy:1; /* bit 0 */
1647 u32 busy:1; /* bit 0 */
1648 u32 scanning:1; /* bit 1 */
1649 u32 not_valid:1; /* bit 2 */
1650 u32 reserved:29; /* bits 3-31 */
1653 } MII_MGMT_INDICATOR_t, *PMII_MGMT_INDICATOR_t;
1656 * structure for Interface Control reg in mac address map.
1657 * located at address 0x5038
1659 typedef union _MAC_IF_CTRL_t {
1662 #ifdef _BIT_FIELDS_HTOL
1663 u32 reset_if_module:1; /* bit 31 */
1664 u32 reserved4:3; /* bit 28-30 */
1665 u32 tbi_mode:1; /* bit 27 */
1666 u32 ghd_mode:1; /* bit 26 */
1667 u32 lhd_mode:1; /* bit 25 */
1668 u32 phy_mode:1; /* bit 24 */
1669 u32 reset_per_mii:1; /* bit 23 */
1670 u32 reserved3:6; /* bits 17-22 */
1671 u32 speed:1; /* bit 16 */
1672 u32 reset_pe100x:1; /* bit 15 */
1673 u32 reserved2:4; /* bits 11-14 */
1674 u32 force_quiet:1; /* bit 10 */
1675 u32 no_cipher:1; /* bit 9 */
1676 u32 disable_link_fail:1; /* bit 8 */
1677 u32 reset_gpsi:1; /* bit 7 */
1678 u32 reserved1:6; /* bits 1-6 */
1679 u32 enab_jab_protect:1; /* bit 0 */
1681 u32 enab_jab_protect:1; /* bit 0 */
1682 u32 reserved1:6; /* bits 1-6 */
1683 u32 reset_gpsi:1; /* bit 7 */
1684 u32 disable_link_fail:1; /* bit 8 */
1685 u32 no_cipher:1; /* bit 9 */
1686 u32 force_quiet:1; /* bit 10 */
1687 u32 reserved2:4; /* bits 11-14 */
1688 u32 reset_pe100x:1; /* bit 15 */
1689 u32 speed:1; /* bit 16 */
1690 u32 reserved3:6; /* bits 17-22 */
1691 u32 reset_per_mii:1; /* bit 23 */
1692 u32 phy_mode:1; /* bit 24 */
1693 u32 lhd_mode:1; /* bit 25 */
1694 u32 ghd_mode:1; /* bit 26 */
1695 u32 tbi_mode:1; /* bit 27 */
1696 u32 reserved4:3; /* bit 28-30 */
1697 u32 reset_if_module:1; /* bit 31 */
1700 } MAC_IF_CTRL_t, *PMAC_IF_CTRL_t;
1703 * structure for Interface Status reg in mac address map.
1704 * located at address 0x503C
1706 typedef union _MAC_IF_STAT_t {
1709 #ifdef _BIT_FIELDS_HTOL
1710 u32 reserved:22; /* bits 10-31 */
1711 u32 excess_defer:1; /* bit 9 */
1712 u32 clash:1; /* bit 8 */
1713 u32 phy_jabber:1; /* bit 7 */
1714 u32 phy_link_ok:1; /* bit 6 */
1715 u32 phy_full_duplex:1; /* bit 5 */
1716 u32 phy_speed:1; /* bit 4 */
1717 u32 pe100x_link_fail:1; /* bit 3 */
1718 u32 pe10t_loss_carrie:1; /* bit 2 */
1719 u32 pe10t_sqe_error:1; /* bit 1 */
1720 u32 pe10t_jabber:1; /* bit 0 */
1722 u32 pe10t_jabber:1; /* bit 0 */
1723 u32 pe10t_sqe_error:1; /* bit 1 */
1724 u32 pe10t_loss_carrie:1; /* bit 2 */
1725 u32 pe100x_link_fail:1; /* bit 3 */
1726 u32 phy_speed:1; /* bit 4 */
1727 u32 phy_full_duplex:1; /* bit 5 */
1728 u32 phy_link_ok:1; /* bit 6 */
1729 u32 phy_jabber:1; /* bit 7 */
1730 u32 clash:1; /* bit 8 */
1731 u32 excess_defer:1; /* bit 9 */
1732 u32 reserved:22; /* bits 10-31 */
1735 } MAC_IF_STAT_t, *PMAC_IF_STAT_t;
1738 * structure for Mac Station Address, Part 1 reg in mac address map.
1739 * located at address 0x5040
1741 typedef union _MAC_STATION_ADDR1_t {
1744 #ifdef _BIT_FIELDS_HTOL
1745 u32 Octet6:8; /* bits 24-31 */
1746 u32 Octet5:8; /* bits 16-23 */
1747 u32 Octet4:8; /* bits 8-15 */
1748 u32 Octet3:8; /* bits 0-7 */
1750 u32 Octet3:8; /* bits 0-7 */
1751 u32 Octet4:8; /* bits 8-15 */
1752 u32 Octet5:8; /* bits 16-23 */
1753 u32 Octet6:8; /* bits 24-31 */
1756 } MAC_STATION_ADDR1_t, *PMAC_STATION_ADDR1_t;
1759 * structure for Mac Station Address, Part 2 reg in mac address map.
1760 * located at address 0x5044
1762 typedef union _MAC_STATION_ADDR2_t {
1765 #ifdef _BIT_FIELDS_HTOL
1766 u32 Octet2:8; /* bits 24-31 */
1767 u32 Octet1:8; /* bits 16-23 */
1768 u32 reserved:16; /* bits 0-15 */
1770 u32 reserved:16; /* bit 0-15 */
1771 u32 Octet1:8; /* bits 16-23 */
1772 u32 Octet2:8; /* bits 24-31 */
1775 } MAC_STATION_ADDR2_t, *PMAC_STATION_ADDR2_t;
1778 * MAC Module of JAGCore Address Mapping
1780 typedef struct _MAC_t { /* Location: */
1781 MAC_CFG1_t cfg1; /* 0x5000 */
1782 MAC_CFG2_t cfg2; /* 0x5004 */
1783 MAC_IPG_t ipg; /* 0x5008 */
1784 MAC_HFDP_t hfdp; /* 0x500C */
1785 MAC_MAX_FM_LEN_t max_fm_len; /* 0x5010 */
1786 u32 rsv1; /* 0x5014 */
1787 u32 rsv2; /* 0x5018 */
1788 MAC_TEST_t mac_test; /* 0x501C */
1789 MII_MGMT_CFG_t mii_mgmt_cfg; /* 0x5020 */
1790 MII_MGMT_CMD_t mii_mgmt_cmd; /* 0x5024 */
1791 MII_MGMT_ADDR_t mii_mgmt_addr; /* 0x5028 */
1792 MII_MGMT_CTRL_t mii_mgmt_ctrl; /* 0x502C */
1793 MII_MGMT_STAT_t mii_mgmt_stat; /* 0x5030 */
1794 MII_MGMT_INDICATOR_t mii_mgmt_indicator; /* 0x5034 */
1795 MAC_IF_CTRL_t if_ctrl; /* 0x5038 */
1796 MAC_IF_STAT_t if_stat; /* 0x503C */
1797 MAC_STATION_ADDR1_t station_addr_1; /* 0x5040 */
1798 MAC_STATION_ADDR2_t station_addr_2; /* 0x5044 */
1801 /* END OF MAC REGISTER ADDRESS MAP */
1803 /* START OF MAC STAT REGISTER ADDRESS MAP */
1806 * structure for Carry Register One and it's Mask Register reg located in mac
1807 * stat address map address 0x6130 and 0x6138.
1809 typedef union _MAC_STAT_REG_1_t {
1812 #ifdef _BIT_FIELDS_HTOL
1813 u32 tr64:1; /* bit 31 */
1814 u32 tr127:1; /* bit 30 */
1815 u32 tr255:1; /* bit 29 */
1816 u32 tr511:1; /* bit 28 */
1817 u32 tr1k:1; /* bit 27 */
1818 u32 trmax:1; /* bit 26 */
1819 u32 trmgv:1; /* bit 25 */
1820 u32 unused:8; /* bits 17-24 */
1821 u32 rbyt:1; /* bit 16 */
1822 u32 rpkt:1; /* bit 15 */
1823 u32 rfcs:1; /* bit 14 */
1824 u32 rmca:1; /* bit 13 */
1825 u32 rbca:1; /* bit 12 */
1826 u32 rxcf:1; /* bit 11 */
1827 u32 rxpf:1; /* bit 10 */
1828 u32 rxuo:1; /* bit 9 */
1829 u32 raln:1; /* bit 8 */
1830 u32 rflr:1; /* bit 7 */
1831 u32 rcde:1; /* bit 6 */
1832 u32 rcse:1; /* bit 5 */
1833 u32 rund:1; /* bit 4 */
1834 u32 rovr:1; /* bit 3 */
1835 u32 rfrg:1; /* bit 2 */
1836 u32 rjbr:1; /* bit 1 */
1837 u32 rdrp:1; /* bit 0 */
1839 u32 rdrp:1; /* bit 0 */
1840 u32 rjbr:1; /* bit 1 */
1841 u32 rfrg:1; /* bit 2 */
1842 u32 rovr:1; /* bit 3 */
1843 u32 rund:1; /* bit 4 */
1844 u32 rcse:1; /* bit 5 */
1845 u32 rcde:1; /* bit 6 */
1846 u32 rflr:1; /* bit 7 */
1847 u32 raln:1; /* bit 8 */
1848 u32 rxuo:1; /* bit 9 */
1849 u32 rxpf:1; /* bit 10 */
1850 u32 rxcf:1; /* bit 11 */
1851 u32 rbca:1; /* bit 12 */
1852 u32 rmca:1; /* bit 13 */
1853 u32 rfcs:1; /* bit 14 */
1854 u32 rpkt:1; /* bit 15 */
1855 u32 rbyt:1; /* bit 16 */
1856 u32 unused:8; /* bits 17-24 */
1857 u32 trmgv:1; /* bit 25 */
1858 u32 trmax:1; /* bit 26 */
1859 u32 tr1k:1; /* bit 27 */
1860 u32 tr511:1; /* bit 28 */
1861 u32 tr255:1; /* bit 29 */
1862 u32 tr127:1; /* bit 30 */
1863 u32 tr64:1; /* bit 31 */
1866 } MAC_STAT_REG_1_t, *PMAC_STAT_REG_1_t;
1869 * structure for Carry Register Two Mask Register reg in mac stat address map.
1870 * located at address 0x613C
1872 typedef union _MAC_STAT_REG_2_t {
1875 #ifdef _BIT_FIELDS_HTOL
1876 u32 unused:12; /* bit 20-31 */
1877 u32 tjbr:1; /* bit 19 */
1878 u32 tfcs:1; /* bit 18 */
1879 u32 txcf:1; /* bit 17 */
1880 u32 tovr:1; /* bit 16 */
1881 u32 tund:1; /* bit 15 */
1882 u32 tfrg:1; /* bit 14 */
1883 u32 tbyt:1; /* bit 13 */
1884 u32 tpkt:1; /* bit 12 */
1885 u32 tmca:1; /* bit 11 */
1886 u32 tbca:1; /* bit 10 */
1887 u32 txpf:1; /* bit 9 */
1888 u32 tdfr:1; /* bit 8 */
1889 u32 tedf:1; /* bit 7 */
1890 u32 tscl:1; /* bit 6 */
1891 u32 tmcl:1; /* bit 5 */
1892 u32 tlcl:1; /* bit 4 */
1893 u32 txcl:1; /* bit 3 */
1894 u32 tncl:1; /* bit 2 */
1895 u32 tpfh:1; /* bit 1 */
1896 u32 tdrp:1; /* bit 0 */
1898 u32 tdrp:1; /* bit 0 */
1899 u32 tpfh:1; /* bit 1 */
1900 u32 tncl:1; /* bit 2 */
1901 u32 txcl:1; /* bit 3 */
1902 u32 tlcl:1; /* bit 4 */
1903 u32 tmcl:1; /* bit 5 */
1904 u32 tscl:1; /* bit 6 */
1905 u32 tedf:1; /* bit 7 */
1906 u32 tdfr:1; /* bit 8 */
1907 u32 txpf:1; /* bit 9 */
1908 u32 tbca:1; /* bit 10 */
1909 u32 tmca:1; /* bit 11 */
1910 u32 tpkt:1; /* bit 12 */
1911 u32 tbyt:1; /* bit 13 */
1912 u32 tfrg:1; /* bit 14 */
1913 u32 tund:1; /* bit 15 */
1914 u32 tovr:1; /* bit 16 */
1915 u32 txcf:1; /* bit 17 */
1916 u32 tfcs:1; /* bit 18 */
1917 u32 tjbr:1; /* bit 19 */
1918 u32 unused:12; /* bit 20-31 */
1921 } MAC_STAT_REG_2_t, *PMAC_STAT_REG_2_t;
1924 * MAC STATS Module of JAGCore Address Mapping
1926 typedef struct _MAC_STAT_t { /* Location: */
1927 u32 pad[32]; /* 0x6000 - 607C */
1929 /* Tx/Rx 0-64 Byte Frame Counter */
1930 u32 TR64; /* 0x6080 */
1932 /* Tx/Rx 65-127 Byte Frame Counter */
1933 u32 TR127; /* 0x6084 */
1935 /* Tx/Rx 128-255 Byte Frame Counter */
1936 u32 TR255; /* 0x6088 */
1938 /* Tx/Rx 256-511 Byte Frame Counter */
1939 u32 TR511; /* 0x608C */
1941 /* Tx/Rx 512-1023 Byte Frame Counter */
1942 u32 TR1K; /* 0x6090 */
1944 /* Tx/Rx 1024-1518 Byte Frame Counter */
1945 u32 TRMax; /* 0x6094 */
1947 /* Tx/Rx 1519-1522 Byte Good VLAN Frame Count */
1948 u32 TRMgv; /* 0x6098 */
1950 /* Rx Byte Counter */
1951 u32 RByt; /* 0x609C */
1953 /* Rx Packet Counter */
1954 u32 RPkt; /* 0x60A0 */
1956 /* Rx FCS Error Counter */
1957 u32 RFcs; /* 0x60A4 */
1959 /* Rx Multicast Packet Counter */
1960 u32 RMca; /* 0x60A8 */
1962 /* Rx Broadcast Packet Counter */
1963 u32 RBca; /* 0x60AC */
1965 /* Rx Control Frame Packet Counter */
1966 u32 RxCf; /* 0x60B0 */
1968 /* Rx Pause Frame Packet Counter */
1969 u32 RxPf; /* 0x60B4 */
1971 /* Rx Unknown OP Code Counter */
1972 u32 RxUo; /* 0x60B8 */
1974 /* Rx Alignment Error Counter */
1975 u32 RAln; /* 0x60BC */
1977 /* Rx Frame Length Error Counter */
1978 u32 RFlr; /* 0x60C0 */
1980 /* Rx Code Error Counter */
1981 u32 RCde; /* 0x60C4 */
1983 /* Rx Carrier Sense Error Counter */
1984 u32 RCse; /* 0x60C8 */
1986 /* Rx Undersize Packet Counter */
1987 u32 RUnd; /* 0x60CC */
1989 /* Rx Oversize Packet Counter */
1990 u32 ROvr; /* 0x60D0 */
1992 /* Rx Fragment Counter */
1993 u32 RFrg; /* 0x60D4 */
1995 /* Rx Jabber Counter */
1996 u32 RJbr; /* 0x60D8 */
1999 u32 RDrp; /* 0x60DC */
2001 /* Tx Byte Counter */
2002 u32 TByt; /* 0x60E0 */
2004 /* Tx Packet Counter */
2005 u32 TPkt; /* 0x60E4 */
2007 /* Tx Multicast Packet Counter */
2008 u32 TMca; /* 0x60E8 */
2010 /* Tx Broadcast Packet Counter */
2011 u32 TBca; /* 0x60EC */
2013 /* Tx Pause Control Frame Counter */
2014 u32 TxPf; /* 0x60F0 */
2016 /* Tx Deferral Packet Counter */
2017 u32 TDfr; /* 0x60F4 */
2019 /* Tx Excessive Deferral Packet Counter */
2020 u32 TEdf; /* 0x60F8 */
2022 /* Tx Single Collision Packet Counter */
2023 u32 TScl; /* 0x60FC */
2025 /* Tx Multiple Collision Packet Counter */
2026 u32 TMcl; /* 0x6100 */
2028 /* Tx Late Collision Packet Counter */
2029 u32 TLcl; /* 0x6104 */
2031 /* Tx Excessive Collision Packet Counter */
2032 u32 TXcl; /* 0x6108 */
2034 /* Tx Total Collision Packet Counter */
2035 u32 TNcl; /* 0x610C */
2037 /* Tx Pause Frame Honored Counter */
2038 u32 TPfh; /* 0x6110 */
2040 /* Tx Drop Frame Counter */
2041 u32 TDrp; /* 0x6114 */
2043 /* Tx Jabber Frame Counter */
2044 u32 TJbr; /* 0x6118 */
2046 /* Tx FCS Error Counter */
2047 u32 TFcs; /* 0x611C */
2049 /* Tx Control Frame Counter */
2050 u32 TxCf; /* 0x6120 */
2052 /* Tx Oversize Frame Counter */
2053 u32 TOvr; /* 0x6124 */
2055 /* Tx Undersize Frame Counter */
2056 u32 TUnd; /* 0x6128 */
2058 /* Tx Fragments Frame Counter */
2059 u32 TFrg; /* 0x612C */
2061 /* Carry Register One Register */
2062 MAC_STAT_REG_1_t Carry1; /* 0x6130 */
2064 /* Carry Register Two Register */
2065 MAC_STAT_REG_2_t Carry2; /* 0x6134 */
2067 /* Carry Register One Mask Register */
2068 MAC_STAT_REG_1_t Carry1M; /* 0x6138 */
2070 /* Carry Register Two Mask Register */
2071 MAC_STAT_REG_2_t Carry2M; /* 0x613C */
2072 } MAC_STAT_t, *PMAC_STAT_t;
2074 /* END OF MAC STAT REGISTER ADDRESS MAP */
2077 /* START OF MMC REGISTER ADDRESS MAP */
2080 * Main Memory Controller Control reg in mmc address map.
2081 * located at address 0x7000
2084 #define ET_MMC_ENABLE 1
2085 #define ET_MMC_ARB_DISABLE 2
2086 #define ET_MMC_RXMAC_DISABLE 4
2087 #define ET_MMC_TXMAC_DISABLE 8
2088 #define ET_MMC_TXDMA_DISABLE 16
2089 #define ET_MMC_RXDMA_DISABLE 32
2090 #define ET_MMC_FORCE_CE 64
2093 * Main Memory Controller Host Memory Access Address reg in mmc
2094 * address map. Located at address 0x7004. Top 16 bits hold the address bits
2097 #define ET_SRAM_REQ_ACCESS 1
2098 #define ET_SRAM_WR_ACCESS 2
2099 #define ET_SRAM_IS_CTRL 4
2102 * structure for Main Memory Controller Host Memory Access Data reg in mmc
2103 * address map. Located at address 0x7008 - 0x7014
2104 * Defined earlier (u32)
2108 * Memory Control Module of JAGCore Address Mapping
2110 typedef struct _MMC_t { /* Location: */
2111 u32 mmc_ctrl; /* 0x7000 */
2112 u32 sram_access; /* 0x7004 */
2113 u32 sram_word1; /* 0x7008 */
2114 u32 sram_word2; /* 0x700C */
2115 u32 sram_word3; /* 0x7010 */
2116 u32 sram_word4; /* 0x7014 */
2119 /* END OF MMC REGISTER ADDRESS MAP */
2122 /* START OF EXP ROM REGISTER ADDRESS MAP */
2125 * Expansion ROM Module of JAGCore Address Mapping
2128 /* Take this out until it is not empty */
2130 typedef struct _EXP_ROM_t {
2132 } EXP_ROM_t, *PEXP_ROM_t;
2135 /* END OF EXP ROM REGISTER ADDRESS MAP */
2139 * JAGCore Address Mapping
2141 typedef struct _ADDRESS_MAP_t {
2143 /* unused section of global address map */
2144 u8 unused_global[4096 - sizeof(GLOBAL_t)];
2146 /* unused section of txdma address map */
2147 u8 unused_txdma[4096 - sizeof(TXDMA_t)];
2149 /* unused section of rxdma address map */
2150 u8 unused_rxdma[4096 - sizeof(RXDMA_t)];
2152 /* unused section of txmac address map */
2153 u8 unused_txmac[4096 - sizeof(TXMAC_t)];
2155 /* unused section of rxmac address map */
2156 u8 unused_rxmac[4096 - sizeof(RXMAC_t)];
2158 /* unused section of mac address map */
2159 u8 unused_mac[4096 - sizeof(MAC_t)];
2161 /* unused section of mac stat address map */
2162 u8 unused_mac_stat[4096 - sizeof(MAC_STAT_t)];
2164 /* unused section of mmc address map */
2165 u8 unused_mmc[4096 - sizeof(MMC_t)];
2166 /* unused section of address map */
2167 u8 unused_[1015808];
2169 /* Take this out until it is not empty */
2174 u8 unused_exp_rom[4096]; /* MGS-size TBD */
2175 u8 unused__[524288]; /* unused section of address map */
2176 } ADDRESS_MAP_t, *PADDRESS_MAP_t;
2178 #endif /* _ET1310_ADDRESS_MAP_H_ */