Commit 8cf1e0fc authored by Etienne Carriere's avatar Etienne Carriere Committed by Vinod Koul

dmaengine: stm32-dma: use reset controller only at probe time

Remove reset controller reference from device instance since it is
used only at probe time.
Signed-off-by: default avatarEtienne Carriere <etienne.carriere@st.com>
Signed-off-by: default avatarAmelie Delaunay <amelie.delaunay@st.com>
Link: https://lore.kernel.org/r/20200129153628.29329-3-amelie.delaunay@st.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 05f8740a
...@@ -207,7 +207,6 @@ struct stm32_dma_device { ...@@ -207,7 +207,6 @@ struct stm32_dma_device {
struct dma_device ddev; struct dma_device ddev;
void __iomem *base; void __iomem *base;
struct clk *clk; struct clk *clk;
struct reset_control *rst;
bool mem2mem; bool mem2mem;
struct stm32_dma_chan chan[STM32_DMA_MAX_CHANNELS]; struct stm32_dma_chan chan[STM32_DMA_MAX_CHANNELS];
}; };
...@@ -1275,6 +1274,7 @@ static int stm32_dma_probe(struct platform_device *pdev) ...@@ -1275,6 +1274,7 @@ static int stm32_dma_probe(struct platform_device *pdev)
struct dma_device *dd; struct dma_device *dd;
const struct of_device_id *match; const struct of_device_id *match;
struct resource *res; struct resource *res;
struct reset_control *rst;
int i, ret; int i, ret;
match = of_match_device(stm32_dma_of_match, &pdev->dev); match = of_match_device(stm32_dma_of_match, &pdev->dev);
...@@ -1309,11 +1309,11 @@ static int stm32_dma_probe(struct platform_device *pdev) ...@@ -1309,11 +1309,11 @@ static int stm32_dma_probe(struct platform_device *pdev)
dmadev->mem2mem = of_property_read_bool(pdev->dev.of_node, dmadev->mem2mem = of_property_read_bool(pdev->dev.of_node,
"st,mem2mem"); "st,mem2mem");
dmadev->rst = devm_reset_control_get(&pdev->dev, NULL); rst = devm_reset_control_get(&pdev->dev, NULL);
if (!IS_ERR(dmadev->rst)) { if (!IS_ERR(rst)) {
reset_control_assert(dmadev->rst); reset_control_assert(rst);
udelay(2); udelay(2);
reset_control_deassert(dmadev->rst); reset_control_deassert(rst);
} }
dma_cap_set(DMA_SLAVE, dd->cap_mask); dma_cap_set(DMA_SLAVE, dd->cap_mask);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment