Skip to contentSkip to conversation

NAND_ECC_SOFT_BCH can support subpage reads too

PATCH Applied Ron 2 participants 2 messages Apr 25, 2014 – May 21, 2014

Subsystems (2)
lore
Share & tools
lore

Ron

author
#0 lore raw

PATCH 1/1 NAND_ECC_SOFT_BCH can support subpage reads too

---
 drivers/mtd/nand/nand_base.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
drivers/mtd/nand/nand_base.c +10 -2
index 9d01c4d..7f5b814 100644
@@ -4023,8 +4023,16 @@ int nand_scan_tail(struct mtd_info *mtd)
 	chip->pagebuf = -1;
 
 	/* Large page NAND with SOFT_ECC should support subpage reads */
-	if ((ecc->mode == NAND_ECC_SOFT) && (chip->page_shift > 9))
-		chip->options |= NAND_SUBPAGE_READ;
+	switch (ecc->mode) {
+	case NAND_ECC_SOFT:
+	case NAND_ECC_SOFT_BCH:
+		if (chip->page_shift > 9)
+			chip->options |= NAND_SUBPAGE_READ;
+		break;
+
+	default:
+		break;
+	}
 
 	/* Fill in remaining MTD driver data */
 	mtd->type = nand_is_slc(chip) ? MTD_NANDFLASH : MTD_MLCNANDFLASH;
Signature · 1 line
1.7.2.5
Applied
#1 lore raw
Quoted 1 line · Ron

Pushed to l2-mtd.git. Thanks!

BTW, can you fix your git config so that it uses your full name? You have the sign-off right, but git-send-email is still just picking your name up as "Ron."

Brian