Commit 595f8928 authored by Ye Li's avatar Ye Li Committed by Jason Liu

MLK-16739 imx8qm/qxp/mq: Change environment offset to avoid overlay

When M4 images (m4_0 and m4_1) are included into flash.bin, the bin size exceeds
the 1.2MB, which cause overlay with u-boot environment area.
To fix the issue, we change the u-boot environment offset to 4MB for SD and FlexSPI,
and align this for all i.MX8 platforms (i.MX8QM/QXP/MQ).
Signed-off-by: default avatarYe Li <ye.li@nxp.com>
Reviewed-by: default avatarPeng Fan <peng.fan@nxp.com>
parent c76e0373
......@@ -184,7 +184,7 @@
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
#define CONFIG_ENV_OVERWRITE
#define CONFIG_ENV_OFFSET (32 * SZ_64K)
#define CONFIG_ENV_OFFSET (64 * SZ_64K)
#define CONFIG_ENV_SIZE 0x1000
#define CONFIG_ENV_IS_IN_MMC
#define CONFIG_SYS_MMC_ENV_DEV 1 /* USDHC2 */
......
......@@ -208,14 +208,14 @@
#ifdef CONFIG_QSPI_BOOT
#define CONFIG_ENV_IS_IN_SPI_FLASH
#define CONFIG_ENV_OFFSET (1024 * 1024)
#define CONFIG_ENV_OFFSET (4 * 1024 * 1024)
#define CONFIG_ENV_SECT_SIZE (128 * 1024)
#define CONFIG_ENV_SPI_BUS CONFIG_SF_DEFAULT_BUS
#define CONFIG_ENV_SPI_CS CONFIG_SF_DEFAULT_CS
#define CONFIG_ENV_SPI_MODE CONFIG_SF_DEFAULT_MODE
#define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED
#else
#define CONFIG_ENV_OFFSET (14 * SZ_64K)
#define CONFIG_ENV_OFFSET (64 * SZ_64K)
#define CONFIG_ENV_IS_IN_MMC
#define CONFIG_SYS_MMC_IMG_LOAD_PART 1
#define CONFIG_SYS_MMC_ENV_PART 0 /* user area */
......
......@@ -207,14 +207,14 @@
#ifdef CONFIG_QSPI_BOOT
#define CONFIG_ENV_IS_IN_SPI_FLASH
#define CONFIG_ENV_OFFSET (1024 * 1024)
#define CONFIG_ENV_OFFSET (4 * 1024 * 1024)
#define CONFIG_ENV_SECT_SIZE (128 * 1024)
#define CONFIG_ENV_SPI_BUS CONFIG_SF_DEFAULT_BUS
#define CONFIG_ENV_SPI_CS CONFIG_SF_DEFAULT_CS
#define CONFIG_ENV_SPI_MODE CONFIG_SF_DEFAULT_MODE
#define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED
#else
#define CONFIG_ENV_OFFSET (14 * SZ_64K)
#define CONFIG_ENV_OFFSET (64 * SZ_64K)
#define CONFIG_ENV_IS_IN_MMC
#define CONFIG_SYS_MMC_IMG_LOAD_PART 1
#define CONFIG_SYS_MMC_ENV_PART 0 /* user area */
......
......@@ -207,14 +207,14 @@
#define CONFIG_ENV_OFFSET (64 << 20)
#elif defined(CONFIG_QSPI_BOOT)
#define CONFIG_ENV_IS_IN_SPI_FLASH
#define CONFIG_ENV_OFFSET (1024 * 1024)
#define CONFIG_ENV_OFFSET (4 * 1024 * 1024)
#define CONFIG_ENV_SECT_SIZE (128 * 1024)
#define CONFIG_ENV_SPI_BUS CONFIG_SF_DEFAULT_BUS
#define CONFIG_ENV_SPI_CS CONFIG_SF_DEFAULT_CS
#define CONFIG_ENV_SPI_MODE CONFIG_SF_DEFAULT_MODE
#define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED
#else
#define CONFIG_ENV_OFFSET (14 * SZ_64K)
#define CONFIG_ENV_OFFSET (64 * SZ_64K)
#define CONFIG_ENV_IS_IN_MMC
#define CONFIG_SYS_MMC_IMG_LOAD_PART 1
#define CONFIG_SYS_MMC_ENV_PART 0 /* user area */
......
......@@ -196,7 +196,7 @@
#define CONFIG_ENV_SIZE 0x1000
#ifdef CONFIG_QSPI_BOOT
#define CONFIG_ENV_IS_IN_SPI_FLASH
#define CONFIG_ENV_OFFSET (1024 * 1024)
#define CONFIG_ENV_OFFSET (4 * 1024 * 1024)
#define CONFIG_ENV_SECT_SIZE (128 * 1024)
#define CONFIG_ENV_SPI_BUS CONFIG_SF_DEFAULT_BUS
#define CONFIG_ENV_SPI_CS CONFIG_SF_DEFAULT_CS
......@@ -204,7 +204,7 @@
#define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED
#else
#define CONFIG_ENV_IS_IN_MMC
#define CONFIG_ENV_OFFSET (14 * SZ_64K)
#define CONFIG_ENV_OFFSET (64 * SZ_64K)
#define CONFIG_SYS_MMC_IMG_LOAD_PART 1
#define CONFIG_SYS_MMC_ENV_PART 0 /* user area */
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment