diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-18 12:20:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-18 12:20:37 -0400 |
commit | 6f128fa344833bf8bf076a51d14401661c146470 (patch) | |
tree | 70049d2b394e86c3c3d06961c155cae45ce47ca7 /arch/arm/mach-davinci/include/mach/edma.h | |
parent | 73c583e4e2dd0fbbf2fafe0cc57ff75314fe72df (diff) | |
parent | 85609c1ccda64af7d7c277469183f20e4f3b69c3 (diff) |
Merge branch 'davinci-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci
* 'davinci-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci: (62 commits)
DaVinci: DM646x - platform changes for vpif capture and display drivers
davinci: DM355 - platform changes for vpfe capture
davinci: DM644x platform changes for vpfe capture
davinci: audio: move tlv320aic33 i2c setup into board files
DaVinci: EDMA: Adding 2 new APIs for allocating/freeing PARAMs
DaVinci: DM365: Adding entries for DM365 IRQ's
DaVinci: DM355: Adding PINMUX entries for DM355 Display
davinci: Handle pinmux conflict between mmc/sd and nor flash
davinci: Add NOR flash support for da850/omap-l138
davinci: Add NAND flash support for DA850/OMAP-L138
davinci: Add MMC/SD support for da850/omap-l138
davinci: Add platform support for da850/omap-l138 GLCD
davinci: Macro to convert GPIO signal to GPIO pin number
davinci: Audio support for DA850/OMAP-L138 EVM
davinci: Audio support for DA830 EVM
davinci: Correct the number of GPIO pins for da850/omap-l138
davinci: Configure MDIO pins for EMAC
DaVinci: DM365: Add Support for new Revision of silicon
DaVinci: DM365: Fix Compilation issue due to PINMUX entry
DaVinci: EDMA: Updating default queue handling
...
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 |