diff options
author | Jeff Westfahl <jeff.westfahl@ni.com> | 2012-08-13 16:35:30 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-09-29 15:28:33 +0100 |
commit | a5ff4f102937a3492bca4a9ff0c341d78813414c (patch) | |
tree | e2fb4a1b059243f92eec02cf5f0b41f869f48424 /include/linux/mtd | |
parent | 32098f6af02754b357ce303afd1bd00a470f906c (diff) | |
download | linux-a5ff4f102937a3492bca4a9ff0c341d78813414c.tar.gz linux-a5ff4f102937a3492bca4a9ff0c341d78813414c.tar.bz2 linux-a5ff4f102937a3492bca4a9ff0c341d78813414c.zip |
mtd: nand: Added a device flag for subpage read support
Added a NAND device flag for subpage read support. Previously this was
hard coded based on large page and soft ECC.
Updated base NAND driver to use the new subpage read flag if the NAND is
large page and soft ECC.
Signed-off-by: Jeff Westfahl <jeff.westfahl@ni.com>
Reviewed-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'include/linux/mtd')
-rw-r--r-- | include/linux/mtd/nand.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 6bdad331cee4..8f99d3621e12 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h @@ -194,6 +194,9 @@ typedef enum { /* Device behaves just like nand, but is readonly */ #define NAND_ROM 0x00000800 +/* Device supports subpage reads */ +#define NAND_SUBPAGE_READ 0x00001000 + /* Options valid for Samsung large page devices */ #define NAND_SAMSUNG_LP_OPTIONS \ (NAND_NO_PADDING | NAND_CACHEPRG | NAND_COPYBACK) @@ -202,9 +205,7 @@ typedef enum { #define NAND_MUST_PAD(chip) (!(chip->options & NAND_NO_PADDING)) #define NAND_HAS_CACHEPROG(chip) ((chip->options & NAND_CACHEPRG)) #define NAND_HAS_COPYBACK(chip) ((chip->options & NAND_COPYBACK)) -/* Large page NAND with SOFT_ECC should support subpage reads */ -#define NAND_SUBPAGE_READ(chip) ((chip->ecc.mode == NAND_ECC_SOFT) \ - && (chip->page_shift > 9)) +#define NAND_HAS_SUBPAGE_READ(chip) ((chip->options & NAND_SUBPAGE_READ)) /* Non chip related options */ /* This option skips the bbt scan during initialization. */ |