dmaengine: shdma: fix a regression: initialise DMA channels for memcpy
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Tue, 31 May 2011 09:25:16 +0000 (09:25 +0000)
committerPaul Mundt <lethal@linux-sh.org>
Thu, 2 Jun 2011 05:40:43 +0000 (14:40 +0900)
A recent patch has introduced a regression, where repeating a memcpy
DMA test with shdma module unloading between them skips the DMA channel
configuration. Fix this regression by always configuring the channel
during its allocation.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
drivers/dma/shdma.c

index 727e76ff13e17ecbcabbb286f981bda820bb137e..2a638f9f09a25d5ed37411d7a997172b928491ce 100644 (file)
@@ -343,7 +343,7 @@ static int sh_dmae_alloc_chan_resources(struct dma_chan *chan)
 
                dmae_set_dmars(sh_chan, cfg->mid_rid);
                dmae_set_chcr(sh_chan, cfg->chcr);
-       } else if ((sh_dmae_readl(sh_chan, CHCR) & 0xf00) != 0x400) {
+       } else {
                dmae_init(sh_chan);
        }