aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Korolev <akorolev@infradead.org>2008-07-29 08:54:11 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2008-07-30 06:59:24 -0400
commit96d8b647cfff90c8ff07863866aacdcd9d13cead (patch)
tree2ab2043e692f1cc03d84380d3e5ea820ec95dc6a
parent6e86841d05f371b5b9b86ce76c02aaee83352298 (diff)
[MTD] [NAND] fix subpage read for small page NAND
Current implementation of subpage read feature for NAND has issues with small page devices. Small page NAND do not support RNDOUT command. So subpage feature is not applicable for them. This patch disables support of subpage for small page NAND. The code is verified on nandsim(SP NAND simulation) and on LP NAND devices. Thanks a lot to Artem for finding this issue. Signed-off-by: Alexey Korolev <akorolev@infradead.org> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
-rw-r--r--include/linux/mtd/nand.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 83f678702dff..81774e5facf4 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -177,7 +177,9 @@ typedef enum {
177#define NAND_MUST_PAD(chip) (!(chip->options & NAND_NO_PADDING)) 177#define NAND_MUST_PAD(chip) (!(chip->options & NAND_NO_PADDING))
178#define NAND_HAS_CACHEPROG(chip) ((chip->options & NAND_CACHEPRG)) 178#define NAND_HAS_CACHEPROG(chip) ((chip->options & NAND_CACHEPRG))
179#define NAND_HAS_COPYBACK(chip) ((chip->options & NAND_COPYBACK)) 179#define NAND_HAS_COPYBACK(chip) ((chip->options & NAND_COPYBACK))
180#define NAND_SUBPAGE_READ(chip) ((chip->ecc.mode == NAND_ECC_SOFT)) 180/* Large page NAND with SOFT_ECC should support subpage reads */
181#define NAND_SUBPAGE_READ(chip) ((chip->ecc.mode == NAND_ECC_SOFT) \
182 && (chip->page_shift > 9))
181 183
182/* Mask to zero out the chip options, which come from the id table */ 184/* Mask to zero out the chip options, which come from the id table */
183#define NAND_CHIPOPTIONS_MSK (0x0000ffff & ~NAND_NO_AUTOINCR) 185#define NAND_CHIPOPTIONS_MSK (0x0000ffff & ~NAND_NO_AUTOINCR)