Title: [6516] branches/2009R1/arch/blackfin/include/asm/dma.h: Make sure the descriptor buffers in the core are drained
Revision
6516
Author
sonicz
Date
2009-05-31 03:18:03 -0500 (Sun, 31 May 2009)

Log Message

Make sure the descriptor buffers in the core are drained

Modified Paths


Diff

Modified: branches/2009R1/arch/blackfin/include/asm/dma.h (6515 => 6516)


--- branches/2009R1/arch/blackfin/include/asm/dma.h	2009-05-31 08:07:25 UTC (rev 6515)
+++ branches/2009R1/arch/blackfin/include/asm/dma.h	2009-05-31 08:18:03 UTC (rev 6516)
@@ -206,10 +206,17 @@
 
 static inline void set_dma_sg(unsigned int channel, struct dmasg *sg, int ndsize)
 {
+	/* The descriptor buffers may be located in core internal SRAM.
+	 * Make sure the descriptor buffers in the core are drained
+	 * so that the DMA descriptors are completely written before
+	 * the DMA engine goes to fetch them.
+	 */
+	SSYNC();
+
+	dma_ch[channel].regs->next_desc_ptr = sg;
 	dma_ch[channel].regs->cfg =
 		(dma_ch[channel].regs->cfg & ~(0xf << 8)) |
 		((ndsize & 0xf) << 8);
-	dma_ch[channel].regs->next_desc_ptr = sg;
 }
 
 static inline int dma_channel_active(unsigned int channel)
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to