Title: [6514] trunk/arch/blackfin/include/asm/dma.h: Drain DMA descriptor buffer in the core in DMA API.
- Revision
- 6514
- Author
- sonicz
- Date
- 2009-05-31 02:47:43 -0500 (Sun, 31 May 2009)
Log Message
Drain DMA descriptor buffer in the core in DMA API.
The descriptor buffers may be located in core internal SRAM.
Make sure the descriptor buffer in the core are drained
so that the DMA descriptors are completely written before
the DMA engine goes to fetch them.
Modified Paths
Diff
Modified: trunk/arch/blackfin/include/asm/dma.h (6513 => 6514)
--- trunk/arch/blackfin/include/asm/dma.h 2009-05-31 07:34:17 UTC (rev 6513)
+++ trunk/arch/blackfin/include/asm/dma.h 2009-05-31 07:47:43 UTC (rev 6514)
@@ -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 buffer 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