Skip to content

Commit

Permalink
dma: mxs-dma: Update state after channel reset
Browse files Browse the repository at this point in the history
After a channel reset, the channel stops running automatically. The
state update was missing so that a channel perperation right after a
channel reset failed.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
  • Loading branch information
Markus Pargmann authored and Vinod Koul committed Nov 13, 2013
1 parent 702e94d commit bb3660f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/dma/mxs-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ static void mxs_dma_reset_chan(struct mxs_dma_chan *mxs_chan)
writel(1 << (chan_id + BP_APBHX_CHANNEL_CTRL_RESET_CHANNEL),
mxs_dma->base + HW_APBHX_CHANNEL_CTRL + STMP_OFFSET_REG_SET);
}

mxs_chan->status = DMA_COMPLETE;
}

static void mxs_dma_enable_chan(struct mxs_dma_chan *mxs_chan)
Expand Down Expand Up @@ -362,7 +364,7 @@ static irqreturn_t mxs_dma_int_handler(int irq, void *dev_id)
chan);
mxs_chan->status = DMA_ERROR;
mxs_dma_reset_chan(mxs_chan);
} else {
} else if (mxs_chan->status != DMA_COMPLETE) {
if (mxs_chan->flags & MXS_DMA_SG_LOOP)
mxs_chan->status = DMA_IN_PROGRESS;
else
Expand Down

0 comments on commit bb3660f

Please sign in to comment.