diff options
author | Ron Lee <ron@debian.org> | 2014-04-25 01:31:35 -0400 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2014-05-20 20:49:03 -0400 |
commit | 4007e2d175cc83ea728b757e49155826b32fbff8 (patch) | |
tree | d9b42f539710693d5d303aed8f660a18919ebf51 /drivers/mtd/nand | |
parent | 96ba9dd65788a0bd2a7d1e57ec78b7642f0ccc25 (diff) |
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/nand')
-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 1b844b8c621f..0c1593be69e3 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) | |||
4047 | chip->pagebuf = -1; | 4047 | chip->pagebuf = -1; |
4048 | 4048 | ||
4049 | /* Large page NAND with SOFT_ECC should support subpage reads */ | 4049 | /* Large page NAND with SOFT_ECC should support subpage reads */ |
4050 | if ((ecc->mode == NAND_ECC_SOFT) && (chip->page_shift > 9)) | 4050 | switch (ecc->mode) { |
4051 | chip->options |= NAND_SUBPAGE_READ; | 4051 | case NAND_ECC_SOFT: |
4052 | case NAND_ECC_SOFT_BCH: | ||
4053 | if (chip->page_shift > 9) | ||
4054 | chip->options |= NAND_SUBPAGE_READ; | ||
4055 | break; | ||
4056 | |||
4057 | default: | ||
4058 | break; | ||
4059 | } | ||
4052 | 4060 | ||
4053 | /* Fill in remaining MTD driver data */ | 4061 | /* Fill in remaining MTD driver data */ |
4054 | mtd->type = nand_is_slc(chip) ? MTD_NANDFLASH : MTD_MLCNANDFLASH; | 4062 | mtd->type = nand_is_slc(chip) ? MTD_NANDFLASH : MTD_MLCNANDFLASH; |