From e49a9907b3dbc5d1b780fde35e58779289897a5a Mon Sep 17 00:00:00 2001 From: Jonas Aaberg Date: Mon, 26 Apr 2010 16:10:26 +0200 Subject: [PATCH 27/65] 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 --- drivers/dma/ste_dma40.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index aa098a6..8c46bb8 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) { -- 1.6.3.3