diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2010-09-30 09:56:32 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2010-10-05 18:49:26 -0400 |
commit | 782bc950d84e404422ba21008fd51ee894c8d231 (patch) | |
tree | c8a10b80bcc571c6de8a19c39b0f447ca61039d6 /drivers/dma/dmaengine.c | |
parent | b30a3f6257ed2105259b404d419b4964e363928c (diff) |
dmaengine: add possibility for cyclic transfers
Cyclic transfers are useful for audio where a single buffer divided
in periods has to be transfered endlessly until stopped. After being
prepared the transfer is started using the dma_async_descriptor->tx_submit
function. dma_async_descriptor->callback is called after each period.
The transfer is stopped using the DMA_TERMINATE_ALL callback.
While being used for cyclic transfers the channel cannot be used
for other transfer types.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma/dmaengine.c')
-rw-r--r-- | drivers/dma/dmaengine.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c index 9d31d5eb95c1..e5e79ced4f4b 100644 --- a/drivers/dma/dmaengine.c +++ b/drivers/dma/dmaengine.c | |||
@@ -692,6 +692,8 @@ int dma_async_device_register(struct dma_device *device) | |||
692 | !device->device_prep_dma_interrupt); | 692 | !device->device_prep_dma_interrupt); |
693 | BUG_ON(dma_has_cap(DMA_SLAVE, device->cap_mask) && | 693 | BUG_ON(dma_has_cap(DMA_SLAVE, device->cap_mask) && |
694 | !device->device_prep_slave_sg); | 694 | !device->device_prep_slave_sg); |
695 | BUG_ON(dma_has_cap(DMA_CYCLIC, device->cap_mask) && | ||
696 | !device->device_prep_dma_cyclic); | ||
695 | BUG_ON(dma_has_cap(DMA_SLAVE, device->cap_mask) && | 697 | BUG_ON(dma_has_cap(DMA_SLAVE, device->cap_mask) && |
696 | !device->device_control); | 698 | !device->device_control); |
697 | 699 | ||