From: Mike Frysinger Date: Wed, 7 Jan 2009 15:14:38 +0000 (+0800) Subject: Blackfin arch: dma code: cannot simply OR the ndsize X-Git-Tag: v2.6.29-rc1~189^2~47 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=d41e8009994f429ef7198a750c37fd9660366fab;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Bryan Wu --- diff --git a/arch/blackfin/include/asm/dma.h b/arch/blackfin/include/asm/dma.h index 264feb4eb17..f58ca64d729 100644 --- a/arch/blackfin/include/asm/dma.h +++ b/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; }