diff options
Diffstat (limited to 'arch/arm/mach-davinci/include/mach/edma.h')
-rw-r--r-- | arch/arm/mach-davinci/include/mach/edma.h | 67 |
1 files changed, 66 insertions, 1 deletions
diff --git a/arch/arm/mach-davinci/include/mach/edma.h b/arch/arm/mach-davinci/include/mach/edma.h index 24a379239d7f..eb8bfd7925e7 100644 --- a/arch/arm/mach-davinci/include/mach/edma.h +++ b/arch/arm/mach-davinci/include/mach/edma.h | |||
@@ -139,6 +139,54 @@ struct edmacc_param { | |||
139 | #define DAVINCI_DMA_PWM1 53 | 139 | #define DAVINCI_DMA_PWM1 53 |
140 | #define DAVINCI_DMA_PWM2 54 | 140 | #define DAVINCI_DMA_PWM2 54 |
141 | 141 | ||
142 | /* DA830 specific EDMA3 information */ | ||
143 | #define EDMA_DA830_NUM_DMACH 32 | ||
144 | #define EDMA_DA830_NUM_TCC 32 | ||
145 | #define EDMA_DA830_NUM_PARAMENTRY 128 | ||
146 | #define EDMA_DA830_NUM_EVQUE 2 | ||
147 | #define EDMA_DA830_NUM_TC 2 | ||
148 | #define EDMA_DA830_CHMAP_EXIST 0 | ||
149 | #define EDMA_DA830_NUM_REGIONS 4 | ||
150 | #define DA830_DMACH2EVENT_MAP0 0x000FC03Fu | ||
151 | #define DA830_DMACH2EVENT_MAP1 0x00000000u | ||
152 | #define DA830_EDMA_ARM_OWN 0x30FFCCFFu | ||
153 | |||
154 | /* DA830 specific EDMA3 Events Information */ | ||
155 | enum DA830_edma_ch { | ||
156 | DA830_DMACH_MCASP0_RX, | ||
157 | DA830_DMACH_MCASP0_TX, | ||
158 | DA830_DMACH_MCASP1_RX, | ||
159 | DA830_DMACH_MCASP1_TX, | ||
160 | DA830_DMACH_MCASP2_RX, | ||
161 | DA830_DMACH_MCASP2_TX, | ||
162 | DA830_DMACH_GPIO_BNK0INT, | ||
163 | DA830_DMACH_GPIO_BNK1INT, | ||
164 | DA830_DMACH_UART0_RX, | ||
165 | DA830_DMACH_UART0_TX, | ||
166 | DA830_DMACH_TMR64P0_EVTOUT12, | ||
167 | DA830_DMACH_TMR64P0_EVTOUT34, | ||
168 | DA830_DMACH_UART1_RX, | ||
169 | DA830_DMACH_UART1_TX, | ||
170 | DA830_DMACH_SPI0_RX, | ||
171 | DA830_DMACH_SPI0_TX, | ||
172 | DA830_DMACH_MMCSD_RX, | ||
173 | DA830_DMACH_MMCSD_TX, | ||
174 | DA830_DMACH_SPI1_RX, | ||
175 | DA830_DMACH_SPI1_TX, | ||
176 | DA830_DMACH_DMAX_EVTOUT6, | ||
177 | DA830_DMACH_DMAX_EVTOUT7, | ||
178 | DA830_DMACH_GPIO_BNK2INT, | ||
179 | DA830_DMACH_GPIO_BNK3INT, | ||
180 | DA830_DMACH_I2C0_RX, | ||
181 | DA830_DMACH_I2C0_TX, | ||
182 | DA830_DMACH_I2C1_RX, | ||
183 | DA830_DMACH_I2C1_TX, | ||
184 | DA830_DMACH_GPIO_BNK4INT, | ||
185 | DA830_DMACH_GPIO_BNK5INT, | ||
186 | DA830_DMACH_UART2_RX, | ||
187 | DA830_DMACH_UART2_TX | ||
188 | }; | ||
189 | |||
142 | /*ch_status paramater of callback function possible values*/ | 190 | /*ch_status paramater of callback function possible values*/ |
143 | #define DMA_COMPLETE 1 | 191 | #define DMA_COMPLETE 1 |
144 | #define DMA_CC_ERROR 2 | 192 | #define DMA_CC_ERROR 2 |
@@ -162,6 +210,8 @@ enum fifo_width { | |||
162 | enum dma_event_q { | 210 | enum dma_event_q { |
163 | EVENTQ_0 = 0, | 211 | EVENTQ_0 = 0, |
164 | EVENTQ_1 = 1, | 212 | EVENTQ_1 = 1, |
213 | EVENTQ_2 = 2, | ||
214 | EVENTQ_3 = 3, | ||
165 | EVENTQ_DEFAULT = -1 | 215 | EVENTQ_DEFAULT = -1 |
166 | }; | 216 | }; |
167 | 217 | ||
@@ -170,8 +220,15 @@ enum sync_dimension { | |||
170 | ABSYNC = 1 | 220 | ABSYNC = 1 |
171 | }; | 221 | }; |
172 | 222 | ||
223 | #define EDMA_CTLR_CHAN(ctlr, chan) (((ctlr) << 16) | (chan)) | ||
224 | #define EDMA_CTLR(i) ((i) >> 16) | ||
225 | #define EDMA_CHAN_SLOT(i) ((i) & 0xffff) | ||
226 | |||
173 | #define EDMA_CHANNEL_ANY -1 /* for edma_alloc_channel() */ | 227 | #define EDMA_CHANNEL_ANY -1 /* for edma_alloc_channel() */ |
174 | #define EDMA_SLOT_ANY -1 /* for edma_alloc_slot() */ | 228 | #define EDMA_SLOT_ANY -1 /* for edma_alloc_slot() */ |
229 | #define EDMA_CONT_PARAMS_ANY 1001 | ||
230 | #define EDMA_CONT_PARAMS_FIXED_EXACT 1002 | ||
231 | #define EDMA_CONT_PARAMS_FIXED_NOT_EXACT 1003 | ||
175 | 232 | ||
176 | /* alloc/free DMA channels and their dedicated parameter RAM slots */ | 233 | /* alloc/free DMA channels and their dedicated parameter RAM slots */ |
177 | int edma_alloc_channel(int channel, | 234 | int edma_alloc_channel(int channel, |
@@ -180,9 +237,13 @@ int edma_alloc_channel(int channel, | |||
180 | void edma_free_channel(unsigned channel); | 237 | void edma_free_channel(unsigned channel); |
181 | 238 | ||
182 | /* alloc/free parameter RAM slots */ | 239 | /* alloc/free parameter RAM slots */ |
183 | int edma_alloc_slot(int slot); | 240 | int edma_alloc_slot(unsigned ctlr, int slot); |
184 | void edma_free_slot(unsigned slot); | 241 | void edma_free_slot(unsigned slot); |
185 | 242 | ||
243 | /* alloc/free a set of contiguous parameter RAM slots */ | ||
244 | int edma_alloc_cont_slots(unsigned ctlr, unsigned int id, int slot, int count); | ||
245 | int edma_free_cont_slots(unsigned slot, int count); | ||
246 | |||
186 | /* calls that operate on part of a parameter RAM slot */ | 247 | /* calls that operate on part of a parameter RAM slot */ |
187 | void edma_set_src(unsigned slot, dma_addr_t src_port, | 248 | void edma_set_src(unsigned slot, dma_addr_t src_port, |
188 | enum address_mode mode, enum fifo_width); | 249 | enum address_mode mode, enum fifo_width); |
@@ -216,9 +277,13 @@ struct edma_soc_info { | |||
216 | unsigned n_region; | 277 | unsigned n_region; |
217 | unsigned n_slot; | 278 | unsigned n_slot; |
218 | unsigned n_tc; | 279 | unsigned n_tc; |
280 | unsigned n_cc; | ||
281 | enum dma_event_q default_queue; | ||
219 | 282 | ||
220 | /* list of channels with no even trigger; terminated by "-1" */ | 283 | /* list of channels with no even trigger; terminated by "-1" */ |
221 | const s8 *noevent; | 284 | const s8 *noevent; |
285 | const s8 (*queue_tc_mapping)[2]; | ||
286 | const s8 (*queue_priority_mapping)[2]; | ||
222 | }; | 287 | }; |
223 | 288 | ||
224 | #endif | 289 | #endif |