diff options
author | Ron Lee <ron@debian.org> | 2014-04-25 15:01:35 +0930 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2014-05-20 17:49:03 -0700 |
commit | 4007e2d175cc83ea728b757e49155826b32fbff8 (patch) | |
tree | d9b42f539710693d5d303aed8f660a18919ebf51 /drivers/mtd | |
parent | 96ba9dd65788a0bd2a7d1e57ec78b7642f0ccc25 (diff) | |
download | op-kernel-dev-4007e2d175cc83ea728b757e49155826b32fbff8.zip op-kernel-dev-4007e2d175cc83ea728b757e49155826b32fbff8.tar.gz |
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>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/nand_base.c | 12 |
1 files 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; |