diff options
author | Sonic Zhang <sonic.zhang@analog.com> | 2007-08-05 04:14:58 -0400 |
---|---|---|
committer | Bryan Wu <bryan.wu@analog.com> | 2007-08-05 04:14:58 -0400 |
commit | 8a26ac7043b0cb3b446ad9f9a3ec0992d0fea1f7 (patch) | |
tree | 27134ed1c717e041d5f1f5d60375deb899ce2457 | |
parent | 2cbfe107434b9651168afb21015f3285e02beed3 (diff) |
Blackfin arch: Add DMA API to set curr descriptor address
This API is necessary for DMA descriptor array mode.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
-rw-r--r-- | arch/blackfin/kernel/bfin_dma_5xx.c | 15 | ||||
-rw-r--r-- | include/asm-blackfin/dma.h | 1 |
2 files changed, 15 insertions, 1 deletions
diff --git a/arch/blackfin/kernel/bfin_dma_5xx.c b/arch/blackfin/kernel/bfin_dma_5xx.c index 62f5a35c13ee..f0db6c5c8d1a 100644 --- a/arch/blackfin/kernel/bfin_dma_5xx.c +++ b/arch/blackfin/kernel/bfin_dma_5xx.c | |||
@@ -270,10 +270,23 @@ void set_dma_next_desc_addr(unsigned int channel, unsigned long addr) | |||
270 | 270 | ||
271 | dma_ch[channel].regs->next_desc_ptr = addr; | 271 | dma_ch[channel].regs->next_desc_ptr = addr; |
272 | SSYNC(); | 272 | SSYNC(); |
273 | pr_debug("set_dma_start_addr() : END\n"); | 273 | pr_debug("set_dma_next_desc_addr() : END\n"); |
274 | } | 274 | } |
275 | EXPORT_SYMBOL(set_dma_next_desc_addr); | 275 | EXPORT_SYMBOL(set_dma_next_desc_addr); |
276 | 276 | ||
277 | void set_dma_curr_desc_addr(unsigned int channel, unsigned long addr) | ||
278 | { | ||
279 | pr_debug("set_dma_curr_desc_addr() : BEGIN \n"); | ||
280 | |||
281 | BUG_ON(!(dma_ch[channel].chan_status != DMA_CHANNEL_FREE | ||
282 | && channel < MAX_BLACKFIN_DMA_CHANNEL)); | ||
283 | |||
284 | dma_ch[channel].regs->curr_desc_ptr = addr; | ||
285 | SSYNC(); | ||
286 | pr_debug("set_dma_curr_desc_addr() : END\n"); | ||
287 | } | ||
288 | EXPORT_SYMBOL(set_dma_curr_desc_addr); | ||
289 | |||
277 | void set_dma_x_count(unsigned int channel, unsigned short x_count) | 290 | void set_dma_x_count(unsigned int channel, unsigned short x_count) |
278 | { | 291 | { |
279 | BUG_ON(!(dma_ch[channel].chan_status != DMA_CHANNEL_FREE | 292 | BUG_ON(!(dma_ch[channel].chan_status != DMA_CHANNEL_FREE |
diff --git a/include/asm-blackfin/dma.h b/include/asm-blackfin/dma.h index 4269082b154a..b42a531e7a1b 100644 --- a/include/asm-blackfin/dma.h +++ b/include/asm-blackfin/dma.h | |||
@@ -152,6 +152,7 @@ struct dma_channel { | |||
152 | /* functions to set register mode */ | 152 | /* functions to set register mode */ |
153 | void set_dma_start_addr(unsigned int channel, unsigned long addr); | 153 | void set_dma_start_addr(unsigned int channel, unsigned long addr); |
154 | void set_dma_next_desc_addr(unsigned int channel, unsigned long addr); | 154 | void set_dma_next_desc_addr(unsigned int channel, unsigned long addr); |
155 | void set_dma_curr_desc_addr(unsigned int channel, unsigned long addr); | ||
155 | void set_dma_x_count(unsigned int channel, unsigned short x_count); | 156 | void set_dma_x_count(unsigned int channel, unsigned short x_count); |
156 | void set_dma_x_modify(unsigned int channel, short x_modify); | 157 | void set_dma_x_modify(unsigned int channel, short x_modify); |
157 | void set_dma_y_count(unsigned int channel, unsigned short y_count); | 158 | void set_dma_y_count(unsigned int channel, unsigned short y_count); |