From 68411007ef14cac9fe49363146e64f4283be5d27 Mon Sep 17 00:00:00 2001 From: Sonic Zhang Date: Mon, 1 Jun 2009 00:49:32 -0400 Subject: [PATCH] --- yaml --- r: 148579 b: refs/heads/master c: ea8538a039607cd959d28ed10086484e051ce7db h: refs/heads/master i: 148577: 36834b8d0738c31d880a46b5ebf2e4209a90bff8 148575: 9b2e52efa4a7da9ad0edbd1910bdad267d6d3808 v: v3 --- [refs] | 2 +- trunk/arch/blackfin/include/asm/dma.h | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index fe458bb65b82..3d9ef7de2ad4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9b9bfded623cffb4259b95e5419404015dba361f +refs/heads/master: ea8538a039607cd959d28ed10086484e051ce7db diff --git a/trunk/arch/blackfin/include/asm/dma.h b/trunk/arch/blackfin/include/asm/dma.h index 46c56185417a..c9a59622e23f 100644 --- a/trunk/arch/blackfin/include/asm/dma.h +++ b/trunk/arch/blackfin/include/asm/dma.h @@ -206,10 +206,16 @@ static inline unsigned long get_dma_curr_addr(unsigned int channel) static inline void set_dma_sg(unsigned int channel, struct dmasg *sg, int ndsize) { + /* Make sure the internal data buffers in the core are drained + * so that the DMA descriptors are completely written when the + * DMA engine goes to fetch them below. + */ + 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)