[U-Boot] [PATCH] mxs_nand: Fix ECC strength for NAND flash with OOB size of 256

Heiko Schocher hs at denx.de
Sun Apr 12 10:17:32 CEST 2015


On the i.mx6 based aristainetos2 board a Toshiba TH58NYG3S0HBAI4
is used, which has 4096 pagesize and 256b oob. The ECC strength
was not correct detected by U-Boot

Signed-off-by: Heiko Schocher <hs at denx.de>
---

 drivers/mtd/nand/mxs_nand.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/mtd/nand/mxs_nand.c b/drivers/mtd/nand/mxs_nand.c
index 2d2b938..00bf036 100644
--- a/drivers/mtd/nand/mxs_nand.c
+++ b/drivers/mtd/nand/mxs_nand.c
@@ -163,6 +163,9 @@ static inline uint32_t mxs_nand_get_ecc_strength(uint32_t page_data_size,
 
 		if (page_oob_size == 224)
 			return 16;
+
+		if (page_oob_size == 256)
+			return 18;
 	}
 
 	return 0;
-- 
2.1.0



More information about the U-Boot mailing list