ARM: S3C24XX: dma-s3c2443 - do not write into arbitary bits

A patch from »ARM: S3C24XX: dma cleanups for s3c2412 and s3c2443« in state Mainline for linux-kernel

From: Heiko Stuebner <heiko@...> Date: Sun, 21 Apr 2013 19:06:44 +0200

Commit-Message

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@...>

Patch-Comment

arch/arm/mach-s3c24xx/dma-s3c2443.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)

Statistics

  • 2 lines added
  • 1 lines removed

Changes

--------------------- arch/arm/mach-s3c24xx/dma-s3c2443.c ----------------------
index 000e4c6..e992a7c 100644
@@ -130,7 +130,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);
}
 
 

Recent Patches

About Us

Sed lacus. Donec lectus. Nullam pretium nibh ut turpis. Nam bibendum. In nulla tortor, elementum vel, tempor at, varius non, purus. Mauris vitae nisl nec metus placerat consectetuer.

Read More...