From: peng.fan@oss.nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Peng Fan <peng.fan@nxp.com> Subject: [PATCH V2 3/4] remoteproc: imx: move memory parsing to rproc_ops Date: Tue, 30 Mar 2021 13:30:34 +0800 [thread overview] Message-ID: <1617082235-15923-4-git-send-email-peng.fan@oss.nxp.com> (raw) In-Reply-To: <1617082235-15923-1-git-send-email-peng.fan@oss.nxp.com> From: Peng Fan <peng.fan@nxp.com> Use the rproc_ops::prepare() hook for doing memory resources reallocation when reattach an remote procesor. Suggested-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Peng Fan <peng.fan@nxp.com> --- drivers/remoteproc/imx_rproc.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index b05aae0ad7a2..7cd09971d1a4 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -317,7 +317,7 @@ static int imx_rproc_mem_release(struct rproc *rproc, return 0; } -static int imx_rproc_parse_memory_regions(struct rproc *rproc) +static int imx_rproc_prepare(struct rproc *rproc) { struct imx_rproc *priv = rproc->priv; struct device_node *np = priv->dev->of_node; @@ -363,10 +363,7 @@ static int imx_rproc_parse_memory_regions(struct rproc *rproc) static int imx_rproc_parse_fw(struct rproc *rproc, const struct firmware *fw) { - int ret = imx_rproc_parse_memory_regions(rproc); - - if (ret) - return ret; + int ret; ret = rproc_elf_load_rsc_table(rproc, fw); if (ret) @@ -399,6 +396,7 @@ static void imx_rproc_kick(struct rproc *rproc, int vqid) } static const struct rproc_ops imx_rproc_ops = { + .prepare = imx_rproc_prepare, .start = imx_rproc_start, .stop = imx_rproc_stop, .kick = imx_rproc_kick, -- 2.30.0
WARNING: multiple messages have this Message-ID (diff)
From: peng.fan@oss.nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Peng Fan <peng.fan@nxp.com> Subject: [PATCH V2 3/4] remoteproc: imx: move memory parsing to rproc_ops Date: Tue, 30 Mar 2021 13:30:34 +0800 [thread overview] Message-ID: <1617082235-15923-4-git-send-email-peng.fan@oss.nxp.com> (raw) In-Reply-To: <1617082235-15923-1-git-send-email-peng.fan@oss.nxp.com> From: Peng Fan <peng.fan@nxp.com> Use the rproc_ops::prepare() hook for doing memory resources reallocation when reattach an remote procesor. Suggested-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Peng Fan <peng.fan@nxp.com> --- drivers/remoteproc/imx_rproc.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index b05aae0ad7a2..7cd09971d1a4 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -317,7 +317,7 @@ static int imx_rproc_mem_release(struct rproc *rproc, return 0; } -static int imx_rproc_parse_memory_regions(struct rproc *rproc) +static int imx_rproc_prepare(struct rproc *rproc) { struct imx_rproc *priv = rproc->priv; struct device_node *np = priv->dev->of_node; @@ -363,10 +363,7 @@ static int imx_rproc_parse_memory_regions(struct rproc *rproc) static int imx_rproc_parse_fw(struct rproc *rproc, const struct firmware *fw) { - int ret = imx_rproc_parse_memory_regions(rproc); - - if (ret) - return ret; + int ret; ret = rproc_elf_load_rsc_table(rproc, fw); if (ret) @@ -399,6 +396,7 @@ static void imx_rproc_kick(struct rproc *rproc, int vqid) } static const struct rproc_ops imx_rproc_ops = { + .prepare = imx_rproc_prepare, .start = imx_rproc_start, .stop = imx_rproc_stop, .kick = imx_rproc_kick, -- 2.30.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-03-30 5:46 UTC|newest] Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-03-30 5:30 [PATCH V2 0/4] remoteproc: imx: support remote cores booted early peng.fan 2021-03-30 5:30 ` peng.fan 2021-03-30 5:30 ` [PATCH V2 1/4] remoteproc: imx: add missing of_node_put peng.fan 2021-03-30 5:30 ` peng.fan 2021-04-07 16:29 ` Mathieu Poirier 2021-04-07 16:29 ` Mathieu Poirier 2021-03-30 5:30 ` [PATCH V2 2/4] remoteproc: imx_rproc: enlarge IMX7D_RPROC_MEM_MAX peng.fan 2021-03-30 5:30 ` peng.fan 2021-03-30 5:30 ` peng.fan [this message] 2021-03-30 5:30 ` [PATCH V2 3/4] remoteproc: imx: move memory parsing to rproc_ops peng.fan 2021-04-07 16:36 ` Mathieu Poirier 2021-04-07 16:36 ` Mathieu Poirier 2021-04-07 16:59 ` Mathieu Poirier 2021-04-07 16:59 ` Mathieu Poirier 2021-03-30 5:30 ` [PATCH V2 4/4] remoteproc: imx_rproc: support remote cores booted before Linux Kernel peng.fan 2021-03-30 5:30 ` peng.fan 2021-04-07 17:03 ` Mathieu Poirier 2021-04-07 17:03 ` Mathieu Poirier 2021-04-14 2:20 ` [PATCH V2 0/4] remoteproc: imx: support remote cores booted early patchwork-bot+linux-remoteproc
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1617082235-15923-4-git-send-email-peng.fan@oss.nxp.com \ --to=peng.fan@oss.nxp.com \ --cc=bjorn.andersson@linaro.org \ --cc=festevam@gmail.com \ --cc=kernel@pengutronix.de \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-remoteproc@vger.kernel.org \ --cc=mathieu.poirier@linaro.org \ --cc=o.rempel@pengutronix.de \ --cc=ohad@wizery.com \ --cc=peng.fan@nxp.com \ --cc=s.hauer@pengutronix.de \ --cc=shawnguo@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.