NAND_ECC_SOFT_BCH can support subpage reads too

Signed-off-by: Ron Lee <ron@debian.org>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
This commit is contained in:
Ron Lee 2014-04-25 15:01:35 +09:30 committed by Brian Norris
parent 96ba9dd657
commit 4007e2d175

View file

@ -4047,8 +4047,16 @@ int nand_scan_tail(struct mtd_info *mtd)
chip->pagebuf = -1; chip->pagebuf = -1;
/* Large page NAND with SOFT_ECC should support subpage reads */ /* Large page NAND with SOFT_ECC should support subpage reads */
if ((ecc->mode == NAND_ECC_SOFT) && (chip->page_shift > 9)) switch (ecc->mode) {
chip->options |= NAND_SUBPAGE_READ; 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 */ /* Fill in remaining MTD driver data */
mtd->type = nand_is_slc(chip) ? MTD_NANDFLASH : MTD_MLCNANDFLASH; mtd->type = nand_is_slc(chip) ? MTD_NANDFLASH : MTD_MLCNANDFLASH;