[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210601153139.GB1759269@xps15>
Date: Tue, 1 Jun 2021 09:31:39 -0600
From: Mathieu Poirier <mathieu.poirier@...aro.org>
To: "Peng Fan (OSS)" <peng.fan@....nxp.com>
Cc: ohad@...ery.com, bjorn.andersson@...aro.org,
o.rempel@...gutronix.de, shawnguo@...nel.org,
s.hauer@...gutronix.de, kernel@...gutronix.de, festevam@...il.com,
linux-imx@....com, linux-remoteproc@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Peng Fan <peng.fan@....com>
Subject: Re: [PATCH] remoteproc: imx_rproc: correct firmware reload
On Tue, Jun 01, 2021 at 06:29:39PM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@....com>
>
> ENABLE_M4 should be set to 1 when loading code to TCM, otherwise
> you will not able to replace the firmware after you stop m4.
>
> Besides ENABLE_M4, we still need set SW_M4C_RST, because this bit
> will be automatically set with SW_M4C_NON_SCLR_RST set.
>
> Signed-off-by: Peng Fan <peng.fan@....com>
> ---
>
> V1:
> Although this is an fix, but it is not critical, patch is based on
> https://patchwork.kernel.org/project/linux-remoteproc/cover/1620274123-1461-1-git-send-email-peng.fan@oss.nxp.com/
>
> drivers/remoteproc/imx_rproc.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c
> index cd2ca96a30e5..ce2ce42bee91 100644
> --- a/drivers/remoteproc/imx_rproc.c
> +++ b/drivers/remoteproc/imx_rproc.c
> @@ -33,7 +33,8 @@
>
> #define IMX7D_M4_START (IMX7D_ENABLE_M4 | IMX7D_SW_M4P_RST \
> | IMX7D_SW_M4C_RST)
> -#define IMX7D_M4_STOP (IMX7D_ENABLE_M4 | IMX7D_SW_M4C_NON_SCLR_RST)
> +#define IMX7D_M4_STOP (IMX7D_ENABLE_M4 | IMX7D_SW_M4C_RST | \
> + IMX7D_SW_M4C_NON_SCLR_RST)
>
> /* Address: 0x020D8000 */
> #define IMX6SX_SRC_SCR 0x00
> @@ -44,7 +45,8 @@
>
> #define IMX6SX_M4_START (IMX6SX_ENABLE_M4 | IMX6SX_SW_M4P_RST \
> | IMX6SX_SW_M4C_RST)
> -#define IMX6SX_M4_STOP (IMX6SX_ENABLE_M4 | IMX6SX_SW_M4C_NON_SCLR_RST)
> +#define IMX6SX_M4_STOP (IMX6SX_ENABLE_M4 | IMX6SX_SW_M4C_RST | \
> + IMX6SX_SW_M4C_NON_SCLR_RST)
> #define IMX6SX_M4_RST_MASK (IMX6SX_ENABLE_M4 | IMX6SX_SW_M4P_RST \
> | IMX6SX_SW_M4C_NON_SCLR_RST \
> | IMX6SX_SW_M4C_RST)
> @@ -691,7 +693,7 @@ static int imx_rproc_detect_mode(struct imx_rproc *priv)
> return ret;
> }
>
> - if (!(val & dcfg->src_stop))
> + if ((val & dcfg->src_mask) != dcfg->src_stop)
> priv->rproc->state = RPROC_DETACHED;
Reviewed-by: Mathieu Poirier <mathieu.poirier@...aro.org>
Bjorn hasn't picked up this set yet so it is best to send a v7 of [1] with this
change merged in it.
Thanks,
Mathieu
[1]. https://patchwork.kernel.org/project/linux-remoteproc/cover/1620274123-1461-1-git-send-email-peng.fan@oss.nxp.com/
>
> return 0;
> --
> 2.30.0
>
Powered by blists - more mailing lists