Message ID | 20200324220329.15523-5-mathieu.poirier@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | remoteproc: stm32: Add support for synchronisation with MCU | expand |
> -----Original Message----- > From: Mathieu Poirier <mathieu.poirier@linaro.org> > Sent: mardi 24 mars 2020 23:03 > To: bjorn.andersson@linaro.org > Cc: ohad@wizery.com; Loic PALLARDY <loic.pallardy@st.com>; s- > anna@ti.com; peng.fan@nxp.com; Arnaud POULIQUEN > <arnaud.pouliquen@st.com>; Fabien DESSENNE > <fabien.dessenne@st.com>; linux-remoteproc@vger.kernel.org > Subject: [PATCH 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 move function > stm32_rproc_of_memory_translations() to stm32_rproc_probe() so that > stm32_rproc_parse_dt() can be extended to look for synchronisation > related binding in a clean way. > > Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Thanks Mathieu Reviewed-by: Loic Pallardy <loic.pallardy@st.com> > --- > 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 ca60c917e218..a3e278490bb4 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) > @@ -630,6 +630,10 @@ static int stm32_rproc_probe(struct platform_device > *pdev) > if (ret) > goto free_ddata; > > + ret = stm32_rproc_of_memory_translations(pdev, ddata); > + if (ret) > + goto free_ddata; > + > rproc = rproc_alloc(dev, np->name, &st_rproc_ops, NULL, > sizeof(*ddata)); > if (!rproc) { > ret = -ENOMEM; > -- > 2.20.1
diff --git a/drivers/remoteproc/stm32_rproc.c b/drivers/remoteproc/stm32_rproc.c index ca60c917e218..a3e278490bb4 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) @@ -630,6 +630,10 @@ static int stm32_rproc_probe(struct platform_device *pdev) if (ret) goto free_ddata; + ret = stm32_rproc_of_memory_translations(pdev, ddata); + if (ret) + goto free_ddata; + rproc = rproc_alloc(dev, np->name, &st_rproc_ops, NULL, sizeof(*ddata)); if (!rproc) { ret = -ENOMEM;
Other than one has to be done after the other, there is no correlation between memory translation and DT parsing. As move function stm32_rproc_of_memory_translations() to stm32_rproc_probe() so that stm32_rproc_parse_dt() can be extended to look for synchronisation related binding in a clean way. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> --- drivers/remoteproc/stm32_rproc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)