[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200601175552.22286-5-mathieu.poirier@linaro.org>
Date: Mon, 1 Jun 2020 11:55:45 -0600
From: Mathieu Poirier <mathieu.poirier@...aro.org>
To: bjorn.andersson@...aro.org, ohad@...ery.com,
mcoquelin.stm32@...il.com, alexandre.torgue@...com
Cc: loic.pallardy@...com, arnaud.pouliquen@...com,
linux-remoteproc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org
Subject: [PATCH v4 04/11] remoteproc: stm32: Remove memory translation from DT parsing
Other than one has to be done after the other, there is no correlation
between memory translation and DT parsing. As such move function
stm32_rproc_of_memory_translations() to stm32_rproc_probe() so that
stm32_rproc_parse_dt() can be extended to look for attach bindings
in a clean way.
Signed-off-by: Mathieu Poirier <mathieu.poirier@...aro.org>
Reviewed-by: Loic Pallardy <loic.pallardy@...com>
Reviewed-by: Bjorn Andersson <bjorn.andersson@...aro.org>
---
drivers/remoteproc/stm32_rproc.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/remoteproc/stm32_rproc.c b/drivers/remoteproc/stm32_rproc.c
index 1e512ddf2591..3e3b199a02c1 100644
--- a/drivers/remoteproc/stm32_rproc.c
+++ b/drivers/remoteproc/stm32_rproc.c
@@ -606,7 +606,7 @@ static int stm32_rproc_parse_dt(struct platform_device *pdev,
*auto_boot = of_property_read_bool(np, "st,auto-boot");
- return stm32_rproc_of_memory_translations(pdev, ddata);
+ return 0;
}
static int stm32_rproc_probe(struct platform_device *pdev)
@@ -633,6 +633,10 @@ static int stm32_rproc_probe(struct platform_device *pdev)
if (ret)
goto free_rproc;
+ ret = stm32_rproc_of_memory_translations(pdev, ddata);
+ if (ret)
+ goto free_rproc;
+
rproc->has_iommu = false;
ddata->workqueue = create_workqueue(dev_name(dev));
if (!ddata->workqueue) {
--
2.20.1
Powered by blists - more mailing lists