aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/drivers/dma/dma-sh.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-02-08 11:34:03 +0900
committerPaul Mundt <lethal@linux-sh.org>2010-02-08 11:34:03 +0900
commit2e18e047981ae04be9bd0d9760057f7c1a7b3785 (patch)
tree999941abf466ce4d6915273e2e7a42bf0a107385 /arch/sh/drivers/dma/dma-sh.c
parentsh: Fix up hp6xx build. (diff)
parentsh: implement DMA_SLAVE capability in SH dmaengine driver (diff)
downloadlinux-dev-2e18e047981ae04be9bd0d9760057f7c1a7b3785.tar.xz
linux-dev-2e18e047981ae04be9bd0d9760057f7c1a7b3785.zip
Merge branch 'sh/dmaengine'
Conflicts: arch/sh/drivers/dma/dma-sh.c
Diffstat (limited to 'arch/sh/drivers/dma/dma-sh.c')
-rw-r--r--arch/sh/drivers/dma/dma-sh.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/sh/drivers/dma/dma-sh.c b/arch/sh/drivers/dma/dma-sh.c
index 565cc1a4cbba..827208781ed5 100644
--- a/arch/sh/drivers/dma/dma-sh.c
+++ b/arch/sh/drivers/dma/dma-sh.c
@@ -52,11 +52,14 @@ static inline unsigned int get_dmte_irq(unsigned int chan)
*
* iterations to complete the transfer.
*/
+static unsigned int ts_shift[] = TS_SHIFT;
static inline unsigned int calc_xmit_shift(struct dma_channel *chan)
{
u32 chcr = __raw_readl(dma_base_addr[chan->chan] + CHCR);
+ int cnt = ((chcr & CHCR_TS_LOW_MASK) >> CHCR_TS_LOW_SHIFT) |
+ ((chcr & CHCR_TS_HIGH_MASK) >> CHCR_TS_HIGH_SHIFT);
- return ts_shift[(chcr & CHCR_TS_MASK)>>CHCR_TS_SHIFT];
+ return ts_shift[cnt];
}
/*