Skip to contentSkip to conversation

imx-bbu-nand-fcb: add support for imx6ull

PATCH Applied Christian Hemp 2 participants 2 messages May 19, 2017 – May 22, 2017 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 imx-bbu-nand-fcb: add support for imx6ull

The i.MX 6ull secures the fcb with bch 40. This is identical to i.MX 6ul.

---
 common/imx-bbu-nand-fcb.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
common/imx-bbu-nand-fcb.c +3 -3
index 5d3d3f7..7218c5e 100644
@@ -441,7 +441,7 @@ static int read_fcb(struct mtd_info *mtd, int num, struct fcb_block **retfcb)
 		goto err;
 	}
 
-	if (cpu_is_mx6ul())
+	if (cpu_is_mx6ul() || cpu_is_mx6ull())
 		fcb = read_fcb_bch(rawpage, 40);
 	else
 		fcb = read_fcb_hamming_13_8(rawpage);
@@ -899,8 +899,8 @@ static int imx_bbu_write_fcbs_dbbts(struct mtd_info *mtd, struct fcb_block *fcb)
 
 	fcb_raw_page = xzalloc(mtd->writesize + mtd->oobsize);
 
-	if (cpu_is_mx6ul()) {
-		/* 40 bit BCH, for i.MX6UL */
+	if (cpu_is_mx6ul() || cpu_is_mx6ull()) {
+		/* 40 bit BCH, for i.MX6UL(L) */
 		encode_bch_ecc(fcb_raw_page + 32, fcb, 40);
 	} else {
 		memcpy(fcb_raw_page + 12, fcb, sizeof(struct fcb_block));
Signature · 7 lines
1.9.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
maintainer Applied
#1 lore raw
Quoted 6 lines · Christian Hemp

The i.MX 6ull secures the fcb with bch 40. This is identical to i.MX 6ul.

---
 common/imx-bbu-nand-fcb.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Applied, thanks

Sascha

Quoted 34 lines
common/imx-bbu-nand-fcb.c +3 -3
index 5d3d3f7..7218c5e 100644
@@ -441,7 +441,7 @@ static int read_fcb(struct mtd_info *mtd, int num, struct fcb_block **retfcb)
 		goto err;
 	}
 
-	if (cpu_is_mx6ul())
+	if (cpu_is_mx6ul() || cpu_is_mx6ull())
 		fcb = read_fcb_bch(rawpage, 40);
 	else
 		fcb = read_fcb_hamming_13_8(rawpage);
@@ -899,8 +899,8 @@ static int imx_bbu_write_fcbs_dbbts(struct mtd_info *mtd, struct fcb_block *fcb)
 
 	fcb_raw_page = xzalloc(mtd->writesize + mtd->oobsize);
 
-	if (cpu_is_mx6ul()) {
-		/* 40 bit BCH, for i.MX6UL */
+	if (cpu_is_mx6ul() || cpu_is_mx6ull()) {
+		/* 40 bit BCH, for i.MX6UL(L) */
 		encode_bch_ecc(fcb_raw_page + 32, fcb, 40);
 	} else {
 		memcpy(fcb_raw_page + 12, fcb, sizeof(struct fcb_block));
Signature · 7 lines
1.9.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox