Skip to content

Commit

Permalink
Blackfin arch: dma code: cannot simply OR the ndsize
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mike Frysinger authored and Bryan Wu committed Jan 7, 2009
1 parent b649839 commit d41e800
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arch/blackfin/include/asm/dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit d41e800

Please sign in to comment.