1 /* Coldfire C Header File
\r
2 * Copyright Freescale Semiconductor Inc
\r
3 * All rights reserved.
\r
5 * 2008/04/17 Revision: 0.2
\r
7 * (c) Copyright UNIS, spol. s r.o. 1997-2008
\r
12 * http : www.processorexpert.com
\r
13 * mail : info@processorexpert.com
\r
16 #ifndef __MCF52259_DMA_H__
\r
17 #define __MCF52259_DMA_H__
\r
20 /*********************************************************************
\r
22 * DMA Controller (DMA)
\r
24 *********************************************************************/
\r
26 /* Register read/write macros */
\r
27 #define MCF_DMA0_SAR (*(vuint32*)(0x40000100))
\r
28 #define MCF_DMA0_DAR (*(vuint32*)(0x40000104))
\r
29 #define MCF_DMA0_DSR (*(vuint8 *)(0x40000108))
\r
30 #define MCF_DMA0_BCR (*(vuint32*)(0x40000108))
\r
31 #define MCF_DMA0_DCR (*(vuint32*)(0x4000010C))
\r
33 #define MCF_DMA1_SAR (*(vuint32*)(0x40000110))
\r
34 #define MCF_DMA1_DAR (*(vuint32*)(0x40000114))
\r
35 #define MCF_DMA1_DSR (*(vuint8 *)(0x40000118))
\r
36 #define MCF_DMA1_BCR (*(vuint32*)(0x40000118))
\r
37 #define MCF_DMA1_DCR (*(vuint32*)(0x4000011C))
\r
39 #define MCF_DMA2_SAR (*(vuint32*)(0x40000120))
\r
40 #define MCF_DMA2_DAR (*(vuint32*)(0x40000124))
\r
41 #define MCF_DMA2_DSR (*(vuint8 *)(0x40000128))
\r
42 #define MCF_DMA2_BCR (*(vuint32*)(0x40000128))
\r
43 #define MCF_DMA2_DCR (*(vuint32*)(0x4000012C))
\r
45 #define MCF_DMA3_SAR (*(vuint32*)(0x40000130))
\r
46 #define MCF_DMA3_DAR (*(vuint32*)(0x40000134))
\r
47 #define MCF_DMA3_DSR (*(vuint8 *)(0x40000138))
\r
48 #define MCF_DMA3_BCR (*(vuint32*)(0x40000138))
\r
49 #define MCF_DMA3_DCR (*(vuint32*)(0x4000013C))
\r
51 #define MCF_DMA_SAR(x) (*(vuint32*)(0x40000100 + ((x)*0x10)))
\r
52 #define MCF_DMA_DAR(x) (*(vuint32*)(0x40000104 + ((x)*0x10)))
\r
53 #define MCF_DMA_DSR(x) (*(vuint8 *)(0x40000108 + ((x)*0x10)))
\r
54 #define MCF_DMA_BCR(x) (*(vuint32*)(0x40000108 + ((x)*0x10)))
\r
55 #define MCF_DMA_DCR(x) (*(vuint32*)(0x4000010C + ((x)*0x10)))
\r
58 /* Bit definitions and macros for MCF_DMA_SAR */
\r
59 #define MCF_DMA_SAR_SAR(x) (((x)&0xFFFFFFFF)<<0)
\r
61 /* Bit definitions and macros for MCF_DMA_DAR */
\r
62 #define MCF_DMA_DAR_DAR(x) (((x)&0xFFFFFFFF)<<0)
\r
64 /* Bit definitions and macros for MCF_DMA_DSR */
\r
65 #define MCF_DMA_DSR_DONE (0x1)
\r
66 #define MCF_DMA_DSR_BSY (0x2)
\r
67 #define MCF_DMA_DSR_REQ (0x4)
\r
68 #define MCF_DMA_DSR_BED (0x10)
\r
69 #define MCF_DMA_DSR_BES (0x20)
\r
70 #define MCF_DMA_DSR_CE (0x40)
\r
72 /* Bit definitions and macros for MCF_DMA_BCR */
\r
73 #define MCF_DMA_BCR_BCR(x) (((x)&0xFFFFFF)<<0)
\r
74 #define MCF_DMA_BCR_DSR(x) (((x)&0xFF)<<0x18)
\r
76 /* Bit definitions and macros for MCF_DMA_DCR */
\r
77 #define MCF_DMA_DCR_LCH2(x) (((x)&0x3)<<0)
\r
78 #define MCF_DMA_DCR_LCH2_CH0 (0)
\r
79 #define MCF_DMA_DCR_LCH2_CH1 (0x1)
\r
80 #define MCF_DMA_DCR_LCH2_CH2 (0x2)
\r
81 #define MCF_DMA_DCR_LCH2_CH3 (0x3)
\r
82 #define MCF_DMA_DCR_LCH1(x) (((x)&0x3)<<0x2)
\r
83 #define MCF_DMA_DCR_LCH1_CH0 (0)
\r
84 #define MCF_DMA_DCR_LCH1_CH1 (0x1)
\r
85 #define MCF_DMA_DCR_LCH1_CH2 (0x2)
\r
86 #define MCF_DMA_DCR_LCH1_CH3 (0x3)
\r
87 #define MCF_DMA_DCR_LINKCC(x) (((x)&0x3)<<0x4)
\r
88 #define MCF_DMA_DCR_D_REQ (0x80)
\r
89 #define MCF_DMA_DCR_DMOD(x) (((x)&0xF)<<0x8)
\r
90 #define MCF_DMA_DCR_DMOD_DIS (0)
\r
91 #define MCF_DMA_DCR_DMOD_16 (0x1)
\r
92 #define MCF_DMA_DCR_DMOD_32 (0x2)
\r
93 #define MCF_DMA_DCR_DMOD_64 (0x3)
\r
94 #define MCF_DMA_DCR_DMOD_128 (0x4)
\r
95 #define MCF_DMA_DCR_DMOD_256 (0x5)
\r
96 #define MCF_DMA_DCR_DMOD_512 (0x6)
\r
97 #define MCF_DMA_DCR_DMOD_1K (0x7)
\r
98 #define MCF_DMA_DCR_DMOD_2K (0x8)
\r
99 #define MCF_DMA_DCR_DMOD_4K (0x9)
\r
100 #define MCF_DMA_DCR_DMOD_8K (0xA)
\r
101 #define MCF_DMA_DCR_DMOD_16K (0xB)
\r
102 #define MCF_DMA_DCR_DMOD_32K (0xC)
\r
103 #define MCF_DMA_DCR_DMOD_64K (0xD)
\r
104 #define MCF_DMA_DCR_DMOD_128K (0xE)
\r
105 #define MCF_DMA_DCR_DMOD_256K (0xF)
\r
106 #define MCF_DMA_DCR_SMOD(x) (((x)&0xF)<<0xC)
\r
107 #define MCF_DMA_DCR_SMOD_DIS (0)
\r
108 #define MCF_DMA_DCR_SMOD_16 (0x1)
\r
109 #define MCF_DMA_DCR_SMOD_32 (0x2)
\r
110 #define MCF_DMA_DCR_SMOD_64 (0x3)
\r
111 #define MCF_DMA_DCR_SMOD_128 (0x4)
\r
112 #define MCF_DMA_DCR_SMOD_256 (0x5)
\r
113 #define MCF_DMA_DCR_SMOD_512 (0x6)
\r
114 #define MCF_DMA_DCR_SMOD_1K (0x7)
\r
115 #define MCF_DMA_DCR_SMOD_2K (0x8)
\r
116 #define MCF_DMA_DCR_SMOD_4K (0x9)
\r
117 #define MCF_DMA_DCR_SMOD_8K (0xA)
\r
118 #define MCF_DMA_DCR_SMOD_16K (0xB)
\r
119 #define MCF_DMA_DCR_SMOD_32K (0xC)
\r
120 #define MCF_DMA_DCR_SMOD_64K (0xD)
\r
121 #define MCF_DMA_DCR_SMOD_128K (0xE)
\r
122 #define MCF_DMA_DCR_SMOD_256K (0xF)
\r
123 #define MCF_DMA_DCR_START (0x10000)
\r
124 #define MCF_DMA_DCR_DSIZE(x) (((x)&0x3)<<0x11)
\r
125 #define MCF_DMA_DCR_DSIZE_LONG (0)
\r
126 #define MCF_DMA_DCR_DSIZE_BYTE (0x1)
\r
127 #define MCF_DMA_DCR_DSIZE_WORD (0x2)
\r
128 #define MCF_DMA_DCR_DSIZE_LINE (0x3)
\r
129 #define MCF_DMA_DCR_DINC (0x80000)
\r
130 #define MCF_DMA_DCR_SSIZE(x) (((x)&0x3)<<0x14)
\r
131 #define MCF_DMA_DCR_SSIZE_LONG (0)
\r
132 #define MCF_DMA_DCR_SSIZE_BYTE (0x1)
\r
133 #define MCF_DMA_DCR_SSIZE_WORD (0x2)
\r
134 #define MCF_DMA_DCR_SSIZE_LINE (0x3)
\r
135 #define MCF_DMA_DCR_SINC (0x400000)
\r
136 #define MCF_DMA_DCR_BWC(x) (((x)&0x7)<<0x19)
\r
137 #define MCF_DMA_DCR_BWC_16K (0x1)
\r
138 #define MCF_DMA_DCR_BWC_32K (0x2)
\r
139 #define MCF_DMA_DCR_BWC_64K (0x3)
\r
140 #define MCF_DMA_DCR_BWC_128K (0x4)
\r
141 #define MCF_DMA_DCR_BWC_256K (0x5)
\r
142 #define MCF_DMA_DCR_BWC_512K (0x6)
\r
143 #define MCF_DMA_DCR_BWC_1024K (0x7)
\r
144 #define MCF_DMA_DCR_AA (0x10000000)
\r
145 #define MCF_DMA_DCR_CS (0x20000000)
\r
146 #define MCF_DMA_DCR_EEXT (0x40000000)
\r
147 #define MCF_DMA_DCR_INT (0x80000000)
\r
150 #endif /* __MCF52259_DMA_H__ */
\r