From ab2375f2fe256358a982e357d298801cf1adbd00 Mon Sep 17 00:00:00 2001 From: Sonic Zhang Date: Mon, 13 Oct 2008 10:33:51 +0100 Subject: Blackfin Serial Driver: Fix bug - request UART2/3 peripheral mapped interrupts in PIO mode Signed-off-by: Sonic Zhang Signed-off-by: Bryan Wu Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds --- arch/blackfin/kernel/bfin_dma_5xx.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'arch/blackfin') diff --git a/arch/blackfin/kernel/bfin_dma_5xx.c b/arch/blackfin/kernel/bfin_dma_5xx.c index 93229b3d6e3e..339293d677cc 100644 --- a/arch/blackfin/kernel/bfin_dma_5xx.c +++ b/arch/blackfin/kernel/bfin_dma_5xx.c @@ -117,15 +117,14 @@ 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) { - dma_ch[channel].regs->peripheral_map &= 0x0FFF; - dma_ch[channel].regs->peripheral_map |= + unsigned int per_map; + per_map = dma_ch[channel].regs->peripheral_map & 0xFFF; + if (strncmp(device_id, "BFIN_UART", 9) == 0) + dma_ch[channel].regs->peripheral_map = per_map | ((channel - CH_UART2_RX + 0xC)<<12); - } else { - dma_ch[channel].regs->peripheral_map &= 0x0FFF; - dma_ch[channel].regs->peripheral_map |= + else + dma_ch[channel].regs->peripheral_map = per_map | ((channel - CH_UART2_RX + 0x6)<<12); - } } #endif -- cgit v1.2.2