Skip to contentSkip to conversation

mxsboot : Support of 224-bytes OOB area length

PATCH New Alexandre Coffignal 2 participants 2 messages Jan 8, 2015 – Jan 19, 2015 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mxsboot : Support of 224-bytes OOB area length

Add support for the NAND Flash chip with page size of 4096+224-bytes OOB area length

For example Micron MT29F4G08 NAND flash device defines a OOB area which is 224 bytes long (oobsize).

---
 tools/mxsboot.c |    6 ++++++
 1 file changed, 6 insertions(+)
tools/mxsboot.c +6 -0
index 90b2173..6d48cfb 100644
@@ -142,6 +142,9 @@ static inline uint32_t mx28_nand_get_ecc_strength(uint32_t page_data_size,
 
 		if (page_oob_size == 218)
 			return 16;
+
+		if (page_oob_size == 224)
+			return 16;
 	}
 
 	return 0;
@@ -269,6 +272,9 @@ static struct mx28_nand_fcb *mx28_nand_get_fcb(uint32_t size)
 		} else if (nand_oobsize == 218) {
 			fcb->ecc_block_n_ecc_type =	8;
 			fcb->ecc_block_0_ecc_type =	8;
+		} else if (nand_oobsize == 224) {
+			fcb->ecc_block_n_ecc_type =	8;
+			fcb->ecc_block_0_ecc_type =	8;
 		}
 	}
 
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 mxsboot : Support of 224-bytes OOB area length

Hi Alexandre,

Quoted 25 lines · Alexandre Coffignal

Add support for the NAND Flash chip with page size of 4096+224-bytes OOB area length

For example Micron MT29F4G08 NAND flash device defines a OOB area which is 224 bytes long (oobsize).

---
 tools/mxsboot.c |    6 ++++++
 1 file changed, 6 insertions(+)
tools/mxsboot.c +3 -0
index 90b2173..6d48cfb 100644
@@ -142,6 +142,9 @@ static inline uint32_t mx28_nand_get_ecc_strength(uint32_t page_data_size,
 
 		if (page_oob_size == 218)
 			return 16;
+
+		if (page_oob_size == 224)
+			return 16;
 	}
 
 	return 0;

tools/mxsboot.c static struct mx28_nand_fcb *mx28_nand_get_fcb(uint32_t size) · line 279

Quoted 8 lines
tools/mxsboot.c +3 -0
@@ -269,6 +272,9 @@ static struct mx28_nand_fcb *mx28_nand_get_fcb(uint32_t size)
 		} else if (nand_oobsize == 218) {
 			fcb->ecc_block_n_ecc_type =	8;
 			fcb->ecc_block_0_ecc_type =	8;
+		} else if (nand_oobsize == 224) {
+			fcb->ecc_block_n_ecc_type =	8;
+			fcb->ecc_block_0_ecc_type =	8;
 		}
 	}

I have not your use case, but it looks ok for me and I merge it.

Applied to -u-boot-imx, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
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
=====================================================================