]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
colibri-imx6ull: improve env badblock management
authorFrancesco Dolcini <francesco.dolcini@toradex.com>
Thu, 3 Feb 2022 17:41:24 +0000 (18:41 +0100)
committerStefano Babic <sbabic@denx.de>
Sat, 19 Feb 2022 22:32:22 +0000 (23:32 +0100)
Use the complete 512kb (4 blocks) nand partition reserved for u-boot
environment instead of just the first block, this allows the module to
have a working environment even if 3 blocks are bad.

Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
include/configs/colibri-imx6ull.h

index 787fe33941b6c3580ac7ade60d9bde010fa3ef1f..91f0f953a12c2c0523da1bcd5a90b0bf85e6d34f 100644 (file)
        (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
 
 /* environment organization */
-
-/* Environment in eMMC, before config block at the end of 1st "boot sector" */
+#if defined(CONFIG_ENV_IS_IN_NAND)
+#define CONFIG_ENV_RANGE       (4 * CONFIG_ENV_SIZE)
+#endif
 
 #ifdef CONFIG_TARGET_COLIBRI_IMX6ULL_NAND
 /* NAND stuff */