[PATCH v4 3/5] mtd: nand: Enable subpage-reads on flashes with on-die ECC enabled.
David Mosberger
davidm at egauge.net
Mon Mar 31 19:28:55 EDT 2014
As far as we know, all flash chips with the Micron on-die ECC hardware
have subpage capability, so enable it for that case.
Signed-off-by: David Mosberger <davidm at egauge.net>
---
drivers/mtd/nand/nand_base.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 7047e9f5..435ef44 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -4185,8 +4185,13 @@ int nand_scan_tail(struct mtd_info *mtd)
/* Invalidate the pagebuffer reference */
chip->pagebuf = -1;
- /* Large page NAND with SOFT_ECC should support subpage reads */
- if ((ecc->mode == NAND_ECC_SOFT) && (chip->page_shift > 9))
+ /*
+ * Large page NAND with SOFT_ECC or on-die ECC should support
+ * subpage reads.
+ */
+ if (((ecc->mode == NAND_ECC_SOFT)
+ || (chip->ecc.mode == NAND_ECC_HW_ON_DIE))
+ && (chip->page_shift > 9))
chip->options |= NAND_SUBPAGE_READ;
/* Fill in remaining MTD driver data */
--
1.7.9.5
More information about the linux-mtd
mailing list