diff options
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/fsldma.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c index 5dfedf326573..cbd5b9684521 100644 --- a/drivers/dma/fsldma.c +++ b/drivers/dma/fsldma.c | |||
@@ -406,6 +406,32 @@ static void fsl_dma_free_chan_resources(struct dma_chan *chan) | |||
406 | dma_pool_destroy(fsl_chan->desc_pool); | 406 | dma_pool_destroy(fsl_chan->desc_pool); |
407 | } | 407 | } |
408 | 408 | ||
409 | static struct dma_async_tx_descriptor * | ||
410 | fsl_dma_prep_interrupt(struct dma_chan *chan) | ||
411 | { | ||
412 | struct fsl_dma_chan *fsl_chan; | ||
413 | struct fsl_desc_sw *new; | ||
414 | |||
415 | if (!chan) | ||
416 | return NULL; | ||
417 | |||
418 | fsl_chan = to_fsl_chan(chan); | ||
419 | |||
420 | new = fsl_dma_alloc_descriptor(fsl_chan); | ||
421 | if (!new) { | ||
422 | dev_err(fsl_chan->dev, "No free memory for link descriptor\n"); | ||
423 | return NULL; | ||
424 | } | ||
425 | |||
426 | new->async_tx.cookie = -EBUSY; | ||
427 | new->async_tx.ack = 0; | ||
428 | |||
429 | /* Set End-of-link to the last link descriptor of new list*/ | ||
430 | set_ld_eol(fsl_chan, new); | ||
431 | |||
432 | return &new->async_tx; | ||
433 | } | ||
434 | |||
409 | static struct dma_async_tx_descriptor *fsl_dma_prep_memcpy( | 435 | static struct dma_async_tx_descriptor *fsl_dma_prep_memcpy( |
410 | struct dma_chan *chan, dma_addr_t dma_dest, dma_addr_t dma_src, | 436 | struct dma_chan *chan, dma_addr_t dma_dest, dma_addr_t dma_src, |
411 | size_t len, unsigned long flags) | 437 | size_t len, unsigned long flags) |
@@ -1020,6 +1046,7 @@ static int __devinit of_fsl_dma_probe(struct of_device *dev, | |||
1020 | dma_cap_set(DMA_INTERRUPT, fdev->common.cap_mask); | 1046 | dma_cap_set(DMA_INTERRUPT, fdev->common.cap_mask); |
1021 | fdev->common.device_alloc_chan_resources = fsl_dma_alloc_chan_resources; | 1047 | fdev->common.device_alloc_chan_resources = fsl_dma_alloc_chan_resources; |
1022 | fdev->common.device_free_chan_resources = fsl_dma_free_chan_resources; | 1048 | fdev->common.device_free_chan_resources = fsl_dma_free_chan_resources; |
1049 | fdev->common.device_prep_dma_interrupt = fsl_dma_prep_interrupt; | ||
1023 | fdev->common.device_prep_dma_memcpy = fsl_dma_prep_memcpy; | 1050 | fdev->common.device_prep_dma_memcpy = fsl_dma_prep_memcpy; |
1024 | fdev->common.device_is_tx_complete = fsl_dma_is_complete; | 1051 | fdev->common.device_is_tx_complete = fsl_dma_is_complete; |
1025 | fdev->common.device_issue_pending = fsl_dma_memcpy_issue_pending; | 1052 | fdev->common.device_issue_pending = fsl_dma_memcpy_issue_pending; |