diff options
author | Peter Tyser <ptyser@xes-inc.com> | 2015-02-03 11:58:12 -0600 |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2015-03-30 23:24:38 -0500 |
commit | 59b5a2ad83dfefae75011a839e94d4880ff02933 (patch) | |
tree | f8e8795000de7c524b3e042a1d6318038bf3e6b7 /include/nand.h | |
parent | 800772a1a6530c31509d65d8e9672fe209a35066 (diff) | |
download | u-boot-imx-59b5a2ad83dfefae75011a839e94d4880ff02933.zip u-boot-imx-59b5a2ad83dfefae75011a839e94d4880ff02933.tar.gz u-boot-imx-59b5a2ad83dfefae75011a839e94d4880ff02933.tar.bz2 |
nand: Add verification functions
Add nand_verify() and nand_verify_page_oob(). nand_verify() verifies
NAND contents against an arbitrarily sized buffer using ECC while
nand_verify_page_oob() verifies a NAND page's contents and OOB.
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Tested-by: Heiko Schocher <hs@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'include/nand.h')
-rw-r--r-- | include/nand.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/nand.h b/include/nand.h index 673597e..8ea4d5d 100644 --- a/include/nand.h +++ b/include/nand.h @@ -108,11 +108,15 @@ int nand_read_skip_bad(nand_info_t *nand, loff_t offset, size_t *length, * is a 'mode' meaning it cannot be mixed with * other flags */ #define WITH_DROP_FFS (1 << 1) /* drop trailing all-0xff pages */ +#define WITH_WR_VERIFY (1 << 2) /* verify data was written correctly */ int nand_write_skip_bad(nand_info_t *nand, loff_t offset, size_t *length, size_t *actual, loff_t lim, 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); +int nand_verify_page_oob(nand_info_t *nand, struct mtd_oob_ops *ops, + loff_t ofs); +int nand_verify(nand_info_t *nand, loff_t ofs, size_t len, u_char *buf); #define NAND_LOCK_STATUS_TIGHT 0x01 #define NAND_LOCK_STATUS_UNLOCK 0x04 |