summaryrefslogtreecommitdiff
path: root/arch/sh
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2010-04-21 19:14:19 +0400
committerPaul Mundt <lethal@linux-sh.org>2010-04-26 11:02:09 +0400
commitc2fe3092e5b85c8c65ebac88a3ffa4355e51a9b6 (patch)
treeb000864a48f0880b6b9afaf7b7cbdc672100cdb3 /arch/sh
parentb91ce4d14a21fc04d165be30319541e0f9204f15 (diff)
downloadlinux-c2fe3092e5b85c8c65ebac88a3ffa4355e51a9b6.tar.xz
SH: fix TS field shift calculation for DMA drivers
CHCR_TS_HIGH_SHIFT is defined as a shift of TS high bits in CHCR register, relative to low bits. The TS_INDEX2VAL() macro has to take this into account. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/include/cpu-sh4/cpu/dma-register.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sh/include/cpu-sh4/cpu/dma-register.h b/arch/sh/include/cpu-sh4/cpu/dma-register.h
index 55f9fec082d4..de2359533994 100644
--- a/arch/sh/include/cpu-sh4/cpu/dma-register.h
+++ b/arch/sh/include/cpu-sh4/cpu/dma-register.h
@@ -76,7 +76,7 @@ enum {
}
#define TS_INDEX2VAL(i) ((((i) & 3) << CHCR_TS_LOW_SHIFT) | \
- ((((i) >> 2) & 3) << CHCR_TS_HIGH_SHIFT))
+ (((i) & 0xc) << CHCR_TS_HIGH_SHIFT))
#else /* CONFIG_CPU_SH4A */