Staging: et131x: kill TX_PR_NUM_DES_t
[firefly-linux-kernel-4.4.55.git] / drivers / staging / et131x / et1310_address_map.h
1 /*
2  * Agere Systems Inc.
3  * 10/100/1000 Base-T Ethernet Driver for the ET1301 and ET131x series MACs
4  *
5  * Copyright © 2005 Agere Systems Inc.
6  * All rights reserved.
7  *   http://www.agere.com
8  *
9  *------------------------------------------------------------------------------
10  *
11  * et1310_address_map.h - Contains the register mapping for the ET1310
12  *
13  *------------------------------------------------------------------------------
14  *
15  * SOFTWARE LICENSE
16  *
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.
21  *
22  * Copyright © 2005 Agere Systems Inc.
23  * All rights reserved.
24  *
25  * Redistribution and use in source or binary forms, with or without
26  * modifications, are permitted provided that the following conditions are met:
27  *
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
31  *    distribution.
32  *
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.
36  *
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.
40  *
41  * Disclaimer
42  *
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
54  * DAMAGE.
55  *
56  */
57
58 #ifndef _ET1310_ADDRESS_MAP_H_
59 #define _ET1310_ADDRESS_MAP_H_
60
61
62 /* START OF GLOBAL REGISTER ADDRESS MAP */
63
64 /*
65  * 10bit registers
66  *
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
71  */
72
73 /*
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
78  *      phy_lped_en     bit 7
79  *      phy_sw_coma     bit 6
80  *      rxclk_gate      bit 5
81  *      txclk_gate      bit 4
82  *      sysclk_gate     bit 3
83  *      jagcore_rx_en   bit 2
84  *      jagcore_tx_en   bit 1
85  *      gigephy_en      bit 0
86  */
87
88 #define ET_PM_PHY_SW_COMA               0x40
89 #define ET_PMCSR_INIT                   0x38
90
91 /*
92  * Interrupt status reg at address 0x0018
93  */
94
95 #define ET_INTR_TXDMA_ISR       0x00000008
96 #define ET_INTR_TXDMA_ERR       0x00000010
97 #define ET_INTR_RXDMA_XFR_DONE  0x00000020
98 #define ET_INTR_RXDMA_FB_R0_LOW 0x00000040
99 #define ET_INTR_RXDMA_FB_R1_LOW 0x00000080
100 #define ET_INTR_RXDMA_STAT_LOW  0x00000100
101 #define ET_INTR_RXDMA_ERR       0x00000200
102 #define ET_INTR_WATCHDOG        0x00004000
103 #define ET_INTR_WOL             0x00008000
104 #define ET_INTR_PHY             0x00010000
105 #define ET_INTR_TXMAC           0x00020000
106 #define ET_INTR_RXMAC           0x00040000
107 #define ET_INTR_MAC_STAT        0x00080000
108 #define ET_INTR_SLV_TIMEOUT     0x00100000
109
110 /*
111  * Interrupt mask register at address 0x001C
112  * Interrupt alias clear mask reg at address 0x0020
113  * Interrupt status alias reg at address 0x0024
114  *
115  * Same masks as above
116  */
117
118 /*
119  * Software reset reg at address 0x0028
120  * 0:   txdma_sw_reset
121  * 1:   rxdma_sw_reset
122  * 2:   txmac_sw_reset
123  * 3:   rxmac_sw_reset
124  * 4:   mac_sw_reset
125  * 5:   mac_stat_sw_reset
126  * 6:   mmc_sw_reset
127  *31:   selfclr_disable
128  */
129
130 /*
131  * SLV Timer reg at address 0x002C (low 24 bits)
132  */
133
134 /*
135  * MSI Configuration reg at address 0x0030
136  */
137
138 #define ET_MSI_VECTOR   0x0000001F
139 #define ET_MSI_TC       0x00070000
140
141 /*
142  * Loopback reg located at address 0x0034
143  */
144
145 #define ET_LOOP_MAC     0x00000001
146 #define ET_LOOP_DMA     0x00000002
147
148 /*
149  * GLOBAL Module of JAGCore Address Mapping
150  * Located at address 0x0000
151  */
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;
169
170 /* END OF GLOBAL REGISTER ADDRESS MAP */
171
172
173 /* START OF TXDMA REGISTER ADDRESS MAP */
174
175 /*
176  * txdma control status reg at address 0x1000
177  */
178
179 #define ET_TXDMA_CSR_HALT       0x00000001
180 #define ET_TXDMA_DROP_TLP       0x00000002
181 #define ET_TXDMA_CACHE_THRS     0x000000F0
182 #define ET_TXDMA_CACHE_SHIFT    4
183 #define ET_TXDMA_SNGL_EPKT      0x00000100
184 #define ET_TXDMA_CLASS          0x00001E00
185
186 /*
187  * structure for txdma packet ring base address hi reg in txdma address map
188  * located at address 0x1004
189  * Defined earlier (u32)
190  */
191
192 /*
193  * structure for txdma packet ring base address low reg in txdma address map
194  * located at address 0x1008
195  * Defined earlier (u32)
196  */
197
198 /*
199  * structure for txdma packet ring number of descriptor reg in txdma address
200  * map.  Located at address 0x100C
201  *
202  * 31-10: unused
203  * 9-0: pr ndes
204  */
205
206 #define ET_DMA10_MASK           0x3FF   /* 10 bit mask for DMA10W types */
207 #define ET_DMA10_WRAP           0x400
208 #define ET_DMA4_MASK            0x00F   /* 4 bit mask for DMA4W types */
209 #define ET_DMA4_WRAP            0x010
210
211 #define INDEX10(x)      ((x) & ET_DMA10_MASK)
212 #define INDEX4(x)       ((x) & ET_DMA4_MASK)
213
214 extern inline void add_10bit(u32 *v, int n)
215 {
216         *v = INDEX10(*v + n) | (*v & ET_DMA10_WRAP);
217 }
218
219 /*
220  * 10bit DMA with wrap
221  * txdma tx queue write address reg in txdma address map at 0x1010
222  * txdma tx queue write address external reg in txdma address map at 0x1014
223  * txdma tx queue read address reg in txdma address map at 0x1018
224  *
225  * u32
226  * txdma status writeback address hi reg in txdma address map at0x101C
227  * txdma status writeback address lo reg in txdma address map at 0x1020
228  *
229  * 10bit DMA with wrap
230  * txdma service request reg in txdma address map at 0x1024
231  * structure for txdma service complete reg in txdma address map at 0x1028
232  *
233  * 4bit DMA with wrap
234  * txdma tx descriptor cache read index reg in txdma address map at 0x102C
235  * txdma tx descriptor cache write index reg in txdma address map at 0x1030
236  *
237  * txdma error reg in txdma address map at address 0x1034
238  * 0: PyldResend
239  * 1: PyldRewind
240  * 4: DescrResend
241  * 5: DescrRewind
242  * 8: WrbkResend
243  * 9: WrbkRewind
244  */
245
246 /*
247  * Tx DMA Module of JAGCore Address Mapping
248  * Located at address 0x1000
249  */
250 typedef struct _TXDMA_t {               /* Location: */
251         u32 csr;                        /*  0x1000 */
252         u32 pr_base_hi;                 /*  0x1004 */
253         u32 pr_base_lo;                 /*  0x1008 */
254         u32 pr_num_des;                 /*  0x100C */
255         u32 txq_wr_addr;                /*  0x1010 */
256         u32 txq_wr_addr_ext;            /*  0x1014 */
257         u32 txq_rd_addr;                /*  0x1018 */
258         u32 dma_wb_base_hi;             /*  0x101C */
259         u32 dma_wb_base_lo;             /*  0x1020 */
260         u32 service_request;            /*  0x1024 */
261         u32 service_complete;           /*  0x1028 */
262         u32 cache_rd_index;             /*  0x102C */
263         u32 cache_wr_index;             /*  0x1030 */
264         u32 TxDmaError;                 /*  0x1034 */
265         u32 DescAbortCount;             /*  0x1038 */
266         u32 PayloadAbortCnt;            /*  0x103c */
267         u32 WriteBackAbortCnt;          /*  0x1040 */
268         u32 DescTimeoutCnt;             /*  0x1044 */
269         u32 PayloadTimeoutCnt;          /*  0x1048 */
270         u32 WriteBackTimeoutCnt;        /*  0x104c */
271         u32 DescErrorCount;             /*  0x1050 */
272         u32 PayloadErrorCnt;            /*  0x1054 */
273         u32 WriteBackErrorCnt;          /*  0x1058 */
274         u32 DroppedTLPCount;            /*  0x105c */
275         u32 NewServiceComplete;         /*  0x1060 */
276         u32 EthernetPacketCount;        /*  0x1064 */
277 } TXDMA_t, *PTXDMA_t;
278
279 /* END OF TXDMA REGISTER ADDRESS MAP */
280
281
282 /* START OF RXDMA REGISTER ADDRESS MAP */
283
284 /*
285  * structure for control status reg in rxdma address map
286  * Located at address 0x2000
287  */
288 typedef union _RXDMA_CSR_t {
289         u32 value;
290         struct {
291 #ifdef _BIT_FIELDS_HTOL
292                 u32 unused2:14;         /* bits 18-31 */
293                 u32 halt_status:1;      /* bit 17 */
294                 u32 pkt_done_flush:1;   /* bit 16 */
295                 u32 pkt_drop_disable:1; /* bit 15 */
296                 u32 unused1:1;          /* bit 14 */
297                 u32 fbr1_enable:1;      /* bit 13 */
298                 u32 fbr1_size:2;        /* bits 11-12 */
299                 u32 fbr0_enable:1;      /* bit 10 */
300                 u32 fbr0_size:2;        /* bits 8-9 */
301                 u32 dma_big_endian:1;   /* bit 7 */
302                 u32 pkt_big_endian:1;   /* bit 6 */
303                 u32 psr_big_endian:1;   /* bit 5 */
304                 u32 fbr_big_endian:1;   /* bit 4 */
305                 u32 tc:3;               /* bits 1-3 */
306                 u32 halt:1;             /* bit 0 */
307 #else
308                 u32 halt:1;             /* bit 0 */
309                 u32 tc:3;               /* bits 1-3 */
310                 u32 fbr_big_endian:1;   /* bit 4 */
311                 u32 psr_big_endian:1;   /* bit 5 */
312                 u32 pkt_big_endian:1;   /* bit 6 */
313                 u32 dma_big_endian:1;   /* bit 7 */
314                 u32 fbr0_size:2;        /* bits 8-9 */
315                 u32 fbr0_enable:1;      /* bit 10 */
316                 u32 fbr1_size:2;        /* bits 11-12 */
317                 u32 fbr1_enable:1;      /* bit 13 */
318                 u32 unused1:1;          /* bit 14 */
319                 u32 pkt_drop_disable:1; /* bit 15 */
320                 u32 pkt_done_flush:1;   /* bit 16 */
321                 u32 halt_status:1;      /* bit 17 */
322                 u32 unused2:14;         /* bits 18-31 */
323 #endif
324         } bits;
325 } RXDMA_CSR_t, *PRXDMA_CSR_t;
326
327 /*
328  * structure for dma writeback lo reg in rxdma address map
329  * located at address 0x2004
330  * Defined earlier (u32)
331  */
332
333 /*
334  * structure for dma writeback hi reg in rxdma address map
335  * located at address 0x2008
336  * Defined earlier (u32)
337  */
338
339 /*
340  * structure for number of packets done reg in rxdma address map
341  * located at address 0x200C
342  */
343 typedef union _RXDMA_NUM_PKT_DONE_t {
344         u32 value;
345         struct {
346 #ifdef _BIT_FIELDS_HTOL
347                 u32 unused:24;  /* bits 8-31 */
348                 u32 num_done:8; /* bits 0-7 */
349 #else
350                 u32 num_done:8; /* bits 0-7 */
351                 u32 unused:24;  /* bits 8-31 */
352 #endif
353         } bits;
354 } RXDMA_NUM_PKT_DONE_t, *PRXDMA_NUM_PKT_DONE_t;
355
356 /*
357  * structure for max packet time reg in rxdma address map
358  * located at address 0x2010
359  */
360 typedef union _RXDMA_MAX_PKT_TIME_t {
361         u32 value;
362         struct {
363 #ifdef _BIT_FIELDS_HTOL
364                 u32 unused:14;          /* bits 18-31 */
365                 u32 time_done:18;       /* bits 0-17 */
366 #else
367                 u32 time_done:18;       /* bits 0-17 */
368                 u32 unused:14;          /* bits 18-31 */
369 #endif
370         } bits;
371 } RXDMA_MAX_PKT_TIME_t, *PRXDMA_MAX_PKT_TIME_t;
372
373 /*
374  * structure for rx queue read address reg in rxdma address map
375  * located at address 0x2014
376  * Defined earlier (u32)
377  */
378
379 /*
380  * structure for rx queue read address external reg in rxdma address map
381  * located at address 0x2018
382  * Defined earlier (u32)
383  */
384
385 /*
386  * structure for rx queue write address reg in rxdma address map
387  * located at address 0x201C
388  * Defined earlier (u32)
389  */
390
391 /*
392  * structure for packet status ring base address lo reg in rxdma address map
393  * located at address 0x2020
394  * Defined earlier (u32)
395  */
396
397 /*
398  * structure for packet status ring base address hi reg in rxdma address map
399  * located at address 0x2024
400  * Defined earlier (u32)
401  */
402
403 /*
404  * structure for packet status ring number of descriptors reg in rxdma address
405  * map.  Located at address 0x2028
406  */
407 typedef union _RXDMA_PSR_NUM_DES_t {
408         u32 value;
409         struct {
410 #ifdef _BIT_FIELDS_HTOL
411                 u32 unused:20;          /* bits 12-31 */
412                 u32 psr_ndes:12;        /* bit 0-11 */
413 #else
414                 u32 psr_ndes:12;        /* bit 0-11 */
415                 u32 unused:20;          /* bits 12-31 */
416 #endif
417         } bits;
418 } RXDMA_PSR_NUM_DES_t, *PRXDMA_PSR_NUM_DES_t;
419
420 /*
421  * structure for packet status ring available offset reg in rxdma address map
422  * located at address 0x202C
423  */
424 typedef union _RXDMA_PSR_AVAIL_OFFSET_t {
425         u32 value;
426         struct {
427 #ifdef _BIT_FIELDS_HTOL
428                 u32 unused:19;          /* bits 13-31 */
429                 u32 psr_avail_wrap:1;   /* bit 12 */
430                 u32 psr_avail:12;       /* bit 0-11 */
431 #else
432                 u32 psr_avail:12;       /* bit 0-11 */
433                 u32 psr_avail_wrap:1;   /* bit 12 */
434                 u32 unused:19;          /* bits 13-31 */
435 #endif
436         } bits;
437 } RXDMA_PSR_AVAIL_OFFSET_t, *PRXDMA_PSR_AVAIL_OFFSET_t;
438
439 /*
440  * structure for packet status ring full offset reg in rxdma address map
441  * located at address 0x2030
442  */
443 typedef union _RXDMA_PSR_FULL_OFFSET_t {
444         u32 value;
445         struct {
446 #ifdef _BIT_FIELDS_HTOL
447                 u32 unused:19;          /* bits 13-31 */
448                 u32 psr_full_wrap:1;    /* bit 12 */
449                 u32 psr_full:12;        /* bit 0-11 */
450 #else
451                 u32 psr_full:12;        /* bit 0-11 */
452                 u32 psr_full_wrap:1;    /* bit 12 */
453                 u32 unused:19;          /* bits 13-31 */
454 #endif
455         } bits;
456 } RXDMA_PSR_FULL_OFFSET_t, *PRXDMA_PSR_FULL_OFFSET_t;
457
458 /*
459  * structure for packet status ring access index reg in rxdma address map
460  * located at address 0x2034
461  */
462 typedef union _RXDMA_PSR_ACCESS_INDEX_t {
463         u32 value;
464         struct {
465 #ifdef _BIT_FIELDS_HTOL
466                 u32 unused:27;  /* bits 5-31 */
467                 u32 psr_ai:5;   /* bits 0-4 */
468 #else
469                 u32 psr_ai:5;   /* bits 0-4 */
470                 u32 unused:27;  /* bits 5-31 */
471 #endif
472         } bits;
473 } RXDMA_PSR_ACCESS_INDEX_t, *PRXDMA_PSR_ACCESS_INDEX_t;
474
475 /*
476  * structure for packet status ring minimum descriptors reg in rxdma address
477  * map.  Located at address 0x2038
478  */
479 typedef union _RXDMA_PSR_MIN_DES_t {
480         u32 value;
481         struct {
482 #ifdef _BIT_FIELDS_HTOL
483                 u32 unused:20;  /* bits 12-31 */
484                 u32 psr_min:12; /* bits 0-11 */
485 #else
486                 u32 psr_min:12; /* bits 0-11 */
487                 u32 unused:20;  /* bits 12-31 */
488 #endif
489         } bits;
490 } RXDMA_PSR_MIN_DES_t, *PRXDMA_PSR_MIN_DES_t;
491
492 /*
493  * structure for free buffer ring base lo address reg in rxdma address map
494  * located at address 0x203C
495  * Defined earlier (u32)
496  */
497
498 /*
499  * structure for free buffer ring base hi address reg in rxdma address map
500  * located at address 0x2040
501  * Defined earlier (u32)
502  */
503
504 /*
505  * structure for free buffer ring number of descriptors reg in rxdma address
506  * map.  Located at address 0x2044
507  */
508 typedef union _RXDMA_FBR_NUM_DES_t {
509         u32 value;
510         struct {
511 #ifdef _BIT_FIELDS_HTOL
512                 u32 unused:22;          /* bits 10-31 */
513                 u32 fbr_ndesc:10;       /* bits 0-9 */
514 #else
515                 u32 fbr_ndesc:10;       /* bits 0-9 */
516                 u32 unused:22;          /* bits 10-31 */
517 #endif
518         } bits;
519 } RXDMA_FBR_NUM_DES_t, *PRXDMA_FBR_NUM_DES_t;
520
521 /*
522  * structure for free buffer ring 0 available offset reg in rxdma address map
523  * located at address 0x2048
524  * Defined earlier (u32)
525  */
526
527 /*
528  * structure for free buffer ring 0 full offset reg in rxdma address map
529  * located at address 0x204C
530  * Defined earlier (u32)
531  */
532
533 /*
534  * structure for free buffer cache 0 full offset reg in rxdma address map
535  * located at address 0x2050
536  */
537 typedef union _RXDMA_FBC_RD_INDEX_t {
538         u32 value;
539         struct {
540 #ifdef _BIT_FIELDS_HTOL
541                 u32 unused:27;  /* bits 5-31 */
542                 u32 fbc_rdi:5;  /* bit 0-4 */
543 #else
544                 u32 fbc_rdi:5;  /* bit 0-4 */
545                 u32 unused:27;  /* bits 5-31 */
546 #endif
547         } bits;
548 } RXDMA_FBC_RD_INDEX_t, *PRXDMA_FBC_RD_INDEX_t;
549
550 /*
551  * structure for free buffer ring 0 minimum descriptor reg in rxdma address map
552  * located at address 0x2054
553  */
554 typedef union _RXDMA_FBR_MIN_DES_t {
555         u32 value;
556         struct {
557 #ifdef _BIT_FIELDS_HTOL
558                 u32 unused:22;  /* bits 10-31 */
559                 u32 fbr_min:10; /* bits 0-9 */
560 #else
561                 u32 fbr_min:10; /* bits 0-9 */
562                 u32 unused:22;  /* bits 10-31 */
563 #endif
564         } bits;
565 } RXDMA_FBR_MIN_DES_t, *PRXDMA_FBR_MIN_DES_t;
566
567 /*
568  * structure for free buffer ring 1 base address lo reg in rxdma address map
569  * located at address 0x2058 - 0x205C
570  * Defined earlier (RXDMA_FBR_BASE_LO_t and RXDMA_FBR_BASE_HI_t)
571  */
572
573 /*
574  * structure for free buffer ring 1 number of descriptors reg in rxdma address
575  * map.  Located at address 0x2060
576  * Defined earlier (RXDMA_FBR_NUM_DES_t)
577  */
578
579 /*
580  * structure for free buffer ring 1 available offset reg in rxdma address map
581  * located at address 0x2064
582  * Defined Earlier (RXDMA_FBR_AVAIL_OFFSET_t)
583  */
584
585 /*
586  * structure for free buffer ring 1 full offset reg in rxdma address map
587  * located at address 0x2068
588  * Defined Earlier (RXDMA_FBR_FULL_OFFSET_t)
589  */
590
591 /*
592  * structure for free buffer cache 1 read index reg in rxdma address map
593  * located at address 0x206C
594  * Defined Earlier (RXDMA_FBC_RD_INDEX_t)
595  */
596
597 /*
598  * structure for free buffer ring 1 minimum descriptor reg in rxdma address map
599  * located at address 0x2070
600  * Defined Earlier (RXDMA_FBR_MIN_DES_t)
601  */
602
603 /*
604  * Rx DMA Module of JAGCore Address Mapping
605  * Located at address 0x2000
606  */
607 typedef struct _RXDMA_t {                               /* Location: */
608         RXDMA_CSR_t csr;                                /*  0x2000 */
609         u32 dma_wb_base_lo;                             /*  0x2004 */
610         u32 dma_wb_base_hi;                             /*  0x2008 */
611         RXDMA_NUM_PKT_DONE_t num_pkt_done;              /*  0x200C */
612         RXDMA_MAX_PKT_TIME_t max_pkt_time;              /*  0x2010 */
613         u32 rxq_rd_addr;                                /*  0x2014 */
614         u32 rxq_rd_addr_ext;                    /*  0x2018 */
615         u32 rxq_wr_addr;                                /*  0x201C */
616         u32 psr_base_lo;                                /*  0x2020 */
617         u32 psr_base_hi;                                /*  0x2024 */
618         RXDMA_PSR_NUM_DES_t psr_num_des;                /*  0x2028 */
619         RXDMA_PSR_AVAIL_OFFSET_t psr_avail_offset;      /*  0x202C */
620         RXDMA_PSR_FULL_OFFSET_t psr_full_offset;        /*  0x2030 */
621         RXDMA_PSR_ACCESS_INDEX_t psr_access_index;      /*  0x2034 */
622         RXDMA_PSR_MIN_DES_t psr_min_des;                /*  0x2038 */
623         u32 fbr0_base_lo;                               /*  0x203C */
624         u32 fbr0_base_hi;                               /*  0x2040 */
625         RXDMA_FBR_NUM_DES_t fbr0_num_des;               /*  0x2044 */
626         u32 fbr0_avail_offset;                  /*  0x2048 */
627         u32 fbr0_full_offset;                   /*  0x204C */
628         RXDMA_FBC_RD_INDEX_t fbr0_rd_index;             /*  0x2050 */
629         RXDMA_FBR_MIN_DES_t fbr0_min_des;               /*  0x2054 */
630         u32 fbr1_base_lo;                               /*  0x2058 */
631         u32 fbr1_base_hi;                               /*  0x205C */
632         RXDMA_FBR_NUM_DES_t fbr1_num_des;               /*  0x2060 */
633         u32 fbr1_avail_offset;                  /*  0x2064 */
634         u32 fbr1_full_offset;                   /*  0x2068 */
635         RXDMA_FBC_RD_INDEX_t fbr1_rd_index;             /*  0x206C */
636         RXDMA_FBR_MIN_DES_t fbr1_min_des;               /*  0x2070 */
637 } RXDMA_t, *PRXDMA_t;
638
639 /* END OF RXDMA REGISTER ADDRESS MAP */
640
641
642 /* START OF TXMAC REGISTER ADDRESS MAP */
643
644 /*
645  * structure for control reg in txmac address map
646  * located at address 0x3000
647  */
648 typedef union _TXMAC_CTL_t {
649         u32 value;
650         struct {
651 #ifdef _BIT_FIELDS_HTOL
652                 u32 unused:24;          /* bits 8-31 */
653                 u32 cklseg_diable:1;    /* bit 7 */
654                 u32 ckbcnt_disable:1;   /* bit 6 */
655                 u32 cksegnum:1;         /* bit 5 */
656                 u32 async_disable:1;    /* bit 4 */
657                 u32 fc_disable:1;       /* bit 3 */
658                 u32 mcif_disable:1;     /* bit 2 */
659                 u32 mif_disable:1;      /* bit 1 */
660                 u32 txmac_en:1;         /* bit 0 */
661 #else
662                 u32 txmac_en:1;         /* bit 0 */
663                 u32 mif_disable:1;      /* bit 1 mac interface */
664                 u32 mcif_disable:1;     /* bit 2 mem. contr. interface */
665                 u32 fc_disable:1;       /* bit 3 */
666                 u32 async_disable:1;    /* bit 4 */
667                 u32 cksegnum:1;         /* bit 5 */
668                 u32 ckbcnt_disable:1;   /* bit 6 */
669                 u32 cklseg_diable:1;    /* bit 7 */
670                 u32 unused:24;          /* bits 8-31 */
671 #endif
672         } bits;
673 } TXMAC_CTL_t, *PTXMAC_CTL_t;
674
675 /*
676  * structure for shadow pointer reg in txmac address map
677  * located at address 0x3004
678  */
679 typedef union _TXMAC_SHADOW_PTR_t {
680         u32 value;
681         struct {
682 #ifdef _BIT_FIELDS_HTOL
683                 u32 reserved2:5;        /* bits 27-31 */
684                 u32 txq_rd_ptr:11;      /* bits 16-26 */
685                 u32 reserved:5;         /* bits 11-15 */
686                 u32 txq_wr_ptr:11;      /* bits 0-10 */
687 #else
688                 u32 txq_wr_ptr:11;      /* bits 0-10 */
689                 u32 reserved:5;         /* bits 11-15 */
690                 u32 txq_rd_ptr:11;      /* bits 16-26 */
691                 u32 reserved2:5;        /* bits 27-31 */
692 #endif
693         } bits;
694 } TXMAC_SHADOW_PTR_t, *PTXMAC_SHADOW_PTR_t;
695
696 /*
697  * structure for error count reg in txmac address map
698  * located at address 0x3008
699  */
700 typedef union _TXMAC_ERR_CNT_t {
701         u32 value;
702         struct {
703 #ifdef _BIT_FIELDS_HTOL
704                 u32 unused:20;          /* bits 12-31 */
705                 u32 reserved:4;         /* bits 8-11 */
706                 u32 txq_underrun:4;     /* bits 4-7 */
707                 u32 fifo_underrun:4;    /* bits 0-3 */
708 #else
709                 u32 fifo_underrun:4;    /* bits 0-3 */
710                 u32 txq_underrun:4;     /* bits 4-7 */
711                 u32 reserved:4;         /* bits 8-11 */
712                 u32 unused:20;          /* bits 12-31 */
713 #endif
714         } bits;
715 } TXMAC_ERR_CNT_t, *PTXMAC_ERR_CNT_t;
716
717 /*
718  * structure for max fill reg in txmac address map
719  * located at address 0x300C
720  * 31-12: unused
721  * 11-0: max fill
722  */
723
724 /*
725  * structure for cf parameter reg in txmac address map
726  * located at address 0x3010
727  * 31-16: cfep
728  * 15-0: cfpt
729  */
730
731 /*
732  * structure for tx test reg in txmac address map
733  * located at address 0x3014
734  * 31-17: unused
735  * 16: reserved1
736  * 15: txtest_en
737  * 14-11: unused
738  * 10-0: txq test pointer
739  */
740
741 /*
742  * structure for error reg in txmac address map
743  * located at address 0x3018
744  */
745 typedef union _TXMAC_ERR_t {
746         u32 value;
747         struct {
748 #ifdef _BIT_FIELDS_HTOL
749                 u32 unused2:23;         /* bits 9-31 */
750                 u32 fifo_underrun:1;    /* bit 8 */
751                 u32 unused1:2;          /* bits 6-7 */
752                 u32 ctrl2_err:1;        /* bit 5 */
753                 u32 txq_underrun:1;     /* bit 4 */
754                 u32 bcnt_err:1;         /* bit 3 */
755                 u32 lseg_err:1;         /* bit 2 */
756                 u32 segnum_err:1;       /* bit 1 */
757                 u32 seg0_err:1;         /* bit 0 */
758 #else
759                 u32 seg0_err:1;         /* bit 0 */
760                 u32 segnum_err:1;       /* bit 1 */
761                 u32 lseg_err:1;         /* bit 2 */
762                 u32 bcnt_err:1;         /* bit 3 */
763                 u32 txq_underrun:1;     /* bit 4 */
764                 u32 ctrl2_err:1;        /* bit 5 */
765                 u32 unused1:2;          /* bits 6-7 */
766                 u32 fifo_underrun:1;    /* bit 8 */
767                 u32 unused2:23;         /* bits 9-31 */
768 #endif
769         } bits;
770 } TXMAC_ERR_t, *PTXMAC_ERR_t;
771
772 /*
773  * structure for error interrupt reg in txmac address map
774  * located at address 0x301C
775  */
776 typedef union _TXMAC_ERR_INT_t {
777         u32 value;
778         struct {
779 #ifdef _BIT_FIELDS_HTOL
780                 u32 unused2:23;         /* bits 9-31 */
781                 u32 fifo_underrun:1;    /* bit 8 */
782                 u32 unused1:2;          /* bits 6-7 */
783                 u32 ctrl2_err:1;        /* bit 5 */
784                 u32 txq_underrun:1;     /* bit 4 */
785                 u32 bcnt_err:1;         /* bit 3 */
786                 u32 lseg_err:1;         /* bit 2 */
787                 u32 segnum_err:1;       /* bit 1 */
788                 u32 seg0_err:1;         /* bit 0 */
789 #else
790                 u32 seg0_err:1;         /* bit 0 */
791                 u32 segnum_err:1;       /* bit 1 */
792                 u32 lseg_err:1;         /* bit 2 */
793                 u32 bcnt_err:1;         /* bit 3 */
794                 u32 txq_underrun:1;     /* bit 4 */
795                 u32 ctrl2_err:1;        /* bit 5 */
796                 u32 unused1:2;          /* bits 6-7 */
797                 u32 fifo_underrun:1;    /* bit 8 */
798                 u32 unused2:23;         /* bits 9-31 */
799 #endif
800         } bits;
801 } TXMAC_ERR_INT_t, *PTXMAC_ERR_INT_t;
802
803 /*
804  * structure for error interrupt reg in txmac address map
805  * located at address 0x3020
806  */
807 typedef union _TXMAC_CP_CTRL_t {
808         u32 value;
809         struct {
810 #ifdef _BIT_FIELDS_HTOL
811                 u32 unused:30;          /* bits 2-31 */
812                 u32 bp_req:1;           /* bit 1 */
813                 u32 bp_xonxoff:1;       /* bit 0 */
814 #else
815                 u32 bp_xonxoff:1;       /* bit 0 */
816                 u32 bp_req:1;           /* bit 1 */
817                 u32 unused:30;          /* bits 2-31 */
818 #endif
819         } bits;
820 } TXMAC_BP_CTRL_t, *PTXMAC_BP_CTRL_t;
821
822 /*
823  * Tx MAC Module of JAGCore Address Mapping
824  */
825 typedef struct _TXMAC_t {               /* Location: */
826         TXMAC_CTL_t ctl;                /*  0x3000 */
827         TXMAC_SHADOW_PTR_t shadow_ptr;  /*  0x3004 */
828         TXMAC_ERR_CNT_t err_cnt;        /*  0x3008 */
829         u32 max_fill;                   /*  0x300C */
830         u32 cf_param;                   /*  0x3010 */
831         u32 tx_test;                    /*  0x3014 */
832         TXMAC_ERR_t err;                /*  0x3018 */
833         TXMAC_ERR_INT_t err_int;        /*  0x301C */
834         TXMAC_BP_CTRL_t bp_ctrl;        /*  0x3020 */
835 } TXMAC_t, *PTXMAC_t;
836
837 /* END OF TXMAC REGISTER ADDRESS MAP */
838
839 /* START OF RXMAC REGISTER ADDRESS MAP */
840
841 /*
842  * structure for rxmac control reg in rxmac address map
843  * located at address 0x4000
844  */
845 typedef union _RXMAC_CTRL_t {
846         u32 value;
847         struct {
848 #ifdef _BIT_FIELDS_HTOL
849                 u32 reserved:25;                /* bits 7-31 */
850                 u32 rxmac_int_disable:1;        /* bit 6 */
851                 u32 async_disable:1;            /* bit 5 */
852                 u32 mif_disable:1;              /* bit 4 */
853                 u32 wol_disable:1;              /* bit 3 */
854                 u32 pkt_filter_disable:1;       /* bit 2 */
855                 u32 mcif_disable:1;             /* bit 1 */
856                 u32 rxmac_en:1;                 /* bit 0 */
857 #else
858                 u32 rxmac_en:1;                 /* bit 0 */
859                 u32 mcif_disable:1;             /* bit 1 */
860                 u32 pkt_filter_disable:1;       /* bit 2 */
861                 u32 wol_disable:1;              /* bit 3 */
862                 u32 mif_disable:1;              /* bit 4 */
863                 u32 async_disable:1;            /* bit 5 */
864                 u32 rxmac_int_disable:1;        /* bit 6 */
865                 u32 reserved:25;                /* bits 7-31 */
866 #endif
867         } bits;
868 } RXMAC_CTRL_t, *PRXMAC_CTRL_t;
869
870 /*
871  * structure for Wake On Lan Control and CRC 0 reg in rxmac address map
872  * located at address 0x4004
873  */
874 typedef union _RXMAC_WOL_CTL_CRC0_t {
875         u32 value;
876         struct {
877 #ifdef _BIT_FIELDS_HTOL
878                 u32 crc0:16;            /* bits 16-31 */
879                 u32 reserve:4;          /* bits 12-15 */
880                 u32 ignore_pp:1;        /* bit 11 */
881                 u32 ignore_mp:1;        /* bit 10 */
882                 u32 clr_intr:1;         /* bit 9 */
883                 u32 ignore_link_chg:1;  /* bit 8 */
884                 u32 ignore_uni:1;       /* bit 7 */
885                 u32 ignore_multi:1;     /* bit 6 */
886                 u32 ignore_broad:1;     /* bit 5 */
887                 u32 valid_crc4:1;       /* bit 4 */
888                 u32 valid_crc3:1;       /* bit 3 */
889                 u32 valid_crc2:1;       /* bit 2 */
890                 u32 valid_crc1:1;       /* bit 1 */
891                 u32 valid_crc0:1;       /* bit 0 */
892 #else
893                 u32 valid_crc0:1;       /* bit 0 */
894                 u32 valid_crc1:1;       /* bit 1 */
895                 u32 valid_crc2:1;       /* bit 2 */
896                 u32 valid_crc3:1;       /* bit 3 */
897                 u32 valid_crc4:1;       /* bit 4 */
898                 u32 ignore_broad:1;     /* bit 5 */
899                 u32 ignore_multi:1;     /* bit 6 */
900                 u32 ignore_uni:1;       /* bit 7 */
901                 u32 ignore_link_chg:1;  /* bit 8 */
902                 u32 clr_intr:1;         /* bit 9 */
903                 u32 ignore_mp:1;        /* bit 10 */
904                 u32 ignore_pp:1;        /* bit 11 */
905                 u32 reserve:4;          /* bits 12-15 */
906                 u32 crc0:16;            /* bits 16-31 */
907 #endif
908         } bits;
909 } RXMAC_WOL_CTL_CRC0_t, *PRXMAC_WOL_CTL_CRC0_t;
910
911 /*
912  * structure for CRC 1 and CRC 2 reg in rxmac address map
913  * located at address 0x4008
914  */
915 typedef union _RXMAC_WOL_CRC12_t {
916         u32 value;
917         struct {
918 #ifdef _BIT_FIELDS_HTOL
919                 u32 crc2:16;    /* bits 16-31 */
920                 u32 crc1:16;    /* bits 0-15 */
921 #else
922                 u32 crc1:16;    /* bits 0-15 */
923                 u32 crc2:16;    /* bits 16-31 */
924 #endif
925         } bits;
926 } RXMAC_WOL_CRC12_t, *PRXMAC_WOL_CRC12_t;
927
928 /*
929  * structure for CRC 3 and CRC 4 reg in rxmac address map
930  * located at address 0x400C
931  */
932 typedef union _RXMAC_WOL_CRC34_t {
933         u32 value;
934         struct {
935 #ifdef _BIT_FIELDS_HTOL
936                 u32 crc4:16;    /* bits 16-31 */
937                 u32 crc3:16;    /* bits 0-15 */
938 #else
939                 u32 crc3:16;    /* bits 0-15 */
940                 u32 crc4:16;    /* bits 16-31 */
941 #endif
942         } bits;
943 } RXMAC_WOL_CRC34_t, *PRXMAC_WOL_CRC34_t;
944
945 /*
946  * structure for Wake On Lan Source Address Lo reg in rxmac address map
947  * located at address 0x4010
948  */
949 typedef union _RXMAC_WOL_SA_LO_t {
950         u32 value;
951         struct {
952 #ifdef _BIT_FIELDS_HTOL
953                 u32 sa3:8;      /* bits 24-31 */
954                 u32 sa4:8;      /* bits 16-23 */
955                 u32 sa5:8;      /* bits 8-15 */
956                 u32 sa6:8;      /* bits 0-7 */
957 #else
958                 u32 sa6:8;      /* bits 0-7 */
959                 u32 sa5:8;      /* bits 8-15 */
960                 u32 sa4:8;      /* bits 16-23 */
961                 u32 sa3:8;      /* bits 24-31 */
962 #endif
963         } bits;
964 } RXMAC_WOL_SA_LO_t, *PRXMAC_WOL_SA_LO_t;
965
966 /*
967  * structure for Wake On Lan Source Address Hi reg in rxmac address map
968  * located at address 0x4014
969  */
970 typedef union _RXMAC_WOL_SA_HI_t {
971         u32 value;
972         struct {
973 #ifdef _BIT_FIELDS_HTOL
974                 u32 reserved:16;        /* bits 16-31 */
975                 u32 sa1:8;              /* bits 8-15 */
976                 u32 sa2:8;              /* bits 0-7 */
977 #else
978                 u32 sa2:8;              /* bits 0-7 */
979                 u32 sa1:8;              /* bits 8-15 */
980                 u32 reserved:16;        /* bits 16-31 */
981 #endif
982         } bits;
983 } RXMAC_WOL_SA_HI_t, *PRXMAC_WOL_SA_HI_t;
984
985 /*
986  * structure for Wake On Lan mask reg in rxmac address map
987  * located at address 0x4018 - 0x4064
988  * Defined earlier (u32)
989  */
990
991 /*
992  * structure for Unicast Paket Filter Address 1 reg in rxmac address map
993  * located at address 0x4068
994  */
995 typedef union _RXMAC_UNI_PF_ADDR1_t {
996         u32 value;
997         struct {
998 #ifdef _BIT_FIELDS_HTOL
999                 u32 addr1_3:8;  /* bits 24-31 */
1000                 u32 addr1_4:8;  /* bits 16-23 */
1001                 u32 addr1_5:8;  /* bits 8-15 */
1002                 u32 addr1_6:8;  /* bits 0-7 */
1003 #else
1004                 u32 addr1_6:8;  /* bits 0-7 */
1005                 u32 addr1_5:8;  /* bits 8-15 */
1006                 u32 addr1_4:8;  /* bits 16-23 */
1007                 u32 addr1_3:8;  /* bits 24-31 */
1008 #endif
1009         } bits;
1010 } RXMAC_UNI_PF_ADDR1_t, *PRXMAC_UNI_PF_ADDR1_t;
1011
1012 /*
1013  * structure for Unicast Paket Filter Address 2 reg in rxmac address map
1014  * located at address 0x406C
1015  */
1016 typedef union _RXMAC_UNI_PF_ADDR2_t {
1017         u32 value;
1018         struct {
1019 #ifdef _BIT_FIELDS_HTOL
1020                 u32 addr2_3:8;  /* bits 24-31 */
1021                 u32 addr2_4:8;  /* bits 16-23 */
1022                 u32 addr2_5:8;  /* bits 8-15 */
1023                 u32 addr2_6:8;  /* bits 0-7 */
1024 #else
1025                 u32 addr2_6:8;  /* bits 0-7 */
1026                 u32 addr2_5:8;  /* bits 8-15 */
1027                 u32 addr2_4:8;  /* bits 16-23 */
1028                 u32 addr2_3:8;  /* bits 24-31 */
1029 #endif
1030         } bits;
1031 } RXMAC_UNI_PF_ADDR2_t, *PRXMAC_UNI_PF_ADDR2_t;
1032
1033 /*
1034  * structure for Unicast Paket Filter Address 1 & 2 reg in rxmac address map
1035  * located at address 0x4070
1036  */
1037 typedef union _RXMAC_UNI_PF_ADDR3_t {
1038         u32 value;
1039         struct {
1040 #ifdef _BIT_FIELDS_HTOL
1041                 u32 addr2_1:8;  /* bits 24-31 */
1042                 u32 addr2_2:8;  /* bits 16-23 */
1043                 u32 addr1_1:8;  /* bits 8-15 */
1044                 u32 addr1_2:8;  /* bits 0-7 */
1045 #else
1046                 u32 addr1_2:8;  /* bits 0-7 */
1047                 u32 addr1_1:8;  /* bits 8-15 */
1048                 u32 addr2_2:8;  /* bits 16-23 */
1049                 u32 addr2_1:8;  /* bits 24-31 */
1050 #endif
1051         } bits;
1052 } RXMAC_UNI_PF_ADDR3_t, *PRXMAC_UNI_PF_ADDR3_t;
1053
1054 /*
1055  * structure for Multicast Hash reg in rxmac address map
1056  * located at address 0x4074 - 0x4080
1057  * Defined earlier (u32)
1058  */
1059
1060 /*
1061  * structure for Packet Filter Control reg in rxmac address map
1062  * located at address 0x4084
1063  */
1064 typedef union _RXMAC_PF_CTRL_t {
1065         u32 value;
1066         struct {
1067 #ifdef _BIT_FIELDS_HTOL
1068                 u32 unused2:9;          /* bits 23-31 */
1069                 u32 min_pkt_size:7;     /* bits 16-22 */
1070                 u32 unused1:12;         /* bits 4-15 */
1071                 u32 filter_frag_en:1;   /* bit 3 */
1072                 u32 filter_uni_en:1;    /* bit 2 */
1073                 u32 filter_multi_en:1;  /* bit 1 */
1074                 u32 filter_broad_en:1;  /* bit 0 */
1075 #else
1076                 u32 filter_broad_en:1;  /* bit 0 */
1077                 u32 filter_multi_en:1;  /* bit 1 */
1078                 u32 filter_uni_en:1;    /* bit 2 */
1079                 u32 filter_frag_en:1;   /* bit 3 */
1080                 u32 unused1:12;         /* bits 4-15 */
1081                 u32 min_pkt_size:7;     /* bits 16-22 */
1082                 u32 unused2:9;          /* bits 23-31 */
1083 #endif
1084         } bits;
1085 } RXMAC_PF_CTRL_t, *PRXMAC_PF_CTRL_t;
1086
1087 /*
1088  * structure for Memory Controller Interface Control Max Segment reg in rxmac
1089  * address map.  Located at address 0x4088
1090  */
1091 typedef union _RXMAC_MCIF_CTRL_MAX_SEG_t {
1092         u32 value;
1093         struct {
1094 #ifdef _BIT_FIELDS_HTOL
1095                 u32 reserved:22;        /* bits 10-31 */
1096                 u32 max_size:8; /* bits 2-9 */
1097                 u32 fc_en:1;    /* bit 1 */
1098                 u32 seg_en:1;   /* bit 0 */
1099 #else
1100                 u32 seg_en:1;   /* bit 0 */
1101                 u32 fc_en:1;    /* bit 1 */
1102                 u32 max_size:8; /* bits 2-9 */
1103                 u32 reserved:22;        /* bits 10-31 */
1104 #endif
1105         } bits;
1106 } RXMAC_MCIF_CTRL_MAX_SEG_t, *PRXMAC_MCIF_CTRL_MAX_SEG_t;
1107
1108 /*
1109  * structure for Memory Controller Interface Water Mark reg in rxmac address
1110  * map.  Located at address 0x408C
1111  */
1112 typedef union _RXMAC_MCIF_WATER_MARK_t {
1113         u32 value;
1114         struct {
1115 #ifdef _BIT_FIELDS_HTOL
1116                 u32 reserved2:6;        /* bits 26-31 */
1117                 u32 mark_hi:10; /* bits 16-25 */
1118                 u32 reserved1:6;        /* bits 10-15 */
1119                 u32 mark_lo:10; /* bits 0-9 */
1120 #else
1121                 u32 mark_lo:10; /* bits 0-9 */
1122                 u32 reserved1:6;        /* bits 10-15 */
1123                 u32 mark_hi:10; /* bits 16-25 */
1124                 u32 reserved2:6;        /* bits 26-31 */
1125 #endif
1126         } bits;
1127 } RXMAC_MCIF_WATER_MARK_t, *PRXMAC_MCIF_WATER_MARK_t;
1128
1129 /*
1130  * structure for Rx Queue Dialog reg in rxmac address map.
1131  * located at address 0x4090
1132  */
1133 typedef union _RXMAC_RXQ_DIAG_t {
1134         u32 value;
1135         struct {
1136 #ifdef _BIT_FIELDS_HTOL
1137                 u32 reserved2:6;        /* bits 26-31 */
1138                 u32 rd_ptr:10;  /* bits 16-25 */
1139                 u32 reserved1:6;        /* bits 10-15 */
1140                 u32 wr_ptr:10;  /* bits 0-9 */
1141 #else
1142                 u32 wr_ptr:10;  /* bits 0-9 */
1143                 u32 reserved1:6;        /* bits 10-15 */
1144                 u32 rd_ptr:10;  /* bits 16-25 */
1145                 u32 reserved2:6;        /* bits 26-31 */
1146 #endif
1147         } bits;
1148 } RXMAC_RXQ_DIAG_t, *PRXMAC_RXQ_DIAG_t;
1149
1150 /*
1151  * structure for space availiable reg in rxmac address map.
1152  * located at address 0x4094
1153  */
1154 typedef union _RXMAC_SPACE_AVAIL_t {
1155         u32 value;
1156         struct {
1157 #ifdef _BIT_FIELDS_HTOL
1158                 u32 reserved2:15;               /* bits 17-31 */
1159                 u32 space_avail_en:1;   /* bit 16 */
1160                 u32 reserved1:6;                /* bits 10-15 */
1161                 u32 space_avail:10;     /* bits 0-9 */
1162 #else
1163                 u32 space_avail:10;     /* bits 0-9 */
1164                 u32 reserved1:6;                /* bits 10-15 */
1165                 u32 space_avail_en:1;   /* bit 16 */
1166                 u32 reserved2:15;               /* bits 17-31 */
1167 #endif
1168         } bits;
1169 } RXMAC_SPACE_AVAIL_t, *PRXMAC_SPACE_AVAIL_t;
1170
1171 /*
1172  * structure for management interface reg in rxmac address map.
1173  * located at address 0x4098
1174  */
1175 typedef union _RXMAC_MIF_CTL_t {
1176         u32 value;
1177         struct {
1178 #ifdef _BIT_FIELDS_HTOL
1179                 u32 reserve:14;         /* bits 18-31 */
1180                 u32 drop_pkt_en:1;              /* bit 17 */
1181                 u32 drop_pkt_mask:17;   /* bits 0-16 */
1182 #else
1183                 u32 drop_pkt_mask:17;   /* bits 0-16 */
1184                 u32 drop_pkt_en:1;              /* bit 17 */
1185                 u32 reserve:14;         /* bits 18-31 */
1186 #endif
1187         } bits;
1188 } RXMAC_MIF_CTL_t, *PRXMAC_MIF_CTL_t;
1189
1190 /*
1191  * structure for Error reg in rxmac address map.
1192  * located at address 0x409C
1193  */
1194 typedef union _RXMAC_ERROR_REG_t {
1195         u32 value;
1196         struct {
1197 #ifdef _BIT_FIELDS_HTOL
1198                 u32 reserve:28; /* bits 4-31 */
1199                 u32 mif:1;              /* bit 3 */
1200                 u32 async:1;    /* bit 2 */
1201                 u32 pkt_filter:1;       /* bit 1 */
1202                 u32 mcif:1;     /* bit 0 */
1203 #else
1204                 u32 mcif:1;     /* bit 0 */
1205                 u32 pkt_filter:1;       /* bit 1 */
1206                 u32 async:1;    /* bit 2 */
1207                 u32 mif:1;              /* bit 3 */
1208                 u32 reserve:28; /* bits 4-31 */
1209 #endif
1210         } bits;
1211 } RXMAC_ERROR_REG_t, *PRXMAC_ERROR_REG_t;
1212
1213 /*
1214  * Rx MAC Module of JAGCore Address Mapping
1215  */
1216 typedef struct _RXMAC_t {                               /* Location: */
1217         RXMAC_CTRL_t ctrl;                              /*  0x4000 */
1218         RXMAC_WOL_CTL_CRC0_t crc0;                      /*  0x4004 */
1219         RXMAC_WOL_CRC12_t crc12;                        /*  0x4008 */
1220         RXMAC_WOL_CRC34_t crc34;                        /*  0x400C */
1221         RXMAC_WOL_SA_LO_t sa_lo;                        /*  0x4010 */
1222         RXMAC_WOL_SA_HI_t sa_hi;                        /*  0x4014 */
1223         u32 mask0_word0;                                /*  0x4018 */
1224         u32 mask0_word1;                                /*  0x401C */
1225         u32 mask0_word2;                                /*  0x4020 */
1226         u32 mask0_word3;                                /*  0x4024 */
1227         u32 mask1_word0;                                /*  0x4028 */
1228         u32 mask1_word1;                                /*  0x402C */
1229         u32 mask1_word2;                                /*  0x4030 */
1230         u32 mask1_word3;                                /*  0x4034 */
1231         u32 mask2_word0;                                /*  0x4038 */
1232         u32 mask2_word1;                                /*  0x403C */
1233         u32 mask2_word2;                                /*  0x4040 */
1234         u32 mask2_word3;                                /*  0x4044 */
1235         u32 mask3_word0;                                /*  0x4048 */
1236         u32 mask3_word1;                                /*  0x404C */
1237         u32 mask3_word2;                                /*  0x4050 */
1238         u32 mask3_word3;                                /*  0x4054 */
1239         u32 mask4_word0;                                /*  0x4058 */
1240         u32 mask4_word1;                                /*  0x405C */
1241         u32 mask4_word2;                                /*  0x4060 */
1242         u32 mask4_word3;                                /*  0x4064 */
1243         RXMAC_UNI_PF_ADDR1_t uni_pf_addr1;              /*  0x4068 */
1244         RXMAC_UNI_PF_ADDR2_t uni_pf_addr2;              /*  0x406C */
1245         RXMAC_UNI_PF_ADDR3_t uni_pf_addr3;              /*  0x4070 */
1246         u32 multi_hash1;                                /*  0x4074 */
1247         u32 multi_hash2;                                /*  0x4078 */
1248         u32 multi_hash3;                                /*  0x407C */
1249         u32 multi_hash4;                                /*  0x4080 */
1250         RXMAC_PF_CTRL_t pf_ctrl;                        /*  0x4084 */
1251         RXMAC_MCIF_CTRL_MAX_SEG_t mcif_ctrl_max_seg;    /*  0x4088 */
1252         RXMAC_MCIF_WATER_MARK_t mcif_water_mark;        /*  0x408C */
1253         RXMAC_RXQ_DIAG_t rxq_diag;                      /*  0x4090 */
1254         RXMAC_SPACE_AVAIL_t space_avail;                /*  0x4094 */
1255
1256         RXMAC_MIF_CTL_t mif_ctrl;                       /*  0x4098 */
1257         RXMAC_ERROR_REG_t err_reg;                      /*  0x409C */
1258 } RXMAC_t, *PRXMAC_t;
1259
1260 /* END OF TXMAC REGISTER ADDRESS MAP */
1261
1262
1263 /* START OF MAC REGISTER ADDRESS MAP */
1264
1265 /*
1266  * structure for configuration #1 reg in mac address map.
1267  * located at address 0x5000
1268  *
1269  * 31: soft reset
1270  * 30: sim reset
1271  * 29-20: reserved
1272  * 19: reset rx mc
1273  * 18: reset tx mc
1274  * 17: reset rx func
1275  * 16: reset tx fnc
1276  * 15-9: reserved
1277  * 8: loopback
1278  * 7-6: reserved
1279  * 5: rx flow
1280  * 4: tx flow
1281  * 3: syncd rx en
1282  * 2: rx enable
1283  * 1: syncd tx en
1284  * 0: tx enable
1285  */
1286
1287 #define CFG1_LOOPBACK   0x00000100
1288 #define CFG1_RX_FLOW    0x00000020
1289 #define CFG1_TX_FLOW    0x00000010
1290 #define CFG1_RX_ENABLE  0x00000004
1291 #define CFG1_TX_ENABLE  0x00000001
1292 #define CFG1_WAIT       0x0000000A      /* RX & TX syncd */
1293
1294 /*
1295  * structure for configuration #2 reg in mac address map.
1296  * located at address 0x5004
1297  * 31-16: reserved
1298  * 15-12: preamble
1299  * 11-10: reserved
1300  * 9-8: if mode
1301  * 7-6: reserved
1302  * 5: huge frame
1303  * 4: length check
1304  * 3: undefined
1305  * 2: pad crc
1306  * 1: crc enable
1307  * 0: full duplex
1308  */
1309
1310
1311 /*
1312  * structure for Interpacket gap reg in mac address map.
1313  * located at address 0x5008
1314  *
1315  * 31: reserved
1316  * 30-24: non B2B ipg 1
1317  * 23: undefined
1318  * 22-16: non B2B ipg 2
1319  * 15-8: Min ifg enforce
1320  * 7-0: B2B ipg
1321  *
1322  * structure for half duplex reg in mac address map.
1323  * located at address 0x500C
1324  * 31-24: reserved
1325  * 23-20: Alt BEB trunc
1326  * 19: Alt BEB enable
1327  * 18: BP no backoff
1328  * 17: no backoff
1329  * 16: excess defer
1330  * 15-12: re-xmit max
1331  * 11-10: reserved
1332  * 9-0: collision window
1333  */
1334
1335 /*
1336  * structure for Maximum Frame Length reg in mac address map.
1337  * located at address 0x5010: bits 0-15 hold the length.
1338  */
1339
1340 /*
1341  * structure for Reserve 1 reg in mac address map.
1342  * located at address 0x5014 - 0x5018
1343  * Defined earlier (u32)
1344  */
1345
1346 /*
1347  * structure for Test reg in mac address map.
1348  * located at address 0x501C
1349  * test: bits 0-2, rest unused
1350  */
1351
1352 /*
1353  * structure for MII Management Configuration reg in mac address map.
1354  * located at address 0x5020
1355  *
1356  * 31: reset MII mgmt
1357  * 30-6: unused
1358  * 5: scan auto increment
1359  * 4: preamble supress
1360  * 3: undefined
1361  * 2-0: mgmt clock reset
1362  */
1363
1364 /*
1365  * structure for MII Management Command reg in mac address map.
1366  * located at address 0x5024
1367  * bit 1: scan cycle
1368  * bit 0: read cycle
1369  */
1370
1371 /*
1372  * structure for MII Management Address reg in mac address map.
1373  * located at address 0x5028
1374  * 31-13: reserved
1375  * 12-8: phy addr
1376  * 7-5: reserved
1377  * 4-0: register
1378  */
1379
1380 #define MII_ADDR(phy,reg)       ((phy) << 8 | (reg))
1381
1382 /*
1383  * structure for MII Management Control reg in mac address map.
1384  * located at address 0x502C
1385  * 31-16: reserved
1386  * 15-0: phy control
1387  */
1388
1389 /*
1390  * structure for MII Management Status reg in mac address map.
1391  * located at address 0x5030
1392  * 31-16: reserved
1393  * 15-0: phy control
1394  */
1395
1396 /*
1397  * structure for MII Management Indicators reg in mac address map.
1398  * located at address 0x5034
1399  * 31-3: reserved
1400  * 2: not valid
1401  * 1: scanning
1402  * 0: busy
1403  */
1404
1405 #define MGMT_BUSY       0x00000001      /* busy */
1406 #define MGMT_WAIT       0x00000005      /* busy | not valid */
1407
1408 /*
1409  * structure for Interface Control reg in mac address map.
1410  * located at address 0x5038
1411  *
1412  * 31: reset if module
1413  * 30-28: reserved
1414  * 27: tbi mode
1415  * 26: ghd mode
1416  * 25: lhd mode
1417  * 24: phy mode
1418  * 23: reset per mii
1419  * 22-17: reserved
1420  * 16: speed
1421  * 15: reset pe100x
1422  * 14-11: reserved
1423  * 10: force quiet
1424  * 9: no cipher
1425  * 8: disable link fail
1426  * 7: reset gpsi
1427  * 6-1: reserved
1428  * 0: enable jabber protection
1429  */
1430
1431 /*
1432  * structure for Interface Status reg in mac address map.
1433  * located at address 0x503C
1434  */
1435 typedef union _MAC_IF_STAT_t {
1436         u32 value;
1437         struct {
1438 #ifdef _BIT_FIELDS_HTOL
1439                 u32 reserved:22;                /* bits 10-31 */
1440                 u32 excess_defer:1;     /* bit 9 */
1441                 u32 clash:1;            /* bit 8 */
1442                 u32 phy_jabber:1;               /* bit 7 */
1443                 u32 phy_link_ok:1;              /* bit 6 */
1444                 u32 phy_full_duplex:1;  /* bit 5 */
1445                 u32 phy_speed:1;                /* bit 4 */
1446                 u32 pe100x_link_fail:1; /* bit 3 */
1447                 u32 pe10t_loss_carrie:1;        /* bit 2 */
1448                 u32 pe10t_sqe_error:1;  /* bit 1 */
1449                 u32 pe10t_jabber:1;     /* bit 0 */
1450 #else
1451                 u32 pe10t_jabber:1;     /* bit 0 */
1452                 u32 pe10t_sqe_error:1;  /* bit 1 */
1453                 u32 pe10t_loss_carrie:1;        /* bit 2 */
1454                 u32 pe100x_link_fail:1; /* bit 3 */
1455                 u32 phy_speed:1;                /* bit 4 */
1456                 u32 phy_full_duplex:1;  /* bit 5 */
1457                 u32 phy_link_ok:1;              /* bit 6 */
1458                 u32 phy_jabber:1;               /* bit 7 */
1459                 u32 clash:1;            /* bit 8 */
1460                 u32 excess_defer:1;     /* bit 9 */
1461                 u32 reserved:22;                /* bits 10-31 */
1462 #endif
1463         } bits;
1464 } MAC_IF_STAT_t, *PMAC_IF_STAT_t;
1465
1466 /*
1467  * structure for Mac Station Address, Part 1 reg in mac address map.
1468  * located at address 0x5040
1469  */
1470 typedef union _MAC_STATION_ADDR1_t {
1471         u32 value;
1472         struct {
1473 #ifdef _BIT_FIELDS_HTOL
1474                 u32 Octet6:8;   /* bits 24-31 */
1475                 u32 Octet5:8;   /* bits 16-23 */
1476                 u32 Octet4:8;   /* bits 8-15 */
1477                 u32 Octet3:8;   /* bits 0-7 */
1478 #else
1479                 u32 Octet3:8;   /* bits 0-7 */
1480                 u32 Octet4:8;   /* bits 8-15 */
1481                 u32 Octet5:8;   /* bits 16-23 */
1482                 u32 Octet6:8;   /* bits 24-31 */
1483 #endif
1484         } bits;
1485 } MAC_STATION_ADDR1_t, *PMAC_STATION_ADDR1_t;
1486
1487 /*
1488  * structure for Mac Station Address, Part 2 reg in mac address map.
1489  * located at address 0x5044
1490  */
1491 typedef union _MAC_STATION_ADDR2_t {
1492         u32 value;
1493         struct {
1494 #ifdef _BIT_FIELDS_HTOL
1495                 u32 Octet2:8;   /* bits 24-31 */
1496                 u32 Octet1:8;   /* bits 16-23 */
1497                 u32 reserved:16;        /* bits 0-15 */
1498 #else
1499                 u32 reserved:16;        /* bit 0-15 */
1500                 u32 Octet1:8;   /* bits 16-23 */
1501                 u32 Octet2:8;   /* bits 24-31 */
1502 #endif
1503         } bits;
1504 } MAC_STATION_ADDR2_t, *PMAC_STATION_ADDR2_t;
1505
1506 /*
1507  * MAC Module of JAGCore Address Mapping
1508  */
1509 typedef struct _MAC_t {                                 /* Location: */
1510         u32 cfg1;                                       /*  0x5000 */
1511         u32 cfg2;                                       /*  0x5004 */
1512         u32 ipg;                                        /*  0x5008 */
1513         u32 hfdp;                                       /*  0x500C */
1514         u32 max_fm_len;                                 /*  0x5010 */
1515         u32 rsv1;                                       /*  0x5014 */
1516         u32 rsv2;                                       /*  0x5018 */
1517         u32 mac_test;                                   /*  0x501C */
1518         u32 mii_mgmt_cfg;                               /*  0x5020 */
1519         u32 mii_mgmt_cmd;                               /*  0x5024 */
1520         u32 mii_mgmt_addr;                              /*  0x5028 */
1521         u32 mii_mgmt_ctrl;                              /*  0x502C */
1522         u32 mii_mgmt_stat;                              /*  0x5030 */
1523         u32 mii_mgmt_indicator;                         /*  0x5034 */
1524         u32 if_ctrl;                                    /*  0x5038 */
1525         MAC_IF_STAT_t if_stat;                          /*  0x503C */
1526         MAC_STATION_ADDR1_t station_addr_1;             /*  0x5040 */
1527         MAC_STATION_ADDR2_t station_addr_2;             /*  0x5044 */
1528 } MAC_t, *PMAC_t;
1529
1530 /* END OF MAC REGISTER ADDRESS MAP */
1531
1532 /* START OF MAC STAT REGISTER ADDRESS MAP */
1533
1534 /*
1535  * structure for Carry Register One and it's Mask Register reg located in mac
1536  * stat address map address 0x6130 and 0x6138.
1537  *
1538  * 31: tr64
1539  * 30: tr127
1540  * 29: tr255
1541  * 28: tr511
1542  * 27: tr1k
1543  * 26: trmax
1544  * 25: trmgv
1545  * 24-17: unused
1546  * 16: rbyt
1547  * 15: rpkt
1548  * 14: rfcs
1549  * 13: rmca
1550  * 12: rbca
1551  * 11: rxcf
1552  * 10: rxpf
1553  * 9: rxuo
1554  * 8: raln
1555  * 7: rflr
1556  * 6: rcde
1557  * 5: rcse
1558  * 4: rund
1559  * 3: rovr
1560  * 2: rfrg
1561  * 1: rjbr
1562  * 0: rdrp
1563  */
1564
1565 /*
1566  * structure for Carry Register Two Mask Register reg in mac stat address map.
1567  * located at address 0x613C
1568  *
1569  * 31-20: unused
1570  * 19: tjbr
1571  * 18: tfcs
1572  * 17: txcf
1573  * 16: tovr
1574  * 15: tund
1575  * 14: trfg
1576  * 13: tbyt
1577  * 12: tpkt
1578  * 11: tmca
1579  * 10: tbca
1580  * 9: txpf
1581  * 8: tdfr
1582  * 7: tedf
1583  * 6: tscl
1584  * 5: tmcl
1585  * 4: tlcl
1586  * 3: txcl
1587  * 2: tncl
1588  * 1: tpfh
1589  * 0: tdrp
1590  */
1591
1592 /*
1593  * MAC STATS Module of JAGCore Address Mapping
1594  */
1595 typedef struct _MAC_STAT_t {            /* Location: */
1596         u32 pad[32];            /*  0x6000 - 607C */
1597
1598         /* Tx/Rx 0-64 Byte Frame Counter */
1599         u32 TR64;                       /*  0x6080 */
1600
1601         /* Tx/Rx 65-127 Byte Frame Counter */
1602         u32 TR127;                      /*  0x6084 */
1603
1604         /* Tx/Rx 128-255 Byte Frame Counter */
1605         u32 TR255;                      /*  0x6088 */
1606
1607         /* Tx/Rx 256-511 Byte Frame Counter */
1608         u32 TR511;                      /*  0x608C */
1609
1610         /* Tx/Rx 512-1023 Byte Frame Counter */
1611         u32 TR1K;                       /*  0x6090 */
1612
1613         /* Tx/Rx 1024-1518 Byte Frame Counter */
1614         u32 TRMax;                      /*  0x6094 */
1615
1616         /* Tx/Rx 1519-1522 Byte Good VLAN Frame Count */
1617         u32 TRMgv;                      /*  0x6098 */
1618
1619         /* Rx Byte Counter */
1620         u32 RByt;                       /*  0x609C */
1621
1622         /* Rx Packet Counter */
1623         u32 RPkt;                       /*  0x60A0 */
1624
1625         /* Rx FCS Error Counter */
1626         u32 RFcs;                       /*  0x60A4 */
1627
1628         /* Rx Multicast Packet Counter */
1629         u32 RMca;                       /*  0x60A8 */
1630
1631         /* Rx Broadcast Packet Counter */
1632         u32 RBca;                       /*  0x60AC */
1633
1634         /* Rx Control Frame Packet Counter */
1635         u32 RxCf;                       /*  0x60B0 */
1636
1637         /* Rx Pause Frame Packet Counter */
1638         u32 RxPf;                       /*  0x60B4 */
1639
1640         /* Rx Unknown OP Code Counter */
1641         u32 RxUo;                       /*  0x60B8 */
1642
1643         /* Rx Alignment Error Counter */
1644         u32 RAln;                       /*  0x60BC */
1645
1646         /* Rx Frame Length Error Counter */
1647         u32 RFlr;                       /*  0x60C0 */
1648
1649         /* Rx Code Error Counter */
1650         u32 RCde;                       /*  0x60C4 */
1651
1652         /* Rx Carrier Sense Error Counter */
1653         u32 RCse;                       /*  0x60C8 */
1654
1655         /* Rx Undersize Packet Counter */
1656         u32 RUnd;                       /*  0x60CC */
1657
1658         /* Rx Oversize Packet Counter */
1659         u32 ROvr;                       /*  0x60D0 */
1660
1661         /* Rx Fragment Counter */
1662         u32 RFrg;                       /*  0x60D4 */
1663
1664         /* Rx Jabber Counter */
1665         u32 RJbr;                       /*  0x60D8 */
1666
1667         /* Rx Drop */
1668         u32 RDrp;                       /*  0x60DC */
1669
1670         /* Tx Byte Counter */
1671         u32 TByt;                       /*  0x60E0 */
1672
1673         /* Tx Packet Counter */
1674         u32 TPkt;                       /*  0x60E4 */
1675
1676         /* Tx Multicast Packet Counter */
1677         u32 TMca;                       /*  0x60E8 */
1678
1679         /* Tx Broadcast Packet Counter */
1680         u32 TBca;                       /*  0x60EC */
1681
1682         /* Tx Pause Control Frame Counter */
1683         u32 TxPf;                       /*  0x60F0 */
1684
1685         /* Tx Deferral Packet Counter */
1686         u32 TDfr;                       /*  0x60F4 */
1687
1688         /* Tx Excessive Deferral Packet Counter */
1689         u32 TEdf;                       /*  0x60F8 */
1690
1691         /* Tx Single Collision Packet Counter */
1692         u32 TScl;                       /*  0x60FC */
1693
1694         /* Tx Multiple Collision Packet Counter */
1695         u32 TMcl;                       /*  0x6100 */
1696
1697         /* Tx Late Collision Packet Counter */
1698         u32 TLcl;                       /*  0x6104 */
1699
1700         /* Tx Excessive Collision Packet Counter */
1701         u32 TXcl;                       /*  0x6108 */
1702
1703         /* Tx Total Collision Packet Counter */
1704         u32 TNcl;                       /*  0x610C */
1705
1706         /* Tx Pause Frame Honored Counter */
1707         u32 TPfh;                       /*  0x6110 */
1708
1709         /* Tx Drop Frame Counter */
1710         u32 TDrp;                       /*  0x6114 */
1711
1712         /* Tx Jabber Frame Counter */
1713         u32 TJbr;                       /*  0x6118 */
1714
1715         /* Tx FCS Error Counter */
1716         u32 TFcs;                       /*  0x611C */
1717
1718         /* Tx Control Frame Counter */
1719         u32 TxCf;                       /*  0x6120 */
1720
1721         /* Tx Oversize Frame Counter */
1722         u32 TOvr;                       /*  0x6124 */
1723
1724         /* Tx Undersize Frame Counter */
1725         u32 TUnd;                       /*  0x6128 */
1726
1727         /* Tx Fragments Frame Counter */
1728         u32 TFrg;                       /*  0x612C */
1729
1730         /* Carry Register One Register */
1731         u32 Carry1;                     /*  0x6130 */
1732
1733         /* Carry Register Two Register */
1734         u32 Carry2;                     /*  0x6134 */
1735
1736         /* Carry Register One Mask Register */
1737         u32 Carry1M;                    /*  0x6138 */
1738
1739         /* Carry Register Two Mask Register */
1740         u32 Carry2M;                    /*  0x613C */
1741 } MAC_STAT_t, *PMAC_STAT_t;
1742
1743 /* END OF MAC STAT REGISTER ADDRESS MAP */
1744
1745
1746 /* START OF MMC REGISTER ADDRESS MAP */
1747
1748 /*
1749  * Main Memory Controller Control reg in mmc address map.
1750  * located at address 0x7000
1751  */
1752
1753 #define ET_MMC_ENABLE           1
1754 #define ET_MMC_ARB_DISABLE      2
1755 #define ET_MMC_RXMAC_DISABLE    4
1756 #define ET_MMC_TXMAC_DISABLE    8
1757 #define ET_MMC_TXDMA_DISABLE    16
1758 #define ET_MMC_RXDMA_DISABLE    32
1759 #define ET_MMC_FORCE_CE         64
1760
1761 /*
1762  * Main Memory Controller Host Memory Access Address reg in mmc
1763  * address map.  Located at address 0x7004. Top 16 bits hold the address bits
1764  */
1765
1766 #define ET_SRAM_REQ_ACCESS      1
1767 #define ET_SRAM_WR_ACCESS       2
1768 #define ET_SRAM_IS_CTRL         4
1769
1770 /*
1771  * structure for Main Memory Controller Host Memory Access Data reg in mmc
1772  * address map.  Located at address 0x7008 - 0x7014
1773  * Defined earlier (u32)
1774  */
1775
1776 /*
1777  * Memory Control Module of JAGCore Address Mapping
1778  */
1779 typedef struct _MMC_t {                 /* Location: */
1780         u32 mmc_ctrl;           /*  0x7000 */
1781         u32 sram_access;        /*  0x7004 */
1782         u32 sram_word1;         /*  0x7008 */
1783         u32 sram_word2;         /*  0x700C */
1784         u32 sram_word3;         /*  0x7010 */
1785         u32 sram_word4;         /*  0x7014 */
1786 } MMC_t, *PMMC_t;
1787
1788 /* END OF MMC REGISTER ADDRESS MAP */
1789
1790
1791 /* START OF EXP ROM REGISTER ADDRESS MAP */
1792
1793 /*
1794  * Expansion ROM Module of JAGCore Address Mapping
1795  */
1796
1797 /* Take this out until it is not empty */
1798 #if 0
1799 typedef struct _EXP_ROM_t {
1800
1801 } EXP_ROM_t, *PEXP_ROM_t;
1802 #endif
1803
1804 /* END OF EXP ROM REGISTER ADDRESS MAP */
1805
1806
1807 /*
1808  * JAGCore Address Mapping
1809  */
1810 typedef struct _ADDRESS_MAP_t {
1811         GLOBAL_t global;
1812         /* unused section of global address map */
1813         u8 unused_global[4096 - sizeof(GLOBAL_t)];
1814         TXDMA_t txdma;
1815         /* unused section of txdma address map */
1816         u8 unused_txdma[4096 - sizeof(TXDMA_t)];
1817         RXDMA_t rxdma;
1818         /* unused section of rxdma address map */
1819         u8 unused_rxdma[4096 - sizeof(RXDMA_t)];
1820         TXMAC_t txmac;
1821         /* unused section of txmac address map */
1822         u8 unused_txmac[4096 - sizeof(TXMAC_t)];
1823         RXMAC_t rxmac;
1824         /* unused section of rxmac address map */
1825         u8 unused_rxmac[4096 - sizeof(RXMAC_t)];
1826         MAC_t mac;
1827         /* unused section of mac address map */
1828         u8 unused_mac[4096 - sizeof(MAC_t)];
1829         MAC_STAT_t macStat;
1830         /* unused section of mac stat address map */
1831         u8 unused_mac_stat[4096 - sizeof(MAC_STAT_t)];
1832         MMC_t mmc;
1833         /* unused section of mmc address map */
1834         u8 unused_mmc[4096 - sizeof(MMC_t)];
1835         /* unused section of address map */
1836         u8 unused_[1015808];
1837
1838 /* Take this out until it is not empty */
1839 #if 0
1840         EXP_ROM_t exp_rom;
1841 #endif
1842
1843         u8 unused_exp_rom[4096];        /* MGS-size TBD */
1844         u8 unused__[524288];    /* unused section of address map */
1845 } ADDRESS_MAP_t, *PADDRESS_MAP_t;
1846
1847 #endif /* _ET1310_ADDRESS_MAP_H_ */