summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiko Stuebner <heiko@sntech.de>2013-05-21 01:01:37 +0900
committerKukjin Kim <kgene.kim@samsung.com>2013-05-21 01:01:37 +0900
commite8de5a1fa9101a6aa22b2cbdde058979664b2474 (patch)
treeeda2911302aefb6db1690328c5be2b09c301770f
parent4c4e9759a6fa63c61f0d269150741feccdd33f06 (diff)
downloadop-kernel-dev-e8de5a1fa9101a6aa22b2cbdde058979664b2474.zip
op-kernel-dev-e8de5a1fa9101a6aa22b2cbdde058979664b2474.tar.gz
ARM: S3C24XX: dma-s3c2443 - do not write into arbitary bits
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>
-rw-r--r--arch/arm/mach-s3c24xx/dma-s3c2443.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/mach-s3c24xx/dma-s3c2443.c b/arch/arm/mach-s3c24xx/dma-s3c2443.c
index 5fe3539..95b9f75 100644
--- a/arch/arm/mach-s3c24xx/dma-s3c2443.c
+++ b/arch/arm/mach-s3c24xx/dma-s3c2443.c
@@ -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);
}
OpenPOWER on IntegriCloud