* [PATCH 3/3] added support for "run twice" mem2mem transfers
@ 2010-09-27 13:59 Tobias Wirtl (none)
0 siblings, 0 replies; only message in thread
From: Tobias Wirtl (none) @ 2010-09-27 13:59 UTC (permalink / raw)
To: linux-arm-kernel
-it's possible to run a prepared mem2mem channel more than 1 time
---
drivers/dma/imx-sdma.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index 325827e..03d94b5 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -945,7 +945,7 @@ static dma_cookie_t sdma_tx_submit(struct
dma_async_tx_descriptor *tx)
spin_lock_irq(&sdma->lock);
=20
cookie =3D sdma_assign_cookie(sdma);
-
+=09
sdma_enable_channel(tx->chan->chan_id);
=20
spin_unlock_irq(&sdma->lock);
@@ -1038,7 +1038,8 @@ static struct dma_async_tx_descriptor
*sdma_prep_dma_memcpy(
if (sdma->busy)
return NULL;
sdma->busy =3D 1;
- sdma->flags =3D 0;
+=09
+ sdma->flags =3D IMX_DMA_SG_LOOP; //if the prepared transfer is
used again
=09
sdma->direction =3D DMA_FROM_DEVICE; //doesn't matter
=09
@@ -1054,7 +1055,7 @@ static struct dma_async_tx_descriptor
*sdma_prep_dma_memcpy(
bd->ext_buffer_addr =3D dest;
bd->mode.count =3D len;
bd->mode.command =3D 0;
- bd->mode.status =3D BD_DONE | BD_EXTD | BD_CONT | BD_INTR;
+ bd->mode.status =3D BD_DONE | BD_EXTD | BD_INTR | BD_WRAP;
//BD_DONE | BD_EXTD | BD_CONT | BD_INTR | BD_WRAP;
=20
sdma->num_bd =3D 1;
=20
--=20
1.7.0.4
=20
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-09-27 13:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-27 13:59 [PATCH 3/3] added support for "run twice" mem2mem transfers Tobias Wirtl (none)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).