/* Calculate the ECC for a 256-byte block of data */
-void yaffs_ecc_cacl(const unsigned char *data, unsigned char *ecc)
+void yaffs_ecc_calc(const unsigned char *data, unsigned char *ecc)
{
unsigned int i;
unsigned char col_parity = 0;
unsigned line_parity_prime;
};
-void yaffs_ecc_cacl(const unsigned char *data, unsigned char *ecc);
+void yaffs_ecc_calc(const unsigned char *data, unsigned char *ecc);
int yaffs_ecc_correct(unsigned char *data, unsigned char *read_ecc,
const unsigned char *test_ecc);
void yaffs_calc_ecc(const u8 *data, struct yaffs_spare *spare)
{
- yaffs_ecc_cacl(data, spare->ecc1);
- yaffs_ecc_cacl(&data[256], spare->ecc2);
+ yaffs_ecc_calc(data, spare->ecc1);
+ yaffs_ecc_calc(&data[256], spare->ecc2);
}
void yaffs_calc_tags_ecc(struct yaffs_tags *tags)
int ecc_result1, ecc_result2;
u8 calc_ecc[3];
- yaffs_ecc_cacl(data, calc_ecc);
+ yaffs_ecc_calc(data, calc_ecc);
ecc_result1 =
yaffs_ecc_correct(data, spare->ecc1, calc_ecc);
- yaffs_ecc_cacl(&data[256], calc_ecc);
+ yaffs_ecc_calc(&data[256], calc_ecc);
ecc_result2 =
yaffs_ecc_correct(&data[256], spare->ecc2,
calc_ecc);