NAND_ECC_SOFT_BCH can support subpage reads too

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Tue Jun 10 23:59:08 PDT 2014


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=4007e2d175cc83ea728b757e49155826b32fbff8
Commit:     4007e2d175cc83ea728b757e49155826b32fbff8
Parent:     96ba9dd65788a0bd2a7d1e57ec78b7642f0ccc25
Author:     Ron Lee <ron at debian.org>
AuthorDate: Fri Apr 25 15:01:35 2014 +0930
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Tue May 20 17:49:03 2014 -0700

    NAND_ECC_SOFT_BCH can support subpage reads too
    
    Signed-off-by: Ron Lee <ron at debian.org>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 drivers/mtd/nand/nand_base.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 1b844b8..0c1593b 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -4047,8 +4047,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;



More information about the linux-mtd-cvs mailing list