summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Gong <yibin.gong@nxp.com>2020-12-15 22:06:55 +0800
committerDenys Drozdov <denys.drozdov@toradex.com>2021-07-15 13:54:55 +0300
commit6eac4c41e6f63e4faff2df69823ef02e28fa0a57 (patch)
tree0698652a74337796f522c39b6368f221826e1c47
parentd61424454f9fd9b8df9f3c840e0219c6da50e1d8 (diff)
MLK-25116-2: dmaengine: imx-sdma: correct iram_pool check point
check iram_pool before sdma_init_sw() so that ccb/context could be allocated from iram because DDR maybe in self-referesh in lower power audio case while sdma still running. Signed-off-by: Robin Gong <yibin.gong@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com> (cherry picked from commit 6087a1b040c7df054efefd6eda7c031b49b80276)
-rw-r--r--drivers/dma/imx-sdma.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index dcf70af83142..71ef21ba64e3 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -2382,6 +2382,12 @@ static int sdma_probe(struct platform_device *pdev)
vchan_init(&sdmac->vc, &sdma->dma_device);
}
+ if (np) {
+ sdma->iram_pool = of_gen_pool_get(np, "iram", 0);
+ if (sdma->iram_pool)
+ dev_info(&pdev->dev, "alloc bd from iram.\n");
+ }
+
ret = sdma_init_sw(sdma);
if (ret)
goto err_init;
@@ -2437,10 +2443,6 @@ static int sdma_probe(struct platform_device *pdev)
sdma->spba_end_addr = spba_res.end;
}
of_node_put(spba_bus);
-
- sdma->iram_pool = of_gen_pool_get(np, "iram", 0);
- if (sdma->iram_pool)
- dev_info(&pdev->dev, "alloc bd from iram. \n");
}
if (pdata) {