nand: Add torture feature
This patch adds a NAND Flash torture feature, which is useful as a block stress test to determine if a block is still good and reliable (or should be marked as bad), e.g. after a write error. This code is ported from mtd-utils' lib/libmtd.c. Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Cc: Scott Wood <scottwood@freescale.com> [scottwood@freescale.com: removed unnec. ifdef and unwrapped error strings] Signed-off-by: Scott Wood <scottwood@freescale.com>
This commit is contained in:
committed by
Scott Wood
parent
8156f732ee
commit
3287f6d385
@@ -139,6 +139,7 @@ int nand_read_skip_bad(nand_info_t *nand, loff_t offset, size_t *length,
|
||||
int nand_write_skip_bad(nand_info_t *nand, loff_t offset, size_t *length,
|
||||
u_char *buffer, int flags);
|
||||
int nand_erase_opts(nand_info_t *meminfo, const nand_erase_options_t *opts);
|
||||
int nand_torture(nand_info_t *nand, loff_t offset);
|
||||
|
||||
#define NAND_LOCK_STATUS_TIGHT 0x01
|
||||
#define NAND_LOCK_STATUS_UNLOCK 0x04
|
||||
|
||||
Reference in New Issue
Block a user