Skip to content

Commit

Permalink
dmaengine: axi-dmac: move active_descs list init after device-tree init
Browse files Browse the repository at this point in the history
We want to enable the clock right after it is obtained. Then later we'll
want to read the core version via register-access (which requires the clock
to be enabled).

The initialization of the active_descs list can be postponed after reading
from registers (or reading the device-tree).

Signed-off-by: Alexandru Ardelean <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vinod Koul <[email protected]>
  • Loading branch information
commodo authored and vinodkoul committed Aug 25, 2020
1 parent b377e67 commit a88fdec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/dma/dma-axi-dmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -850,8 +850,6 @@ static int axi_dmac_probe(struct platform_device *pdev)
if (IS_ERR(dmac->clk))
return PTR_ERR(dmac->clk);

INIT_LIST_HEAD(&dmac->chan.active_descs);

of_channels = of_get_child_by_name(pdev->dev.of_node, "adi,channels");
if (of_channels == NULL)
return -ENODEV;
Expand All @@ -866,6 +864,8 @@ static int axi_dmac_probe(struct platform_device *pdev)
}
of_node_put(of_channels);

INIT_LIST_HEAD(&dmac->chan.active_descs);

pdev->dev.dma_parms = &dmac->dma_parms;
dma_set_max_seg_size(&pdev->dev, UINT_MAX);

Expand Down

0 comments on commit a88fdec

Please sign in to comment.