diff options
author | Nicolas Ferre <nicolas.ferre@atmel.com> | 2011-04-30 16:57:45 +0200 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2011-05-02 15:42:09 +0530 |
commit | 9b3aa589eaa1366200062ce1f9cc7ddca8d1d578 (patch) | |
tree | 31237c0bfbea0a79548fd4a3e18e2260f97de6fb /drivers/dma/at_hdmac_regs.h | |
parent | 364de77831213be20f7f33c39ca1c194593b5c11 (diff) | |
download | blackbird-op-linux-9b3aa589eaa1366200062ce1f9cc7ddca8d1d578.tar.gz blackbird-op-linux-9b3aa589eaa1366200062ce1f9cc7ddca8d1d578.zip |
dmaengine: at_hdmac: modify way to use interrupts
Now we use Buffer Transfer Completed interrupts. If we
want a chained buffer completed information, we setup the
ATC_IEN bit in CTRLB register in the lli.
This is done by set_desc_eol() function and used by
memcpy/slave_sg functions.
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/at_hdmac_regs.h')
-rw-r--r-- | drivers/dma/at_hdmac_regs.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/dma/at_hdmac_regs.h b/drivers/dma/at_hdmac_regs.h index 495457e3dc4b..8303306ea825 100644 --- a/drivers/dma/at_hdmac_regs.h +++ b/drivers/dma/at_hdmac_regs.h @@ -309,8 +309,8 @@ static void atc_setup_irq(struct at_dma_chan *atchan, int on) struct at_dma *atdma = to_at_dma(atchan->chan_common.device); u32 ebci; - /* enable interrupts on buffer chain completion & error */ - ebci = AT_DMA_CBTC(atchan->chan_common.chan_id) + /* enable interrupts on buffer transfer completion & error */ + ebci = AT_DMA_BTC(atchan->chan_common.chan_id) | AT_DMA_ERR(atchan->chan_common.chan_id); if (on) dma_writel(atdma, EBCIER, ebci); @@ -347,7 +347,12 @@ static inline int atc_chan_is_enabled(struct at_dma_chan *atchan) */ static void set_desc_eol(struct at_desc *desc) { - desc->lli.ctrlb |= ATC_SRC_DSCR_DIS | ATC_DST_DSCR_DIS; + u32 ctrlb = desc->lli.ctrlb; + + ctrlb &= ~ATC_IEN; + ctrlb |= ATC_SRC_DSCR_DIS | ATC_DST_DSCR_DIS; + + desc->lli.ctrlb = ctrlb; desc->lli.dscr = 0; } |