[PATCH v1] configs: colibri-imx7: Fix bad block table in flash configuration

From: Stefan Eichenberger stefan.eichenberger@toradex.com
Make sure that the bad block table in flash is used on Colibri iMX7. Without this configuration enabled U-Boot corrupts the bad block table and Linux will update the table on each reboot. The corruption occurs because if CONFIG_SYS_NAND_USE_FLASH_BBT is not set, U-boot will store bad blocks out of band, while the Linux driver for the iMX7 will store them in band in a bad block table.
Fixes: fd8c1fc9430 ("arm: dts: imx7: colibri: add raw NAND support") Signed-off-by: Stefan Eichenberger stefan.eichenberger@toradex.com Signed-off-by: Francesco Dolcini francesco.dolcini@toradex.com --- configs/colibri_imx7_defconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/configs/colibri_imx7_defconfig b/configs/colibri_imx7_defconfig index 7e24dcd40090..a6279a806daa 100644 --- a/configs/colibri_imx7_defconfig +++ b/configs/colibri_imx7_defconfig @@ -77,6 +77,7 @@ CONFIG_FSL_USDHC=y CONFIG_MTD=y CONFIG_DM_MTD=y CONFIG_MTD_RAW_NAND=y +CONFIG_SYS_NAND_USE_FLASH_BBT=y CONFIG_NAND_MXS_DT=y CONFIG_SYS_NAND_ONFI_DETECTION=y CONFIG_MTD_UBI_FASTMAP=y

On Fri, Feb 10, 2023 at 11:34 AM Francesco Dolcini francesco@dolcini.it wrote:
From: Stefan Eichenberger stefan.eichenberger@toradex.com
Make sure that the bad block table in flash is used on Colibri iMX7. Without this configuration enabled U-Boot corrupts the bad block table and Linux will update the table on each reboot. The corruption occurs because if CONFIG_SYS_NAND_USE_FLASH_BBT is not set, U-boot will store bad blocks out of band, while the Linux driver for the iMX7 will store them in band in a bad block table.
Fixes: fd8c1fc9430 ("arm: dts: imx7: colibri: add raw NAND support") Signed-off-by: Stefan Eichenberger stefan.eichenberger@toradex.com Signed-off-by: Francesco Dolcini francesco.dolcini@toradex.com
configs/colibri_imx7_defconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/configs/colibri_imx7_defconfig b/configs/colibri_imx7_defconfig index 7e24dcd40090..a6279a806daa 100644 --- a/configs/colibri_imx7_defconfig +++ b/configs/colibri_imx7_defconfig @@ -77,6 +77,7 @@ CONFIG_FSL_USDHC=y CONFIG_MTD=y CONFIG_DM_MTD=y CONFIG_MTD_RAW_NAND=y +CONFIG_SYS_NAND_USE_FLASH_BBT=y
Reviewed-by: Michael Trimarchi michael@amarulasolutions.com
CONFIG_NAND_MXS_DT=y CONFIG_SYS_NAND_ONFI_DETECTION=y CONFIG_MTD_UBI_FASTMAP=y -- 2.25.1

On Fri, 2023-02-10 at 11:33 +0100, Francesco Dolcini wrote:
From: Stefan Eichenberger stefan.eichenberger@toradex.com
Make sure that the bad block table in flash is used on Colibri iMX7. Without this configuration enabled U-Boot corrupts the bad block table and Linux will update the table on each reboot. The corruption occurs because if CONFIG_SYS_NAND_USE_FLASH_BBT is not set, U-boot will store bad blocks out of band, while the Linux driver for the iMX7 will store them in band in a bad block table.
Fixes: fd8c1fc9430 ("arm: dts: imx7: colibri: add raw NAND support") Signed-off-by: Stefan Eichenberger stefan.eichenberger@toradex.com Signed-off-by: Francesco Dolcini francesco.dolcini@toradex.com
Reviewed-by: Marcel Ziswiler marcel.ziswiler@toradex.com
configs/colibri_imx7_defconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/configs/colibri_imx7_defconfig b/configs/colibri_imx7_defconfig index 7e24dcd40090..a6279a806daa 100644 --- a/configs/colibri_imx7_defconfig +++ b/configs/colibri_imx7_defconfig @@ -77,6 +77,7 @@ CONFIG_FSL_USDHC=y CONFIG_MTD=y CONFIG_DM_MTD=y CONFIG_MTD_RAW_NAND=y +CONFIG_SYS_NAND_USE_FLASH_BBT=y CONFIG_NAND_MXS_DT=y CONFIG_SYS_NAND_ONFI_DETECTION=y CONFIG_MTD_UBI_FASTMAP=y

From: Stefan Eichenberger stefan.eichenberger@toradex.com Make sure that the bad block table in flash is used on Colibri iMX7. Without this configuration enabled U-Boot corrupts the bad block table and Linux will update the table on each reboot. The corruption occurs because if CONFIG_SYS_NAND_USE_FLASH_BBT is not set, U-boot will store bad blocks out of band, while the Linux driver for the iMX7 will store them in band in a bad block table. Fixes: fd8c1fc9430 ("arm: dts: imx7: colibri: add raw NAND support") Signed-off-by: Stefan Eichenberger stefan.eichenberger@toradex.com Signed-off-by: Francesco Dolcini francesco.dolcini@toradex.com Reviewed-by: Michael Trimarchi michael@amarulasolutions.com Reviewed-by: Marcel Ziswiler marcel.ziswiler@toradex.com
Applied to u-boot-imx, next, thanks !
Best regards, Stefano Babic
participants (4)
-
Francesco Dolcini
-
Marcel Ziswiler
-
Michael Nazzareno Trimarchi
-
sbabic@denx.de