Skip to content

Commit

Permalink
dmaengine: freescale: add and export fsl_dma_external_start()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vinod Koul committed Oct 15, 2014
1 parent b65612a commit 0a5642b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
16 changes: 15 additions & 1 deletion drivers/dma/fsldma.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include <linux/of_address.h>
#include <linux/of_irq.h>
#include <linux/of_platform.h>

#include <linux/fsldma.h>
#include "dmaengine.h"
#include "fsldma.h"

Expand Down Expand Up @@ -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);
Expand Down
13 changes: 13 additions & 0 deletions include/linux/fsldma.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/

#ifndef FSL_DMA_H
#define FSL_DMA_H
/* fsl dma API for enxternal start */
int fsl_dma_external_start(struct dma_chan *dchan, int enable);

#endif

0 comments on commit 0a5642b

Please sign in to comment.