MLK-25426 remoteproc: imx_rproc: fix firmware reload
authorPeng Fan <peng.fan@nxp.com>
Tue, 13 Apr 2021 03:29:52 +0000 (11:29 +0800)
committerPeng Fan <peng.fan@nxp.com>
Tue, 13 Apr 2021 06:31:20 +0000 (14:31 +0800)
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.

Reviewed-by: Robin Gong <yibin.gong@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/remoteproc/imx_rproc.c

index 05288ab..447731f 100644 (file)
@@ -37,7 +37,7 @@
 
 #define IMX7D_M4_START                 (IMX7D_ENABLE_M4 | IMX7D_SW_M4P_RST \
                                         | IMX7D_SW_M4C_RST)
-#define IMX7D_M4_STOP                  IMX7D_SW_M4C_NON_SCLR_RST
+#define IMX7D_M4_STOP                  (IMX7D_ENABLE_M4 | IMX7D_SW_M4C_NON_SCLR_RST)
 
 /* Address: 0x020D8000 */
 #define IMX6SX_SRC_SCR                 0x00
@@ -48,7 +48,7 @@
 
 #define IMX6SX_M4_START                        (IMX6SX_ENABLE_M4 | IMX6SX_SW_M4P_RST \
                                         | IMX6SX_SW_M4C_RST)
-#define IMX6SX_M4_STOP                 IMX6SX_SW_M4C_NON_SCLR_RST
+#define IMX6SX_M4_STOP                 (IMX6SX_ENABLE_M4 | 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)