Skip to contentSkip to conversation

configs: colibri-imx7: Fix bad block table in flash configuration

PATCH In review Francesco Dolcini 4 participants 4 messages Feb 10, 2023 – Mar 30, 2023 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configs: colibri-imx7: Fix bad block table in flash configuration

From: Stefan Eichenberger <[email protected]>

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")
---
 configs/colibri_imx7_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/colibri_imx7_defconfig +1 -0
index 7e24dcd40090..a6279a806daa 100644
@@ -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
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 22 lines · Francesco Dolcini

From: Stefan Eichenberger <[email protected]>

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")
---
 configs/colibri_imx7_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/colibri_imx7_defconfig +0 -0
index 7e24dcd40090..a6279a806daa 100644

configs/colibri_imx7_defconfig CONFIG_FSL_USDHC=y · line 80

Quoted 4 lines
configs/colibri_imx7_defconfig +1 -0
@@ -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
Quoted 6 lines
configs/colibri_imx7_defconfig +0 -1
 CONFIG_NAND_MXS_DT=y
 CONFIG_SYS_NAND_ONFI_DETECTION=y
 CONFIG_MTD_UBI_FASTMAP=y
--

2.25.1

Signature · 11 lines
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
[email protected]
__________________________________

Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
[email protected]
www.amarulasolutions.com
Reviewed-by on v1 1/1
#2 lore raw
In reply to Francesco Dolcini
Quoted 9 lines · Francesco Dolcini

From: Stefan Eichenberger <[email protected]>

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.

Quoted 3 lines
Fixes fd8c1fc9430 ("arm: dts: imx7: colibri: add raw NAND support")
Quoted 16 lines

---
 configs/colibri_imx7_defconfig | 1 +

 1 file changed, 1 insertion(+)
configs/colibri_imx7_defconfig +0 -0
index 7e24dcd40090..a6279a806daa 100644
@@ -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

#3 lore raw

PATCH 1/1 configs: colibri-imx7: Fix bad block table in flash configuration

In reply to Francesco Dolcini
Quoted 7 lines

From: Stefan Eichenberger <[email protected]> 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.

Quoted 5 lines
Fixes fd8c1fc9430 ("arm: dts: imx7: colibri: add raw NAND support")

Applied to u-boot-imx, next, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,        Managing Director: Erika Unter  
HRB 165235 Munich,   Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================