diff options
author | Huang Shijie <shijie8@gmail.com> | 2012-08-14 22:38:45 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-09-29 10:00:46 -0400 |
commit | 657f28f8811c92724db10d18bbbec70d540147d6 (patch) | |
tree | 1d8cb32d57eec27f46a74cad73a1ceff43f5e099 /drivers/mtd/nand/nandsim.c | |
parent | 8da28681eb1430fb6715c7aef67001acfbbbcba5 (diff) |
mtd: kill MTD_NAND_VERIFY_WRITE
Just as Artem suggested:
"Both UBI and JFFS2 are able to read verify what they wrote already.
There are also MTD tests which do this verification. So I think there
is no reason to keep this in the NAND layer, let alone wasting RAM in
the driver to support this feature. Besides, it does not work for sub-pages
and many drivers have it broken. It hurts more than it provides benefits."
So kill MTD_NAND_VERIFY_WRITE entirely.
Signed-off-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/nand/nandsim.c')
-rw-r--r-- | drivers/mtd/nand/nandsim.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c index cf0cd3146817..21e64b5d352b 100644 --- a/drivers/mtd/nand/nandsim.c +++ b/drivers/mtd/nand/nandsim.c | |||
@@ -447,8 +447,6 @@ static unsigned int rptwear_cnt = 0; | |||
447 | /* MTD structure for NAND controller */ | 447 | /* MTD structure for NAND controller */ |
448 | static struct mtd_info *nsmtd; | 448 | static struct mtd_info *nsmtd; |
449 | 449 | ||
450 | static u_char ns_verify_buf[NS_LARGEST_PAGE_SIZE]; | ||
451 | |||
452 | /* | 450 | /* |
453 | * Allocate array of page pointers, create slab allocation for an array | 451 | * Allocate array of page pointers, create slab allocation for an array |
454 | * and initialize the array by NULL pointers. | 452 | * and initialize the array by NULL pointers. |
@@ -2189,19 +2187,6 @@ static void ns_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len) | |||
2189 | return; | 2187 | return; |
2190 | } | 2188 | } |
2191 | 2189 | ||
2192 | static int ns_nand_verify_buf(struct mtd_info *mtd, const u_char *buf, int len) | ||
2193 | { | ||
2194 | ns_nand_read_buf(mtd, (u_char *)&ns_verify_buf[0], len); | ||
2195 | |||
2196 | if (!memcmp(buf, &ns_verify_buf[0], len)) { | ||
2197 | NS_DBG("verify_buf: the buffer is OK\n"); | ||
2198 | return 0; | ||
2199 | } else { | ||
2200 | NS_DBG("verify_buf: the buffer is wrong\n"); | ||
2201 | return -EFAULT; | ||
2202 | } | ||
2203 | } | ||
2204 | |||
2205 | /* | 2190 | /* |
2206 | * Module initialization function | 2191 | * Module initialization function |
2207 | */ | 2192 | */ |
@@ -2236,7 +2221,6 @@ static int __init ns_init_module(void) | |||
2236 | chip->dev_ready = ns_device_ready; | 2221 | chip->dev_ready = ns_device_ready; |
2237 | chip->write_buf = ns_nand_write_buf; | 2222 | chip->write_buf = ns_nand_write_buf; |
2238 | chip->read_buf = ns_nand_read_buf; | 2223 | chip->read_buf = ns_nand_read_buf; |
2239 | chip->verify_buf = ns_nand_verify_buf; | ||
2240 | chip->read_word = ns_nand_read_word; | 2224 | chip->read_word = ns_nand_read_word; |
2241 | chip->ecc.mode = NAND_ECC_SOFT; | 2225 | chip->ecc.mode = NAND_ECC_SOFT; |
2242 | /* The NAND_SKIP_BBTSCAN option is necessary for 'overridesize' */ | 2226 | /* The NAND_SKIP_BBTSCAN option is necessary for 'overridesize' */ |