1 |
578 |
jeremybenn |
/* Coldfire C Header File
|
2 |
|
|
* Copyright Freescale Semiconductor Inc
|
3 |
|
|
* All rights reserved.
|
4 |
|
|
*
|
5 |
|
|
* 2007/03/19 Revision: 0.9
|
6 |
|
|
*/
|
7 |
|
|
|
8 |
|
|
#ifndef __MCF5282_DMA_H__
|
9 |
|
|
#define __MCF5282_DMA_H__
|
10 |
|
|
|
11 |
|
|
|
12 |
|
|
/*********************************************************************
|
13 |
|
|
*
|
14 |
|
|
* DMA Controller (DMA)
|
15 |
|
|
*
|
16 |
|
|
*********************************************************************/
|
17 |
|
|
|
18 |
|
|
/* Register read/write macros */
|
19 |
|
|
#define MCF_DMA0_SAR (*(vuint32*)(&__IPSBAR[0x100]))
|
20 |
|
|
#define MCF_DMA0_DAR (*(vuint32*)(&__IPSBAR[0x104]))
|
21 |
|
|
#define MCF_DMA0_DCR (*(vuint32*)(&__IPSBAR[0x108]))
|
22 |
|
|
#define MCF_DMA0_BCR (*(vuint32*)(&__IPSBAR[0x10C]))
|
23 |
|
|
#define MCF_DMA0_DSR (*(vuint8 *)(&__IPSBAR[0x110]))
|
24 |
|
|
|
25 |
|
|
#define MCF_DMA1_SAR (*(vuint32*)(&__IPSBAR[0x140]))
|
26 |
|
|
#define MCF_DMA1_DAR (*(vuint32*)(&__IPSBAR[0x144]))
|
27 |
|
|
#define MCF_DMA1_DCR (*(vuint32*)(&__IPSBAR[0x148]))
|
28 |
|
|
#define MCF_DMA1_BCR (*(vuint32*)(&__IPSBAR[0x14C]))
|
29 |
|
|
#define MCF_DMA1_DSR (*(vuint8 *)(&__IPSBAR[0x150]))
|
30 |
|
|
|
31 |
|
|
#define MCF_DMA2_SAR (*(vuint32*)(&__IPSBAR[0x180]))
|
32 |
|
|
#define MCF_DMA2_DAR (*(vuint32*)(&__IPSBAR[0x184]))
|
33 |
|
|
#define MCF_DMA2_DCR (*(vuint32*)(&__IPSBAR[0x188]))
|
34 |
|
|
#define MCF_DMA2_BCR (*(vuint32*)(&__IPSBAR[0x18C]))
|
35 |
|
|
#define MCF_DMA2_DSR (*(vuint8 *)(&__IPSBAR[0x190]))
|
36 |
|
|
|
37 |
|
|
#define MCF_DMA3_SAR (*(vuint32*)(&__IPSBAR[0x1C0]))
|
38 |
|
|
#define MCF_DMA3_DAR (*(vuint32*)(&__IPSBAR[0x1C4]))
|
39 |
|
|
#define MCF_DMA3_DCR (*(vuint32*)(&__IPSBAR[0x1C8]))
|
40 |
|
|
#define MCF_DMA3_BCR (*(vuint32*)(&__IPSBAR[0x1CC]))
|
41 |
|
|
#define MCF_DMA3_DSR (*(vuint8 *)(&__IPSBAR[0x1D0]))
|
42 |
|
|
|
43 |
|
|
#define MCF_DMA_SAR(x) (*(vuint32*)(&__IPSBAR[0x100 + ((x)*0x40)]))
|
44 |
|
|
#define MCF_DMA_DAR(x) (*(vuint32*)(&__IPSBAR[0x104 + ((x)*0x40)]))
|
45 |
|
|
#define MCF_DMA_DCR(x) (*(vuint32*)(&__IPSBAR[0x108 + ((x)*0x40)]))
|
46 |
|
|
#define MCF_DMA_BCR(x) (*(vuint32*)(&__IPSBAR[0x10C + ((x)*0x40)]))
|
47 |
|
|
#define MCF_DMA_DSR(x) (*(vuint8 *)(&__IPSBAR[0x110 + ((x)*0x40)]))
|
48 |
|
|
|
49 |
|
|
|
50 |
|
|
/* Bit definitions and macros for MCF_DMA_SAR */
|
51 |
|
|
#define MCF_DMA_SAR_SAR(x) (((x)&0xFFFFFFFF)<<0)
|
52 |
|
|
|
53 |
|
|
/* Bit definitions and macros for MCF_DMA_DAR */
|
54 |
|
|
#define MCF_DMA_DAR_DAR(x) (((x)&0xFFFFFFFF)<<0)
|
55 |
|
|
|
56 |
|
|
/* Bit definitions and macros for MCF_DMA_DCR */
|
57 |
|
|
#define MCF_DMA_DCR_AT (0x8000)
|
58 |
|
|
#define MCF_DMA_DCR_START (0x10000)
|
59 |
|
|
#define MCF_DMA_DCR_DSIZE(x) (((x)&0x3)<<0x11)
|
60 |
|
|
#define MCF_DMA_DCR_DSIZE_LONG (0)
|
61 |
|
|
#define MCF_DMA_DCR_DSIZE_BYTE (0x1)
|
62 |
|
|
#define MCF_DMA_DCR_DSIZE_WORD (0x2)
|
63 |
|
|
#define MCF_DMA_DCR_DSIZE_LINE (0x3)
|
64 |
|
|
#define MCF_DMA_DCR_DINC (0x80000)
|
65 |
|
|
#define MCF_DMA_DCR_SSIZE(x) (((x)&0x3)<<0x14)
|
66 |
|
|
#define MCF_DMA_DCR_SSIZE_LONG (0)
|
67 |
|
|
#define MCF_DMA_DCR_SSIZE_BYTE (0x1)
|
68 |
|
|
#define MCF_DMA_DCR_SSIZE_WORD (0x2)
|
69 |
|
|
#define MCF_DMA_DCR_SSIZE_LINE (0x3)
|
70 |
|
|
#define MCF_DMA_DCR_SINC (0x400000)
|
71 |
|
|
#define MCF_DMA_DCR_BWC(x) (((x)&0x7)<<0x19)
|
72 |
|
|
#define MCF_DMA_DCR_AA (0x10000000)
|
73 |
|
|
#define MCF_DMA_DCR_CS (0x20000000)
|
74 |
|
|
#define MCF_DMA_DCR_EEXT (0x40000000)
|
75 |
|
|
#define MCF_DMA_DCR_INT (0x80000000)
|
76 |
|
|
#define MCF_DMA_DCR_BWC_DMA (0)
|
77 |
|
|
#define MCF_DMA_DCR_BWC_512 (0x2000000)
|
78 |
|
|
#define MCF_DMA_DCR_BWC_1024 (0x4000000)
|
79 |
|
|
#define MCF_DMA_DCR_BWC_2048 (0x6000000)
|
80 |
|
|
#define MCF_DMA_DCR_BWC_4096 (0x8000000)
|
81 |
|
|
#define MCF_DMA_DCR_BWC_8192 (0xA000000)
|
82 |
|
|
#define MCF_DMA_DCR_BWC_16384 (0xC000000)
|
83 |
|
|
#define MCF_DMA_DCR_BWC_32768 (0xE000000)
|
84 |
|
|
|
85 |
|
|
/* Bit definitions and macros for MCF_DMA_BCR */
|
86 |
|
|
#define MCF_DMA_BCR_BCR(x) (((x)&0xFFFFFFFF)<<0)
|
87 |
|
|
|
88 |
|
|
/* Bit definitions and macros for MCF_DMA_DSR */
|
89 |
|
|
#define MCF_DMA_DSR_DONE (0x1)
|
90 |
|
|
#define MCF_DMA_DSR_BSY (0x2)
|
91 |
|
|
#define MCF_DMA_DSR_REQ (0x4)
|
92 |
|
|
#define MCF_DMA_DSR_BED (0x10)
|
93 |
|
|
#define MCF_DMA_DSR_BES (0x20)
|
94 |
|
|
#define MCF_DMA_DSR_CE (0x40)
|
95 |
|
|
|
96 |
|
|
|
97 |
|
|
#endif /* __MCF5282_DMA_H__ */
|