aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/shdma.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2011-06-17 08:21:05 +0000
committerPaul Mundt <lethal@linux-sh.org>2011-06-21 17:56:11 +0900
commit260bf2c5f69f419b04b6861ca91565b5fb16ce48 (patch)
tree498536635f58c8fccbd6f46d3f3e2764fc35ca7e /drivers/dma/shdma.c
parente76c3af873025f5a704d56a28882be761e15657b (diff)
downloadkernel_goldelico_gta04-260bf2c5f69f419b04b6861ca91565b5fb16ce48.zip
kernel_goldelico_gta04-260bf2c5f69f419b04b6861ca91565b5fb16ce48.tar.gz
kernel_goldelico_gta04-260bf2c5f69f419b04b6861ca91565b5fb16ce48.tar.bz2
dmaengine: shdma: add .needs_tend_set / .no_dmars flags
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/dma/shdma.c')
-rw-r--r--drivers/dma/shdma.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/dma/shdma.c b/drivers/dma/shdma.c
index 6a21cd8..0f3ec8d 100644
--- a/drivers/dma/shdma.c
+++ b/drivers/dma/shdma.c
@@ -194,6 +194,9 @@ static void dmae_start(struct sh_dmae_chan *sh_chan)
struct sh_dmae_device *shdev = to_sh_dev(sh_chan);
u32 chcr = chcr_read(sh_chan);
+ if (shdev->pdata->needs_tend_set)
+ sh_dmae_writel(sh_chan, 0xFFFFFFFF, TEND);
+
chcr |= CHCR_DE | shdev->chcr_ie_bit;
chcr_write(sh_chan, chcr & ~CHCR_TE);
}
@@ -242,6 +245,9 @@ static int dmae_set_dmars(struct sh_dmae_chan *sh_chan, u16 val)
if (dmae_is_busy(sh_chan))
return -EBUSY;
+ if (pdata->no_dmars)
+ return 0;
+
/* in the case of a missing DMARS resource use first memory window */
if (!addr)
addr = (u16 __iomem *)shdev->chan_reg;