MLK-17494: imx8mq: config: fix the mscale u-boot env setting for NAND boot
authorHan Xu <han.xu@nxp.com>
Thu, 1 Feb 2018 17:58:01 +0000 (11:58 -0600)
committerHan Xu <han.xu@nxp.com>
Fri, 2 Feb 2018 02:00:35 +0000 (20:00 -0600)
Fix the NAND environment settings including save environment to NAND,
correct offset and console settings.

Signed-off-by: Han Xu <han.xu@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
include/configs/imx8mq_arm2.h

index e8718d8..b961308 100644 (file)
        "fdt_addr=0x43000000\0"                 \
        "fdt_high=0xffffffffffffffff\0" \
        "console=ttymxc0,115200 earlycon=ec_imx6q,0x30860000,115200\0" \
-       "bootargs=console=${console} ubi.mtd=5 "  \
+       "bootargs=console=ttymxc0,115200 earlycon=ec_imx6q,0x30860000,115200 ubi.mtd=5 "  \
                "root=ubi0:rootfs rootfstype=ubifs "                 \
                MFG_NAND_PARTITION \
                "\0" \
 #define CONFIG_SYS_INIT_SP_ADDR \
         (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
 
+
+#define CONFIG_ENV_SIZE                        0x1000
+#ifdef CONFIG_NAND_BOOT
+#define CONFIG_ENV_IS_IN_NAND
+#define CONFIG_ENV_OFFSET       (60 << 20)
+#else
 #define CONFIG_ENV_OVERWRITE
 #define CONFIG_ENV_OFFSET               (64 * SZ_64K)
-#define CONFIG_ENV_SIZE                        0x1000
 #define CONFIG_ENV_IS_IN_MMC
+#endif
+
 #define CONFIG_SYS_MMC_ENV_DEV         1   /* USDHC2 */
 #define CONFIG_MMCROOT                 "/dev/mmcblk1p2"  /* USDHC2 */