Skip to contentSkip to conversation

mtd: nand: mxs: Add ECC geometry for 2048b/112b NAND

PATCH New Marek Vasut 2 participants 2 messages Sep 25, 2014 – Oct 30, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: nand: mxs: Add ECC geometry for 2048b/112b NAND

Add ECC geometry for NAND which has 2048b pagesize and 112b OOB size. This is for example Macronix MX30LF2G28AB chip.

---
 drivers/mtd/nand/mxs_nand.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/mtd/nand/mxs_nand.c +7 -2
index 036c113..7a064ab 100644
@@ -146,8 +146,13 @@ static uint32_t mxs_nand_aux_status_offset(void)
 static inline uint32_t mxs_nand_get_ecc_strength(uint32_t page_data_size,
 						uint32_t page_oob_size)
 {
-	if (page_data_size == 2048)
-		return 8;
+	if (page_data_size == 2048) {
+		if (page_oob_size == 64)
+			return 8;
+
+		if (page_oob_size == 112)
+			return 14;
+	}
 
 	if (page_data_size == 4096) {
 		if (page_oob_size == 128)
Signature · 1 line
2.1.0
#1 lore raw

PATCH 1/1 mtd: nand: mxs: Add ECC geometry for 2048b/112b NAND

Quoted 5 lines · Marek Vasut

Add ECC geometry for NAND which has 2048b pagesize and 112b OOB size. This is for example Macronix MX30LF2G28AB chip.

---

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================