diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2011-06-17 04:21:05 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-06-21 04:56:11 -0400 |
commit | 260bf2c5f69f419b04b6861ca91565b5fb16ce48 (patch) | |
tree | 498536635f58c8fccbd6f46d3f3e2764fc35ca7e /drivers/dma | |
parent | e76c3af873025f5a704d56a28882be761e15657b (diff) |
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')
-rw-r--r-- | drivers/dma/shdma.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/dma/shdma.c b/drivers/dma/shdma.c index 6a21cd843ab..0f3ec8d57a7 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) | |||
194 | struct sh_dmae_device *shdev = to_sh_dev(sh_chan); | 194 | struct sh_dmae_device *shdev = to_sh_dev(sh_chan); |
195 | u32 chcr = chcr_read(sh_chan); | 195 | u32 chcr = chcr_read(sh_chan); |
196 | 196 | ||
197 | if (shdev->pdata->needs_tend_set) | ||
198 | sh_dmae_writel(sh_chan, 0xFFFFFFFF, TEND); | ||
199 | |||
197 | chcr |= CHCR_DE | shdev->chcr_ie_bit; | 200 | chcr |= CHCR_DE | shdev->chcr_ie_bit; |
198 | chcr_write(sh_chan, chcr & ~CHCR_TE); | 201 | chcr_write(sh_chan, chcr & ~CHCR_TE); |
199 | } | 202 | } |
@@ -242,6 +245,9 @@ static int dmae_set_dmars(struct sh_dmae_chan *sh_chan, u16 val) | |||
242 | if (dmae_is_busy(sh_chan)) | 245 | if (dmae_is_busy(sh_chan)) |
243 | return -EBUSY; | 246 | return -EBUSY; |
244 | 247 | ||
248 | if (pdata->no_dmars) | ||
249 | return 0; | ||
250 | |||
245 | /* in the case of a missing DMARS resource use first memory window */ | 251 | /* in the case of a missing DMARS resource use first memory window */ |
246 | if (!addr) | 252 | if (!addr) |
247 | addr = (u16 __iomem *)shdev->chan_reg; | 253 | addr = (u16 __iomem *)shdev->chan_reg; |