aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorBryan Wu <bryan.wu@analog.com>2007-10-21 12:02:14 -0400
committerBryan Wu <bryan.wu@analog.com>2007-10-21 12:02:14 -0400
commit452af71f36685c932a5cce540a48c1818df6533f (patch)
treec466051e5be2b193c6fe41afc5335011dce1f6ea /arch
parent780431e397c82df7e20ee17536b97a08f97ef8ba (diff)
Blackfin arch: dma add some API and cleanup bf54x DMA definition
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/blackfin/kernel/bfin_dma_5xx.c26
-rw-r--r--arch/blackfin/mach-bf548/dma.c1
2 files changed, 27 insertions, 0 deletions
diff --git a/arch/blackfin/kernel/bfin_dma_5xx.c b/arch/blackfin/kernel/bfin_dma_5xx.c
index e19164fb4cd1..503eef4c7fec 100644
--- a/arch/blackfin/kernel/bfin_dma_5xx.c
+++ b/arch/blackfin/kernel/bfin_dma_5xx.c
@@ -420,6 +420,32 @@ unsigned short get_dma_curr_ycount(unsigned int channel)
420} 420}
421EXPORT_SYMBOL(get_dma_curr_ycount); 421EXPORT_SYMBOL(get_dma_curr_ycount);
422 422
423unsigned long get_dma_next_desc_ptr(unsigned int channel)
424{
425 BUG_ON(!(dma_ch[channel].chan_status != DMA_CHANNEL_FREE
426 && channel < MAX_BLACKFIN_DMA_CHANNEL));
427
428 return dma_ch[channel].regs->next_desc_ptr;
429}
430EXPORT_SYMBOL(get_dma_next_desc_ptr);
431
432unsigned long get_dma_curr_desc_ptr(unsigned int channel)
433{
434 BUG_ON(!(dma_ch[channel].chan_status != DMA_CHANNEL_FREE
435 && channel < MAX_BLACKFIN_DMA_CHANNEL));
436
437 return dma_ch[channel].regs->curr_desc_ptr;
438}
439
440unsigned long get_dma_curr_addr(unsigned int channel)
441{
442 BUG_ON(!(dma_ch[channel].chan_status != DMA_CHANNEL_FREE
443 && channel < MAX_BLACKFIN_DMA_CHANNEL));
444
445 return dma_ch[channel].regs->curr_addr_ptr;
446}
447EXPORT_SYMBOL(get_dma_curr_addr);
448
423static void *__dma_memcpy(void *dest, const void *src, size_t size) 449static void *__dma_memcpy(void *dest, const void *src, size_t size)
424{ 450{
425 int direction; /* 1 - address decrease, 0 - address increase */ 451 int direction; /* 1 - address decrease, 0 - address increase */
diff --git a/arch/blackfin/mach-bf548/dma.c b/arch/blackfin/mach-bf548/dma.c
index a8184113be48..957bf1366eff 100644
--- a/arch/blackfin/mach-bf548/dma.c
+++ b/arch/blackfin/mach-bf548/dma.c
@@ -64,6 +64,7 @@
64 (struct dma_register *) MDMA_D3_NEXT_DESC_PTR, 64 (struct dma_register *) MDMA_D3_NEXT_DESC_PTR,
65 (struct dma_register *) MDMA_S3_NEXT_DESC_PTR, 65 (struct dma_register *) MDMA_S3_NEXT_DESC_PTR,
66}; 66};
67EXPORT_SYMBOL(base_addr);
67 68
68int channel2irq(unsigned int channel) 69int channel2irq(unsigned int channel)
69{ 70{