NAND_ECC_SOFT_BCH can support subpage reads too
authorRon Lee <ron@debian.org>
Fri, 25 Apr 2014 05:31:35 +0000 (15:01 +0930)
committerBrian Norris <computersforpeace@gmail.com>
Wed, 21 May 2014 00:49:03 +0000 (17:49 -0700)
Signed-off-by: Ron Lee <ron@debian.org>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/nand_base.c

index 1b844b8c621f1abaa0f719f189c70ad264edb6f6..0c1593be69e3ce7affb0986c5ece774252a7873f 100644 (file)
@@ -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;
This page took 0.064067 seconds and 5 git commands to generate.