summaryrefslogtreecommitdiffstats
path: root/include/nand.h
diff options
context:
space:
mode:
authorBenoît Thébaudeau <benoit.thebaudeau@advansee.com>2012-11-16 20:20:54 +0100
committerScott Wood <scottwood@freescale.com>2012-11-26 15:41:29 -0600
commit3287f6d3858faee768a7c47515bd21914ad591a2 (patch)
tree389079aae420c3b0b05a64b7c7dc2fb557334744 /include/nand.h
parent8156f732ee49fc4d91aef1ce09fb6679b3a23c0c (diff)
downloadblackbird-obmc-uboot-3287f6d3858faee768a7c47515bd21914ad591a2.tar.gz
blackbird-obmc-uboot-3287f6d3858faee768a7c47515bd21914ad591a2.zip
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>
Diffstat (limited to 'include/nand.h')
-rw-r--r--include/nand.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/nand.h b/include/nand.h
index bbe28b20bb..dded4e27f0 100644
--- a/include/nand.h
+++ b/include/nand.h
@@ -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
OpenPOWER on IntegriCloud