]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ARM: S3C24XX: dma-s3c2443 - do not write into arbitary bits
authorHeiko Stuebner <heiko@sntech.de>
Mon, 20 May 2013 16:01:37 +0000 (01:01 +0900)
committerKukjin Kim <kgene.kim@samsung.com>
Mon, 20 May 2013 16:01:37 +0000 (01:01 +0900)
The values read from the channel map always also contain the
DMA_CH_VALID (= 1<<31) setting, which should not get written
into the register, even if this bit is unused.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
arch/arm/mach-s3c24xx/dma-s3c2443.c

index 5fe3539dc2b5a097ab46c7712b63b96344d86378..95b9f759fe97fdea1df49efdf78f062f11a8d2aa 100644 (file)
@@ -128,7 +128,8 @@ static struct s3c24xx_dma_map __initdata s3c2443_dma_mappings[] = {
 static void s3c2443_dma_select(struct s3c2410_dma_chan *chan,
                               struct s3c24xx_dma_map *map)
 {
-       writel(map->channels[0] | S3C2443_DMAREQSEL_HW,
+       unsigned long chsel = map->channels[0] & (~DMA_CH_VALID);
+       writel(chsel | S3C2443_DMAREQSEL_HW,
               chan->regs + S3C2443_DMA_DMAREQSEL);
 }