From: Graf Yang Date: Thu, 24 Apr 2008 19:10:04 +0000 (+0800) Subject: [Blackfin] arch: fix bug - before assign new channel to the map register, need clear... X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=565c0d3ff438d18aa8c3201979fb1f5d1872ab11;p=karo-tx-linux.git [Blackfin] arch: fix bug - before assign new channel to the map register, 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 Signed-off-by: Bryan Wu --- diff --git a/arch/blackfin/kernel/bfin_dma_5xx.c b/arch/blackfin/kernel/bfin_dma_5xx.c index df4d2a5b8e30..fd5448d6107c 100644 --- a/arch/blackfin/kernel/bfin_dma_5xx.c +++ b/arch/blackfin/kernel/bfin_dma_5xx.c @@ -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