Browse Source

Blackfin arch: dma code: cannot simply OR the ndsize

cannot simply OR the ndsize ... need to clear out the old value first

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Mike Frysinger 16 năm trước cách đây
mục cha
commit
d41e800999
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      arch/blackfin/include/asm/dma.h

+ 3 - 1
arch/blackfin/include/asm/dma.h

@@ -205,7 +205,9 @@ 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)
 {
-	dma_ch[channel].regs->cfg |= ((ndsize & 0x0F) << 8);
+	dma_ch[channel].regs->cfg =
+		(dma_ch[channel].regs->cfg & ~(0xf << 8)) |
+		((ndsize & 0xf) << 8);
 	dma_ch[channel].regs->next_desc_ptr = sg;
 }