]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - arch/blackfin/include/asm/dma.h
Blackfin arch: dma code: cannot simply OR the ndsize
[mv-sheeva.git] / arch / blackfin / include / asm / dma.h
index 264feb4eb175aec957cc106334a9ef1b3224725a..f58ca64d729c8a572abec435e008e51e41d5c34a 100644 (file)
@@ -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;
 }