blob: 8aaa62bc1138e0088d64d509e9c46a48d89907d6 [file] [log] [blame]
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001/*
2 * Agere Systems Inc.
3 * 10/100/1000 Base-T Ethernet Driver for the ET1301 and ET131x series MACs
4 *
Alan Cox64f93032009-06-10 17:30:41 +01005 * Copyright © 2005 Agere Systems Inc.
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07006 * 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 *
Alan Cox64f93032009-06-10 17:30:41 +010022 * Copyright © 2005 Agere Systems Inc.
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -070023 * 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 *
Alan Cox64f93032009-06-10 17:30:41 +010043 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -070044 * 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
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -070064/*
Alan Coxb8ab7352009-08-27 11:01:42 +010065 * 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
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -070071 */
72
73/*
74 * structure for power management control status reg in global address map
75 * located at address 0x0010
Alan Coxf2c98d22009-08-27 11:01:49 +010076 * 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
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -070086 */
Alan Coxf2c98d22009-08-27 11:01:49 +010087
88#define ET_PM_PHY_SW_COMA 0x40
89#define ET_PMCSR_INIT 0x38
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -070090
91/*
92 * structure for interrupt status reg in global address map
93 * located at address 0x0018
94 */
95typedef union _INTERRUPT_t {
96 u32 value;
97 struct {
98#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +010099 u32 unused5:11; /* bits 21-31 */
100 u32 slv_timeout:1; /* bit 20 */
101 u32 mac_stat_interrupt:1; /* bit 19 */
102 u32 rxmac_interrupt:1; /* bit 18 */
103 u32 txmac_interrupt:1; /* bit 17 */
104 u32 phy_interrupt:1; /* bit 16 */
105 u32 wake_on_lan:1; /* bit 15 */
106 u32 watchdog_interrupt:1; /* bit 14 */
107 u32 unused4:4; /* bits 10-13 */
108 u32 rxdma_err:1; /* bit 9 */
109 u32 rxdma_pkt_stat_ring_low:1; /* bit 8 */
110 u32 rxdma_fb_ring1_low:1; /* bit 7 */
111 u32 rxdma_fb_ring0_low:1; /* bit 6 */
112 u32 rxdma_xfr_done:1; /* bit 5 */
113 u32 txdma_err:1; /* bit 4 */
114 u32 txdma_isr:1; /* bit 3 */
115 u32 unused3:1; /* bit 2 */
116 u32 unused2:1; /* bit 1 */
117 u32 unused1:1; /* bit 0 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700118#else
Alan Cox64f93032009-06-10 17:30:41 +0100119 u32 unused1:1; /* bit 0 */
120 u32 unused2:1; /* bit 1 */
121 u32 unused3:1; /* bit 2 */
122 u32 txdma_isr:1; /* bit 3 */
123 u32 txdma_err:1; /* bit 4 */
124 u32 rxdma_xfr_done:1; /* bit 5 */
125 u32 rxdma_fb_ring0_low:1; /* bit 6 */
126 u32 rxdma_fb_ring1_low:1; /* bit 7 */
127 u32 rxdma_pkt_stat_ring_low:1; /* bit 8 */
128 u32 rxdma_err:1; /* bit 9 */
129 u32 unused4:4; /* bits 10-13 */
130 u32 watchdog_interrupt:1; /* bit 14 */
131 u32 wake_on_lan:1; /* bit 15 */
132 u32 phy_interrupt:1; /* bit 16 */
133 u32 txmac_interrupt:1; /* bit 17 */
134 u32 rxmac_interrupt:1; /* bit 18 */
135 u32 mac_stat_interrupt:1; /* bit 19 */
136 u32 slv_timeout:1; /* bit 20 */
137 u32 unused5:11; /* bits 21-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700138#endif
139 } bits;
140} INTERRUPT_t, *PINTERRUPT_t;
141
142/*
143 * structure for interrupt mask reg in global address map
144 * located at address 0x001C
145 * Defined earlier (INTERRUPT_t), but 'watchdog_interrupt' is not used.
146 */
147
148/*
149 * structure for interrupt alias clear mask reg in global address map
150 * located at address 0x0020
151 * Defined earlier (INTERRUPT_t)
152 */
153
154/*
155 * structure for interrupt status alias reg in global address map
156 * located at address 0x0024
157 * Defined earlier (INTERRUPT_t)
158 */
159
160/*
161 * structure for software reset reg in global address map
162 * located at address 0x0028
163 */
164typedef union _SW_RESET_t {
165 u32 value;
166 struct {
167#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +0100168 u32 selfclr_disable:1; /* bit 31 */
169 u32 unused:24; /* bits 7-30 */
170 u32 mmc_sw_reset:1; /* bit 6 */
171 u32 mac_stat_sw_reset:1; /* bit 5 */
172 u32 mac_sw_reset:1; /* bit 4 */
173 u32 rxmac_sw_reset:1; /* bit 3 */
174 u32 txmac_sw_reset:1; /* bit 2 */
175 u32 rxdma_sw_reset:1; /* bit 1 */
176 u32 txdma_sw_reset:1; /* bit 0 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700177#else
Alan Cox64f93032009-06-10 17:30:41 +0100178 u32 txdma_sw_reset:1; /* bit 0 */
179 u32 rxdma_sw_reset:1; /* bit 1 */
180 u32 txmac_sw_reset:1; /* bit 2 */
181 u32 rxmac_sw_reset:1; /* bit 3 */
182 u32 mac_sw_reset:1; /* bit 4 */
183 u32 mac_stat_sw_reset:1; /* bit 5 */
184 u32 mmc_sw_reset:1; /* bit 6 */
185 u32 unused:24; /* bits 7-30 */
186 u32 selfclr_disable:1; /* bit 31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700187#endif
188 } bits;
189} SW_RESET_t, *PSW_RESET_t;
190
191/*
192 * structure for SLV Timer reg in global address map
193 * located at address 0x002C
194 */
195typedef union _SLV_TIMER_t {
196 u32 value;
197 struct {
198#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +0100199 u32 unused:8; /* bits 24-31 */
200 u32 timer_ini:24; /* bits 0-23 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700201#else
Alan Cox64f93032009-06-10 17:30:41 +0100202 u32 timer_ini:24; /* bits 0-23 */
203 u32 unused:8; /* bits 24-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700204#endif
205 } bits;
206} SLV_TIMER_t, *PSLV_TIMER_t;
207
208/*
209 * structure for MSI Configuration reg in global address map
210 * located at address 0x0030
211 */
212typedef union _MSI_CONFIG_t {
213 u32 value;
214 struct {
215#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +0100216 u32 unused1:13; /* bits 19-31 */
217 u32 msi_tc:3; /* bits 16-18 */
218 u32 unused2:11; /* bits 5-15 */
219 u32 msi_vector:5; /* bits 0-4 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700220#else
Alan Cox64f93032009-06-10 17:30:41 +0100221 u32 msi_vector:5; /* bits 0-4 */
222 u32 unused2:11; /* bits 5-15 */
223 u32 msi_tc:3; /* bits 16-18 */
224 u32 unused1:13; /* bits 19-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700225#endif
226 } bits;
227} MSI_CONFIG_t, *PMSI_CONFIG_t;
228
229/*
230 * structure for Loopback reg in global address map
231 * located at address 0x0034
232 */
233typedef union _LOOPBACK_t {
234 u32 value;
235 struct {
236#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +0100237 u32 unused:30; /* bits 2-31 */
238 u32 dma_loopback:1; /* bit 1 */
239 u32 mac_loopback:1; /* bit 0 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700240#else
Alan Cox64f93032009-06-10 17:30:41 +0100241 u32 mac_loopback:1; /* bit 0 */
242 u32 dma_loopback:1; /* bit 1 */
243 u32 unused:30; /* bits 2-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700244#endif
245 } bits;
246} LOOPBACK_t, *PLOOPBACK_t;
247
248/*
249 * GLOBAL Module of JAGCore Address Mapping
250 * Located at address 0x0000
251 */
Alan Cox64f93032009-06-10 17:30:41 +0100252typedef struct _GLOBAL_t { /* Location: */
Alan Coxb8ab7352009-08-27 11:01:42 +0100253 u32 txq_start_addr; /* 0x0000 */
254 u32 txq_end_addr; /* 0x0004 */
255 u32 rxq_start_addr; /* 0x0008 */
256 u32 rxq_end_addr; /* 0x000C */
Alan Coxf2c98d22009-08-27 11:01:49 +0100257 u32 pm_csr; /* 0x0010 */
Alan Cox64f93032009-06-10 17:30:41 +0100258 u32 unused; /* 0x0014 */
259 INTERRUPT_t int_status; /* 0x0018 */
260 INTERRUPT_t int_mask; /* 0x001C */
261 INTERRUPT_t int_alias_clr_en; /* 0x0020 */
262 INTERRUPT_t int_status_alias; /* 0x0024 */
263 SW_RESET_t sw_reset; /* 0x0028 */
264 SLV_TIMER_t slv_timer; /* 0x002C */
265 MSI_CONFIG_t msi_config; /* 0x0030 */
266 LOOPBACK_t loopback; /* 0x0034 */
267 u32 watchdog_timer; /* 0x0038 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700268} GLOBAL_t, *PGLOBAL_t;
269
270/* END OF GLOBAL REGISTER ADDRESS MAP */
271
272
273/* START OF TXDMA REGISTER ADDRESS MAP */
274
275/*
276 * structure for txdma control status reg in txdma address map
277 * located at address 0x1000
278 */
279typedef union _TXDMA_CSR_t {
280 u32 value;
281 struct {
282#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +0100283 u32 unused2:19; /* bits 13-31 */
284 u32 traffic_class:4; /* bits 9-12 */
285 u32 sngl_epkt_mode:1; /* bit 8 */
286 u32 cache_thrshld:4; /* bits 4-7 */
287 u32 unused1:2; /* bits 2-3 */
288 u32 drop_TLP_disable:1; /* bit 1 */
289 u32 halt:1; /* bit 0 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700290#else
Alan Cox64f93032009-06-10 17:30:41 +0100291 u32 halt:1; /* bit 0 */
292 u32 drop_TLP_disable:1; /* bit 1 */
293 u32 unused1:2; /* bits 2-3 */
294 u32 cache_thrshld:4; /* bits 4-7 */
295 u32 sngl_epkt_mode:1; /* bit 8 */
296 u32 traffic_class:4; /* bits 9-12 */
297 u32 unused2:19; /* bits 13-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700298#endif
299 } bits;
300} TXDMA_CSR_t, *PTXDMA_CSR_t;
301
302/*
303 * structure for txdma packet ring base address hi reg in txdma address map
304 * located at address 0x1004
305 * Defined earlier (u32)
306 */
307
308/*
309 * structure for txdma packet ring base address low reg in txdma address map
310 * located at address 0x1008
311 * Defined earlier (u32)
312 */
313
314/*
315 * structure for txdma packet ring number of descriptor reg in txdma address
316 * map. Located at address 0x100C
317 */
318typedef union _TXDMA_PR_NUM_DES_t {
319 u32 value;
320 struct {
321#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +0100322 u32 unused:22; /* bits 10-31 */
323 u32 pr_ndes:10; /* bits 0-9 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700324#else
Alan Cox64f93032009-06-10 17:30:41 +0100325 u32 pr_ndes:10; /* bits 0-9 */
326 u32 unused:22; /* bits 10-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700327#endif
328 } bits;
329} TXDMA_PR_NUM_DES_t, *PTXDMA_PR_NUM_DES_t;
330
331
332typedef union _DMA10W_t {
333 u32 value;
334 struct {
335#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +0100336 u32 unused:21; /* bits 11-31 */
337 u32 wrap:1; /* bit 10 */
338 u32 val:10; /* bits 0-9 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700339#else
Alan Cox64f93032009-06-10 17:30:41 +0100340 u32 val:10; /* bits 0-9 */
341 u32 wrap:1; /* bit 10 */
342 u32 unused:21; /* bits 11-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700343#endif
344 } bits;
345} DMA10W_t, *PDMA10W_t;
346
347/*
348 * structure for txdma tx queue write address reg in txdma address map
349 * located at address 0x1010
350 * Defined earlier (DMA10W_t)
351 */
352
353/*
354 * structure for txdma tx queue write address external reg in txdma address map
355 * located at address 0x1014
356 * Defined earlier (DMA10W_t)
357 */
358
359/*
360 * structure for txdma tx queue read address reg in txdma address map
361 * located at address 0x1018
362 * Defined earlier (DMA10W_t)
363 */
364
365/*
366 * structure for txdma status writeback address hi reg in txdma address map
367 * located at address 0x101C
368 * Defined earlier (u32)
369 */
370
371/*
372 * structure for txdma status writeback address lo reg in txdma address map
373 * located at address 0x1020
374 * Defined earlier (u32)
375 */
376
377/*
378 * structure for txdma service request reg in txdma address map
379 * located at address 0x1024
380 * Defined earlier (DMA10W_t)
381 */
382
383/*
384 * structure for txdma service complete reg in txdma address map
385 * located at address 0x1028
386 * Defined earlier (DMA10W_t)
387 */
388
389typedef union _DMA4W_t {
390 u32 value;
391 struct {
392#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +0100393 u32 unused:27; /* bits 5-31 */
394 u32 wrap:1; /* bit 4 */
395 u32 val:4; /* bit 0-3 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700396#else
Alan Cox64f93032009-06-10 17:30:41 +0100397 u32 val:4; /* bits 0-3 */
398 u32 wrap:1; /* bit 4 */
399 u32 unused:27; /* bits 5-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700400#endif
401 } bits;
402} DMA4W_t, *PDMA4W_t;
403
404/*
405 * structure for txdma tx descriptor cache read index reg in txdma address map
406 * located at address 0x102C
407 * Defined earlier (DMA4W_t)
408 */
409
410/*
411 * structure for txdma tx descriptor cache write index reg in txdma address map
412 * located at address 0x1030
413 * Defined earlier (DMA4W_t)
414 */
415
416/*
417 * structure for txdma error reg in txdma address map
418 * located at address 0x1034
419 */
420typedef union _TXDMA_ERROR_t {
421 u32 value;
422 struct {
423#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +0100424 u32 unused3:22; /* bits 10-31 */
425 u32 WrbkRewind:1; /* bit 9 */
426 u32 WrbkResend:1; /* bit 8 */
427 u32 unused2:2; /* bits 6-7 */
428 u32 DescrRewind:1; /* bit 5 */
429 u32 DescrResend:1; /* bit 4 */
430 u32 unused1:2; /* bits 2-3 */
431 u32 PyldRewind:1; /* bit 1 */
432 u32 PyldResend:1; /* bit 0 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700433#else
Alan Cox64f93032009-06-10 17:30:41 +0100434 u32 PyldResend:1; /* bit 0 */
435 u32 PyldRewind:1; /* bit 1 */
436 u32 unused1:2; /* bits 2-3 */
437 u32 DescrResend:1; /* bit 4 */
438 u32 DescrRewind:1; /* bit 5 */
439 u32 unused2:2; /* bits 6-7 */
440 u32 WrbkResend:1; /* bit 8 */
441 u32 WrbkRewind:1; /* bit 9 */
442 u32 unused3:22; /* bits 10-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700443#endif
444 } bits;
445} TXDMA_ERROR_t, *PTXDMA_ERROR_t;
446
447/*
448 * Tx DMA Module of JAGCore Address Mapping
449 * Located at address 0x1000
450 */
Alan Cox64f93032009-06-10 17:30:41 +0100451typedef struct _TXDMA_t { /* Location: */
452 TXDMA_CSR_t csr; /* 0x1000 */
453 u32 pr_base_hi; /* 0x1004 */
454 u32 pr_base_lo; /* 0x1008 */
455 TXDMA_PR_NUM_DES_t pr_num_des; /* 0x100C */
456 DMA10W_t txq_wr_addr; /* 0x1010 */
457 DMA10W_t txq_wr_addr_ext; /* 0x1014 */
458 DMA10W_t txq_rd_addr; /* 0x1018 */
459 u32 dma_wb_base_hi; /* 0x101C */
460 u32 dma_wb_base_lo; /* 0x1020 */
461 DMA10W_t service_request; /* 0x1024 */
462 DMA10W_t service_complete; /* 0x1028 */
463 DMA4W_t cache_rd_index; /* 0x102C */
464 DMA4W_t cache_wr_index; /* 0x1030 */
465 TXDMA_ERROR_t TxDmaError; /* 0x1034 */
466 u32 DescAbortCount; /* 0x1038 */
467 u32 PayloadAbortCnt; /* 0x103c */
468 u32 WriteBackAbortCnt; /* 0x1040 */
469 u32 DescTimeoutCnt; /* 0x1044 */
470 u32 PayloadTimeoutCnt; /* 0x1048 */
471 u32 WriteBackTimeoutCnt; /* 0x104c */
472 u32 DescErrorCount; /* 0x1050 */
473 u32 PayloadErrorCnt; /* 0x1054 */
474 u32 WriteBackErrorCnt; /* 0x1058 */
475 u32 DroppedTLPCount; /* 0x105c */
476 DMA10W_t NewServiceComplete; /* 0x1060 */
477 u32 EthernetPacketCount; /* 0x1064 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700478} TXDMA_t, *PTXDMA_t;
479
480/* END OF TXDMA REGISTER ADDRESS MAP */
481
482
483/* START OF RXDMA REGISTER ADDRESS MAP */
484
485/*
486 * structure for control status reg in rxdma address map
487 * Located at address 0x2000
488 */
489typedef union _RXDMA_CSR_t {
490 u32 value;
491 struct {
492#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +0100493 u32 unused2:14; /* bits 18-31 */
494 u32 halt_status:1; /* bit 17 */
495 u32 pkt_done_flush:1; /* bit 16 */
496 u32 pkt_drop_disable:1; /* bit 15 */
497 u32 unused1:1; /* bit 14 */
498 u32 fbr1_enable:1; /* bit 13 */
499 u32 fbr1_size:2; /* bits 11-12 */
500 u32 fbr0_enable:1; /* bit 10 */
501 u32 fbr0_size:2; /* bits 8-9 */
502 u32 dma_big_endian:1; /* bit 7 */
503 u32 pkt_big_endian:1; /* bit 6 */
504 u32 psr_big_endian:1; /* bit 5 */
505 u32 fbr_big_endian:1; /* bit 4 */
506 u32 tc:3; /* bits 1-3 */
507 u32 halt:1; /* bit 0 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700508#else
Alan Cox64f93032009-06-10 17:30:41 +0100509 u32 halt:1; /* bit 0 */
510 u32 tc:3; /* bits 1-3 */
511 u32 fbr_big_endian:1; /* bit 4 */
512 u32 psr_big_endian:1; /* bit 5 */
513 u32 pkt_big_endian:1; /* bit 6 */
514 u32 dma_big_endian:1; /* bit 7 */
515 u32 fbr0_size:2; /* bits 8-9 */
516 u32 fbr0_enable:1; /* bit 10 */
517 u32 fbr1_size:2; /* bits 11-12 */
518 u32 fbr1_enable:1; /* bit 13 */
519 u32 unused1:1; /* bit 14 */
520 u32 pkt_drop_disable:1; /* bit 15 */
521 u32 pkt_done_flush:1; /* bit 16 */
522 u32 halt_status:1; /* bit 17 */
523 u32 unused2:14; /* bits 18-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700524#endif
525 } bits;
526} RXDMA_CSR_t, *PRXDMA_CSR_t;
527
528/*
529 * structure for dma writeback lo reg in rxdma address map
530 * located at address 0x2004
531 * Defined earlier (u32)
532 */
533
534/*
535 * structure for dma writeback hi reg in rxdma address map
536 * located at address 0x2008
537 * Defined earlier (u32)
538 */
539
540/*
541 * structure for number of packets done reg in rxdma address map
542 * located at address 0x200C
543 */
544typedef union _RXDMA_NUM_PKT_DONE_t {
545 u32 value;
546 struct {
547#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +0100548 u32 unused:24; /* bits 8-31 */
549 u32 num_done:8; /* bits 0-7 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700550#else
Alan Cox64f93032009-06-10 17:30:41 +0100551 u32 num_done:8; /* bits 0-7 */
552 u32 unused:24; /* bits 8-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700553#endif
554 } bits;
555} RXDMA_NUM_PKT_DONE_t, *PRXDMA_NUM_PKT_DONE_t;
556
557/*
558 * structure for max packet time reg in rxdma address map
559 * located at address 0x2010
560 */
561typedef union _RXDMA_MAX_PKT_TIME_t {
562 u32 value;
563 struct {
564#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +0100565 u32 unused:14; /* bits 18-31 */
566 u32 time_done:18; /* bits 0-17 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700567#else
Alan Cox64f93032009-06-10 17:30:41 +0100568 u32 time_done:18; /* bits 0-17 */
569 u32 unused:14; /* bits 18-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700570#endif
571 } bits;
572} RXDMA_MAX_PKT_TIME_t, *PRXDMA_MAX_PKT_TIME_t;
573
574/*
575 * structure for rx queue read address reg in rxdma address map
576 * located at address 0x2014
577 * Defined earlier (DMA10W_t)
578 */
579
580/*
581 * structure for rx queue read address external reg in rxdma address map
582 * located at address 0x2018
583 * Defined earlier (DMA10W_t)
584 */
585
586/*
587 * structure for rx queue write address reg in rxdma address map
588 * located at address 0x201C
589 * Defined earlier (DMA10W_t)
590 */
591
592/*
593 * structure for packet status ring base address lo reg in rxdma address map
594 * located at address 0x2020
595 * Defined earlier (u32)
596 */
597
598/*
599 * structure for packet status ring base address hi reg in rxdma address map
600 * located at address 0x2024
601 * Defined earlier (u32)
602 */
603
604/*
605 * structure for packet status ring number of descriptors reg in rxdma address
606 * map. Located at address 0x2028
607 */
608typedef union _RXDMA_PSR_NUM_DES_t {
609 u32 value;
610 struct {
611#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +0100612 u32 unused:20; /* bits 12-31 */
613 u32 psr_ndes:12; /* bit 0-11 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700614#else
Alan Cox64f93032009-06-10 17:30:41 +0100615 u32 psr_ndes:12; /* bit 0-11 */
616 u32 unused:20; /* bits 12-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700617#endif
618 } bits;
619} RXDMA_PSR_NUM_DES_t, *PRXDMA_PSR_NUM_DES_t;
620
621/*
622 * structure for packet status ring available offset reg in rxdma address map
623 * located at address 0x202C
624 */
625typedef union _RXDMA_PSR_AVAIL_OFFSET_t {
626 u32 value;
627 struct {
628#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +0100629 u32 unused:19; /* bits 13-31 */
630 u32 psr_avail_wrap:1; /* bit 12 */
631 u32 psr_avail:12; /* bit 0-11 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700632#else
Alan Cox64f93032009-06-10 17:30:41 +0100633 u32 psr_avail:12; /* bit 0-11 */
634 u32 psr_avail_wrap:1; /* bit 12 */
635 u32 unused:19; /* bits 13-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700636#endif
637 } bits;
638} RXDMA_PSR_AVAIL_OFFSET_t, *PRXDMA_PSR_AVAIL_OFFSET_t;
639
640/*
641 * structure for packet status ring full offset reg in rxdma address map
642 * located at address 0x2030
643 */
644typedef union _RXDMA_PSR_FULL_OFFSET_t {
645 u32 value;
646 struct {
647#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +0100648 u32 unused:19; /* bits 13-31 */
649 u32 psr_full_wrap:1; /* bit 12 */
650 u32 psr_full:12; /* bit 0-11 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700651#else
Alan Cox64f93032009-06-10 17:30:41 +0100652 u32 psr_full:12; /* bit 0-11 */
653 u32 psr_full_wrap:1; /* bit 12 */
654 u32 unused:19; /* bits 13-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700655#endif
656 } bits;
657} RXDMA_PSR_FULL_OFFSET_t, *PRXDMA_PSR_FULL_OFFSET_t;
658
659/*
660 * structure for packet status ring access index reg in rxdma address map
661 * located at address 0x2034
662 */
663typedef union _RXDMA_PSR_ACCESS_INDEX_t {
664 u32 value;
665 struct {
666#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +0100667 u32 unused:27; /* bits 5-31 */
668 u32 psr_ai:5; /* bits 0-4 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700669#else
Alan Cox64f93032009-06-10 17:30:41 +0100670 u32 psr_ai:5; /* bits 0-4 */
671 u32 unused:27; /* bits 5-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700672#endif
673 } bits;
674} RXDMA_PSR_ACCESS_INDEX_t, *PRXDMA_PSR_ACCESS_INDEX_t;
675
676/*
677 * structure for packet status ring minimum descriptors reg in rxdma address
678 * map. Located at address 0x2038
679 */
680typedef union _RXDMA_PSR_MIN_DES_t {
681 u32 value;
682 struct {
683#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +0100684 u32 unused:20; /* bits 12-31 */
685 u32 psr_min:12; /* bits 0-11 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700686#else
Alan Cox64f93032009-06-10 17:30:41 +0100687 u32 psr_min:12; /* bits 0-11 */
688 u32 unused:20; /* bits 12-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700689#endif
690 } bits;
691} RXDMA_PSR_MIN_DES_t, *PRXDMA_PSR_MIN_DES_t;
692
693/*
694 * structure for free buffer ring base lo address reg in rxdma address map
695 * located at address 0x203C
696 * Defined earlier (u32)
697 */
698
699/*
700 * structure for free buffer ring base hi address reg in rxdma address map
701 * located at address 0x2040
702 * Defined earlier (u32)
703 */
704
705/*
706 * structure for free buffer ring number of descriptors reg in rxdma address
707 * map. Located at address 0x2044
708 */
709typedef union _RXDMA_FBR_NUM_DES_t {
710 u32 value;
711 struct {
712#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +0100713 u32 unused:22; /* bits 10-31 */
714 u32 fbr_ndesc:10; /* bits 0-9 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700715#else
Alan Cox64f93032009-06-10 17:30:41 +0100716 u32 fbr_ndesc:10; /* bits 0-9 */
717 u32 unused:22; /* bits 10-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700718#endif
719 } bits;
720} RXDMA_FBR_NUM_DES_t, *PRXDMA_FBR_NUM_DES_t;
721
722/*
723 * structure for free buffer ring 0 available offset reg in rxdma address map
724 * located at address 0x2048
725 * Defined earlier (DMA10W_t)
726 */
727
728/*
729 * structure for free buffer ring 0 full offset reg in rxdma address map
730 * located at address 0x204C
731 * Defined earlier (DMA10W_t)
732 */
733
734/*
735 * structure for free buffer cache 0 full offset reg in rxdma address map
736 * located at address 0x2050
737 */
738typedef union _RXDMA_FBC_RD_INDEX_t {
739 u32 value;
740 struct {
741#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +0100742 u32 unused:27; /* bits 5-31 */
743 u32 fbc_rdi:5; /* bit 0-4 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700744#else
Alan Cox64f93032009-06-10 17:30:41 +0100745 u32 fbc_rdi:5; /* bit 0-4 */
746 u32 unused:27; /* bits 5-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700747#endif
748 } bits;
749} RXDMA_FBC_RD_INDEX_t, *PRXDMA_FBC_RD_INDEX_t;
750
751/*
752 * structure for free buffer ring 0 minimum descriptor reg in rxdma address map
753 * located at address 0x2054
754 */
755typedef union _RXDMA_FBR_MIN_DES_t {
756 u32 value;
757 struct {
758#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +0100759 u32 unused:22; /* bits 10-31 */
760 u32 fbr_min:10; /* bits 0-9 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700761#else
Alan Cox64f93032009-06-10 17:30:41 +0100762 u32 fbr_min:10; /* bits 0-9 */
763 u32 unused:22; /* bits 10-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700764#endif
765 } bits;
766} RXDMA_FBR_MIN_DES_t, *PRXDMA_FBR_MIN_DES_t;
767
768/*
769 * structure for free buffer ring 1 base address lo reg in rxdma address map
770 * located at address 0x2058 - 0x205C
771 * Defined earlier (RXDMA_FBR_BASE_LO_t and RXDMA_FBR_BASE_HI_t)
772 */
773
774/*
775 * structure for free buffer ring 1 number of descriptors reg in rxdma address
776 * map. Located at address 0x2060
777 * Defined earlier (RXDMA_FBR_NUM_DES_t)
778 */
779
780/*
781 * structure for free buffer ring 1 available offset reg in rxdma address map
782 * located at address 0x2064
783 * Defined Earlier (RXDMA_FBR_AVAIL_OFFSET_t)
784 */
785
786/*
787 * structure for free buffer ring 1 full offset reg in rxdma address map
788 * located at address 0x2068
789 * Defined Earlier (RXDMA_FBR_FULL_OFFSET_t)
790 */
791
792/*
793 * structure for free buffer cache 1 read index reg in rxdma address map
794 * located at address 0x206C
795 * Defined Earlier (RXDMA_FBC_RD_INDEX_t)
796 */
797
798/*
799 * structure for free buffer ring 1 minimum descriptor reg in rxdma address map
800 * located at address 0x2070
801 * Defined Earlier (RXDMA_FBR_MIN_DES_t)
802 */
803
804/*
805 * Rx DMA Module of JAGCore Address Mapping
806 * Located at address 0x2000
807 */
Alan Cox64f93032009-06-10 17:30:41 +0100808typedef struct _RXDMA_t { /* Location: */
809 RXDMA_CSR_t csr; /* 0x2000 */
810 u32 dma_wb_base_lo; /* 0x2004 */
811 u32 dma_wb_base_hi; /* 0x2008 */
812 RXDMA_NUM_PKT_DONE_t num_pkt_done; /* 0x200C */
813 RXDMA_MAX_PKT_TIME_t max_pkt_time; /* 0x2010 */
814 DMA10W_t rxq_rd_addr; /* 0x2014 */
815 DMA10W_t rxq_rd_addr_ext; /* 0x2018 */
816 DMA10W_t rxq_wr_addr; /* 0x201C */
817 u32 psr_base_lo; /* 0x2020 */
818 u32 psr_base_hi; /* 0x2024 */
819 RXDMA_PSR_NUM_DES_t psr_num_des; /* 0x2028 */
820 RXDMA_PSR_AVAIL_OFFSET_t psr_avail_offset; /* 0x202C */
821 RXDMA_PSR_FULL_OFFSET_t psr_full_offset; /* 0x2030 */
822 RXDMA_PSR_ACCESS_INDEX_t psr_access_index; /* 0x2034 */
823 RXDMA_PSR_MIN_DES_t psr_min_des; /* 0x2038 */
824 u32 fbr0_base_lo; /* 0x203C */
825 u32 fbr0_base_hi; /* 0x2040 */
826 RXDMA_FBR_NUM_DES_t fbr0_num_des; /* 0x2044 */
827 DMA10W_t fbr0_avail_offset; /* 0x2048 */
828 DMA10W_t fbr0_full_offset; /* 0x204C */
829 RXDMA_FBC_RD_INDEX_t fbr0_rd_index; /* 0x2050 */
830 RXDMA_FBR_MIN_DES_t fbr0_min_des; /* 0x2054 */
831 u32 fbr1_base_lo; /* 0x2058 */
832 u32 fbr1_base_hi; /* 0x205C */
833 RXDMA_FBR_NUM_DES_t fbr1_num_des; /* 0x2060 */
834 DMA10W_t fbr1_avail_offset; /* 0x2064 */
835 DMA10W_t fbr1_full_offset; /* 0x2068 */
836 RXDMA_FBC_RD_INDEX_t fbr1_rd_index; /* 0x206C */
837 RXDMA_FBR_MIN_DES_t fbr1_min_des; /* 0x2070 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700838} RXDMA_t, *PRXDMA_t;
839
840/* END OF RXDMA REGISTER ADDRESS MAP */
841
842
843/* START OF TXMAC REGISTER ADDRESS MAP */
844
845/*
846 * structure for control reg in txmac address map
847 * located at address 0x3000
848 */
849typedef union _TXMAC_CTL_t {
850 u32 value;
851 struct {
852#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +0100853 u32 unused:24; /* bits 8-31 */
854 u32 cklseg_diable:1; /* bit 7 */
855 u32 ckbcnt_disable:1; /* bit 6 */
856 u32 cksegnum:1; /* bit 5 */
857 u32 async_disable:1; /* bit 4 */
858 u32 fc_disable:1; /* bit 3 */
859 u32 mcif_disable:1; /* bit 2 */
860 u32 mif_disable:1; /* bit 1 */
861 u32 txmac_en:1; /* bit 0 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700862#else
Alan Cox64f93032009-06-10 17:30:41 +0100863 u32 txmac_en:1; /* bit 0 */
864 u32 mif_disable:1; /* bit 1 mac interface */
865 u32 mcif_disable:1; /* bit 2 mem. contr. interface */
866 u32 fc_disable:1; /* bit 3 */
867 u32 async_disable:1; /* bit 4 */
868 u32 cksegnum:1; /* bit 5 */
869 u32 ckbcnt_disable:1; /* bit 6 */
870 u32 cklseg_diable:1; /* bit 7 */
871 u32 unused:24; /* bits 8-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700872#endif
873 } bits;
874} TXMAC_CTL_t, *PTXMAC_CTL_t;
875
876/*
877 * structure for shadow pointer reg in txmac address map
878 * located at address 0x3004
879 */
880typedef union _TXMAC_SHADOW_PTR_t {
881 u32 value;
882 struct {
883#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +0100884 u32 reserved2:5; /* bits 27-31 */
885 u32 txq_rd_ptr:11; /* bits 16-26 */
886 u32 reserved:5; /* bits 11-15 */
887 u32 txq_wr_ptr:11; /* bits 0-10 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700888#else
Alan Cox64f93032009-06-10 17:30:41 +0100889 u32 txq_wr_ptr:11; /* bits 0-10 */
890 u32 reserved:5; /* bits 11-15 */
891 u32 txq_rd_ptr:11; /* bits 16-26 */
892 u32 reserved2:5; /* bits 27-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700893#endif
894 } bits;
895} TXMAC_SHADOW_PTR_t, *PTXMAC_SHADOW_PTR_t;
896
897/*
898 * structure for error count reg in txmac address map
899 * located at address 0x3008
900 */
901typedef union _TXMAC_ERR_CNT_t {
902 u32 value;
903 struct {
904#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +0100905 u32 unused:20; /* bits 12-31 */
906 u32 reserved:4; /* bits 8-11 */
907 u32 txq_underrun:4; /* bits 4-7 */
908 u32 fifo_underrun:4; /* bits 0-3 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700909#else
Alan Cox64f93032009-06-10 17:30:41 +0100910 u32 fifo_underrun:4; /* bits 0-3 */
911 u32 txq_underrun:4; /* bits 4-7 */
912 u32 reserved:4; /* bits 8-11 */
913 u32 unused:20; /* bits 12-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700914#endif
915 } bits;
916} TXMAC_ERR_CNT_t, *PTXMAC_ERR_CNT_t;
917
918/*
919 * structure for max fill reg in txmac address map
920 * located at address 0x300C
921 */
922typedef union _TXMAC_MAX_FILL_t {
923 u32 value;
924 struct {
925#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +0100926 u32 unused:20; /* bits 12-31 */
927 u32 max_fill:12; /* bits 0-11 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700928#else
Alan Cox64f93032009-06-10 17:30:41 +0100929 u32 max_fill:12; /* bits 0-11 */
930 u32 unused:20; /* bits 12-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700931#endif
932 } bits;
933} TXMAC_MAX_FILL_t, *PTXMAC_MAX_FILL_t;
934
935/*
936 * structure for cf parameter reg in txmac address map
937 * located at address 0x3010
938 */
939typedef union _TXMAC_CF_PARAM_t {
940 u32 value;
941 struct {
942#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +0100943 u32 cfep:16; /* bits 16-31 */
944 u32 cfpt:16; /* bits 0-15 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700945#else
Alan Cox64f93032009-06-10 17:30:41 +0100946 u32 cfpt:16; /* bits 0-15 */
947 u32 cfep:16; /* bits 16-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700948#endif
949 } bits;
950} TXMAC_CF_PARAM_t, *PTXMAC_CF_PARAM_t;
951
952/*
953 * structure for tx test reg in txmac address map
954 * located at address 0x3014
955 */
956typedef union _TXMAC_TXTEST_t {
957 u32 value;
958 struct {
959#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +0100960 u32 unused2:15; /* bits 17-31 */
961 u32 reserved1:1; /* bit 16 */
962 u32 txtest_en:1; /* bit 15 */
963 u32 unused1:4; /* bits 11-14 */
964 u32 txqtest_ptr:11; /* bits 0-11 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700965#else
Alan Cox64f93032009-06-10 17:30:41 +0100966 u32 txqtest_ptr:11; /* bits 0-10 */
967 u32 unused1:4; /* bits 11-14 */
968 u32 txtest_en:1; /* bit 15 */
969 u32 reserved1:1; /* bit 16 */
970 u32 unused2:15; /* bits 17-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700971#endif
972 } bits;
973} TXMAC_TXTEST_t, *PTXMAC_TXTEST_t;
974
975/*
976 * structure for error reg in txmac address map
977 * located at address 0x3018
978 */
979typedef union _TXMAC_ERR_t {
980 u32 value;
981 struct {
982#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +0100983 u32 unused2:23; /* bits 9-31 */
984 u32 fifo_underrun:1; /* bit 8 */
985 u32 unused1:2; /* bits 6-7 */
986 u32 ctrl2_err:1; /* bit 5 */
987 u32 txq_underrun:1; /* bit 4 */
988 u32 bcnt_err:1; /* bit 3 */
989 u32 lseg_err:1; /* bit 2 */
990 u32 segnum_err:1; /* bit 1 */
991 u32 seg0_err:1; /* bit 0 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -0700992#else
Alan Cox64f93032009-06-10 17:30:41 +0100993 u32 seg0_err:1; /* bit 0 */
994 u32 segnum_err:1; /* bit 1 */
995 u32 lseg_err:1; /* bit 2 */
996 u32 bcnt_err:1; /* bit 3 */
997 u32 txq_underrun:1; /* bit 4 */
998 u32 ctrl2_err:1; /* bit 5 */
999 u32 unused1:2; /* bits 6-7 */
1000 u32 fifo_underrun:1; /* bit 8 */
1001 u32 unused2:23; /* bits 9-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001002#endif
1003 } bits;
1004} TXMAC_ERR_t, *PTXMAC_ERR_t;
1005
1006/*
1007 * structure for error interrupt reg in txmac address map
1008 * located at address 0x301C
1009 */
1010typedef union _TXMAC_ERR_INT_t {
1011 u32 value;
1012 struct {
1013#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +01001014 u32 unused2:23; /* bits 9-31 */
1015 u32 fifo_underrun:1; /* bit 8 */
1016 u32 unused1:2; /* bits 6-7 */
1017 u32 ctrl2_err:1; /* bit 5 */
1018 u32 txq_underrun:1; /* bit 4 */
1019 u32 bcnt_err:1; /* bit 3 */
1020 u32 lseg_err:1; /* bit 2 */
1021 u32 segnum_err:1; /* bit 1 */
1022 u32 seg0_err:1; /* bit 0 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001023#else
Alan Cox64f93032009-06-10 17:30:41 +01001024 u32 seg0_err:1; /* bit 0 */
1025 u32 segnum_err:1; /* bit 1 */
1026 u32 lseg_err:1; /* bit 2 */
1027 u32 bcnt_err:1; /* bit 3 */
1028 u32 txq_underrun:1; /* bit 4 */
1029 u32 ctrl2_err:1; /* bit 5 */
1030 u32 unused1:2; /* bits 6-7 */
1031 u32 fifo_underrun:1; /* bit 8 */
1032 u32 unused2:23; /* bits 9-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001033#endif
1034 } bits;
1035} TXMAC_ERR_INT_t, *PTXMAC_ERR_INT_t;
1036
1037/*
1038 * structure for error interrupt reg in txmac address map
1039 * located at address 0x3020
1040 */
1041typedef union _TXMAC_CP_CTRL_t {
1042 u32 value;
1043 struct {
1044#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +01001045 u32 unused:30; /* bits 2-31 */
1046 u32 bp_req:1; /* bit 1 */
1047 u32 bp_xonxoff:1; /* bit 0 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001048#else
Alan Cox64f93032009-06-10 17:30:41 +01001049 u32 bp_xonxoff:1; /* bit 0 */
1050 u32 bp_req:1; /* bit 1 */
1051 u32 unused:30; /* bits 2-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001052#endif
1053 } bits;
1054} TXMAC_BP_CTRL_t, *PTXMAC_BP_CTRL_t;
1055
1056/*
1057 * Tx MAC Module of JAGCore Address Mapping
1058 */
Alan Cox64f93032009-06-10 17:30:41 +01001059typedef struct _TXMAC_t { /* Location: */
1060 TXMAC_CTL_t ctl; /* 0x3000 */
1061 TXMAC_SHADOW_PTR_t shadow_ptr; /* 0x3004 */
1062 TXMAC_ERR_CNT_t err_cnt; /* 0x3008 */
1063 TXMAC_MAX_FILL_t max_fill; /* 0x300C */
1064 TXMAC_CF_PARAM_t cf_param; /* 0x3010 */
1065 TXMAC_TXTEST_t tx_test; /* 0x3014 */
1066 TXMAC_ERR_t err; /* 0x3018 */
1067 TXMAC_ERR_INT_t err_int; /* 0x301C */
1068 TXMAC_BP_CTRL_t bp_ctrl; /* 0x3020 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001069} TXMAC_t, *PTXMAC_t;
1070
1071/* END OF TXMAC REGISTER ADDRESS MAP */
1072
1073/* START OF RXMAC REGISTER ADDRESS MAP */
1074
1075/*
1076 * structure for rxmac control reg in rxmac address map
1077 * located at address 0x4000
1078 */
1079typedef union _RXMAC_CTRL_t {
1080 u32 value;
1081 struct {
1082#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +01001083 u32 reserved:25; /* bits 7-31 */
1084 u32 rxmac_int_disable:1; /* bit 6 */
1085 u32 async_disable:1; /* bit 5 */
1086 u32 mif_disable:1; /* bit 4 */
1087 u32 wol_disable:1; /* bit 3 */
1088 u32 pkt_filter_disable:1; /* bit 2 */
1089 u32 mcif_disable:1; /* bit 1 */
1090 u32 rxmac_en:1; /* bit 0 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001091#else
Alan Cox64f93032009-06-10 17:30:41 +01001092 u32 rxmac_en:1; /* bit 0 */
1093 u32 mcif_disable:1; /* bit 1 */
1094 u32 pkt_filter_disable:1; /* bit 2 */
1095 u32 wol_disable:1; /* bit 3 */
1096 u32 mif_disable:1; /* bit 4 */
1097 u32 async_disable:1; /* bit 5 */
1098 u32 rxmac_int_disable:1; /* bit 6 */
1099 u32 reserved:25; /* bits 7-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001100#endif
1101 } bits;
1102} RXMAC_CTRL_t, *PRXMAC_CTRL_t;
1103
1104/*
1105 * structure for Wake On Lan Control and CRC 0 reg in rxmac address map
1106 * located at address 0x4004
1107 */
1108typedef union _RXMAC_WOL_CTL_CRC0_t {
1109 u32 value;
1110 struct {
1111#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +01001112 u32 crc0:16; /* bits 16-31 */
1113 u32 reserve:4; /* bits 12-15 */
1114 u32 ignore_pp:1; /* bit 11 */
1115 u32 ignore_mp:1; /* bit 10 */
1116 u32 clr_intr:1; /* bit 9 */
1117 u32 ignore_link_chg:1; /* bit 8 */
1118 u32 ignore_uni:1; /* bit 7 */
1119 u32 ignore_multi:1; /* bit 6 */
1120 u32 ignore_broad:1; /* bit 5 */
1121 u32 valid_crc4:1; /* bit 4 */
1122 u32 valid_crc3:1; /* bit 3 */
1123 u32 valid_crc2:1; /* bit 2 */
1124 u32 valid_crc1:1; /* bit 1 */
1125 u32 valid_crc0:1; /* bit 0 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001126#else
Alan Cox64f93032009-06-10 17:30:41 +01001127 u32 valid_crc0:1; /* bit 0 */
1128 u32 valid_crc1:1; /* bit 1 */
1129 u32 valid_crc2:1; /* bit 2 */
1130 u32 valid_crc3:1; /* bit 3 */
1131 u32 valid_crc4:1; /* bit 4 */
1132 u32 ignore_broad:1; /* bit 5 */
1133 u32 ignore_multi:1; /* bit 6 */
1134 u32 ignore_uni:1; /* bit 7 */
1135 u32 ignore_link_chg:1; /* bit 8 */
1136 u32 clr_intr:1; /* bit 9 */
1137 u32 ignore_mp:1; /* bit 10 */
1138 u32 ignore_pp:1; /* bit 11 */
1139 u32 reserve:4; /* bits 12-15 */
1140 u32 crc0:16; /* bits 16-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001141#endif
1142 } bits;
1143} RXMAC_WOL_CTL_CRC0_t, *PRXMAC_WOL_CTL_CRC0_t;
1144
1145/*
1146 * structure for CRC 1 and CRC 2 reg in rxmac address map
1147 * located at address 0x4008
1148 */
1149typedef union _RXMAC_WOL_CRC12_t {
1150 u32 value;
1151 struct {
1152#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +01001153 u32 crc2:16; /* bits 16-31 */
1154 u32 crc1:16; /* bits 0-15 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001155#else
Alan Cox64f93032009-06-10 17:30:41 +01001156 u32 crc1:16; /* bits 0-15 */
1157 u32 crc2:16; /* bits 16-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001158#endif
1159 } bits;
1160} RXMAC_WOL_CRC12_t, *PRXMAC_WOL_CRC12_t;
1161
1162/*
1163 * structure for CRC 3 and CRC 4 reg in rxmac address map
1164 * located at address 0x400C
1165 */
1166typedef union _RXMAC_WOL_CRC34_t {
1167 u32 value;
1168 struct {
1169#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +01001170 u32 crc4:16; /* bits 16-31 */
1171 u32 crc3:16; /* bits 0-15 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001172#else
Alan Cox64f93032009-06-10 17:30:41 +01001173 u32 crc3:16; /* bits 0-15 */
1174 u32 crc4:16; /* bits 16-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001175#endif
1176 } bits;
1177} RXMAC_WOL_CRC34_t, *PRXMAC_WOL_CRC34_t;
1178
1179/*
1180 * structure for Wake On Lan Source Address Lo reg in rxmac address map
1181 * located at address 0x4010
1182 */
1183typedef union _RXMAC_WOL_SA_LO_t {
1184 u32 value;
1185 struct {
1186#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +01001187 u32 sa3:8; /* bits 24-31 */
1188 u32 sa4:8; /* bits 16-23 */
1189 u32 sa5:8; /* bits 8-15 */
1190 u32 sa6:8; /* bits 0-7 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001191#else
Alan Cox64f93032009-06-10 17:30:41 +01001192 u32 sa6:8; /* bits 0-7 */
1193 u32 sa5:8; /* bits 8-15 */
1194 u32 sa4:8; /* bits 16-23 */
1195 u32 sa3:8; /* bits 24-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001196#endif
1197 } bits;
1198} RXMAC_WOL_SA_LO_t, *PRXMAC_WOL_SA_LO_t;
1199
1200/*
1201 * structure for Wake On Lan Source Address Hi reg in rxmac address map
1202 * located at address 0x4014
1203 */
1204typedef union _RXMAC_WOL_SA_HI_t {
1205 u32 value;
1206 struct {
1207#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +01001208 u32 reserved:16; /* bits 16-31 */
1209 u32 sa1:8; /* bits 8-15 */
1210 u32 sa2:8; /* bits 0-7 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001211#else
Alan Cox64f93032009-06-10 17:30:41 +01001212 u32 sa2:8; /* bits 0-7 */
1213 u32 sa1:8; /* bits 8-15 */
1214 u32 reserved:16; /* bits 16-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001215#endif
1216 } bits;
1217} RXMAC_WOL_SA_HI_t, *PRXMAC_WOL_SA_HI_t;
1218
1219/*
1220 * structure for Wake On Lan mask reg in rxmac address map
1221 * located at address 0x4018 - 0x4064
1222 * Defined earlier (u32)
1223 */
1224
1225/*
1226 * structure for Unicast Paket Filter Address 1 reg in rxmac address map
1227 * located at address 0x4068
1228 */
1229typedef union _RXMAC_UNI_PF_ADDR1_t {
1230 u32 value;
1231 struct {
1232#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +01001233 u32 addr1_3:8; /* bits 24-31 */
1234 u32 addr1_4:8; /* bits 16-23 */
1235 u32 addr1_5:8; /* bits 8-15 */
1236 u32 addr1_6:8; /* bits 0-7 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001237#else
Alan Cox64f93032009-06-10 17:30:41 +01001238 u32 addr1_6:8; /* bits 0-7 */
1239 u32 addr1_5:8; /* bits 8-15 */
1240 u32 addr1_4:8; /* bits 16-23 */
1241 u32 addr1_3:8; /* bits 24-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001242#endif
1243 } bits;
1244} RXMAC_UNI_PF_ADDR1_t, *PRXMAC_UNI_PF_ADDR1_t;
1245
1246/*
1247 * structure for Unicast Paket Filter Address 2 reg in rxmac address map
1248 * located at address 0x406C
1249 */
1250typedef union _RXMAC_UNI_PF_ADDR2_t {
1251 u32 value;
1252 struct {
1253#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +01001254 u32 addr2_3:8; /* bits 24-31 */
1255 u32 addr2_4:8; /* bits 16-23 */
1256 u32 addr2_5:8; /* bits 8-15 */
1257 u32 addr2_6:8; /* bits 0-7 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001258#else
Alan Cox64f93032009-06-10 17:30:41 +01001259 u32 addr2_6:8; /* bits 0-7 */
1260 u32 addr2_5:8; /* bits 8-15 */
1261 u32 addr2_4:8; /* bits 16-23 */
1262 u32 addr2_3:8; /* bits 24-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001263#endif
1264 } bits;
1265} RXMAC_UNI_PF_ADDR2_t, *PRXMAC_UNI_PF_ADDR2_t;
1266
1267/*
1268 * structure for Unicast Paket Filter Address 1 & 2 reg in rxmac address map
1269 * located at address 0x4070
1270 */
1271typedef union _RXMAC_UNI_PF_ADDR3_t {
1272 u32 value;
1273 struct {
1274#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +01001275 u32 addr2_1:8; /* bits 24-31 */
1276 u32 addr2_2:8; /* bits 16-23 */
1277 u32 addr1_1:8; /* bits 8-15 */
1278 u32 addr1_2:8; /* bits 0-7 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001279#else
Alan Cox64f93032009-06-10 17:30:41 +01001280 u32 addr1_2:8; /* bits 0-7 */
1281 u32 addr1_1:8; /* bits 8-15 */
1282 u32 addr2_2:8; /* bits 16-23 */
1283 u32 addr2_1:8; /* bits 24-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001284#endif
1285 } bits;
1286} RXMAC_UNI_PF_ADDR3_t, *PRXMAC_UNI_PF_ADDR3_t;
1287
1288/*
1289 * structure for Multicast Hash reg in rxmac address map
1290 * located at address 0x4074 - 0x4080
1291 * Defined earlier (u32)
1292 */
1293
1294/*
1295 * structure for Packet Filter Control reg in rxmac address map
1296 * located at address 0x4084
1297 */
1298typedef union _RXMAC_PF_CTRL_t {
1299 u32 value;
1300 struct {
1301#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +01001302 u32 unused2:9; /* bits 23-31 */
1303 u32 min_pkt_size:7; /* bits 16-22 */
1304 u32 unused1:12; /* bits 4-15 */
1305 u32 filter_frag_en:1; /* bit 3 */
1306 u32 filter_uni_en:1; /* bit 2 */
1307 u32 filter_multi_en:1; /* bit 1 */
1308 u32 filter_broad_en:1; /* bit 0 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001309#else
Alan Cox64f93032009-06-10 17:30:41 +01001310 u32 filter_broad_en:1; /* bit 0 */
1311 u32 filter_multi_en:1; /* bit 1 */
1312 u32 filter_uni_en:1; /* bit 2 */
1313 u32 filter_frag_en:1; /* bit 3 */
1314 u32 unused1:12; /* bits 4-15 */
1315 u32 min_pkt_size:7; /* bits 16-22 */
1316 u32 unused2:9; /* bits 23-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001317#endif
1318 } bits;
1319} RXMAC_PF_CTRL_t, *PRXMAC_PF_CTRL_t;
1320
1321/*
1322 * structure for Memory Controller Interface Control Max Segment reg in rxmac
1323 * address map. Located at address 0x4088
1324 */
1325typedef union _RXMAC_MCIF_CTRL_MAX_SEG_t {
1326 u32 value;
1327 struct {
1328#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +01001329 u32 reserved:22; /* bits 10-31 */
1330 u32 max_size:8; /* bits 2-9 */
1331 u32 fc_en:1; /* bit 1 */
1332 u32 seg_en:1; /* bit 0 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001333#else
Alan Cox64f93032009-06-10 17:30:41 +01001334 u32 seg_en:1; /* bit 0 */
1335 u32 fc_en:1; /* bit 1 */
1336 u32 max_size:8; /* bits 2-9 */
1337 u32 reserved:22; /* bits 10-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001338#endif
1339 } bits;
1340} RXMAC_MCIF_CTRL_MAX_SEG_t, *PRXMAC_MCIF_CTRL_MAX_SEG_t;
1341
1342/*
1343 * structure for Memory Controller Interface Water Mark reg in rxmac address
1344 * map. Located at address 0x408C
1345 */
1346typedef union _RXMAC_MCIF_WATER_MARK_t {
1347 u32 value;
1348 struct {
1349#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +01001350 u32 reserved2:6; /* bits 26-31 */
1351 u32 mark_hi:10; /* bits 16-25 */
1352 u32 reserved1:6; /* bits 10-15 */
1353 u32 mark_lo:10; /* bits 0-9 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001354#else
Alan Cox64f93032009-06-10 17:30:41 +01001355 u32 mark_lo:10; /* bits 0-9 */
1356 u32 reserved1:6; /* bits 10-15 */
1357 u32 mark_hi:10; /* bits 16-25 */
1358 u32 reserved2:6; /* bits 26-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001359#endif
1360 } bits;
1361} RXMAC_MCIF_WATER_MARK_t, *PRXMAC_MCIF_WATER_MARK_t;
1362
1363/*
1364 * structure for Rx Queue Dialog reg in rxmac address map.
1365 * located at address 0x4090
1366 */
1367typedef union _RXMAC_RXQ_DIAG_t {
1368 u32 value;
1369 struct {
1370#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +01001371 u32 reserved2:6; /* bits 26-31 */
1372 u32 rd_ptr:10; /* bits 16-25 */
1373 u32 reserved1:6; /* bits 10-15 */
1374 u32 wr_ptr:10; /* bits 0-9 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001375#else
Alan Cox64f93032009-06-10 17:30:41 +01001376 u32 wr_ptr:10; /* bits 0-9 */
1377 u32 reserved1:6; /* bits 10-15 */
1378 u32 rd_ptr:10; /* bits 16-25 */
1379 u32 reserved2:6; /* bits 26-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001380#endif
1381 } bits;
1382} RXMAC_RXQ_DIAG_t, *PRXMAC_RXQ_DIAG_t;
1383
1384/*
1385 * structure for space availiable reg in rxmac address map.
1386 * located at address 0x4094
1387 */
1388typedef union _RXMAC_SPACE_AVAIL_t {
1389 u32 value;
1390 struct {
1391#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +01001392 u32 reserved2:15; /* bits 17-31 */
1393 u32 space_avail_en:1; /* bit 16 */
1394 u32 reserved1:6; /* bits 10-15 */
1395 u32 space_avail:10; /* bits 0-9 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001396#else
Alan Cox64f93032009-06-10 17:30:41 +01001397 u32 space_avail:10; /* bits 0-9 */
1398 u32 reserved1:6; /* bits 10-15 */
1399 u32 space_avail_en:1; /* bit 16 */
1400 u32 reserved2:15; /* bits 17-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001401#endif
1402 } bits;
1403} RXMAC_SPACE_AVAIL_t, *PRXMAC_SPACE_AVAIL_t;
1404
1405/*
1406 * structure for management interface reg in rxmac address map.
1407 * located at address 0x4098
1408 */
1409typedef union _RXMAC_MIF_CTL_t {
1410 u32 value;
1411 struct {
1412#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +01001413 u32 reserve:14; /* bits 18-31 */
1414 u32 drop_pkt_en:1; /* bit 17 */
1415 u32 drop_pkt_mask:17; /* bits 0-16 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001416#else
Alan Cox64f93032009-06-10 17:30:41 +01001417 u32 drop_pkt_mask:17; /* bits 0-16 */
1418 u32 drop_pkt_en:1; /* bit 17 */
1419 u32 reserve:14; /* bits 18-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001420#endif
1421 } bits;
1422} RXMAC_MIF_CTL_t, *PRXMAC_MIF_CTL_t;
1423
1424/*
1425 * structure for Error reg in rxmac address map.
1426 * located at address 0x409C
1427 */
1428typedef union _RXMAC_ERROR_REG_t {
1429 u32 value;
1430 struct {
1431#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +01001432 u32 reserve:28; /* bits 4-31 */
1433 u32 mif:1; /* bit 3 */
1434 u32 async:1; /* bit 2 */
1435 u32 pkt_filter:1; /* bit 1 */
1436 u32 mcif:1; /* bit 0 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001437#else
Alan Cox64f93032009-06-10 17:30:41 +01001438 u32 mcif:1; /* bit 0 */
1439 u32 pkt_filter:1; /* bit 1 */
1440 u32 async:1; /* bit 2 */
1441 u32 mif:1; /* bit 3 */
1442 u32 reserve:28; /* bits 4-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001443#endif
1444 } bits;
1445} RXMAC_ERROR_REG_t, *PRXMAC_ERROR_REG_t;
1446
1447/*
1448 * Rx MAC Module of JAGCore Address Mapping
1449 */
Alan Cox64f93032009-06-10 17:30:41 +01001450typedef struct _RXMAC_t { /* Location: */
1451 RXMAC_CTRL_t ctrl; /* 0x4000 */
1452 RXMAC_WOL_CTL_CRC0_t crc0; /* 0x4004 */
1453 RXMAC_WOL_CRC12_t crc12; /* 0x4008 */
1454 RXMAC_WOL_CRC34_t crc34; /* 0x400C */
1455 RXMAC_WOL_SA_LO_t sa_lo; /* 0x4010 */
1456 RXMAC_WOL_SA_HI_t sa_hi; /* 0x4014 */
1457 u32 mask0_word0; /* 0x4018 */
1458 u32 mask0_word1; /* 0x401C */
1459 u32 mask0_word2; /* 0x4020 */
1460 u32 mask0_word3; /* 0x4024 */
1461 u32 mask1_word0; /* 0x4028 */
1462 u32 mask1_word1; /* 0x402C */
1463 u32 mask1_word2; /* 0x4030 */
1464 u32 mask1_word3; /* 0x4034 */
1465 u32 mask2_word0; /* 0x4038 */
1466 u32 mask2_word1; /* 0x403C */
1467 u32 mask2_word2; /* 0x4040 */
1468 u32 mask2_word3; /* 0x4044 */
1469 u32 mask3_word0; /* 0x4048 */
1470 u32 mask3_word1; /* 0x404C */
1471 u32 mask3_word2; /* 0x4050 */
1472 u32 mask3_word3; /* 0x4054 */
1473 u32 mask4_word0; /* 0x4058 */
1474 u32 mask4_word1; /* 0x405C */
1475 u32 mask4_word2; /* 0x4060 */
1476 u32 mask4_word3; /* 0x4064 */
1477 RXMAC_UNI_PF_ADDR1_t uni_pf_addr1; /* 0x4068 */
1478 RXMAC_UNI_PF_ADDR2_t uni_pf_addr2; /* 0x406C */
1479 RXMAC_UNI_PF_ADDR3_t uni_pf_addr3; /* 0x4070 */
1480 u32 multi_hash1; /* 0x4074 */
1481 u32 multi_hash2; /* 0x4078 */
1482 u32 multi_hash3; /* 0x407C */
1483 u32 multi_hash4; /* 0x4080 */
1484 RXMAC_PF_CTRL_t pf_ctrl; /* 0x4084 */
1485 RXMAC_MCIF_CTRL_MAX_SEG_t mcif_ctrl_max_seg; /* 0x4088 */
1486 RXMAC_MCIF_WATER_MARK_t mcif_water_mark; /* 0x408C */
1487 RXMAC_RXQ_DIAG_t rxq_diag; /* 0x4090 */
1488 RXMAC_SPACE_AVAIL_t space_avail; /* 0x4094 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001489
Alan Cox64f93032009-06-10 17:30:41 +01001490 RXMAC_MIF_CTL_t mif_ctrl; /* 0x4098 */
1491 RXMAC_ERROR_REG_t err_reg; /* 0x409C */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001492} RXMAC_t, *PRXMAC_t;
1493
1494/* END OF TXMAC REGISTER ADDRESS MAP */
1495
1496
1497/* START OF MAC REGISTER ADDRESS MAP */
1498
1499/*
1500 * structure for configuration #1 reg in mac address map.
1501 * located at address 0x5000
1502 */
1503typedef union _MAC_CFG1_t {
1504 u32 value;
1505 struct {
1506#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +01001507 u32 soft_reset:1; /* bit 31 */
1508 u32 sim_reset:1; /* bit 30 */
1509 u32 reserved3:10; /* bits 20-29 */
1510 u32 reset_rx_mc:1; /* bit 19 */
1511 u32 reset_tx_mc:1; /* bit 18 */
1512 u32 reset_rx_fun:1; /* bit 17 */
1513 u32 reset_tx_fun:1; /* bit 16 */
1514 u32 reserved2:7; /* bits 9-15 */
1515 u32 loop_back:1; /* bit 8 */
1516 u32 reserved1:2; /* bits 6-7 */
1517 u32 rx_flow:1; /* bit 5 */
1518 u32 tx_flow:1; /* bit 4 */
1519 u32 syncd_rx_en:1; /* bit 3 */
1520 u32 rx_enable:1; /* bit 2 */
1521 u32 syncd_tx_en:1; /* bit 1 */
1522 u32 tx_enable:1; /* bit 0 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001523#else
Alan Cox64f93032009-06-10 17:30:41 +01001524 u32 tx_enable:1; /* bit 0 */
1525 u32 syncd_tx_en:1; /* bit 1 */
1526 u32 rx_enable:1; /* bit 2 */
1527 u32 syncd_rx_en:1; /* bit 3 */
1528 u32 tx_flow:1; /* bit 4 */
1529 u32 rx_flow:1; /* bit 5 */
1530 u32 reserved1:2; /* bits 6-7 */
1531 u32 loop_back:1; /* bit 8 */
1532 u32 reserved2:7; /* bits 9-15 */
1533 u32 reset_tx_fun:1; /* bit 16 */
1534 u32 reset_rx_fun:1; /* bit 17 */
1535 u32 reset_tx_mc:1; /* bit 18 */
1536 u32 reset_rx_mc:1; /* bit 19 */
1537 u32 reserved3:10; /* bits 20-29 */
1538 u32 sim_reset:1; /* bit 30 */
1539 u32 soft_reset:1; /* bit 31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001540#endif
1541 } bits;
1542} MAC_CFG1_t, *PMAC_CFG1_t;
1543
1544/*
1545 * structure for configuration #2 reg in mac address map.
1546 * located at address 0x5004
1547 */
1548typedef union _MAC_CFG2_t {
1549 u32 value;
1550 struct {
1551#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +01001552 u32 reserved3:16; /* bits 16-31 */
1553 u32 preamble_len:4; /* bits 12-15 */
1554 u32 reserved2:2; /* bits 10-11 */
1555 u32 if_mode:2; /* bits 8-9 */
1556 u32 reserved1:2; /* bits 6-7 */
1557 u32 huge_frame:1; /* bit 5 */
1558 u32 len_check:1; /* bit 4 */
1559 u32 undefined:1; /* bit 3 */
1560 u32 pad_crc:1; /* bit 2 */
1561 u32 crc_enable:1; /* bit 1 */
1562 u32 full_duplex:1; /* bit 0 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001563#else
Alan Cox64f93032009-06-10 17:30:41 +01001564 u32 full_duplex:1; /* bit 0 */
1565 u32 crc_enable:1; /* bit 1 */
1566 u32 pad_crc:1; /* bit 2 */
1567 u32 undefined:1; /* bit 3 */
1568 u32 len_check:1; /* bit 4 */
1569 u32 huge_frame:1; /* bit 5 */
1570 u32 reserved1:2; /* bits 6-7 */
1571 u32 if_mode:2; /* bits 8-9 */
1572 u32 reserved2:2; /* bits 10-11 */
1573 u32 preamble_len:4; /* bits 12-15 */
1574 u32 reserved3:16; /* bits 16-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001575#endif
1576 } bits;
1577} MAC_CFG2_t, *PMAC_CFG2_t;
1578
1579/*
1580 * structure for Interpacket gap reg in mac address map.
1581 * located at address 0x5008
1582 */
1583typedef union _MAC_IPG_t {
1584 u32 value;
1585 struct {
1586#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +01001587 u32 reserved:1; /* bit 31 */
1588 u32 non_B2B_ipg_1:7; /* bits 24-30 */
1589 u32 undefined2:1; /* bit 23 */
1590 u32 non_B2B_ipg_2:7; /* bits 16-22 */
1591 u32 min_ifg_enforce:8; /* bits 8-15 */
1592 u32 undefined1:1; /* bit 7 */
1593 u32 B2B_ipg:7; /* bits 0-6 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001594#else
Alan Cox64f93032009-06-10 17:30:41 +01001595 u32 B2B_ipg:7; /* bits 0-6 */
1596 u32 undefined1:1; /* bit 7 */
1597 u32 min_ifg_enforce:8; /* bits 8-15 */
1598 u32 non_B2B_ipg_2:7; /* bits 16-22 */
1599 u32 undefined2:1; /* bit 23 */
1600 u32 non_B2B_ipg_1:7; /* bits 24-30 */
1601 u32 reserved:1; /* bit 31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001602#endif
1603 } bits;
1604} MAC_IPG_t, *PMAC_IPG_t;
1605
1606/*
1607 * structure for half duplex reg in mac address map.
1608 * located at address 0x500C
1609 */
1610typedef union _MAC_HFDP_t {
1611 u32 value;
1612 struct {
1613#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +01001614 u32 reserved2:8; /* bits 24-31 */
1615 u32 alt_beb_trunc:4; /* bits 23-20 */
1616 u32 alt_beb_enable:1; /* bit 19 */
1617 u32 bp_no_backoff:1; /* bit 18 */
1618 u32 no_backoff:1; /* bit 17 */
1619 u32 excess_defer:1; /* bit 16 */
1620 u32 rexmit_max:4; /* bits 12-15 */
1621 u32 reserved1:2; /* bits 10-11 */
1622 u32 coll_window:10; /* bits 0-9 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001623#else
Alan Cox64f93032009-06-10 17:30:41 +01001624 u32 coll_window:10; /* bits 0-9 */
1625 u32 reserved1:2; /* bits 10-11 */
1626 u32 rexmit_max:4; /* bits 12-15 */
1627 u32 excess_defer:1; /* bit 16 */
1628 u32 no_backoff:1; /* bit 17 */
1629 u32 bp_no_backoff:1; /* bit 18 */
1630 u32 alt_beb_enable:1; /* bit 19 */
1631 u32 alt_beb_trunc:4; /* bits 23-20 */
1632 u32 reserved2:8; /* bits 24-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001633#endif
1634 } bits;
1635} MAC_HFDP_t, *PMAC_HFDP_t;
1636
1637/*
1638 * structure for Maximum Frame Length reg in mac address map.
1639 * located at address 0x5010
1640 */
1641typedef union _MAC_MAX_FM_LEN_t {
1642 u32 value;
1643 struct {
1644#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +01001645 u32 reserved:16; /* bits 16-31 */
1646 u32 max_len:16; /* bits 0-15 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001647#else
Alan Cox64f93032009-06-10 17:30:41 +01001648 u32 max_len:16; /* bits 0-15 */
1649 u32 reserved:16; /* bits 16-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001650#endif
1651 } bits;
1652} MAC_MAX_FM_LEN_t, *PMAC_MAX_FM_LEN_t;
1653
1654/*
1655 * structure for Reserve 1 reg in mac address map.
1656 * located at address 0x5014 - 0x5018
1657 * Defined earlier (u32)
1658 */
1659
1660/*
1661 * structure for Test reg in mac address map.
1662 * located at address 0x501C
1663 */
1664typedef union _MAC_TEST_t {
1665 u32 value;
1666 struct {
1667#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +01001668 u32 unused:29; /* bits 3-31 */
1669 u32 mac_test:3; /* bits 0-2 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001670#else
Alan Cox64f93032009-06-10 17:30:41 +01001671 u32 mac_test:3; /* bits 0-2 */
1672 u32 unused:29; /* bits 3-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001673#endif
1674 } bits;
1675} MAC_TEST_t, *PMAC_TEST_t;
1676
1677/*
1678 * structure for MII Management Configuration reg in mac address map.
1679 * located at address 0x5020
1680 */
1681typedef union _MII_MGMT_CFG_t {
1682 u32 value;
1683 struct {
1684#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +01001685 u32 reset_mii_mgmt:1; /* bit 31 */
1686 u32 reserved:25; /* bits 6-30 */
1687 u32 scan_auto_incremt:1; /* bit 5 */
1688 u32 preamble_suppress:1; /* bit 4 */
1689 u32 undefined:1; /* bit 3 */
1690 u32 mgmt_clk_reset:3; /* bits 0-2 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001691#else
Alan Cox64f93032009-06-10 17:30:41 +01001692 u32 mgmt_clk_reset:3; /* bits 0-2 */
1693 u32 undefined:1; /* bit 3 */
1694 u32 preamble_suppress:1; /* bit 4 */
1695 u32 scan_auto_incremt:1; /* bit 5 */
1696 u32 reserved:25; /* bits 6-30 */
1697 u32 reset_mii_mgmt:1; /* bit 31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001698#endif
1699 } bits;
1700} MII_MGMT_CFG_t, *PMII_MGMT_CFG_t;
1701
1702/*
1703 * structure for MII Management Command reg in mac address map.
1704 * located at address 0x5024
1705 */
1706typedef union _MII_MGMT_CMD_t {
1707 u32 value;
1708 struct {
1709#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +01001710 u32 reserved:30; /* bits 2-31 */
1711 u32 scan_cycle:1; /* bit 1 */
1712 u32 read_cycle:1; /* bit 0 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001713#else
Alan Cox64f93032009-06-10 17:30:41 +01001714 u32 read_cycle:1; /* bit 0 */
1715 u32 scan_cycle:1; /* bit 1 */
1716 u32 reserved:30; /* bits 2-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001717#endif
1718 } bits;
1719} MII_MGMT_CMD_t, *PMII_MGMT_CMD_t;
1720
1721/*
1722 * structure for MII Management Address reg in mac address map.
1723 * located at address 0x5028
1724 */
1725typedef union _MII_MGMT_ADDR_t {
1726 u32 value;
1727 struct {
1728#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +01001729 u32 reserved2:19; /* bit 13-31 */
1730 u32 phy_addr:5; /* bits 8-12 */
1731 u32 reserved1:3; /* bits 5-7 */
1732 u32 reg_addr:5; /* bits 0-4 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001733#else
Alan Cox64f93032009-06-10 17:30:41 +01001734 u32 reg_addr:5; /* bits 0-4 */
1735 u32 reserved1:3; /* bits 5-7 */
1736 u32 phy_addr:5; /* bits 8-12 */
1737 u32 reserved2:19; /* bit 13-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001738#endif
1739 } bits;
1740} MII_MGMT_ADDR_t, *PMII_MGMT_ADDR_t;
1741
1742/*
1743 * structure for MII Management Control reg in mac address map.
1744 * located at address 0x502C
1745 */
1746typedef union _MII_MGMT_CTRL_t {
1747 u32 value;
1748 struct {
1749#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +01001750 u32 reserved:16; /* bits 16-31 */
1751 u32 phy_ctrl:16; /* bits 0-15 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001752#else
Alan Cox64f93032009-06-10 17:30:41 +01001753 u32 phy_ctrl:16; /* bits 0-15 */
1754 u32 reserved:16; /* bits 16-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001755#endif
1756 } bits;
1757} MII_MGMT_CTRL_t, *PMII_MGMT_CTRL_t;
1758
1759/*
1760 * structure for MII Management Status reg in mac address map.
1761 * located at address 0x5030
1762 */
1763typedef union _MII_MGMT_STAT_t {
1764 u32 value;
1765 struct {
1766#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +01001767 u32 reserved:16; /* bits 16-31 */
1768 u32 phy_stat:16; /* bits 0-15 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001769#else
Alan Cox64f93032009-06-10 17:30:41 +01001770 u32 phy_stat:16; /* bits 0-15 */
1771 u32 reserved:16; /* bits 16-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001772#endif
1773 } bits;
1774} MII_MGMT_STAT_t, *PMII_MGMT_STAT_t;
1775
1776/*
1777 * structure for MII Management Indicators reg in mac address map.
1778 * located at address 0x5034
1779 */
1780typedef union _MII_MGMT_INDICATOR_t {
1781 u32 value;
1782 struct {
1783#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +01001784 u32 reserved:29; /* bits 3-31 */
1785 u32 not_valid:1; /* bit 2 */
1786 u32 scanning:1; /* bit 1 */
1787 u32 busy:1; /* bit 0 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001788#else
Alan Cox64f93032009-06-10 17:30:41 +01001789 u32 busy:1; /* bit 0 */
1790 u32 scanning:1; /* bit 1 */
1791 u32 not_valid:1; /* bit 2 */
1792 u32 reserved:29; /* bits 3-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001793#endif
1794 } bits;
1795} MII_MGMT_INDICATOR_t, *PMII_MGMT_INDICATOR_t;
1796
1797/*
1798 * structure for Interface Control reg in mac address map.
1799 * located at address 0x5038
1800 */
1801typedef union _MAC_IF_CTRL_t {
1802 u32 value;
1803 struct {
1804#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +01001805 u32 reset_if_module:1; /* bit 31 */
1806 u32 reserved4:3; /* bit 28-30 */
1807 u32 tbi_mode:1; /* bit 27 */
1808 u32 ghd_mode:1; /* bit 26 */
1809 u32 lhd_mode:1; /* bit 25 */
1810 u32 phy_mode:1; /* bit 24 */
1811 u32 reset_per_mii:1; /* bit 23 */
1812 u32 reserved3:6; /* bits 17-22 */
1813 u32 speed:1; /* bit 16 */
1814 u32 reset_pe100x:1; /* bit 15 */
1815 u32 reserved2:4; /* bits 11-14 */
1816 u32 force_quiet:1; /* bit 10 */
1817 u32 no_cipher:1; /* bit 9 */
1818 u32 disable_link_fail:1; /* bit 8 */
1819 u32 reset_gpsi:1; /* bit 7 */
1820 u32 reserved1:6; /* bits 1-6 */
1821 u32 enab_jab_protect:1; /* bit 0 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001822#else
Alan Cox64f93032009-06-10 17:30:41 +01001823 u32 enab_jab_protect:1; /* bit 0 */
1824 u32 reserved1:6; /* bits 1-6 */
1825 u32 reset_gpsi:1; /* bit 7 */
1826 u32 disable_link_fail:1; /* bit 8 */
1827 u32 no_cipher:1; /* bit 9 */
1828 u32 force_quiet:1; /* bit 10 */
1829 u32 reserved2:4; /* bits 11-14 */
1830 u32 reset_pe100x:1; /* bit 15 */
1831 u32 speed:1; /* bit 16 */
1832 u32 reserved3:6; /* bits 17-22 */
1833 u32 reset_per_mii:1; /* bit 23 */
1834 u32 phy_mode:1; /* bit 24 */
1835 u32 lhd_mode:1; /* bit 25 */
1836 u32 ghd_mode:1; /* bit 26 */
1837 u32 tbi_mode:1; /* bit 27 */
1838 u32 reserved4:3; /* bit 28-30 */
1839 u32 reset_if_module:1; /* bit 31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001840#endif
1841 } bits;
1842} MAC_IF_CTRL_t, *PMAC_IF_CTRL_t;
1843
1844/*
1845 * structure for Interface Status reg in mac address map.
1846 * located at address 0x503C
1847 */
1848typedef union _MAC_IF_STAT_t {
1849 u32 value;
1850 struct {
1851#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +01001852 u32 reserved:22; /* bits 10-31 */
1853 u32 excess_defer:1; /* bit 9 */
1854 u32 clash:1; /* bit 8 */
1855 u32 phy_jabber:1; /* bit 7 */
1856 u32 phy_link_ok:1; /* bit 6 */
1857 u32 phy_full_duplex:1; /* bit 5 */
1858 u32 phy_speed:1; /* bit 4 */
1859 u32 pe100x_link_fail:1; /* bit 3 */
1860 u32 pe10t_loss_carrie:1; /* bit 2 */
1861 u32 pe10t_sqe_error:1; /* bit 1 */
1862 u32 pe10t_jabber:1; /* bit 0 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001863#else
Alan Cox64f93032009-06-10 17:30:41 +01001864 u32 pe10t_jabber:1; /* bit 0 */
1865 u32 pe10t_sqe_error:1; /* bit 1 */
1866 u32 pe10t_loss_carrie:1; /* bit 2 */
1867 u32 pe100x_link_fail:1; /* bit 3 */
1868 u32 phy_speed:1; /* bit 4 */
1869 u32 phy_full_duplex:1; /* bit 5 */
1870 u32 phy_link_ok:1; /* bit 6 */
1871 u32 phy_jabber:1; /* bit 7 */
1872 u32 clash:1; /* bit 8 */
1873 u32 excess_defer:1; /* bit 9 */
1874 u32 reserved:22; /* bits 10-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001875#endif
1876 } bits;
1877} MAC_IF_STAT_t, *PMAC_IF_STAT_t;
1878
1879/*
1880 * structure for Mac Station Address, Part 1 reg in mac address map.
1881 * located at address 0x5040
1882 */
1883typedef union _MAC_STATION_ADDR1_t {
1884 u32 value;
1885 struct {
1886#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +01001887 u32 Octet6:8; /* bits 24-31 */
1888 u32 Octet5:8; /* bits 16-23 */
1889 u32 Octet4:8; /* bits 8-15 */
1890 u32 Octet3:8; /* bits 0-7 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001891#else
Alan Cox64f93032009-06-10 17:30:41 +01001892 u32 Octet3:8; /* bits 0-7 */
1893 u32 Octet4:8; /* bits 8-15 */
1894 u32 Octet5:8; /* bits 16-23 */
1895 u32 Octet6:8; /* bits 24-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001896#endif
1897 } bits;
1898} MAC_STATION_ADDR1_t, *PMAC_STATION_ADDR1_t;
1899
1900/*
1901 * structure for Mac Station Address, Part 2 reg in mac address map.
1902 * located at address 0x5044
1903 */
1904typedef union _MAC_STATION_ADDR2_t {
1905 u32 value;
1906 struct {
1907#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +01001908 u32 Octet2:8; /* bits 24-31 */
1909 u32 Octet1:8; /* bits 16-23 */
1910 u32 reserved:16; /* bits 0-15 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001911#else
Alan Cox64f93032009-06-10 17:30:41 +01001912 u32 reserved:16; /* bit 0-15 */
1913 u32 Octet1:8; /* bits 16-23 */
1914 u32 Octet2:8; /* bits 24-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001915#endif
1916 } bits;
1917} MAC_STATION_ADDR2_t, *PMAC_STATION_ADDR2_t;
1918
1919/*
1920 * MAC Module of JAGCore Address Mapping
1921 */
Alan Cox64f93032009-06-10 17:30:41 +01001922typedef struct _MAC_t { /* Location: */
1923 MAC_CFG1_t cfg1; /* 0x5000 */
1924 MAC_CFG2_t cfg2; /* 0x5004 */
1925 MAC_IPG_t ipg; /* 0x5008 */
1926 MAC_HFDP_t hfdp; /* 0x500C */
1927 MAC_MAX_FM_LEN_t max_fm_len; /* 0x5010 */
1928 u32 rsv1; /* 0x5014 */
1929 u32 rsv2; /* 0x5018 */
1930 MAC_TEST_t mac_test; /* 0x501C */
1931 MII_MGMT_CFG_t mii_mgmt_cfg; /* 0x5020 */
1932 MII_MGMT_CMD_t mii_mgmt_cmd; /* 0x5024 */
1933 MII_MGMT_ADDR_t mii_mgmt_addr; /* 0x5028 */
1934 MII_MGMT_CTRL_t mii_mgmt_ctrl; /* 0x502C */
1935 MII_MGMT_STAT_t mii_mgmt_stat; /* 0x5030 */
1936 MII_MGMT_INDICATOR_t mii_mgmt_indicator; /* 0x5034 */
1937 MAC_IF_CTRL_t if_ctrl; /* 0x5038 */
1938 MAC_IF_STAT_t if_stat; /* 0x503C */
1939 MAC_STATION_ADDR1_t station_addr_1; /* 0x5040 */
1940 MAC_STATION_ADDR2_t station_addr_2; /* 0x5044 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001941} MAC_t, *PMAC_t;
1942
1943/* END OF MAC REGISTER ADDRESS MAP */
1944
1945/* START OF MAC STAT REGISTER ADDRESS MAP */
1946
1947/*
1948 * structure for Carry Register One and it's Mask Register reg located in mac
1949 * stat address map address 0x6130 and 0x6138.
1950 */
1951typedef union _MAC_STAT_REG_1_t {
1952 u32 value;
1953 struct {
1954#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +01001955 u32 tr64:1; /* bit 31 */
1956 u32 tr127:1; /* bit 30 */
1957 u32 tr255:1; /* bit 29 */
1958 u32 tr511:1; /* bit 28 */
1959 u32 tr1k:1; /* bit 27 */
1960 u32 trmax:1; /* bit 26 */
1961 u32 trmgv:1; /* bit 25 */
1962 u32 unused:8; /* bits 17-24 */
1963 u32 rbyt:1; /* bit 16 */
1964 u32 rpkt:1; /* bit 15 */
1965 u32 rfcs:1; /* bit 14 */
1966 u32 rmca:1; /* bit 13 */
1967 u32 rbca:1; /* bit 12 */
1968 u32 rxcf:1; /* bit 11 */
1969 u32 rxpf:1; /* bit 10 */
1970 u32 rxuo:1; /* bit 9 */
1971 u32 raln:1; /* bit 8 */
1972 u32 rflr:1; /* bit 7 */
1973 u32 rcde:1; /* bit 6 */
1974 u32 rcse:1; /* bit 5 */
1975 u32 rund:1; /* bit 4 */
1976 u32 rovr:1; /* bit 3 */
1977 u32 rfrg:1; /* bit 2 */
1978 u32 rjbr:1; /* bit 1 */
1979 u32 rdrp:1; /* bit 0 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07001980#else
Alan Cox64f93032009-06-10 17:30:41 +01001981 u32 rdrp:1; /* bit 0 */
1982 u32 rjbr:1; /* bit 1 */
1983 u32 rfrg:1; /* bit 2 */
1984 u32 rovr:1; /* bit 3 */
1985 u32 rund:1; /* bit 4 */
1986 u32 rcse:1; /* bit 5 */
1987 u32 rcde:1; /* bit 6 */
1988 u32 rflr:1; /* bit 7 */
1989 u32 raln:1; /* bit 8 */
1990 u32 rxuo:1; /* bit 9 */
1991 u32 rxpf:1; /* bit 10 */
1992 u32 rxcf:1; /* bit 11 */
1993 u32 rbca:1; /* bit 12 */
1994 u32 rmca:1; /* bit 13 */
1995 u32 rfcs:1; /* bit 14 */
1996 u32 rpkt:1; /* bit 15 */
1997 u32 rbyt:1; /* bit 16 */
1998 u32 unused:8; /* bits 17-24 */
1999 u32 trmgv:1; /* bit 25 */
2000 u32 trmax:1; /* bit 26 */
2001 u32 tr1k:1; /* bit 27 */
2002 u32 tr511:1; /* bit 28 */
2003 u32 tr255:1; /* bit 29 */
2004 u32 tr127:1; /* bit 30 */
2005 u32 tr64:1; /* bit 31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002006#endif
2007 } bits;
2008} MAC_STAT_REG_1_t, *PMAC_STAT_REG_1_t;
2009
2010/*
2011 * structure for Carry Register Two Mask Register reg in mac stat address map.
2012 * located at address 0x613C
2013 */
2014typedef union _MAC_STAT_REG_2_t {
2015 u32 value;
2016 struct {
2017#ifdef _BIT_FIELDS_HTOL
Alan Cox64f93032009-06-10 17:30:41 +01002018 u32 unused:12; /* bit 20-31 */
2019 u32 tjbr:1; /* bit 19 */
2020 u32 tfcs:1; /* bit 18 */
2021 u32 txcf:1; /* bit 17 */
2022 u32 tovr:1; /* bit 16 */
2023 u32 tund:1; /* bit 15 */
2024 u32 tfrg:1; /* bit 14 */
2025 u32 tbyt:1; /* bit 13 */
2026 u32 tpkt:1; /* bit 12 */
2027 u32 tmca:1; /* bit 11 */
2028 u32 tbca:1; /* bit 10 */
2029 u32 txpf:1; /* bit 9 */
2030 u32 tdfr:1; /* bit 8 */
2031 u32 tedf:1; /* bit 7 */
2032 u32 tscl:1; /* bit 6 */
2033 u32 tmcl:1; /* bit 5 */
2034 u32 tlcl:1; /* bit 4 */
2035 u32 txcl:1; /* bit 3 */
2036 u32 tncl:1; /* bit 2 */
2037 u32 tpfh:1; /* bit 1 */
2038 u32 tdrp:1; /* bit 0 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002039#else
Alan Cox64f93032009-06-10 17:30:41 +01002040 u32 tdrp:1; /* bit 0 */
2041 u32 tpfh:1; /* bit 1 */
2042 u32 tncl:1; /* bit 2 */
2043 u32 txcl:1; /* bit 3 */
2044 u32 tlcl:1; /* bit 4 */
2045 u32 tmcl:1; /* bit 5 */
2046 u32 tscl:1; /* bit 6 */
2047 u32 tedf:1; /* bit 7 */
2048 u32 tdfr:1; /* bit 8 */
2049 u32 txpf:1; /* bit 9 */
2050 u32 tbca:1; /* bit 10 */
2051 u32 tmca:1; /* bit 11 */
2052 u32 tpkt:1; /* bit 12 */
2053 u32 tbyt:1; /* bit 13 */
2054 u32 tfrg:1; /* bit 14 */
2055 u32 tund:1; /* bit 15 */
2056 u32 tovr:1; /* bit 16 */
2057 u32 txcf:1; /* bit 17 */
2058 u32 tfcs:1; /* bit 18 */
2059 u32 tjbr:1; /* bit 19 */
2060 u32 unused:12; /* bit 20-31 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002061#endif
2062 } bits;
2063} MAC_STAT_REG_2_t, *PMAC_STAT_REG_2_t;
2064
2065/*
2066 * MAC STATS Module of JAGCore Address Mapping
2067 */
Alan Cox64f93032009-06-10 17:30:41 +01002068typedef struct _MAC_STAT_t { /* Location: */
2069 u32 pad[32]; /* 0x6000 - 607C */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002070
Alan Cox64f93032009-06-10 17:30:41 +01002071 /* Tx/Rx 0-64 Byte Frame Counter */
2072 u32 TR64; /* 0x6080 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002073
Alan Cox64f93032009-06-10 17:30:41 +01002074 /* Tx/Rx 65-127 Byte Frame Counter */
2075 u32 TR127; /* 0x6084 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002076
Alan Cox64f93032009-06-10 17:30:41 +01002077 /* Tx/Rx 128-255 Byte Frame Counter */
2078 u32 TR255; /* 0x6088 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002079
Alan Cox64f93032009-06-10 17:30:41 +01002080 /* Tx/Rx 256-511 Byte Frame Counter */
2081 u32 TR511; /* 0x608C */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002082
Alan Cox64f93032009-06-10 17:30:41 +01002083 /* Tx/Rx 512-1023 Byte Frame Counter */
2084 u32 TR1K; /* 0x6090 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002085
Alan Cox64f93032009-06-10 17:30:41 +01002086 /* Tx/Rx 1024-1518 Byte Frame Counter */
2087 u32 TRMax; /* 0x6094 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002088
Alan Cox64f93032009-06-10 17:30:41 +01002089 /* Tx/Rx 1519-1522 Byte Good VLAN Frame Count */
2090 u32 TRMgv; /* 0x6098 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002091
Alan Cox64f93032009-06-10 17:30:41 +01002092 /* Rx Byte Counter */
2093 u32 RByt; /* 0x609C */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002094
Alan Cox64f93032009-06-10 17:30:41 +01002095 /* Rx Packet Counter */
2096 u32 RPkt; /* 0x60A0 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002097
Alan Cox64f93032009-06-10 17:30:41 +01002098 /* Rx FCS Error Counter */
2099 u32 RFcs; /* 0x60A4 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002100
Alan Cox64f93032009-06-10 17:30:41 +01002101 /* Rx Multicast Packet Counter */
2102 u32 RMca; /* 0x60A8 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002103
Alan Cox64f93032009-06-10 17:30:41 +01002104 /* Rx Broadcast Packet Counter */
2105 u32 RBca; /* 0x60AC */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002106
Alan Cox64f93032009-06-10 17:30:41 +01002107 /* Rx Control Frame Packet Counter */
2108 u32 RxCf; /* 0x60B0 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002109
Alan Cox64f93032009-06-10 17:30:41 +01002110 /* Rx Pause Frame Packet Counter */
2111 u32 RxPf; /* 0x60B4 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002112
Alan Cox64f93032009-06-10 17:30:41 +01002113 /* Rx Unknown OP Code Counter */
2114 u32 RxUo; /* 0x60B8 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002115
Alan Cox64f93032009-06-10 17:30:41 +01002116 /* Rx Alignment Error Counter */
2117 u32 RAln; /* 0x60BC */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002118
Alan Cox64f93032009-06-10 17:30:41 +01002119 /* Rx Frame Length Error Counter */
2120 u32 RFlr; /* 0x60C0 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002121
Alan Cox64f93032009-06-10 17:30:41 +01002122 /* Rx Code Error Counter */
2123 u32 RCde; /* 0x60C4 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002124
Alan Cox64f93032009-06-10 17:30:41 +01002125 /* Rx Carrier Sense Error Counter */
2126 u32 RCse; /* 0x60C8 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002127
Alan Cox64f93032009-06-10 17:30:41 +01002128 /* Rx Undersize Packet Counter */
2129 u32 RUnd; /* 0x60CC */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002130
Alan Cox64f93032009-06-10 17:30:41 +01002131 /* Rx Oversize Packet Counter */
2132 u32 ROvr; /* 0x60D0 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002133
Alan Cox64f93032009-06-10 17:30:41 +01002134 /* Rx Fragment Counter */
2135 u32 RFrg; /* 0x60D4 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002136
Alan Cox64f93032009-06-10 17:30:41 +01002137 /* Rx Jabber Counter */
2138 u32 RJbr; /* 0x60D8 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002139
Alan Cox64f93032009-06-10 17:30:41 +01002140 /* Rx Drop */
2141 u32 RDrp; /* 0x60DC */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002142
Alan Cox64f93032009-06-10 17:30:41 +01002143 /* Tx Byte Counter */
2144 u32 TByt; /* 0x60E0 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002145
Alan Cox64f93032009-06-10 17:30:41 +01002146 /* Tx Packet Counter */
2147 u32 TPkt; /* 0x60E4 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002148
Alan Cox64f93032009-06-10 17:30:41 +01002149 /* Tx Multicast Packet Counter */
2150 u32 TMca; /* 0x60E8 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002151
Alan Cox64f93032009-06-10 17:30:41 +01002152 /* Tx Broadcast Packet Counter */
2153 u32 TBca; /* 0x60EC */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002154
Alan Cox64f93032009-06-10 17:30:41 +01002155 /* Tx Pause Control Frame Counter */
2156 u32 TxPf; /* 0x60F0 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002157
Alan Cox64f93032009-06-10 17:30:41 +01002158 /* Tx Deferral Packet Counter */
2159 u32 TDfr; /* 0x60F4 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002160
Alan Cox64f93032009-06-10 17:30:41 +01002161 /* Tx Excessive Deferral Packet Counter */
2162 u32 TEdf; /* 0x60F8 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002163
Alan Cox64f93032009-06-10 17:30:41 +01002164 /* Tx Single Collision Packet Counter */
2165 u32 TScl; /* 0x60FC */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002166
Alan Cox64f93032009-06-10 17:30:41 +01002167 /* Tx Multiple Collision Packet Counter */
2168 u32 TMcl; /* 0x6100 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002169
Alan Cox64f93032009-06-10 17:30:41 +01002170 /* Tx Late Collision Packet Counter */
2171 u32 TLcl; /* 0x6104 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002172
Alan Cox64f93032009-06-10 17:30:41 +01002173 /* Tx Excessive Collision Packet Counter */
2174 u32 TXcl; /* 0x6108 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002175
Alan Cox64f93032009-06-10 17:30:41 +01002176 /* Tx Total Collision Packet Counter */
2177 u32 TNcl; /* 0x610C */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002178
Alan Cox64f93032009-06-10 17:30:41 +01002179 /* Tx Pause Frame Honored Counter */
2180 u32 TPfh; /* 0x6110 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002181
Alan Cox64f93032009-06-10 17:30:41 +01002182 /* Tx Drop Frame Counter */
2183 u32 TDrp; /* 0x6114 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002184
Alan Cox64f93032009-06-10 17:30:41 +01002185 /* Tx Jabber Frame Counter */
2186 u32 TJbr; /* 0x6118 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002187
Alan Cox64f93032009-06-10 17:30:41 +01002188 /* Tx FCS Error Counter */
2189 u32 TFcs; /* 0x611C */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002190
Alan Cox64f93032009-06-10 17:30:41 +01002191 /* Tx Control Frame Counter */
2192 u32 TxCf; /* 0x6120 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002193
Alan Cox64f93032009-06-10 17:30:41 +01002194 /* Tx Oversize Frame Counter */
2195 u32 TOvr; /* 0x6124 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002196
Alan Cox64f93032009-06-10 17:30:41 +01002197 /* Tx Undersize Frame Counter */
2198 u32 TUnd; /* 0x6128 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002199
Alan Cox64f93032009-06-10 17:30:41 +01002200 /* Tx Fragments Frame Counter */
2201 u32 TFrg; /* 0x612C */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002202
Alan Cox64f93032009-06-10 17:30:41 +01002203 /* Carry Register One Register */
2204 MAC_STAT_REG_1_t Carry1; /* 0x6130 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002205
Alan Cox64f93032009-06-10 17:30:41 +01002206 /* Carry Register Two Register */
2207 MAC_STAT_REG_2_t Carry2; /* 0x6134 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002208
Alan Cox64f93032009-06-10 17:30:41 +01002209 /* Carry Register One Mask Register */
2210 MAC_STAT_REG_1_t Carry1M; /* 0x6138 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002211
Alan Cox64f93032009-06-10 17:30:41 +01002212 /* Carry Register Two Mask Register */
2213 MAC_STAT_REG_2_t Carry2M; /* 0x613C */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002214} MAC_STAT_t, *PMAC_STAT_t;
2215
2216/* END OF MAC STAT REGISTER ADDRESS MAP */
2217
2218
2219/* START OF MMC REGISTER ADDRESS MAP */
2220
2221/*
Alan Coxe5cf1b72009-08-27 11:01:22 +01002222 * Main Memory Controller Control reg in mmc address map.
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002223 * located at address 0x7000
2224 */
Alan Coxdf482a02009-08-27 11:01:13 +01002225
2226#define ET_MMC_ENABLE 1
2227#define ET_MMC_ARB_DISABLE 2
2228#define ET_MMC_RXMAC_DISABLE 4
2229#define ET_MMC_TXMAC_DISABLE 8
2230#define ET_MMC_TXDMA_DISABLE 16
2231#define ET_MMC_RXDMA_DISABLE 32
2232#define ET_MMC_FORCE_CE 64
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002233
2234/*
Alan Coxe5cf1b72009-08-27 11:01:22 +01002235 * Main Memory Controller Host Memory Access Address reg in mmc
2236 * address map. Located at address 0x7004. Top 16 bits hold the address bits
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002237 */
Alan Coxe5cf1b72009-08-27 11:01:22 +01002238
2239#define ET_SRAM_REQ_ACCESS 1
2240#define ET_SRAM_WR_ACCESS 2
2241#define ET_SRAM_IS_CTRL 4
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002242
2243/*
2244 * structure for Main Memory Controller Host Memory Access Data reg in mmc
2245 * address map. Located at address 0x7008 - 0x7014
2246 * Defined earlier (u32)
2247 */
2248
2249/*
2250 * Memory Control Module of JAGCore Address Mapping
2251 */
Alan Cox64f93032009-06-10 17:30:41 +01002252typedef struct _MMC_t { /* Location: */
Alan Coxdf482a02009-08-27 11:01:13 +01002253 u32 mmc_ctrl; /* 0x7000 */
Alan Coxe5cf1b72009-08-27 11:01:22 +01002254 u32 sram_access; /* 0x7004 */
Alan Cox64f93032009-06-10 17:30:41 +01002255 u32 sram_word1; /* 0x7008 */
2256 u32 sram_word2; /* 0x700C */
2257 u32 sram_word3; /* 0x7010 */
2258 u32 sram_word4; /* 0x7014 */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002259} MMC_t, *PMMC_t;
2260
2261/* END OF MMC REGISTER ADDRESS MAP */
2262
2263
2264/* START OF EXP ROM REGISTER ADDRESS MAP */
2265
2266/*
2267 * Expansion ROM Module of JAGCore Address Mapping
2268 */
2269
2270/* Take this out until it is not empty */
2271#if 0
2272typedef struct _EXP_ROM_t {
2273
2274} EXP_ROM_t, *PEXP_ROM_t;
2275#endif
2276
2277/* END OF EXP ROM REGISTER ADDRESS MAP */
2278
2279
2280/*
2281 * JAGCore Address Mapping
2282 */
2283typedef struct _ADDRESS_MAP_t {
2284 GLOBAL_t global;
Alan Cox64f93032009-06-10 17:30:41 +01002285 /* unused section of global address map */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002286 u8 unused_global[4096 - sizeof(GLOBAL_t)];
2287 TXDMA_t txdma;
Alan Cox64f93032009-06-10 17:30:41 +01002288 /* unused section of txdma address map */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002289 u8 unused_txdma[4096 - sizeof(TXDMA_t)];
2290 RXDMA_t rxdma;
Alan Cox64f93032009-06-10 17:30:41 +01002291 /* unused section of rxdma address map */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002292 u8 unused_rxdma[4096 - sizeof(RXDMA_t)];
2293 TXMAC_t txmac;
Alan Cox64f93032009-06-10 17:30:41 +01002294 /* unused section of txmac address map */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002295 u8 unused_txmac[4096 - sizeof(TXMAC_t)];
2296 RXMAC_t rxmac;
Alan Cox64f93032009-06-10 17:30:41 +01002297 /* unused section of rxmac address map */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002298 u8 unused_rxmac[4096 - sizeof(RXMAC_t)];
2299 MAC_t mac;
Alan Cox64f93032009-06-10 17:30:41 +01002300 /* unused section of mac address map */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002301 u8 unused_mac[4096 - sizeof(MAC_t)];
2302 MAC_STAT_t macStat;
Alan Cox64f93032009-06-10 17:30:41 +01002303 /* unused section of mac stat address map */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002304 u8 unused_mac_stat[4096 - sizeof(MAC_STAT_t)];
2305 MMC_t mmc;
Alan Cox64f93032009-06-10 17:30:41 +01002306 /* unused section of mmc address map */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002307 u8 unused_mmc[4096 - sizeof(MMC_t)];
Alan Cox64f93032009-06-10 17:30:41 +01002308 /* unused section of address map */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002309 u8 unused_[1015808];
2310
2311/* Take this out until it is not empty */
2312#if 0
2313 EXP_ROM_t exp_rom;
2314#endif
2315
Alan Cox64f93032009-06-10 17:30:41 +01002316 u8 unused_exp_rom[4096]; /* MGS-size TBD */
2317 u8 unused__[524288]; /* unused section of address map */
Greg Kroah-Hartmancfb739b2008-04-03 17:30:53 -07002318} ADDRESS_MAP_t, *PADDRESS_MAP_t;
2319
2320#endif /* _ET1310_ADDRESS_MAP_H_ */