From: Jonas Aaberg Date: Sun, 20 Jun 2010 21:26:01 +0000 (+0000) Subject: DMAENGINE: ste_dma40: no premature stop X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1d392a7ba43300b0bde877de15121b261d7a6ce2;p=linux-beck.git DMAENGINE: ste_dma40: no premature stop Correct bug that could cause paused channels to stop. Signed-off-by: Jonas Aaberg Signed-off-by: Linus Walleij Signed-off-by: Dan Williams --- diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index aa098a672605..8c46bb803dbb 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -508,6 +508,7 @@ static int d40_channel_execute_command(struct d40_chan *d40c, void __iomem *active_reg; int ret = 0; unsigned long flags; + u32 wmask; spin_lock_irqsave(&d40c->base->execmd_lock, flags); @@ -525,7 +526,9 @@ static int d40_channel_execute_command(struct d40_chan *d40c, goto done; } - writel(command << D40_CHAN_POS(d40c->phy_chan->num), active_reg); + wmask = 0xffffffff & ~(D40_CHAN_POS_MASK(d40c->phy_chan->num)); + writel(wmask | (command << D40_CHAN_POS(d40c->phy_chan->num)), + active_reg); if (command == D40_DMA_SUSPEND_REQ) {