Commit 2906317e68d2f5a9ff75b43c1b54c768098fa7f2

Authored by Ye Li
1 parent f8b95c085f

MLK-12723 imx: Change the env offset on NAND to 60M

Current environment offset on NAND is 37MB, this will cause a alignment
issue when erasing if nand erase block is 2MB. The saveenv is failed.

=> saveenv
Saving Environment to NAND...
Erasing NAND...
Attempt to erase non block-aligned data

Since the max erase block we supported is 4MB, adjust the env offset to 60MB,
where is the last 4MB in 64MB reserved area for boot.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 22f6c4b151fbdea1985403086715de841152c880)

Showing 3 changed files with 3 additions and 3 deletions Side-by-side Diff

include/configs/mx6sabre_common.h
... ... @@ -339,7 +339,7 @@
339 339 #define CONFIG_ENV_OFFSET (4 * CONFIG_SYS_FLASH_SECT_SIZE)
340 340 #elif defined(CONFIG_ENV_IS_IN_NAND)
341 341 #undef CONFIG_ENV_SIZE
342   -#define CONFIG_ENV_OFFSET (37 << 20)
  342 +#define CONFIG_ENV_OFFSET (60 << 20)
343 343 #define CONFIG_ENV_SECT_SIZE (128 << 10)
344 344 #define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE
345 345 #elif defined(CONFIG_ENV_IS_IN_SATA)
include/configs/mx6sxsabreauto.h
... ... @@ -269,7 +269,7 @@
269 269 #define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED
270 270 #elif defined(CONFIG_ENV_IS_IN_NAND)
271 271 #undef CONFIG_ENV_SIZE
272   -#define CONFIG_ENV_OFFSET (37 << 20)
  272 +#define CONFIG_ENV_OFFSET (60 << 20)
273 273 #define CONFIG_ENV_SECT_SIZE (128 << 10)
274 274 #define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE
275 275 #endif
include/configs/mx6ul_14x14_evk.h
... ... @@ -275,7 +275,7 @@
275 275 #define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED
276 276 #elif defined(CONFIG_ENV_IS_IN_NAND)
277 277 #undef CONFIG_ENV_SIZE
278   -#define CONFIG_ENV_OFFSET (37 << 20)
  278 +#define CONFIG_ENV_OFFSET (60 << 20)
279 279 #define CONFIG_ENV_SECT_SIZE (128 << 10)
280 280 #define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE
281 281 #endif