From 0a5642be03293f73706961a7649ac1d12bd0be59 Mon Sep 17 00:00:00 2001 From: Vinod Koul Date: Sat, 11 Oct 2014 21:16:44 +0530 Subject: 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 --- drivers/dma/fsldma.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'drivers/dma/fsldma.c') 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 @@ #include #include #include - +#include #include "dmaengine.h" #include "fsldma.h" @@ -367,6 +367,20 @@ static void fsl_chan_toggle_ext_start(struct fsldma_chan *chan, int enable) chan->feature &= ~FSL_DMA_CHAN_START_EXT; } +int fsl_dma_external_start(struct dma_chan *dchan, int enable) +{ + struct fsldma_chan *chan; + + if (!dchan) + return -EINVAL; + + chan = to_fsl_chan(dchan); + + fsl_chan_toggle_ext_start(chan, enable); + return 0; +} +EXPORT_SYMBOL_GPL(fsl_dma_external_start); + static void append_ld_queue(struct fsldma_chan *chan, struct fsl_desc_sw *desc) { struct fsl_desc_sw *tail = to_fsl_desc(chan->ld_pending.prev); -- cgit v1.2.3