Skip to content

Commit

Permalink
SH: fix TS field shift calculation for DMA drivers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Guennadi Liakhovetski authored and Paul Mundt committed Apr 26, 2010
1 parent b91ce4d commit c2fe309
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/sh/include/cpu-sh4/cpu/dma-register.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down

0 comments on commit c2fe309

Please sign in to comment.