From ec50ff6d648dee1f3024e1cbd23f1d1cec4944dc Mon Sep 17 00:00:00 2001 From: Frank Haverkamp Date: Sat, 24 Nov 2007 11:04:51 +0100 Subject: ubi-utils: nand2bin had ECC calculation problems Fixed a problem when ECC was checked. The correction was not properly done by subpage. Added more output for the moment to be able to figure out more potential problems. Added testcase: bin2nand2bin.sh and biterror inject program inject_biterror.pl Interface o ECC correction disabled by default. Switch to turn it explicitly on. The user must specify what he wants to be done. Signed-off-by: Frank Haverkamp --- ubi-utils/src/nandecc.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ubi-utils/src/nandecc.h') diff --git a/ubi-utils/src/nandecc.h b/ubi-utils/src/nandecc.h index fb5d529..bcf1982 100644 --- a/ubi-utils/src/nandecc.h +++ b/ubi-utils/src/nandecc.h @@ -22,7 +22,8 @@ #include -extern int nand_calculate_ecc(const uint8_t *dat, uint8_t *ecc_code); -extern int nand_correct_data(uint8_t *dat, const uint8_t *fail_ecc); +int nand_calculate_ecc(const uint8_t *dat, uint8_t *ecc_code); +int nand_correct_data(uint8_t *dat, const uint8_t *read_ecc, + const uint8_t *calc_ecc); #endif -- cgit v1.2.3