Skip to content

Commit

Permalink
[Blackfin] arch: fix bug - before assign new channel to the map regis…
Browse files Browse the repository at this point in the history
…ter, need clear the bits first.

http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=2445

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
  • Loading branch information
Graf Yang authored and Bryan Wu committed Apr 24, 2008
1 parent 5be36d2 commit 565c0d3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions arch/blackfin/kernel/bfin_dma_5xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,15 @@ int request_dma(unsigned int channel, char *device_id)

#ifdef CONFIG_BF54x
if (channel >= CH_UART2_RX && channel <= CH_UART3_TX) {
if (strncmp(device_id, "BFIN_UART", 9) == 0)
if (strncmp(device_id, "BFIN_UART", 9) == 0) {
dma_ch[channel].regs->peripheral_map &= 0x0FFF;
dma_ch[channel].regs->peripheral_map |=
((channel - CH_UART2_RX + 0xC)<<12);
else
} else {
dma_ch[channel].regs->peripheral_map &= 0x0FFF;
dma_ch[channel].regs->peripheral_map |=
((channel - CH_UART2_RX + 0x6)<<12);
}
}
#endif

Expand Down

0 comments on commit 565c0d3

Please sign in to comment.