[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200129153628.29329-5-amelie.delaunay@st.com>
Date: Wed, 29 Jan 2020 16:36:24 +0100
From: Amelie Delaunay <amelie.delaunay@...com>
To: Vinod Koul <vkoul@...nel.org>,
Dan Williams <dan.j.williams@...el.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Alexandre Torgue <alexandre.torgue@...com>
CC: <dmaengine@...r.kernel.org>,
<linux-stm32@...md-mailman.stormreply.com>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>,
Amelie Delaunay <amelie.delaunay@...com>,
Pierre-Yves MORDRET <pierre-yves.mordret@...com>
Subject: [PATCH 4/8] dmaengine: stm32-dma: enable descriptor_reuse
From: Pierre-Yves MORDRET <pierre-yves.mordret@...com>
Enable client to resubmit already processed descriptors
in order to save descriptor creation time.
Signed-off-by: Pierre-Yves MORDRET <pierre-yves.mordret@...com>
Signed-off-by: Amelie Delaunay <amelie.delaunay@...com>
---
drivers/dma/stm32-dma.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/dma/stm32-dma.c b/drivers/dma/stm32-dma.c
index c8bbe08b8e32..25f7281932bd 100644
--- a/drivers/dma/stm32-dma.c
+++ b/drivers/dma/stm32-dma.c
@@ -554,6 +554,7 @@ static void stm32_dma_start_transfer(struct stm32_dma_chan *chan)
sg_req = &chan->desc->sg_req[chan->next_sg];
reg = &sg_req->chan_reg;
+ reg->dma_scr &= ~STM32_DMA_SCR_EN;
stm32_dma_write(dmadev, STM32_DMA_SCR(chan->id), reg->dma_scr);
stm32_dma_write(dmadev, STM32_DMA_SPAR(chan->id), reg->dma_spar);
stm32_dma_write(dmadev, STM32_DMA_SM0AR(chan->id), reg->dma_sm0ar);
@@ -1343,6 +1344,7 @@ static int stm32_dma_probe(struct platform_device *pdev)
dd->directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
dd->residue_granularity = DMA_RESIDUE_GRANULARITY_BURST;
dd->max_burst = STM32_DMA_MAX_BURST;
+ dd->descriptor_reuse = true;
dd->dev = &pdev->dev;
INIT_LIST_HEAD(&dd->channels);
--
2.17.1
Powered by blists - more mailing lists