Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,7 @@ static void dw_axi_dma_synchronize(struct dma_chan *dchan)
static int dma_chan_alloc_chan_resources(struct dma_chan *dchan)
{
struct axi_dma_chan *chan = dchan_to_axi_dma_chan(dchan);
int ret;

/* ASSERT: channel is idle */
if (axi_chan_is_hw_enable(chan)) {
Expand All @@ -622,7 +623,17 @@ static int dma_chan_alloc_chan_resources(struct dma_chan *dchan)
}
dev_vdbg(dchan2dev(dchan), "%s: allocating\n", axi_chan_name(chan));

pm_runtime_get(chan->chip->dev);
/*
* Callers configure and use the channel's registers as soon as this
* returns, so the chip's clocks must already be running - a plain
* pm_runtime_get() only schedules the resume asynchronously.
*/
ret = pm_runtime_resume_and_get(chan->chip->dev);
if (ret < 0) {
dma_pool_destroy(chan->desc_pool);
chan->desc_pool = NULL;
return ret;
}

return 0;
}
Expand Down
Loading