diff mbox

dmaengine: imx-sdma: advertise correct residue granularity

Message ID 20170308091309.5171-1-l.stach@pengutronix.de (mailing list archive)
State Accepted
Headers show

Commit Message

Lucas Stach March 8, 2017, 9:13 a.m. UTC
The SDMA hardware/driver does not actually report the transfer residue at
burst size granularity, but in fact is only able to report residue after
each finished segment.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 drivers/dma/imx-sdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Fabio Estevam March 8, 2017, 1:50 p.m. UTC | #1
Hi Lucas,

On Wed, Mar 8, 2017 at 6:13 AM, Lucas Stach <l.stach@pengutronix.de> wrote:
> The SDMA hardware/driver does not actually report the transfer residue at
> burst size granularity, but in fact is only able to report residue after
> each finished segment.
>
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>

Makes sense, thanks.

Tested-by: Fabio Estevam <fabio.estevam@nxp.com>
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Vinod Koul March 14, 2017, 4:32 a.m. UTC | #2
On Wed, Mar 08, 2017 at 10:13:09AM +0100, Lucas Stach wrote:
> The SDMA hardware/driver does not actually report the transfer residue at
> burst size granularity, but in fact is only able to report residue after
> each finished segment.

Apolied, thanks
diff mbox

Patch

diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index d1651a50c349..46359c4be22d 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -1832,7 +1832,7 @@  static int sdma_probe(struct platform_device *pdev)
 	sdma->dma_device.src_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES);
 	sdma->dma_device.dst_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES);
 	sdma->dma_device.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
-	sdma->dma_device.residue_granularity = DMA_RESIDUE_GRANULARITY_BURST;
+	sdma->dma_device.residue_granularity = DMA_RESIDUE_GRANULARITY_SEGMENT;
 	sdma->dma_device.device_issue_pending = sdma_issue_pending;
 	sdma->dma_device.dev->dma_parms = &sdma->dma_parms;
 	dma_set_max_seg_size(sdma->dma_device.dev, 65535);