]> err.no Git - linux-2.6/commitdiff
Blackfin arch: add set_dma_curr_addr DMA API to support sound driver recording function
authorRoy Huang <roy.huang@analog.com>
Wed, 10 Oct 2007 15:31:19 +0000 (23:31 +0800)
committerBryan Wu <bryan.wu@analog.com>
Wed, 10 Oct 2007 15:31:19 +0000 (23:31 +0800)
Signed-off-by: Roy Huang <roy.huang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
arch/blackfin/kernel/bfin_dma_5xx.c
include/asm-blackfin/dma.h

index 7cf02f02a1dbed0243cfda428d9768687f0ab808..7e2201908356d53cf44ed47e8e612d213db6cc53 100644 (file)
@@ -345,6 +345,16 @@ void set_dma_sg(unsigned int channel, struct dmasg *sg, int nr_sg)
 }
 EXPORT_SYMBOL(set_dma_sg);
 
+void set_dma_curr_addr(unsigned int channel, unsigned long addr)
+{
+       BUG_ON(!(dma_ch[channel].chan_status != DMA_CHANNEL_FREE
+              && channel < MAX_BLACKFIN_DMA_CHANNEL));
+
+       dma_ch[channel].regs->curr_addr_ptr = addr;
+       SSYNC();
+}
+EXPORT_SYMBOL(set_dma_curr_addr);
+
 /*------------------------------------------------------------------------------
  *     Get the DMA status of a specific DMA channel from the system.
  *-----------------------------------------------------------------------------*/
index be0d913e5516271b240d1c691c074344bfc6cf36..4269082b154aede9b7946cbb5fc651ee276c4466 100644 (file)
@@ -159,6 +159,7 @@ void set_dma_y_modify(unsigned int channel, short y_modify);
 void set_dma_config(unsigned int channel, unsigned short config);
 unsigned short set_bfin_dma_config(char direction, char flow_mode,
                                   char intr_mode, char dma_mode, char width);
+void set_dma_curr_addr(unsigned int channel, unsigned long addr);
 
 /* get curr status for polling */
 unsigned short get_dma_curr_irqstat(unsigned int channel);