Skip to content

Commit

Permalink
dma: dw: allow to stop in DW_DMA_SUSPENDED state
Browse files Browse the repository at this point in the history
Allow DMA channel to be stopped even if it is in suspended state.
The current code in dw_dma_stop() supports this, but the recently
added early check for dw_dma_is_enabled() results in DMA stop
sequence to be skipped if the channel was in suspended state.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
  • Loading branch information
kv2019i authored and nashif committed Feb 20, 2023
1 parent 6422b2b commit 0c0d737
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/dma/dma_dw_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ int dw_dma_stop(const struct device *dev, uint32_t channel)
goto out;
}

if (!dw_dma_is_enabled(dev, channel)) {
if (!dw_dma_is_enabled(dev, channel) && chan_data->state != DW_DMA_SUSPENDED) {
goto out;
}

Expand Down

0 comments on commit 0c0d737

Please sign in to comment.