summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2017-08-09 22:26:19 -0500
committerJason Liu <jason.hui.liu@nxp.com>2017-11-03 02:37:08 +0800
commit588bab19a0d24a507153d67e0ebb9e062eb13e4f (patch)
tree2eac369c6b5494e867066d909c5be4e1ba699ac7
parent4b5cfdea95c6dfbb0aac6c9fbf60ebc08869d658 (diff)
MLK-16181 imx8qm/qxp: Add dcache flush to M4 boot commands
For booting M4 running in DDR, we use fatload to load the image to DDR first. The fatload will do a copy for block size unaligned data in the tail. Since the DDR area is cachable, so this cause a memory coherence issue. Need to use dcache flush command before booting the M4 core. This patch enables the CONFIG_CMD_CACHE and add the dcache flush to M4 boot commands no matter the M4 runs in DDR or TCM. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
-rw-r--r--configs/imx8qm_lpddr4_arm2_defconfig1
-rw-r--r--configs/imx8qxp_lpddr4_arm2_defconfig1
-rw-r--r--configs/imx8qxp_mek_defconfig1
-rw-r--r--configs/mx8qm_lpddr4_arm2_android_defconfig1
-rw-r--r--configs/mx8qxp_lpddr4_arm2_android_defconfig1
-rw-r--r--configs/mx8qxp_mek_android_defconfig1
-rw-r--r--include/configs/imx8qm_arm2.h4
-rw-r--r--include/configs/imx8qxp_arm2.h2
-rw-r--r--include/configs/imx8qxp_mek.h2
9 files changed, 10 insertions, 4 deletions
diff --git a/configs/imx8qm_lpddr4_arm2_defconfig b/configs/imx8qm_lpddr4_arm2_defconfig
index a0692d8688..78bf33b592 100644
--- a/configs/imx8qm_lpddr4_arm2_defconfig
+++ b/configs/imx8qm_lpddr4_arm2_defconfig
@@ -5,6 +5,7 @@ CONFIG_TARGET_IMX8QM_LPDDR4_ARM2=y
CONFIG_CMD_IMPORTENV=n
CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_DM=y
+CONFIG_CMD_CACHE=y
CONFIG_DM_SERIAL=y
CONFIG_FSL_LPUART=y
diff --git a/configs/imx8qxp_lpddr4_arm2_defconfig b/configs/imx8qxp_lpddr4_arm2_defconfig
index 0b3bf3ca78..cb1771bb64 100644
--- a/configs/imx8qxp_lpddr4_arm2_defconfig
+++ b/configs/imx8qxp_lpddr4_arm2_defconfig
@@ -5,6 +5,7 @@ CONFIG_TARGET_IMX8QXP_LPDDR4_ARM2=y
CONFIG_CMD_IMPORTENV=n
CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_DM=y
+CONFIG_CMD_CACHE=y
CONFIG_DM_SERIAL=y
CONFIG_FSL_LPUART=y
diff --git a/configs/imx8qxp_mek_defconfig b/configs/imx8qxp_mek_defconfig
index f695c6428f..a706f41331 100644
--- a/configs/imx8qxp_mek_defconfig
+++ b/configs/imx8qxp_mek_defconfig
@@ -5,6 +5,7 @@ CONFIG_TARGET_IMX8QXP_MEK=y
CONFIG_CMD_IMPORTENV=n
CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_DM=y
+CONFIG_CMD_CACHE=y
CONFIG_DM_SERIAL=y
CONFIG_FSL_LPUART=y
diff --git a/configs/mx8qm_lpddr4_arm2_android_defconfig b/configs/mx8qm_lpddr4_arm2_android_defconfig
index e6c745e8f1..eb81845aee 100644
--- a/configs/mx8qm_lpddr4_arm2_android_defconfig
+++ b/configs/mx8qm_lpddr4_arm2_android_defconfig
@@ -7,6 +7,7 @@ CONFIG_TARGET_IMX8QM_LPDDR4_ARM2=y
CONFIG_CMD_IMPORTENV=n
CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_DM=y
+CONFIG_CMD_CACHE=y
CONFIG_DM_SERIAL=y
CONFIG_FSL_LPUART=y
diff --git a/configs/mx8qxp_lpddr4_arm2_android_defconfig b/configs/mx8qxp_lpddr4_arm2_android_defconfig
index 2c66841c29..57de5e6dfb 100644
--- a/configs/mx8qxp_lpddr4_arm2_android_defconfig
+++ b/configs/mx8qxp_lpddr4_arm2_android_defconfig
@@ -7,6 +7,7 @@ CONFIG_EFI_PARTITION=y
CONFIG_CMD_IMPORTENV=n
CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_DM=y
+CONFIG_CMD_CACHE=y
CONFIG_DM_SERIAL=y
CONFIG_FSL_LPUART=y
diff --git a/configs/mx8qxp_mek_android_defconfig b/configs/mx8qxp_mek_android_defconfig
index 8d11c95399..7ff471d963 100644
--- a/configs/mx8qxp_mek_android_defconfig
+++ b/configs/mx8qxp_mek_android_defconfig
@@ -7,6 +7,7 @@ CONFIG_EFI_PARTITION=y
CONFIG_CMD_IMPORTENV=n
CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_DM=y
+CONFIG_CMD_CACHE=y
CONFIG_DM_SERIAL=y
CONFIG_FSL_LPUART=y
diff --git a/include/configs/imx8qm_arm2.h b/include/configs/imx8qm_arm2.h
index 4f98189af0..7af14e19f4 100644
--- a/include/configs/imx8qm_arm2.h
+++ b/include/configs/imx8qm_arm2.h
@@ -99,8 +99,8 @@
"m4_1_image=m4_1.bin\0" \
"loadm4image_0=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${m4_0_image}\0" \
"loadm4image_1=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${m4_1_image}\0" \
- "m4boot_0=run loadm4image_0; bootaux ${loadaddr} 0\0" \
- "m4boot_1=run loadm4image_1; bootaux ${loadaddr} 1\0" \
+ "m4boot_0=run loadm4image_0; dcache flush; bootaux ${loadaddr} 0\0" \
+ "m4boot_1=run loadm4image_1; dcache flush; bootaux ${loadaddr} 1\0" \
#ifdef CONFIG_NAND_BOOT
#define MFG_NAND_PARTITION "mtdparts=gpmi-nand:64m(boot),16m(kernel),16m(dtb),1m(misc),-(rootfs) "
diff --git a/include/configs/imx8qxp_arm2.h b/include/configs/imx8qxp_arm2.h
index 68faeb02f5..7247be0f17 100644
--- a/include/configs/imx8qxp_arm2.h
+++ b/include/configs/imx8qxp_arm2.h
@@ -88,7 +88,7 @@
#define M4_BOOT_ENV \
"m4_0_image=m4_0.bin\0" \
"loadm4image_0=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${m4_0_image}\0" \
- "m4boot_0=run loadm4image_0; bootaux ${loadaddr} 0\0" \
+ "m4boot_0=run loadm4image_0; dcache flush; bootaux ${loadaddr} 0\0" \
#ifdef CONFIG_NAND_BOOT
#define MFG_NAND_PARTITION "mtdparts=gpmi-nand:64m(boot),16m(kernel),16m(dtb),1m(misc),-(rootfs) "
diff --git a/include/configs/imx8qxp_mek.h b/include/configs/imx8qxp_mek.h
index 444e8a8c80..93ac7eee96 100644
--- a/include/configs/imx8qxp_mek.h
+++ b/include/configs/imx8qxp_mek.h
@@ -88,7 +88,7 @@
#define M4_BOOT_ENV \
"m4_0_image=m4_0.bin\0" \
"loadm4image_0=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${m4_0_image}\0" \
- "m4boot_0=run loadm4image_0; bootaux ${loadaddr} 0\0" \
+ "m4boot_0=run loadm4image_0; dcache flush; bootaux ${loadaddr} 0\0" \
#ifdef CONFIG_NAND_BOOT
#define MFG_NAND_PARTITION "mtdparts=gpmi-nand:64m(boot),16m(kernel),16m(dtb),1m(misc),-(rootfs) "