diff options
author | Bryan Wu <bryan.wu@analog.com> | 2007-10-22 00:02:14 +0800 |
---|---|---|
committer | Bryan Wu <bryan.wu@analog.com> | 2007-10-22 00:02:14 +0800 |
commit | 452af71f36685c932a5cce540a48c1818df6533f (patch) | |
tree | c466051e5be2b193c6fe41afc5335011dce1f6ea /arch | |
parent | 780431e397c82df7e20ee17536b97a08f97ef8ba (diff) | |
download | linux-3.10-452af71f36685c932a5cce540a48c1818df6533f.tar.gz linux-3.10-452af71f36685c932a5cce540a48c1818df6533f.tar.bz2 linux-3.10-452af71f36685c932a5cce540a48c1818df6533f.zip |
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.c | 26 | ||||
-rw-r--r-- | arch/blackfin/mach-bf548/dma.c | 1 |
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 e19164fb4cd..503eef4c7fe 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) } EXPORT_SYMBOL(get_dma_curr_ycount); +unsigned long get_dma_next_desc_ptr(unsigned int channel) +{ + BUG_ON(!(dma_ch[channel].chan_status != DMA_CHANNEL_FREE + && channel < MAX_BLACKFIN_DMA_CHANNEL)); + + return dma_ch[channel].regs->next_desc_ptr; +} +EXPORT_SYMBOL(get_dma_next_desc_ptr); + +unsigned long get_dma_curr_desc_ptr(unsigned int channel) +{ + BUG_ON(!(dma_ch[channel].chan_status != DMA_CHANNEL_FREE + && channel < MAX_BLACKFIN_DMA_CHANNEL)); + + return dma_ch[channel].regs->curr_desc_ptr; +} + +unsigned long get_dma_curr_addr(unsigned int channel) +{ + BUG_ON(!(dma_ch[channel].chan_status != DMA_CHANNEL_FREE + && channel < MAX_BLACKFIN_DMA_CHANNEL)); + + return dma_ch[channel].regs->curr_addr_ptr; +} +EXPORT_SYMBOL(get_dma_curr_addr); + static void *__dma_memcpy(void *dest, const void *src, size_t size) { 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 a8184113be4..957bf1366ef 100644 --- a/arch/blackfin/mach-bf548/dma.c +++ b/arch/blackfin/mach-bf548/dma.c @@ -64,6 +64,7 @@ (struct dma_register *) MDMA_D3_NEXT_DESC_PTR, (struct dma_register *) MDMA_S3_NEXT_DESC_PTR, }; +EXPORT_SYMBOL(base_addr); int channel2irq(unsigned int channel) { |