dmaengine: Pass flags via device_prep_dma_cyclic() callback
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Fri, 14 Sep 2012 12:05:47 +0000 (15:05 +0300)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sat, 22 Sep 2012 15:12:45 +0000 (11:12 -0400)
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>
13 files changed:
drivers/dma/at_hdmac.c
drivers/dma/ep93xx_dma.c
drivers/dma/imx-dma.c
drivers/dma/imx-sdma.c
drivers/dma/mmp_tdma.c
drivers/dma/mxs-dma.c
drivers/dma/omap-dma.c
drivers/dma/pl330.c
drivers/dma/sa11x0-dma.c
drivers/dma/sirf-dma.c
drivers/dma/ste_dma40.c
drivers/dma/tegra20-apb-dma.c
include/linux/dmaengine.h

index 3934fcc4e00b1b02778bb02866fb86073f9b1f0a..7e5f6b65c6518e5c0db3b346c7faa7171c87f53f 100644 (file)
@@ -841,12 +841,13 @@ atc_dma_cyclic_fill_desc(struct dma_chan *chan, struct at_desc *desc,
  * @buf_len: total number of bytes for the entire buffer
  * @period_len: number of bytes for each period
  * @direction: transfer direction, to or from device
+ * @flags: tx descriptor status flags
  * @context: transfer context (ignored)
  */
 static struct dma_async_tx_descriptor *
 atc_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
                size_t period_len, enum dma_transfer_direction direction,
-               void *context)
+               unsigned long flags, void *context)
 {
        struct at_dma_chan      *atchan = to_at_dma_chan(chan);
        struct at_dma_slave     *atslave = chan->private;
index c64917ec313dc25d501ad41312fa8e898df8e003..493735b9b2c92a3871d4f48d80301a604d924552 100644 (file)
@@ -1120,6 +1120,7 @@ fail:
  * @buf_len: length of the buffer (in bytes)
  * @period_len: lenght of a single period
  * @dir: direction of the operation
+ * @flags: tx descriptor status flags
  * @context: operation context (ignored)
  *
  * Prepares a descriptor for cyclic DMA operation. This means that once the
@@ -1133,7 +1134,8 @@ fail:
 static struct dma_async_tx_descriptor *
 ep93xx_dma_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t dma_addr,
                           size_t buf_len, size_t period_len,
-                          enum dma_transfer_direction dir, void *context)
+                          enum dma_transfer_direction dir, unsigned long flags,
+                          void *context)
 {
        struct ep93xx_dma_chan *edmac = to_ep93xx_dma_chan(chan);
        struct ep93xx_dma_desc *desc, *first;
index 5084975d793cd25949e62ae68f5932bd3c456763..41b4376eb61467c4003933543bf56f2359c7fe83 100644 (file)
@@ -801,7 +801,7 @@ static struct dma_async_tx_descriptor *imxdma_prep_slave_sg(
 static struct dma_async_tx_descriptor *imxdma_prep_dma_cyclic(
                struct dma_chan *chan, dma_addr_t dma_addr, size_t buf_len,
                size_t period_len, enum dma_transfer_direction direction,
-               void *context)
+               unsigned long flags, void *context)
 {
        struct imxdma_channel *imxdmac = to_imxdma_chan(chan);
        struct imxdma_engine *imxdma = imxdmac->imxdma;
index 1dc2a4ad0026d21c43720941a2670cf0518c60e0..2c5fd3e9880c88f52efe4cb04808d5bcf6b358ae 100644 (file)
@@ -1012,7 +1012,7 @@ err_out:
 static struct dma_async_tx_descriptor *sdma_prep_dma_cyclic(
                struct dma_chan *chan, dma_addr_t dma_addr, size_t buf_len,
                size_t period_len, enum dma_transfer_direction direction,
-               void *context)
+               unsigned long flags, void *context)
 {
        struct sdma_channel *sdmac = to_sdma_chan(chan);
        struct sdma_engine *sdma = sdmac->sdma;
index 8a15cf2163dc8512dcb8805694a327e03ba86f01..6d52bd43a527f6b0f9e5d078fdbe82e6c489f685 100644 (file)
@@ -358,7 +358,7 @@ struct mmp_tdma_desc *mmp_tdma_alloc_descriptor(struct mmp_tdma_chan *tdmac)
 static struct dma_async_tx_descriptor *mmp_tdma_prep_dma_cyclic(
                struct dma_chan *chan, dma_addr_t dma_addr, size_t buf_len,
                size_t period_len, enum dma_transfer_direction direction,
-               void *context)
+               unsigned long flags, void *context)
 {
        struct mmp_tdma_chan *tdmac = to_mmp_tdma_chan(chan);
        struct mmp_tdma_desc *desc;
index 7f41b25805fa071edfa9d74946c630c2a7528733..734a4eb84d6579675110033eeda6676ff40c4c91 100644 (file)
@@ -531,7 +531,7 @@ err_out:
 static struct dma_async_tx_descriptor *mxs_dma_prep_dma_cyclic(
                struct dma_chan *chan, dma_addr_t dma_addr, size_t buf_len,
                size_t period_len, enum dma_transfer_direction direction,
-               void *context)
+               unsigned long flags, void *context)
 {
        struct mxs_dma_chan *mxs_chan = to_mxs_dma_chan(chan);
        struct mxs_dma_engine *mxs_dma = mxs_chan->mxs_dma;
index 71d786973dfdcb1f7f32035d9543819297b10509..4d2650f4202cbe4a587fb25e9a07b7fc536f325d 100644 (file)
@@ -366,7 +366,8 @@ static struct dma_async_tx_descriptor *omap_dma_prep_slave_sg(
 
 static struct dma_async_tx_descriptor *omap_dma_prep_dma_cyclic(
        struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
-       size_t period_len, enum dma_transfer_direction dir, void *context)
+       size_t period_len, enum dma_transfer_direction dir, unsigned long flags,
+       void *context)
 {
        struct omap_chan *c = to_omap_dma_chan(chan);
        enum dma_slave_buswidth dev_width;
index e4feba6b03c00e6f2ae412a9a1104eef21fb94f4..00356458e399c70fde49294b448bcb0df2e172dd 100644 (file)
@@ -2683,7 +2683,7 @@ static inline int get_burst_len(struct dma_pl330_desc *desc, size_t len)
 static struct dma_async_tx_descriptor *pl330_prep_dma_cyclic(
                struct dma_chan *chan, dma_addr_t dma_addr, size_t len,
                size_t period_len, enum dma_transfer_direction direction,
-               void *context)
+               unsigned long flags, void *context)
 {
        struct dma_pl330_desc *desc;
        struct dma_pl330_chan *pch = to_pchan(chan);
index f5a73606217ee6118f9562e5f49b34338691611e..b893159c1ecb0c9f1ff68d667f8df5fc0cedeb80 100644 (file)
@@ -614,7 +614,7 @@ static struct dma_async_tx_descriptor *sa11x0_dma_prep_slave_sg(
 
 static struct dma_async_tx_descriptor *sa11x0_dma_prep_dma_cyclic(
        struct dma_chan *chan, dma_addr_t addr, size_t size, size_t period,
-       enum dma_transfer_direction dir, void *context)
+       enum dma_transfer_direction dir, unsigned long flags, void *context)
 {
        struct sa11x0_dma_chan *c = to_sa11x0_dma_chan(chan);
        struct sa11x0_dma_desc *txd;
index 434ad31174f289f6a2cc14ac6121b594d2b09207..3eed8b35b0f19d51f025a5de2dc656b9fe3f211c 100644 (file)
@@ -489,7 +489,7 @@ err_dir:
 static struct dma_async_tx_descriptor *
 sirfsoc_dma_prep_cyclic(struct dma_chan *chan, dma_addr_t addr,
        size_t buf_len, size_t period_len,
-       enum dma_transfer_direction direction, void *context)
+       enum dma_transfer_direction direction, unsigned long flags, void *context)
 {
        struct sirfsoc_dma_chan *schan = dma_chan_to_sirfsoc_dma_chan(chan);
        struct sirfsoc_dma_desc *sdesc = NULL;
index 000d309602b2d76fd825d895be5ab5b91837d19f..eee8d9b9a20bcdfde84eaa75dc05617b0524dd36 100644 (file)
@@ -2347,7 +2347,8 @@ static struct dma_async_tx_descriptor *d40_prep_slave_sg(struct dma_chan *chan,
 static struct dma_async_tx_descriptor *
 dma40_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t dma_addr,
                     size_t buf_len, size_t period_len,
-                    enum dma_transfer_direction direction, void *context)
+                    enum dma_transfer_direction direction, unsigned long flags,
+                    void *context)
 {
        unsigned int periods = buf_len / period_len;
        struct dma_async_tx_descriptor *txd;
index 24acd711e0326852e2bf97bce308fb1fe272cea6..b42b6ffb75adf2be4b1872234a9145f9d097e146 100644 (file)
@@ -990,7 +990,7 @@ static struct dma_async_tx_descriptor *tegra_dma_prep_slave_sg(
 struct dma_async_tx_descriptor *tegra_dma_prep_dma_cyclic(
        struct dma_chan *dc, dma_addr_t buf_addr, size_t buf_len,
        size_t period_len, enum dma_transfer_direction direction,
-       void *context)
+       unsigned long flags, void *context)
 {
        struct tegra_dma_channel *tdc = to_tegra_dma_chan(dc);
        struct tegra_dma_desc *dma_desc = NULL;
index 9c02a4508b25380123ab6e2b24c6879645b2961a..09da4e56529780f51f6f9a756001849888517c9d 100644 (file)
@@ -591,7 +591,7 @@ struct dma_device {
        struct dma_async_tx_descriptor *(*device_prep_dma_cyclic)(
                struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
                size_t period_len, enum dma_transfer_direction direction,
-               void *context);
+               unsigned long flags, void *context);
        struct dma_async_tx_descriptor *(*device_prep_interleaved_dma)(
                struct dma_chan *chan, struct dma_interleaved_template *xt,
                unsigned long flags);
@@ -656,7 +656,7 @@ static inline struct dma_async_tx_descriptor *dmaengine_prep_dma_cyclic(
                size_t period_len, enum dma_transfer_direction dir)
 {
        return chan->device->device_prep_dma_cyclic(chan, buf_addr, buf_len,
-                                               period_len, dir, NULL);
+                                               period_len, dir, flags, NULL);
 }
 
 static inline int dmaengine_terminate_all(struct dma_chan *chan)
This page took 0.043089 seconds and 5 git commands to generate.