RTEMS
7.0-rc1
Loading...
Searching...
No Matches
bsps
mips
include
libcpu
au1x00.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: BSD-2-Clause */
2
9
/*
10
* Copyright (C) 2005 by Cogent Computer Systems
11
* Written by Jay Monkman <jtm@lopingdog.com>
12
*
13
* Redistribution and use in source and binary forms, with or without
14
* modification, are permitted provided that the following conditions
15
* are met:
16
* 1. Redistributions of source code must retain the above copyright
17
* notice, this list of conditions and the following disclaimer.
18
* 2. Redistributions in binary form must reproduce the above copyright
19
* notice, this list of conditions and the following disclaimer in the
20
* documentation and/or other materials provided with the distribution.
21
*
22
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
26
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32
* POSSIBILITY OF SUCH DAMAGE.
33
*/
34
35
#ifndef __AU1X00_H__
36
#define __AU1X00_H__
37
38
#define bit(x) (1 << (x))
39
40
/* Au1x00 CP0 registers
41
*/
42
#define CP0_Index $0
43
#define CP0_Random $1
44
#define CP0_EntryLo0 $2
45
#define CP0_EntryLo1 $3
46
#define CP0_Context $4
47
#define CP0_PageMask $5
48
#define CP0_Wired $6
49
#define CP0_BadVAddr $8
50
#define CP0_Count $9
51
#define CP0_EntryHi $10
52
#define CP0_Compare $11
53
#define CP0_Status $12
54
#define CP0_Cause $13
55
#define CP0_EPC $14
56
#define CP0_PRId $15
57
#define CP0_Config $16
58
#define CP0_Config0 $16
59
#define CP0_Config1 $16,1
60
#define CP0_LLAddr $17
61
#define CP0_WatchLo $18
62
#define CP0_IWatchLo $18,1
63
#define CP0_WatchHi $19
64
#define CP0_IWatchHi $19,1
65
#define CP0_Scratch $22
66
#define CP0_Debug $23
67
#define CP0_DEPC $24
68
#define CP0_PerfCnt $25
69
#define CP0_PerfCtrl $25,1
70
#define CP0_DTag $28
71
#define CP0_DData $28,1
72
#define CP0_ITag $29
73
#define CP0_IData $29,1
74
#define CP0_ErrorEPC $30
75
#define CP0_DESave $31
76
77
/* Addresses common to all AU1x00 CPUs */
78
#define AU1X00_MEM_ADDR 0xB4000000
79
#define AU1X00_AC97_ADDR 0xB0000000
80
#define AU1X00_USBH_ADDR 0xB0100000
81
#define AU1X00_USBD_ADDR 0xB0200000
82
#define AU1X00_MACDMA0_ADDR 0xB4004000
83
#define AU1X00_MACDMA1_ADDR 0xB4004200
84
#define AU1X00_UART0_ADDR 0xB1100000
85
#define AU1X00_UART3_ADDR 0xB1400000
86
#define AU1X00_SYS_ADDR 0xB1900000
87
#define AU1X00_GPIO2_ADDR 0xB1700000
88
#define AU1X00_IC0_ADDR 0xB0400000
89
#define AU1X00_IC1_ADDR 0xB1800000
90
91
/* Au1100 base addresses (in KSEG1 region) */
92
#define AU1100_MAC0_ADDR 0xB0500000
93
#define AU1100_MACEN_ADDR 0xB0520000
94
95
/* Au1500 base addresses (in KSEG1 region) */
96
#define AU1500_MAC0_ADDR 0xB1500000
97
#define AU1500_MAC1_ADDR 0xB1510000
98
#define AU1500_MACEN_ADDR 0xB1520000
99
#define AU1500_PCI_ADDR 0xB4005000
100
101
/* Au1x00 gpio2 register offsets
102
*/
103
#define gpio2_dir 0x0000
104
#define gpio2_output 0x0008
105
#define gpio2_pinstate 0x000c
106
#define gpio2_inten 0x0010
107
#define gpio2_enable 0x0014
108
109
/* Au1x00 memory controller register offsets
110
*/
111
#define mem_sdmode0 0x0000
112
#define mem_sdmode1 0x0004
113
#define mem_sdmode2 0x0008
114
#define mem_sdaddr0 0x000C
115
#define mem_sdaddr1 0x0010
116
#define mem_sdaddr2 0x0014
117
#define mem_sdrefcfg 0x0018
118
#define mem_sdprecmd 0x001C
119
#define mem_sdautoref 0x0020
120
#define mem_sdwrmd0 0x0024
121
#define mem_sdwrmd1 0x0028
122
#define mem_sdwrmd2 0x002C
123
#define mem_sdsleep 0x0030
124
#define mem_sdsmcke 0x0034
125
126
#define mem_stcfg0 0x1000
127
#define mem_sttime0 0x1004
128
#define mem_staddr0 0x1008
129
#define mem_stcfg1 0x1010
130
#define mem_sttime1 0x1014
131
#define mem_staddr1 0x1018
132
#define mem_stcfg2 0x1020
133
#define mem_sttime2 0x1024
134
#define mem_staddr2 0x1028
135
#define mem_stcfg3 0x1030
136
#define mem_sttime3 0x1034
137
#define mem_staddr3 0x1038
138
139
/*
140
* Au1x00 peripheral register offsets
141
*/
142
#define ac97_enable 0x0010
143
#define usbh_enable 0x0007FFFC
144
#define usbd_enable 0x0058
145
#define irda_enable 0x0040
146
#define macen_mac0 0x0000
147
#define macen_mac1 0x0004
148
#define i2s_enable 0x0008
149
#define uart_enable 0x0100
150
#define ssi_enable 0x0100
151
152
#define sys_scratch0 0x0018
153
#define sys_scratch1 0x001c
154
#define sys_cntctrl 0x0014
155
#define sys_freqctrl0 0x0020
156
#define sys_freqctrl1 0x0024
157
#define sys_clksrc 0x0028
158
#define sys_pinfunc 0x002C
159
#define sys_powerctrl 0x003C
160
#define sys_endian 0x0038
161
#define sys_wakesrc 0x005C
162
#define sys_cpupll 0x0060
163
#define sys_auxpll 0x0064
164
#define sys_pininputen 0x0110
165
166
#define pci_cmem 0x0000
167
#define pci_config 0x0004
168
#define pci_b2bmask_cch 0x0008
169
#define pci_b2bbase0_venid 0x000C
170
#define pci_b2bbase1_id 0x0010
171
#define pci_mwmask_dev 0x0014
172
#define pci_mwbase_rev_ccl 0x0018
173
#define pci_err_addr 0x001C
174
#define pci_spec_intack 0x0020
175
#define pci_id 0x0100
176
#define pci_statcmd 0x0104
177
#define pci_classrev 0x0108
178
#define pci_hdrtype 0x010C
179
#define pci_mbar 0x0110
180
181
/*
182
* CSB250-specific values
183
*/
184
185
#define SYS_CPUPLL 33
186
#define SYS_POWERCTRL 1
187
#define SYS_AUXPLL 8
188
#define SYS_CNTCTRL 256
189
190
/* RCE0: */
191
#define MEM_STCFG0 0x00000203
192
#define MEM_STTIME0 0x22080b20
193
#define MEM_STADDR0 0x11f03fc0
194
195
/* RCE1: */
196
#define MEM_STCFG1 0x00000203
197
#define MEM_STTIME1 0x22080b20
198
#define MEM_STADDR1 0x11e03fc0
199
200
/* RCE2: */
201
#define MEM_STCFG2 0x00000244
202
#define MEM_STTIME2 0x22080a20
203
#define MEM_STADDR2 0x11803f00
204
205
/* RCE3: */
206
#define MEM_STCFG3 0x00000201
207
#define MEM_STTIME3 0x22080b20
208
#define MEM_STADDR3 0x11003f00
209
210
/*
211
* SDCS0 -
212
* SDCS1 -
213
* SDCS2 -
214
*/
215
#define MEM_SDMODE0 0x00552229
216
#define MEM_SDMODE1 0x00552229
217
#define MEM_SDMODE2 0x00552229
218
219
#define MEM_SDADDR0 0x001003F8
220
#define MEM_SDADDR1 0x001023F8
221
#define MEM_SDADDR2 0x001043F8
222
223
#define MEM_SDREFCFG_D 0x74000c30
/* disable */
224
#define MEM_SDREFCFG_E 0x76000c30
/* enable */
225
#define MEM_SDWRMD0 0x00000023
226
#define MEM_SDWRMD1 0x00000023
227
#define MEM_SDWRMD2 0x00000023
228
229
#define MEM_1MS ((396000000/1000000) * 1000)
230
231
#define AU1X00_IC_CFG0RD(x) (*(volatile uint32_t*)(x + 0x40))
232
#define AU1X00_IC_CFG0SET(x) (*(volatile uint32_t*)(x + 0x40))
233
#define AU1X00_IC_CFG0CLR(x) (*(volatile uint32_t*)(x + 0x44))
234
#define AU1X00_IC_CFG1RD(x) (*(volatile uint32_t*)(x + 0x48))
235
#define AU1X00_IC_CFG1SET(x) (*(volatile uint32_t*)(x + 0x48))
236
#define AU1X00_IC_CFG1CLR(x) (*(volatile uint32_t*)(x + 0x4c))
237
#define AU1X00_IC_CFG2RD(x) (*(volatile uint32_t*)(x + 0x50))
238
#define AU1X00_IC_CFG2SET(x) (*(volatile uint32_t*)(x + 0x50))
239
#define AU1X00_IC_CFG2CLR(x) (*(volatile uint32_t*)(x + 0x54))
240
#define AU1X00_IC_REQ0INT(x) (*(volatile uint32_t*)(x + 0x54))
241
#define AU1X00_IC_SRCRD(x) (*(volatile uint32_t*)(x + 0x58))
242
#define AU1X00_IC_SRCSET(x) (*(volatile uint32_t*)(x + 0x58))
243
#define AU1X00_IC_SRCCLR(x) (*(volatile uint32_t*)(x + 0x5c))
244
#define AU1X00_IC_REQ1INT(x) (*(volatile uint32_t*)(x + 0x5c))
245
#define AU1X00_IC_ASSIGNRD(x) (*(volatile uint32_t*)(x + 0x60))
246
#define AU1X00_IC_ASSIGNSET(x) (*(volatile uint32_t*)(x + 0x60))
247
#define AU1X00_IC_ASSIGNCLR(x) (*(volatile uint32_t*)(x + 0x64))
248
#define AU1X00_IC_WAKERD(x) (*(volatile uint32_t*)(x + 0x68))
249
#define AU1X00_IC_WAKESET(x) (*(volatile uint32_t*)(x + 0x68))
250
#define AU1X00_IC_WAKECLR(x) (*(volatile uint32_t*)(x + 0x6c))
251
#define AU1X00_IC_MASKRD(x) (*(volatile uint32_t*)(x + 0x70))
252
#define AU1X00_IC_MASKSET(x) (*(volatile uint32_t*)(x + 0x70))
253
#define AU1X00_IC_MASKCLR(x) (*(volatile uint32_t*)(x + 0x74))
254
#define AU1X00_IC_RISINGRD(x) (*(volatile uint32_t*)(x + 0x78))
255
#define AU1X00_IC_RISINGCLR(x) (*(volatile uint32_t*)(x + 0x78))
256
#define AU1X00_IC_FALLINGRD(x) (*(volatile uint32_t*)(x + 0x7c))
257
#define AU1X00_IC_FALLINGCLR(x) (*(volatile uint32_t*)(x + 0x7c))
258
#define AU1X00_IC_TESTBIT(x) (*(volatile uint32_t*)(x + 0x80))
259
#define AU1X00_IC_IRQ_MAC0 (bit(28))
260
#define AU1X00_IC_IRQ_MAC1 (bit(29))
261
#define AU1X00_IC_IRQ_TOY_MATCH0 (bit(15))
262
#define AU1X00_IC_IRQ_TOY_MATCH1 (bit(16))
263
#define AU1X00_IC_IRQ_TOY_MATCH2 (bit(17))
264
265
266
267
#define AU1X00_SYS_TOYTRIM(x) (*(volatile uint32_t*)(x + 0x00))
268
#define AU1X00_SYS_TOYWRITE(x) (*(volatile uint32_t*)(x + 0x04))
269
#define AU1X00_SYS_TOYMATCH0(x) (*(volatile uint32_t*)(x + 0x08))
270
#define AU1X00_SYS_TOYMATCH1(x) (*(volatile uint32_t*)(x + 0x0c))
271
#define AU1X00_SYS_TOYMATCH2(x) (*(volatile uint32_t*)(x + 0x10))
272
#define AU1X00_SYS_CNTCTRL(x) (*(volatile uint32_t*)(x + 0x14))
273
#define AU1X00_SYS_SCRATCH0(x) (*(volatile uint32_t*)(x + 0x18))
274
#define AU1X00_SYS_SCRATCH1(x) (*(volatile uint32_t*)(x + 0x1c))
275
#define AU1X00_SYS_WAKEMSK(x) (*(volatile uint32_t*)(x + 0x34))
276
#define AU1X00_SYS_ENDIAN(x) (*(volatile uint32_t*)(x + 0x38))
277
#define AU1X00_SYS_POWERCTRL(x) (*(volatile uint32_t*)(x + 0x3c))
278
#define AU1X00_SYS_TOYREAD(x) (*(volatile uint32_t*)(x + 0x40))
279
#define AU1X00_SYS_RTCTRIM(x) (*(volatile uint32_t*)(x + 0x44))
280
#define AU1X00_SYS_RTCWRITE(x) (*(volatile uint32_t*)(x + 0x48))
281
#define AU1X00_SYS_RTCMATCH0(x) (*(volatile uint32_t*)(x + 0x4c))
282
#define AU1X00_SYS_RTCMATCH1(x) (*(volatile uint32_t*)(x + 0x50))
283
#define AU1X00_SYS_RTCMATCH2(x) (*(volatile uint32_t*)(x + 0x54))
284
#define AU1X00_SYS_RTCREAD(x) (*(volatile uint32_t*)(x + 0x58))
285
#define AU1X00_SYS_WAKESRC(x) (*(volatile uint32_t*)(x + 0x5c))
286
#define AU1X00_SYS_SLPPWR(x) (*(volatile uint32_t*)(x + 0x78))
287
#define AU1X00_SYS_SLEEP(x) (*(volatile uint32_t*)(x + 0x7c))
288
289
#define AU1X00_SYS_CNTCTRL_ERS (bit(23))
290
#define AU1X00_SYS_CNTCTRL_RTS (bit(20))
291
#define AU1X00_SYS_CNTCTRL_RM2 (bit(19))
292
#define AU1X00_SYS_CNTCTRL_RM1 (bit(18))
293
#define AU1X00_SYS_CNTCTRL_RM0 (bit(17))
294
#define AU1X00_SYS_CNTCTRL_RS (bit(16))
295
#define AU1X00_SYS_CNTCTRL_BP (bit(14))
296
#define AU1X00_SYS_CNTCTRL_REN (bit(13))
297
#define AU1X00_SYS_CNTCTRL_BRT (bit(12))
298
#define AU1X00_SYS_CNTCTRL_TEN (bit(11))
299
#define AU1X00_SYS_CNTCTRL_BTT (bit(10))
300
#define AU1X00_SYS_CNTCTRL_E0 (bit(8))
301
#define AU1X00_SYS_CNTCTRL_ETS (bit(7))
302
#define AU1X00_SYS_CNTCTRL_32S (bit(5))
303
#define AU1X00_SYS_CNTCTRL_TTS (bit(4))
304
#define AU1X00_SYS_CNTCTRL_TM2 (bit(3))
305
#define AU1X00_SYS_CNTCTRL_TM1 (bit(2))
306
#define AU1X00_SYS_CNTCTRL_TM0 (bit(1))
307
#define AU1X00_SYS_CNTCTRL_TS (bit(0))
308
#define AU1X00_SYS_WAKEMSK_M20 (bit(8))
309
310
#define AU1X00_MAC_CONTROL(x) (*(volatile uint32_t*)(x + 0x00))
311
#define AU1X00_MAC_ADDRHIGH(x) (*(volatile uint32_t*)(x + 0x04))
312
#define AU1X00_MAC_ADDRLOW(x) (*(volatile uint32_t*)(x + 0x08))
313
#define AU1X00_MAC_HASHHIGH(x) (*(volatile uint32_t*)(x + 0x0c))
314
#define AU1X00_MAC_HASHLOW(x) (*(volatile uint32_t*)(x + 0x10))
315
#define AU1X00_MAC_MIICTRL(x) (*(volatile uint32_t*)(x + 0x14))
316
#define AU1X00_MAC_MIIDATA(x) (*(volatile uint32_t*)(x + 0x18))
317
#define AU1X00_MAC_FLOWCTRL(x) (*(volatile uint32_t*)(x + 0x1c))
318
#define AU1X00_MAC_VLAN1(x) (*(volatile uint32_t*)(x + 0x20))
319
#define AU1X00_MAC_VLAN2(x) (*(volatile uint32_t*)(x + 0x24))
320
#define AU1X00_MAC_EN0 (*(volatile uint32_t*)(AU1X00_MACEN_ADDR + 0x0))
321
#define AU1X00_MAC_EN1 (*(volatile uint32_t*)(AU1X00_MACEN_ADDR + 0x4))
322
#define AU1X00_MAC_DMA_TX0_ADDR(x) (*(volatile uint32_t*)(x + 0x000))
323
#define AU1X00_MAC_DMA_TX1_ADDR(x) (*(volatile uint32_t*)(x + 0x010))
324
#define AU1X00_MAC_DMA_TX2_ADDR(x) (*(volatile uint32_t*)(x + 0x020))
325
#define AU1X00_MAC_DMA_TX3_ADDR(x) (*(volatile uint32_t*)(x + 0x030))
326
#define AU1X00_MAC_DMA_RX0_ADDR(x) (*(volatile uint32_t*)(x + 0x100))
327
#define AU1X00_MAC_DMA_RX1_ADDR(x) (*(volatile uint32_t*)(x + 0x110))
328
#define AU1X00_MAC_DMA_RX2_ADDR(x) (*(volatile uint32_t*)(x + 0x120))
329
#define AU1X00_MAC_DMA_RX3_ADDR(x) (*(volatile uint32_t*)(x + 0x130))
330
331
typedef
struct
{
332
volatile
uint32_t stat;
333
volatile
uint32_t addr;
334
uint32_t _rsv0;
335
uint32_t _rsv1;
336
}
au1x00_macdma_rx_t
;
337
338
339
typedef
struct
{
340
volatile
uint32_t stat;
341
volatile
uint32_t addr;
342
volatile
uint32_t len;
343
uint32_t _rsv0;
344
}
au1x00_macdma_tx_t
;
345
346
#define AU1X00_MAC_CTRL_RA (bit(31))
347
#define AU1X00_MAC_CTRL_EM (bit(30))
348
#define AU1X00_MAC_CTRL_DO (bit(23))
349
#define AU1X00_MAC_CTRL_LM(x) ((x) << 21)
350
#define AU1X00_MAC_CTRL_LM_NORMAL ((0) << 21)
351
#define AU1X00_MAC_CTRL_LM_INTERNAL ((1) << 21)
352
#define AU1X00_MAC_CTRL_LM_EXTERNAL ((2) << 21)
353
#define AU1X00_MAC_CTRL_F (bit(20))
354
#define AU1X00_MAC_CTRL_PM (bit(19))
355
#define AU1X00_MAC_CTRL_PR (bit(18))
356
#define AU1X00_MAC_CTRL_IF (bit(17))
357
#define AU1X00_MAC_CTRL_PB (bit(16))
358
#define AU1X00_MAC_CTRL_HO (bit(15))
359
#define AU1X00_MAC_CTRL_HP (bit(13))
360
#define AU1X00_MAC_CTRL_LC (bit(12))
361
#define AU1X00_MAC_CTRL_DB (bit(11))
362
#define AU1X00_MAC_CTRL_DR (bit(10))
363
#define AU1X00_MAC_CTRL_AP (bit(8))
364
#define AU1X00_MAC_CTRL_BL(x) ((x) << 6)
365
#define AU1X00_MAC_CTRL_DC (bit(5))
366
#define AU1X00_MAC_CTRL_TE (bit(3))
367
#define AU1X00_MAC_CTRL_RE (bit(2))
368
369
#define AU1X00_MAC_EN_JP (bit(6))
370
#define AU1X00_MAC_EN_E2 (bit(5))
371
#define AU1X00_MAC_EN_E1 (bit(4))
372
#define AU1X00_MAC_EN_C (bit(3))
373
#define AU1X00_MAC_EN_TS (bit(2))
374
#define AU1X00_MAC_EN_E0 (bit(1))
375
#define AU1X00_MAC_EN_CE (bit(0))
376
377
#define AU1X00_MAC_ADDRHIGH_MASK (0xffff)_
378
#define AU1X00_MAC_MIICTRL_PHYADDR(x) ((x & 0x1f) << 11)
379
#define AU1X00_MAC_MIICTRL_MIIREG(x) ((x & 0x1f) << 6)
380
#define AU1X00_MAC_MIICTRL_MW (bit(1))
381
#define AU1X00_MAC_MIICTRL_MB (bit(0))
382
#define AU1X00_MAC_MIIDATA_MASK (0xffff)
383
#define AU1X00_MAC_FLOWCTRL_PT(x) (((x) & 0xffff) << 16)
384
#define AU1X00_MAC_FLOWCTRL_PC (bit(2))
385
#define AU1X00_MAC_FLOWCTRL_FE (bit(1))
386
#define AU1X00_MAC_FLOWCTRL_FB (bit(0))
387
388
#define AU1X00_MAC_DMA_RXSTAT_MI (bit(31))
389
#define AU1X00_MAC_DMA_RXSTAT_PF (bit(30))
390
#define AU1X00_MAC_DMA_RXSTAT_FF (bit(29))
391
#define AU1X00_MAC_DMA_RXSTAT_BF (bit(28))
392
#define AU1X00_MAC_DMA_RXSTAT_MF (bit(27))
393
#define AU1X00_MAC_DMA_RXSTAT_UC (bit(26))
394
#define AU1X00_MAC_DMA_RXSTAT_CF (bit(25))
395
#define AU1X00_MAC_DMA_RXSTAT_LE (bit(24))
396
#define AU1X00_MAC_DMA_RXSTAT_V2 (bit(23))
397
#define AU1X00_MAC_DMA_RXSTAT_V1 (bit(22))
398
#define AU1X00_MAC_DMA_RXSTAT_CR (bit(21))
399
#define AU1X00_MAC_DMA_RXSTAT_DB (bit(20))
400
#define AU1X00_MAC_DMA_RXSTAT_ME (bit(19))
401
#define AU1X00_MAC_DMA_RXSTAT_FT (bit(18))
402
#define AU1X00_MAC_DMA_RXSTAT_CS (bit(17))
403
#define AU1X00_MAC_DMA_RXSTAT_FL (bit(16))
404
#define AU1X00_MAC_DMA_RXSTAT_RF (bit(15))
405
#define AU1X00_MAC_DMA_RXSTAT_WT (bit(14))
406
#define AU1X00_MAC_DMA_RXSTAT_LEN(x) ((x) & 0x3fff)
407
#define AU1X00_MAC_DMA_RXADDR_ADDR(x) ((x) & ~0x1f)
408
#define AU1X00_MAC_DMA_RXADDR_CB_MASK (0x3 << 0x2)
409
#define AU1X00_MAC_DMA_RXADDR_DN (bit(1))
410
#define AU1X00_MAC_DMA_RXADDR_EN (bit(0))
411
412
413
#define AU1X00_MAC_DMA_TXSTAT_PR (bit(31))
414
#define AU1X00_MAC_DMA_TXSTAT_CC_MASK (0xf << 10)
415
#define AU1X00_MAC_DMA_TXSTAT_LO (bit(9))
416
#define AU1X00_MAC_DMA_TXSTAT_DF (bit(8))
417
#define AU1X00_MAC_DMA_TXSTAT_UR (bit(7))
418
#define AU1X00_MAC_DMA_TXSTAT_EC (bit(6))
419
#define AU1X00_MAC_DMA_TXSTAT_LC (bit(5))
420
#define AU1X00_MAC_DMA_TXSTAT_ED (bit(4))
421
#define AU1X00_MAC_DMA_TXSTAT_LS (bit(3))
422
#define AU1X00_MAC_DMA_TXSTAT_NC (bit(2))
423
#define AU1X00_MAC_DMA_TXSTAT_JT (bit(1))
424
#define AU1X00_MAC_DMA_TXSTAT_FA (bit(0))
425
#define AU1X00_MAC_DMA_TXADDR_ADDR(x) ((x) & ~0x1f)
426
#define AU1X00_MAC_DMA_TXADDR_CB_MASK (0x3 << 0x2)
427
#define AU1X00_MAC_DMA_TXADDR_DN (bit(1))
428
#define AU1X00_MAC_DMA_TXADDR_EN (bit(0))
429
430
431
432
typedef
struct
{
433
volatile
uint32_t rxdata;
434
volatile
uint32_t txdata;
435
volatile
uint32_t inten;
436
volatile
uint32_t intcause;
437
volatile
uint32_t fifoctrl;
438
volatile
uint32_t linectrl;
439
volatile
uint32_t mdmctrl;
440
volatile
uint32_t linestat;
441
volatile
uint32_t mdmstat;
442
volatile
uint32_t clkdiv;
443
volatile
uint32_t _resv[54];
444
volatile
uint32_t enable;
445
}
au1x00_uart_t
;
446
447
extern
au1x00_uart_t
*uart0;
448
extern
au1x00_uart_t
*uart3;
449
450
static
inline
void
au_sync(
void
)
451
{
452
__asm__
volatile
(
"sync"
);
453
}
454
455
456
extern
void
mips_default_isr(
int
vector );
457
458
/* Generate a software interrupt */
459
extern
int
assert_sw_irq(uint32_t irqnum);
460
461
/* Clear a software interrupt */
462
extern
int
negate_sw_irq(uint32_t irqnum);
463
464
#endif
au1x00_macdma_rx_t
Definition:
au1x00.h:331
au1x00_macdma_tx_t
Definition:
au1x00.h:339
au1x00_uart_t
Definition:
au1x00.h:432
Generated by
1.9.6