diff options
author | Vinod Koul <vinod.koul@intel.com> | 2014-10-11 11:46:44 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2014-10-15 12:01:27 -0400 |
commit | 0a5642be03293f73706961a7649ac1d12bd0be59 (patch) | |
tree | 158f2547dbcef8c5e4df0c290373ec4b106e3560 /drivers/dma/fsldma.c | |
parent | b65612a868768cd0431084ccf376d0946c12132d (diff) |
dmaengine: freescale: add and export fsl_dma_external_start()
The freescale driver uses custom device control FSLDMA_EXTERNAL_START to
put the controller in external start mode.
Since we are planning to deprecate the device control, move this to exported
API. Subsequent patches will remove the FSLDMA_EXTERNAL_START
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/fsldma.c')
-rw-r--r-- | drivers/dma/fsldma.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c index d5d6885ab341..0cded86f946c 100644 --- a/drivers/dma/fsldma.c +++ b/drivers/dma/fsldma.c | |||
@@ -36,7 +36,7 @@ | |||
36 | #include <linux/of_address.h> | 36 | #include <linux/of_address.h> |
37 | #include <linux/of_irq.h> | 37 | #include <linux/of_irq.h> |
38 | #include <linux/of_platform.h> | 38 | #include <linux/of_platform.h> |
39 | 39 | #include <linux/fsldma.h> | |
40 | #include "dmaengine.h" | 40 | #include "dmaengine.h" |
41 | #include "fsldma.h" | 41 | #include "fsldma.h" |
42 | 42 | ||
@@ -367,6 +367,20 @@ static void fsl_chan_toggle_ext_start(struct fsldma_chan *chan, int enable) | |||
367 | chan->feature &= ~FSL_DMA_CHAN_START_EXT; | 367 | chan->feature &= ~FSL_DMA_CHAN_START_EXT; |
368 | } | 368 | } |
369 | 369 | ||
370 | int fsl_dma_external_start(struct dma_chan *dchan, int enable) | ||
371 | { | ||
372 | struct fsldma_chan *chan; | ||
373 | |||
374 | if (!dchan) | ||
375 | return -EINVAL; | ||
376 | |||
377 | chan = to_fsl_chan(dchan); | ||
378 | |||
379 | fsl_chan_toggle_ext_start(chan, enable); | ||
380 | return 0; | ||
381 | } | ||
382 | EXPORT_SYMBOL_GPL(fsl_dma_external_start); | ||
383 | |||
370 | static void append_ld_queue(struct fsldma_chan *chan, struct fsl_desc_sw *desc) | 384 | static void append_ld_queue(struct fsldma_chan *chan, struct fsl_desc_sw *desc) |
371 | { | 385 | { |
372 | struct fsl_desc_sw *tail = to_fsl_desc(chan->ld_pending.prev); | 386 | struct fsl_desc_sw *tail = to_fsl_desc(chan->ld_pending.prev); |