4450ab22c333e69ea1101a5546b4ec365a9f0aca
[firmerware] / include / bottom / tic55x.h
1 /* tic55x bottom support definitions
2  *
3  * This file is part of 0cpm Firmerware.
4  *
5  * 0cpm Firmerware is Copyright (c)2011 Rick van Rein, OpenFortress.
6  *
7  * 0cpm Firmerware is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License as
9  * published by the Free Software Foundation, version 3.
10  *
11  * 0cpm Firmerware is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with 0cpm Firmerware.  If not, see <http://www.gnu.org/licenses/>.
18  */
19
20
21 /* Below:
22  *  - definitions for this architecture to service the top half
23  *  - definitions to bind bottom half files together
24  *
25  * From: Rick van Rein <rick@openfortress.nl>
26  */
27
28
29 /* The timer is the top 32-bit half of timer0 */
30 typedef uint32_t timing_t;
31 #define TIME_BEFORE(x,y)        (((x)-(y)) >> 31)
32 #define TIME_BEFOREQ(x,y)       (!(TIME_BEFORE((y),(x))))
33
34 #define TIMER_NULL 0
35
36 #define TIME_MSEC(x)    (((uint32_t) (x)))
37 #define TIME_SEC(x)     (((uint32_t) (x))*1000)
38 #define TIME_MIN(x)     (((uint32_t) (x))*1000*60)
39 #define TIME_HOUR(x)    (((uint32_t) (x))*1000*60*60)
40 #define TIME_DAY(x)     (((uint32_t) (x))*1000*60*60*24)
41
42
43 /* Critical region definitions */
44 #define bottom_critical_region_begin() _disable_interrupts()
45 #define bottom_critical_region_end()    _enable_interrupts()
46
47 /* Mapping data from/to network format */
48 #define htons(x) (x)
49 #define htonl(x) (x)
50 #define ntohs(x) (x)
51 #define ntohl(x) (x)
52
53 /* Misc utility functions */
54 #define bzero(p,n) memset((p),0,(n))
55
56
57 /* A number of object allocation qualifiers.  As defined
58  * in SPRU281F, these basically redirect large portions of
59  * data to their own segments.  This solves the linker
60  * message "section XYZ spans page boundary: not allowed
61  * before CPU revision 3.0" by limiting each to 64k max.
62  * The format is DATA_SECTION(_symbol, "sectionname") and
63  * a section named .sectionname must then be defined in
64  * source file src/driver/tic55x/linker.cmd
65  * Also see this webpage explaining the need for this:
66  * http://www.dsprelated.com/groups/c55x/show/2049.php
67  */
68 #pragma DATA_SECTION(codes0, ".const_codebook_codec2");
69 #pragma DATA_SECTION(codes1, ".const_codebook_codec2");
70 #pragma DATA_SECTION(codes2, ".const_codebook_codec2");
71 #pragma DATA_SECTION(codes3, ".const_codebook_codec2");
72 #pragma DATA_SECTION(codes4, ".const_codebook_codec2");
73 #pragma DATA_SECTION(codes5, ".const_codebook_codec2");
74 #pragma DATA_SECTION(codes6, ".const_codebook_codec2");
75 #pragma DATA_SECTION(codes7, ".const_codebook_codec2");
76 #pragma DATA_SECTION(codes8, ".const_codebook_codec2");
77 #pragma DATA_SECTION(codes9, ".const_codebook_codec2");
78
79
80 /* A number of code object allocations, that aim to place
81  * high-speed code into on-board static RAM, as this is a
82  * much faster resource than all the other forms of memory.
83  * See SPRU281F and this webpage:
84  * http://www.dsprelated.com/groups/c55x/show/2049.php
85  */
86 #pragma CODE_SECTION(netinput, ".text_fast");
87
88
89 /* Following definitions are only available if BOTTOM is defined */
90
91 #ifdef BOTTOM
92
93 /* Interrupt Enable Registers (memory-mapped) */
94 extern volatile uint16_t IER0, IER1;
95 asm ("_IER0 .set 0x0000");
96 asm ("_IER1 .set 0x0045");
97 extern volatile uint16_t IFR0, IFR1;
98 asm ("_IFR0 .set 0x0001");
99 asm ("_IFR1 .set 0x0046");
100
101 #define REGBIT_IER0_TINT0       4
102 #define REGBIT_IER0_DMAC1       9
103 #define REGBIT_IER0_INT0        2
104 #define REGBIT_IER1_TINT1       6
105 #define REGBIT_IER1_DMAC0       2
106
107 extern volatile uint16_t IVPD, IVPH;
108 asm ("_IVPD .set 0x0049");
109 asm ("_IVPH .set 0x004a");
110
111 extern volatile bool tic55x_top_has_been_interrupted;
112
113 void setup_interrupts (void);
114
115 /* General Purpose I/O registers */
116 extern volatile uint16_t ioport IODIR, IODATA;
117 asm ("_IODIR .set 0x3400");
118 asm ("_IODATA .set 0x3401");
119
120 /* EMIF and CE space control registers */
121 extern volatile uint16_t ioport EGCR1, EGCR2;
122 extern volatile uint16_t ioport CE0_1, CE0_2, CE1_1, CE1_2, CE2_1, CE2_2, CE3_1, CE3_2;
123 extern volatile uint16_t ioport CE0_SEC1, CE0_SEC2, CE1_SEC1, CE1_SEC2,
124                                 CE2_SEC1, CE2_SEC2, CE3_SEC1, CE3_SEC2;
125 asm ("_EGCR1 .set 0x0800");
126 asm ("_EGCR2 .set 0x0801");
127 asm ("_CE1_1 .set 0x0802");
128 asm ("_CE1_2 .set 0x0803");
129 asm ("_CE0_1 .set 0x0804");
130 asm ("_CE0_2 .set 0x0805");
131 asm ("_CE2_1 .set 0x0808");
132 asm ("_CE2_2 .set 0x0809");
133 asm ("_CE3_1 .set 0x080a");
134 asm ("_CE3_2 .set 0x080b");
135 asm ("_CE1_SEC1 .set 0x0822");
136 asm ("_CE1_SEC2 .set 0x0823");
137 asm ("_CE0_SEC1 .set 0x0824");
138 asm ("_CE0_SEC2 .set 0x0825");
139 asm ("_CE2_SEC1 .set 0x0828");
140 asm ("_CE2_SEC2 .set 0x0829");
141 asm ("_CE3_SEC1 .set 0x082a");
142 asm ("_CE3_SEC2 .set 0x082b");
143
144 /* EMIF SDRAM control registers */
145 extern volatile uint16_t ioport SDC1, SDC2, SDRC1, SDRC2, SDX1, SDX2, CESCR1, CESCR2;
146 asm ("_SDC1 .set 0x080c");
147 asm ("_SDC2 .set 0x080d");
148 asm ("_SDRC1 .set 0x080e");
149 asm ("_SDRC2 .set 0x080f");
150 asm ("_SDX1 .set 0x0810");
151 asm ("_SDX2 .set 0x0811");
152 asm ("_CESCR1 .set 0x0840");
153 asm ("_CESCR2 .set 0x0841");
154
155 /* Pin Control Registers for McBSP0, McBSP1 */
156 extern volatile uint16_t ioport PCR0, PCR1;
157 asm ("_PCR0 .set 0x2812");
158 asm ("_PCR1 .set 0x2c12");
159
160 #define REGBIT_PCR_IDLEEN       14
161 #define REGBIT_PCR_XIOEN        13
162 #define REGBIT_PCR_RIOEN        12
163 #define REGBIT_PCR_FSXM         11
164 #define REGBIT_PCR_FSRM         10
165 #define REGBIT_PCR_CLKXM        9
166 #define REGBIT_PCR_CLKRM        8
167 #define REGBIT_PCR_SCLKME       7
168 #define REGBIT_PCR_CLKSSTAT     6
169 #define REGBIT_PCR_DXSTAT       5
170 #define REGBIT_PCR_DRSTAT       4
171 #define REGBIT_PCR_FSXP         3
172 #define REGBIT_PCR_FSRP         2
173 #define REGBIT_PCR_CLKXP        1
174 #define REGBIT_PCR_CLKRP        0
175
176 #define REGVAL_PCR_CLKRP        0x01
177 #define REGVAL_PCR_CLKXP        0x02
178 #define REGVAL_PCR_FSRP         0x04
179 #define REGVAL_PCR_FSXP         0x08
180 #define REGVAL_PCR_DRSTAT       0x10
181
182 /* Timer0/1 configuration registers */
183 extern volatile uint16_t ioport GPTCLK_0;
184 extern volatile uint16_t ioport GPTCNT1_0, GPTCNT2_0, GPTCNT3_0, GPTCNT4_0;
185 extern volatile uint16_t ioport GPTPRD1_0, GPTPRD2_0, GPTPRD3_0, GPTPRD4_0;
186 extern volatile uint16_t ioport GPTCTL1_0, GPTCTL2_0, GPTGCTL1_0;
187 asm ("_GPTCLK_0 .set 0x1003");
188 asm ("_GPTCNT1_0 .set 0x1008");
189 asm ("_GPTCNT2_0 .set 0x1009");
190 asm ("_GPTCNT3_0 .set 0x100a");
191 asm ("_GPTCNT4_0 .set 0x100b");
192 asm ("_GPTPRD1_0 .set 0x100c");
193 asm ("_GPTPRD2_0 .set 0x100d");
194 asm ("_GPTPRD3_0 .set 0x100e");
195 asm ("_GPTPRD4_0 .set 0x100f");
196 asm ("_GPTCTL1_0 .set 0x1010");
197 asm ("_GPTCTL2_0 .set 0x1011");
198 asm ("_GPTGCTL1_0 .set 0x1012");
199
200 extern volatile uint16_t ioport GPTCLK_1;
201 extern volatile uint16_t ioport GPTCNT1_1, GPTCNT2_1, GPTCNT3_1, GPTCNT4_1;
202 extern volatile uint16_t ioport GPTPRD1_1, GPTPRD2_1, GPTPRD3_1, GPTPRD4_1;
203 extern volatile uint16_t ioport GPTCTL1_1, GPTCTL2_1, GPTGCTL1_1;
204 asm ("_GPTCLK_1 .set 0x2403");
205 asm ("_GPTCNT1_1 .set 0x2408");
206 asm ("_GPTCNT2_1 .set 0x2409");
207 asm ("_GPTCNT3_1 .set 0x240a");
208 asm ("_GPTCNT4_1 .set 0x240b");
209 asm ("_GPTPRD1_1 .set 0x240c");
210 asm ("_GPTPRD2_1 .set 0x240d");
211 asm ("_GPTPRD3_1 .set 0x240e");
212 asm ("_GPTPRD4_1 .set 0x240f");
213 asm ("_GPTCTL1_1 .set 0x2410");
214 asm ("_GPTCTL2_1 .set 0x2411");
215 asm ("_GPTGCTL1_1 .set 0x2412");
216
217 #define REGVAL_GCTL_TIMMODE_DUAL32CHAINED 0x0c
218 #define REGVAL_GCTL_TIM12RS 0x01
219 #define REGVAL_GCTL_TIM34RS 0x02
220
221 #define REGVAL_CTL12_ENAMODE_MASK       0xc0
222 #define REGVAL_CTL12_ENAMODE_ONETIME    0x40
223 #define REGVAL_CTL12_ENAMODE_CONTINUOUS 0x80
224 #define REGVAL_CTL12_CP                 0x08
225 #define REGVAL_CTL12_TSTAT              0x01
226
227
228 /* Idle mode configuration parameters */
229 extern volatile uint16_t ioport ICR, PICR;
230 asm ("_ICR .set 0x0001");
231 asm ("_PICR .set 0x9400");
232
233 #define REGBIT_ICR_CLKEI 9
234 #define REGBIT_ICR_IPORTI 8
235 #define REGBIT_ICR_MPORTI 7
236 #define REGBIT_ICR_XPORTI 6
237 #define REGBIT_ICR_EMIFI 5
238 #define REGBIT_ICR_CLKI 4
239 #define REGBIT_ICR_PERI 3
240 #define REGBIT_ICR_ICACHEI 2
241 #define REGBIT_ICR_MPI 1
242 #define REGBIT_ICR_CPUI 0
243
244 #define REGBIT_PICR_MISC 13
245 #define REGBIT_PICR_EMIF 12
246 #define REGBIT_PICR_BIOST 11
247 #define REGBIT_PICR_WDT 10
248 #define REGBIT_PICR_PIO 9
249 #define REGBIT_PICR_URT 8
250 #define REGBIT_PICR_I2C 7
251 #define REGBIT_PICR_ID 6
252 #define REGBIT_PICR_IO 6
253 #define REGBIT_PICR_SP1 3
254 #define REGBIT_PICR_SP0 2
255 #define REGBIT_PICR_TIM1 1
256 #define REGBIT_PICR_TIM0 0
257
258 /* PLL configuration registers */
259 extern volatile uint16_t ioport PLLCSR, PLLM, PLLDIV0, PLLDIV1, PLLDIV2, PLLDIV3;
260 asm ("_PLLCSR .set 0x1c80");
261 asm ("_PLLM .set 0x1c88");
262 asm ("_PLLDIV0 .set 0x1c8a");
263 asm ("_PLLDIV1 .set 0x1c8c");
264 asm ("_PLLDIV2 .set 0x1c8e");
265 asm ("_PLLDIV3 .set 0x1c90");
266
267 #define REGVAL_PLLM_TIMES_2             0x0002
268 #define REGVAL_PLLM_TIMES_3             0x0003
269 #define REGVAL_PLLM_TIMES_4             0x0004
270 #define REGVAL_PLLM_TIMES_5             0x0005
271 #define REGVAL_PLLM_TIMES_6             0x0006
272 #define REGVAL_PLLM_TIMES_7             0x0007
273 #define REGVAL_PLLM_TIMES_8             0x0008
274 #define REGVAL_PLLM_TIMES_9             0x0009
275 #define REGVAL_PLLM_TIMES_10            0x000a
276 #define REGVAL_PLLM_TIMES_11            0x000b
277 #define REGVAL_PLLM_TIMES_12            0x000c
278 #define REGVAL_PLLM_TIMES_13            0x000d
279 #define REGVAL_PLLM_TIMES_14            0x000e
280 #define REGVAL_PLLM_TIMES_15            0x000f
281
282 #define REGVAL_PLLCSR_PLLEN             0x0001
283 #define REGVAL_PLLCSR_PLLRST            0x0008
284 #define REGVAL_PLLCSR_LOCK              0x0020
285 #define REGVAL_PLLCSR_STABLE            0x0040
286
287 #define REGVAL_PLLDIVx_DxEN             0x8000
288 #define REGVAL_PLLDIVx_PLLDIVx_1        0x0000
289 #define REGVAL_PLLDIVx_PLLDIVx_2        0x0001
290 #define REGVAL_PLLDIVx_PLLDIVx_4        0x0003
291
292 /* McBSP1 configuration registers */
293 extern volatile uint16_t ioport SPCR1_1, SPCR2_1, SRGR1_1, SRGR2_1;
294 extern volatile uint16_t ioport MCR1_1, MCR2_1;
295 extern volatile uint16_t ioport RCR1_1, RCR2_1, XCR1_1, XCR2_1;
296 extern volatile uint16_t ioport DXR1_1, DRR1_1;
297 asm ("_SPCR1_1 .set 0x2c04");
298 asm ("_SPCR2_1 .set 0x2c05");
299 asm ("_RCR1_1 .set 0x2c06");
300 asm ("_RCR2_1 .set 0x2c07");
301 asm ("_XCR1_1 .set 0x2c08");
302 asm ("_XCR2_1 .set 0x2c09");
303 asm ("_SRGR1_1 .set 0x2c0a");
304 asm ("_SRGR2_1 .set 0x2c0b");
305 asm ("_MCR1_1 .set 0x2c0c");
306 asm ("_MCR2_1 .set 0x2c0d");
307 asm ("_DXR1_1 .set 0x2c02");
308 asm ("_DRR1_1 .set 0x2c00");
309
310 #define REGVAL_SPCR1_CLKSTP_DISABLED    0x0000
311 #define REGVAL_SPCR1_CLKSTP_NODELAY     0x1000
312 #define REGVAL_SPCR1_CLKSTP_NODELAY     0x1000
313 #define REGVAL_SPCR1_CLKSTP_WITHDELAY   0x1800
314 #define REGVAL_SPCR1_RRST_NOTRESET      0x0001
315 #define REGVAL_SPCR2_FRST_NOTRESET      0x0080
316 #define REGVAL_SPCR2_GRST_NOTRESET      0x0040
317 #define REGVAL_SPCR2_XRDY               0x0002
318 #define REGVAL_SPCR2_XRST_NOTRESET      0x0001
319
320 #define REGVAL_SRGR1_FWID_1             0x0000
321 #define REGVAL_SRGR1_FWID_2             0x0100
322 #define REGVAL_SRGR1_CLKGDIV_1          0x0001
323 #define REGVAL_SRGR1_CLKGDIV_4          0x0004
324 #define REGVAL_SRGR1_CLKGDIV_5          0x0005
325 #define REGVAL_SRGR1_CLKGDIV_15         0x000f
326 #define REGVAL_SRGR1_CLKGDIV_30         0x001e
327 #define REGVAL_SRGR2_GSYNC              0x8000
328 #define REGVAL_SRGR2_CLKSP              0x4000
329 #define REGVAL_SRGR2_CLKSM              0x2000
330 #define REGVAL_SRGR2_FSGM               0x1000
331 #define REGVAL_SRGR2_FPER_255           255
332 #define REGVAL_SRGR2_FPER_511           511
333 #define REGVAL_SRGR2_FPER_999           999
334 #define REGVAL_SRGR2_FPER_1535          1535
335
336 /* I2C configuration registers */
337
338 extern volatile uint16_t ioport I2CPSC, I2CCLKL, I2CCLKH, I2COAR;
339 extern volatile uint16_t ioport I2CMDR, I2CSTR, I2CIER, I2CISRC;
340 extern volatile uint16_t ioport I2CSAR, I2CCNT, I2CDXR, I2CDRR;
341
342 asm ("_I2CPSC .set 0x3c0c");
343 asm ("_I2CCLKL .set 0x3c03");
344 asm ("_I2CCLKH .set 0x3c04");
345 asm ("_I2COAR .set 0x3c00");
346 asm ("_I2CMDR .set 0x3c09");
347 asm ("_I2CSTR .set 0x3c02");
348 asm ("_I2CIER .set 0x3c01");
349 asm ("_I2CISRC .set 0x3c0a");
350 asm ("_I2CSAR .set 0x3c07");
351 asm ("_I2CCNT .set 0x3c05");
352 asm ("_I2CDXR .set 0x3c08");
353 asm ("_I2CDRR .set 0x3c06");
354
355 #define REGVAL_I2CMDR_NACKMOD   0x8000
356 #define REGVAL_I2CMDR_FREE      0x4000
357 #define REGVAL_I2CMDR_STT       0x2000
358 #define REGVAL_I2CMDR_IDLEEN    0x1000
359 #define REGVAL_I2CMDR_STP       0x0800
360 #define REGVAL_I2CMDR_MST       0x0400
361 #define REGVAL_I2CMDR_TRX       0x0200
362 #define REGVAL_I2CMDR_XA        0x0100
363 #define REGVAL_I2CMDR_RM        0x0080
364 #define REGVAL_I2CMDR_DLB       0x0040
365 #define REGVAL_I2CMDR_NORESET   0x0020
366 #define REGVAL_I2CMDR_STB       0x0010
367 #define REGVAL_I2CMDR_FDF       0x0008
368 #define REGVAL_I2CMDR_BC_8      0x0000
369
370 #define REGVAL_I2CIER_XRDY      0x0010
371 #define REGVAL_I2CIER_RRDY      0x0008
372 #define REGVAL_I2CIER_ARDY      0x0004
373 #define REGVAL_I2CIER_NACK      0x0002
374 #define REGVAL_I2CIER_AL        0x0001
375
376 #define REGVAL_I2CSTR_NACKSN    0x2000
377 #define REGVAL_I2CSTR_BB        0x1000
378 #define REGVAL_I2CSTR_RSFULL    0x0800
379 #define REGVAL_I2CSTR_XSMT      0x0400
380 #define REGVAL_I2CSTR_AAS       0x0200
381 #define REGVAL_I2CSTR_AD0       0x0100
382 #define REGVAL_I2CSTR_XRDY      0x0010
383 #define REGVAL_I2CSTR_RRDY      0x0008
384 #define REGVAL_I2CSTR_ARDY      0x0004
385 #define REGVAL_I2CSTR_NACK      0x0002
386 #define REGVAL_I2CSTR_AL        0x0001
387
388 #define REGVAL_I2COAR           0x005a
389
390 /* DMA configuration */
391
392 extern volatile uint16_t ioport DMAGCR, DMAGTCR;
393
394 extern volatile uint16_t ioport DMACSDP_0, DMACCR_0, DMACICR_0, DMACSR_0;
395 extern volatile uint16_t ioport DMACSSAL_0, DMACSSAU_0, DMACDSAL_0, DMACDSAU_0;
396 extern volatile uint16_t ioport DMACEN_0, DMACFN_0, DMACSEI_0, DMACSFI_0, DMACDEI_0, DMACDFI_0;
397 extern volatile uint16_t ioport DMACSAC_0, DMACDAC_0;
398
399 extern volatile uint16_t ioport DMACSDP_1, DMACCR_1, DMACICR_1, DMACSR_1;
400 extern volatile uint16_t ioport DMACSSAL_1, DMACSSAU_1, DMACDSAL_1, DMACDSAU_1;
401 extern volatile uint16_t ioport DMACEN_1, DMACFN_1, DMACSEI_1, DMACSFI_1, DMACDEI_1, DMACDFI_1;
402 extern volatile uint16_t ioport DMACSAC_1, DMACDAC_1;
403
404 asm ("_DMAGCR .set 0x0e00");
405 asm ("_DMAGTCR .set 0x0e01");
406
407 asm ("_DMACSDP_0 .set 0x0c00");
408 asm ("_DMACCR_0 .set 0x0c01");
409 asm ("_DMACICR_0 .set 0x0c02");
410 asm ("_DMACSR_0 .set 0x0c03");
411 asm ("_DMACSSAL_0 .set 0x0c04");
412 asm ("_DMACSSAU_0 .set 0x0c05");
413 asm ("_DMACDSAL_0 .set 0x0c06");
414 asm ("_DMACDSAU_0 .set 0x0c07");
415 asm ("_DMACEN_0 .set 0x0c08");
416 asm ("_DMACFN_0 .set 0x0c09");
417 asm ("_DMACSEI_0 .set 0x0c0b");
418 asm ("_DMACSFI_0 .set 0x0c0a");
419 asm ("_DMACSDEI_0 .set 0x0c0e");
420 asm ("_DMACSDFI_0 .set 0x0c0f");
421 asm ("_DMACSAC_0 .set 0x0c0c");
422 asm ("_DMACDAC_0 .set 0x0c0d");
423
424 asm ("_DMACSDP_1 .set 0x0c20");
425 asm ("_DMACCR_1 .set 0x0c21");
426 asm ("_DMACICR_1 .set 0x0c22");
427 asm ("_DMACSR_1 .set 0x0c23");
428 asm ("_DMACSSAL_1 .set 0x0c24");
429 asm ("_DMACSSAU_1 .set 0x0c25");
430 asm ("_DMACDSAL_1 .set 0x0c26");
431 asm ("_DMACDSAU_1 .set 0x0c27");
432 asm ("_DMACEN_1 .set 0x0c28");
433 asm ("_DMACFN_1 .set 0x0c29");
434 asm ("_DMACSEI_1 .set 0x0c2b");
435 asm ("_DMACSFI_1 .set 0x0c2a");
436 asm ("_DMACSDEI_1 .set 0x0c2e");
437 asm ("_DMACSDFI_1 .set 0x0c2f");
438 asm ("_DMACSAC_1 .set 0x0c2c");
439 asm ("_DMACDAC_1 .set 0x0c2d");
440
441 #define REGVAL_DMAGCR_FREE      0x0004
442 #define REGVAL_DMAGTCR_PTE      0x0008
443 #define REGVAL_DMAGTCR_ETE      0x0004
444 #define REGVAL_DMAGTCR_ITE1     0x0002
445 #define REGVAL_DMAGTCR_ITE0     0x0001
446 #define REGVAL_DMACCR_ENDPROG   0x0800
447 #define REGVAL_DMACCR_WP        0x0400
448 #define REGVAL_DMACCR_REPEAT    0x0200
449 #define REGVAL_DMACCR_AUTOINIT  0x0100
450 #define REGVAL_DMACCR_EN        0x0080
451 #define REGVAL_DMACCR_PRIO      0x0040
452 #define REGVAL_DMACCR_FS        0x0020
453 #define REGVAL_DMACCR_DSTAMODE_CONST    0x0000
454 #define REGVAL_DMACCR_DSTAMODE_POSTINC  0x4000
455 #define REGVAL_DMACCR_DSTAMODE_1INDEX   0x8000
456 #define REGVAL_DMACCR_DSTAMODE_2INDEX   0xc000
457 #define REGVAL_DMACCR_SRCAMODE_CONST    0x0000
458 #define REGVAL_DMACCR_SRCAMODE_POSTINC  0x1000
459 #define REGVAL_DMACCR_SRCAMODE_1INDEX   0x2000
460 #define REGVAL_DMACCR_SRCAMODE_2INDEX   0x3000
461 #define REGVAL_DMACCR_SYNC_NOEVENT      0x0000
462 #define REGVAL_DMACCR_SYNC_MCBSP0_REV   0x0001
463 #define REGVAL_DMACCR_SYNC_MCBSP0_TEV   0x0002
464 #define REGVAL_DMACCR_SYNC_MCBSP1_REV   0x0005
465 #define REGVAL_DMACCR_SYNC_MCBSP1_TEV   0x0006
466 #define REGVAL_DMACCR_SYNC_MCBSP2_REV   0x0009
467 #define REGVAL_DMACCR_SYNC_MCBSP2_TEV   0x000a
468 #define REGVAL_DMACCR_SYNC_UART_REV     0x000b
469 #define REGVAL_DMACCR_SYNC_UART_TEV     0x000c
470 #define REGVAL_DMACCR_SYNC_TIMER0       0x000d
471 #define REGVAL_DMACCR_SYNC_TIMER1       0x000e
472 #define REGVAL_DMACCR_SYNC_INT0         0x0010
473 #define REGVAL_DMACCR_SYNC_INT1         0x0011
474 #define REGVAL_DMACCR_SYNC_INT2         0x0012
475 #define REGVAL_DMACCR_SYNC_INT3         0x0013
476 #define REGVAL_DMACCR_SYNC_I2C_REV      0x0013
477 #define REGVAL_DMACCR_SYNC_I2C_TEV      0x0014
478 #define REGVAL_DMACICR_AERRIE           0x0080
479 #define REGVAL_DMACICR_BLOCKIE          0x0020
480 #define REGVAL_DMACICR_LASTIE           0x0010
481 #define REGVAL_DMACICR_FRAMEIE          0x0008
482 #define REGVAL_DMACICR_HALFIE           0x0004
483 #define REGVAL_DMACICR_DROPIE           0x0002
484 #define REGVAL_DMACICR_TIMEOUTIE        0x0001
485 #define REGVAL_DMACSR_AERR              0x0080
486 #define REGVAL_DMACSR_SYNC              0x0040
487 #define REGVAL_DMACSR_BLOCK             0x0020
488 #define REGVAL_DMACSR_LAST              0x0010
489 #define REGVAL_DMACSR_FRAME             0x0008
490 #define REGVAL_DMACSR_HALF              0x0004
491 #define REGVAL_DMACSR_DROP              0x0002
492 #define REGVAL_DMACSR_TIMEOUT           0x0001
493 #define REGVAL_DMACSDP_DSTBEN_DISABLE   0x0000
494 #define REGVAL_DMACSDP_DSTBEN_BURST     0x8000
495 #define REGVAL_DMACSDP_DSTPACK          0x2000
496 #define REGVAL_DMACSDP_DST_DARAM0       0x0000
497 #define REGVAL_DMACSDP_DST_DARAM1       0x0200
498 #define REGVAL_DMACSDP_DST_EMIF         0x0400
499 #define REGVAL_DMACSDP_DST_PERIPH       0x0600
500 #define REGVAL_DMACSDP_SRCBEN_DISABLE   0x0000
501 #define REGVAL_DMACSDP_SRCB EN_ENABLE   0x0100
502 #define REGVAL_DMACSDP_SRCPACK          0x0040
503 #define REGVAL_DMACSDP_SRC_DARAM0       0x0000
504 #define REGVAL_DMACSDP_SRC_DARAM1       0x0004
505 #define REGVAL_DMACSDP_SRC_EMIF         0x0008
506 #define REGVAL_DMACSDP_SRC_PERIPH       0x000c
507 #define REGVAL_DMACSDP_DATATYPE_8BIT    0x0000
508 #define REGVAL_DMACSDP_DATATYPE_16BIT   0x0001
509 #define REGVAL_DMACSDP_DATATYPE_32BIT   0x0002
510
511 #endif