Patchwork [RFC,2/8] dma: mpc512x: fix start condition in execute()

login
register
mail settings
Submitter Gerhard Sittig
Date July 12, 2013, 3:26 p.m.
Message ID <1373642781-32631-3-git-send-email-gsi@denx.de>
Download mbox | patch
Permalink /patch/258766/
State Superseded
Delegated to: Anatolij Gustschin
Headers show

Comments

Gerhard Sittig - July 12, 2013, 3:26 p.m.
adjust the conditions how submitted DMA jobs get started: memory transfers
need to get initiated by an explicit software request, all transfers which
involve peripherals need to reference the external requester line

Signed-off-by: Gerhard Sittig <gsi@denx.de>
---
 drivers/dma/mpc512x_dma.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Patch

diff --git a/drivers/dma/mpc512x_dma.c b/drivers/dma/mpc512x_dma.c
index f90b717..df10a48 100644
--- a/drivers/dma/mpc512x_dma.c
+++ b/drivers/dma/mpc512x_dma.c
@@ -272,10 +272,12 @@  static void mpc_dma_execute(struct mpc_dma_chan *mchan)
 		mdma->tcd[cid].e_sg = 1;
 
 	switch (cid) {
-	case 26:
+	default:
+		/* peripherals involved, use external request */
 		out_8(&mdma->regs->dmaserq, cid);
 		break;
 	case 32:
+		/* memory transfer, software provided start signal */
 		out_8(&mdma->regs->dmassrt, cid);
 		break;
 	}