summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2016-01-20 17:12:36 +0800
committerguoyin.chen <guoyin.chen@freescale.com>2016-03-04 15:35:56 +0800
commit9f0a0ce739e6511ad8de36e4f42e46b5d39ecaf2 (patch)
tree542e0ad7420dafdf5b0a8292e6f685cf71f1389a
parentca98d082e45da94cc1a47833df69c4112c8c6268 (diff)
downloadu-boot-imx-9f0a0ce739e6511ad8de36e4f42e46b5d39ecaf2.zip
u-boot-imx-9f0a0ce739e6511ad8de36e4f42e46b5d39ecaf2.tar.gz
u-boot-imx-9f0a0ce739e6511ad8de36e4f42e46b5d39ecaf2.tar.bz2
MLK-12296 imx: mx7dsabresd: Change default env for M4 boot to TCM
Since the QSPI needs to rework on this board, at default the QSPI is disabled. So bind the M4 QSPI boot with QSPI enabled u-boot image, set default M4 boot to TCM. Need to use TCM m4 image at default. Additional, on SDB there is only one QSPI flash. Considering the A7 QSPI boot case, we have to move M4 image to 1M offset to give enough space for u-boot and env. Signed-off-by: Ye Li <ye.li@nxp.com>
-rw-r--r--include/configs/mx7dsabresd.h37
1 files changed, 24 insertions, 13 deletions
diff --git a/include/configs/mx7dsabresd.h b/include/configs/mx7dsabresd.h
index 02aee51..e44c81f 100644
--- a/include/configs/mx7dsabresd.h
+++ b/include/configs/mx7dsabresd.h
@@ -125,13 +125,28 @@
#define CONFIG_LOADADDR 0x80800000
#define CONFIG_SYS_TEXT_BASE 0x87800000
-#define CONFIG_SYS_AUXCORE_BOOTDATA 0x60000000 /* Set to QSPI1 A flash at default */
+#ifdef CONFIG_SYS_BOOT_QSPI
+#define CONFIG_SYS_USE_QSPI
+#define CONFIG_ENV_IS_IN_SPI_FLASH
+#elif defined CONFIG_SYS_BOOT_NAND
+#define CONFIG_SYS_USE_NAND
+#define CONFIG_ENV_IS_IN_NAND
+#else
+#define CONFIG_ENV_IS_IN_MMC
+#endif
+
+#ifdef CONFIG_SYS_USE_QSPI
+#define CONFIG_SYS_AUXCORE_BOOTDATA 0x60100000 /* Set to QSPI1 A flash, offset 1M */
+#else
+#define CONFIG_SYS_AUXCORE_BOOTDATA 0x7F8000 /* Set to TCML address */
+#endif
#define CONFIG_CMD_BOOTAUX /* Boot M4 */
#define CONFIG_CMD_SETEXPR
#ifdef CONFIG_CMD_BOOTAUX
#define CONFIG_MXC_RDC /* Enable RDC to isolate the peripherals for A7 and M4 */
+#ifdef CONFIG_SYS_USE_QSPI
#define UPDATE_M4_ENV \
"m4image=m4_qspi.bin\0" \
"loadm4image=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${m4image}\0" \
@@ -141,12 +156,18 @@
"setexpr fw_sz ${filesize} + 0xffff; " \
"setexpr fw_sz ${fw_sz} / 0x10000; " \
"setexpr fw_sz ${fw_sz} * 0x10000; " \
- "sf erase 0x0 ${fw_sz}; " \
- "sf write ${loadaddr} 0x0 ${filesize}; " \
+ "sf erase 0x100000 ${fw_sz}; " \
+ "sf write ${loadaddr} 0x100000 ${filesize}; " \
"fi; " \
"fi\0" \
"m4boot=sf probe 0:0; bootaux "__stringify(CONFIG_SYS_AUXCORE_BOOTDATA)"\0"
#else
+#define UPDATE_M4_ENV \
+ "m4image=m4_qspi.bin\0" \
+ "loadm4image=fatload mmc ${mmcdev}:${mmcpart} "__stringify(CONFIG_SYS_AUXCORE_BOOTDATA)" ${m4image}\0" \
+ "m4boot=run loadm4image; bootaux "__stringify(CONFIG_SYS_AUXCORE_BOOTDATA)"\0"
+#endif
+#else
#define UPDATE_M4_ENV ""
#endif
@@ -312,16 +333,6 @@
#define CONFIG_ENV_SIZE SZ_8K
-#ifdef CONFIG_SYS_BOOT_QSPI
-#define CONFIG_SYS_USE_QSPI
-#define CONFIG_ENV_IS_IN_SPI_FLASH
-#elif defined CONFIG_SYS_BOOT_NAND
-#define CONFIG_SYS_USE_NAND
-#define CONFIG_ENV_IS_IN_NAND
-#else
-#define CONFIG_ENV_IS_IN_MMC
-#endif
-
#ifdef CONFIG_SYS_USE_NAND
#define CONFIG_CMD_NAND
#define CONFIG_CMD_NAND_TRIMFFS