Skip to content

Commit ec8b5e4

Browse files
Peter Ujfalusibroonie
authored andcommitted
dmaengine: Pass flags via device_prep_dma_cyclic() callback
Change the parameter list of device_prep_dma_cyclic() so the DMA drivers can receive the flags coming from clients. This feature can be used during audio operation to disable all audio related interrupts when the DMA_PREP_INTERRUPT is cleared from the flags. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Vinod Koul <vinod.koul@linux.intel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
1 parent 2dcdf57 commit ec8b5e4

13 files changed

Lines changed: 19 additions & 14 deletions

File tree

‎drivers/dma/at_hdmac.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -841,12 +841,13 @@ atc_dma_cyclic_fill_desc(struct dma_chan *chan, struct at_desc *desc,
841841
* @buf_len: total number of bytes for the entire buffer
842842
* @period_len: number of bytes for each period
843843
* @direction: transfer direction, to or from device
844+
* @flags: tx descriptor status flags
844845
* @context: transfer context (ignored)
845846
*/
846847
static struct dma_async_tx_descriptor *
847848
atc_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
848849
size_t period_len, enum dma_transfer_direction direction,
849-
void *context)
850+
unsigned long flags, void *context)
850851
{
851852
struct at_dma_chan *atchan = to_at_dma_chan(chan);
852853
struct at_dma_slave *atslave = chan->private;

‎drivers/dma/ep93xx_dma.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1120,6 +1120,7 @@ ep93xx_dma_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
11201120
* @buf_len: length of the buffer (in bytes)
11211121
* @period_len: lenght of a single period
11221122
* @dir: direction of the operation
1123+
* @flags: tx descriptor status flags
11231124
* @context: operation context (ignored)
11241125
*
11251126
* Prepares a descriptor for cyclic DMA operation. This means that once the
@@ -1133,7 +1134,8 @@ ep93xx_dma_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
11331134
static struct dma_async_tx_descriptor *
11341135
ep93xx_dma_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t dma_addr,
11351136
size_t buf_len, size_t period_len,
1136-
enum dma_transfer_direction dir, void *context)
1137+
enum dma_transfer_direction dir, unsigned long flags,
1138+
void *context)
11371139
{
11381140
struct ep93xx_dma_chan *edmac = to_ep93xx_dma_chan(chan);
11391141
struct ep93xx_dma_desc *desc, *first;

‎drivers/dma/imx-dma.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,7 @@ static struct dma_async_tx_descriptor *imxdma_prep_slave_sg(
801801
static struct dma_async_tx_descriptor *imxdma_prep_dma_cyclic(
802802
struct dma_chan *chan, dma_addr_t dma_addr, size_t buf_len,
803803
size_t period_len, enum dma_transfer_direction direction,
804-
void *context)
804+
unsigned long flags, void *context)
805805
{
806806
struct imxdma_channel *imxdmac = to_imxdma_chan(chan);
807807
struct imxdma_engine *imxdma = imxdmac->imxdma;

‎drivers/dma/imx-sdma.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@ static struct dma_async_tx_descriptor *sdma_prep_slave_sg(
10121012
static struct dma_async_tx_descriptor *sdma_prep_dma_cyclic(
10131013
struct dma_chan *chan, dma_addr_t dma_addr, size_t buf_len,
10141014
size_t period_len, enum dma_transfer_direction direction,
1015-
void *context)
1015+
unsigned long flags, void *context)
10161016
{
10171017
struct sdma_channel *sdmac = to_sdma_chan(chan);
10181018
struct sdma_engine *sdma = sdmac->sdma;

‎drivers/dma/mmp_tdma.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ struct mmp_tdma_desc *mmp_tdma_alloc_descriptor(struct mmp_tdma_chan *tdmac)
358358
static struct dma_async_tx_descriptor *mmp_tdma_prep_dma_cyclic(
359359
struct dma_chan *chan, dma_addr_t dma_addr, size_t buf_len,
360360
size_t period_len, enum dma_transfer_direction direction,
361-
void *context)
361+
unsigned long flags, void *context)
362362
{
363363
struct mmp_tdma_chan *tdmac = to_mmp_tdma_chan(chan);
364364
struct mmp_tdma_desc *desc;

‎drivers/dma/mxs-dma.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ static struct dma_async_tx_descriptor *mxs_dma_prep_slave_sg(
531531
static struct dma_async_tx_descriptor *mxs_dma_prep_dma_cyclic(
532532
struct dma_chan *chan, dma_addr_t dma_addr, size_t buf_len,
533533
size_t period_len, enum dma_transfer_direction direction,
534-
void *context)
534+
unsigned long flags, void *context)
535535
{
536536
struct mxs_dma_chan *mxs_chan = to_mxs_dma_chan(chan);
537537
struct mxs_dma_engine *mxs_dma = mxs_chan->mxs_dma;

‎drivers/dma/omap-dma.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,8 @@ static struct dma_async_tx_descriptor *omap_dma_prep_slave_sg(
366366

367367
static struct dma_async_tx_descriptor *omap_dma_prep_dma_cyclic(
368368
struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
369-
size_t period_len, enum dma_transfer_direction dir, void *context)
369+
size_t period_len, enum dma_transfer_direction dir, unsigned long flags,
370+
void *context)
370371
{
371372
struct omap_chan *c = to_omap_dma_chan(chan);
372373
enum dma_slave_buswidth dev_width;

‎drivers/dma/pl330.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2683,7 +2683,7 @@ static inline int get_burst_len(struct dma_pl330_desc *desc, size_t len)
26832683
static struct dma_async_tx_descriptor *pl330_prep_dma_cyclic(
26842684
struct dma_chan *chan, dma_addr_t dma_addr, size_t len,
26852685
size_t period_len, enum dma_transfer_direction direction,
2686-
void *context)
2686+
unsigned long flags, void *context)
26872687
{
26882688
struct dma_pl330_desc *desc;
26892689
struct dma_pl330_chan *pch = to_pchan(chan);

‎drivers/dma/sa11x0-dma.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ static struct dma_async_tx_descriptor *sa11x0_dma_prep_slave_sg(
614614

615615
static struct dma_async_tx_descriptor *sa11x0_dma_prep_dma_cyclic(
616616
struct dma_chan *chan, dma_addr_t addr, size_t size, size_t period,
617-
enum dma_transfer_direction dir, void *context)
617+
enum dma_transfer_direction dir, unsigned long flags, void *context)
618618
{
619619
struct sa11x0_dma_chan *c = to_sa11x0_dma_chan(chan);
620620
struct sa11x0_dma_desc *txd;

‎drivers/dma/sirf-dma.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ static struct dma_async_tx_descriptor *sirfsoc_dma_prep_interleaved(
489489
static struct dma_async_tx_descriptor *
490490
sirfsoc_dma_prep_cyclic(struct dma_chan *chan, dma_addr_t addr,
491491
size_t buf_len, size_t period_len,
492-
enum dma_transfer_direction direction, void *context)
492+
enum dma_transfer_direction direction, unsigned long flags, void *context)
493493
{
494494
struct sirfsoc_dma_chan *schan = dma_chan_to_sirfsoc_dma_chan(chan);
495495
struct sirfsoc_dma_desc *sdesc = NULL;

0 commit comments

Comments
 (0)