aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/sh/shdma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma/sh/shdma.c')
-rw-r--r--drivers/dma/sh/shdma.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/dma/sh/shdma.c b/drivers/dma/sh/shdma.c
index 027c9be97654..f41bcc5267fd 100644
--- a/drivers/dma/sh/shdma.c
+++ b/drivers/dma/sh/shdma.c
@@ -381,6 +381,17 @@ static bool sh_dmae_chan_irq(struct shdma_chan *schan, int irq)
381 return true; 381 return true;
382} 382}
383 383
384static size_t sh_dmae_get_partial(struct shdma_chan *schan,
385 struct shdma_desc *sdesc)
386{
387 struct sh_dmae_chan *sh_chan = container_of(schan, struct sh_dmae_chan,
388 shdma_chan);
389 struct sh_dmae_desc *sh_desc = container_of(sdesc,
390 struct sh_dmae_desc, shdma_desc);
391 return (sh_desc->hw.tcr - sh_dmae_readl(sh_chan, TCR)) <<
392 sh_chan->xmit_shift;
393}
394
384/* Called from error IRQ or NMI */ 395/* Called from error IRQ or NMI */
385static bool sh_dmae_reset(struct sh_dmae_device *shdev) 396static bool sh_dmae_reset(struct sh_dmae_device *shdev)
386{ 397{
@@ -632,6 +643,7 @@ static const struct shdma_ops sh_dmae_shdma_ops = {
632 .start_xfer = sh_dmae_start_xfer, 643 .start_xfer = sh_dmae_start_xfer,
633 .embedded_desc = sh_dmae_embedded_desc, 644 .embedded_desc = sh_dmae_embedded_desc,
634 .chan_irq = sh_dmae_chan_irq, 645 .chan_irq = sh_dmae_chan_irq,
646 .get_partial = sh_dmae_get_partial,
635}; 647};
636 648
637static int __devinit sh_dmae_probe(struct platform_device *pdev) 649static int __devinit sh_dmae_probe(struct platform_device *pdev)