Lines Matching full:strength

290 		if (req->ecc.strength != ATMEL_PMECC_MAXIMIZE_ECC_STRENGTH)  in atmel_pmecc_prepare_user_req()
310 int nbytes, strength = pmecc->caps->strengths[i]; in atmel_pmecc_prepare_user_req() local
312 if (req->ecc.strength != ATMEL_PMECC_MAXIMIZE_ECC_STRENGTH && in atmel_pmecc_prepare_user_req()
313 strength < req->ecc.strength) in atmel_pmecc_prepare_user_req()
316 nbytes = DIV_ROUND_UP(strength * fls(8 * req->ecc.sectorsize), in atmel_pmecc_prepare_user_req()
323 eccstrength = strength; in atmel_pmecc_prepare_user_req()
326 if (req->ecc.strength != ATMEL_PMECC_MAXIMIZE_ECC_STRENGTH) in atmel_pmecc_prepare_user_req()
334 req->ecc.strength = eccstrength; in atmel_pmecc_prepare_user_req()
348 int strength, size, ret; in atmel_pmecc_create_user() local
357 size += ((2 * req->ecc.strength) + 1) * sizeof(u16) * in atmel_pmecc_create_user()
358 (2 + req->ecc.strength + 2); in atmel_pmecc_create_user()
360 size += (req->ecc.strength + 1) * sizeof(u16); in atmel_pmecc_create_user()
363 size += (req->ecc.strength + 1) * sizeof(s32) * 3; in atmel_pmecc_create_user()
372 user->si = user->partial_syn + ((2 * req->ecc.strength) + 1); in atmel_pmecc_create_user()
373 user->lmu = user->si + ((2 * req->ecc.strength) + 1); in atmel_pmecc_create_user()
374 user->smu = user->lmu + (req->ecc.strength + 1); in atmel_pmecc_create_user()
376 (((2 * req->ecc.strength) + 1) * in atmel_pmecc_create_user()
377 (req->ecc.strength + 2)), in atmel_pmecc_create_user()
379 user->dmu = user->mu + req->ecc.strength + 1; in atmel_pmecc_create_user()
380 user->delta = user->dmu + req->ecc.strength + 1; in atmel_pmecc_create_user()
390 for (strength = 0; strength < pmecc->caps->nstrengths; strength++) { in atmel_pmecc_create_user()
391 if (pmecc->caps->strengths[strength] == req->ecc.strength) in atmel_pmecc_create_user()
395 user->cache.cfg = PMECC_CFG_BCH_STRENGTH(strength) | in atmel_pmecc_create_user()
423 int strength = get_strength(user); in atmel_pmecc_gen_syndrome() local
428 for (i = 0; i < strength; i++) { in atmel_pmecc_gen_syndrome()
442 int strength = get_strength(user); in atmel_pmecc_substitute() local
455 memset(&si[1], 0, sizeof(s16) * ((2 * strength) - 1)); in atmel_pmecc_substitute()
459 for (i = 1; i < 2 * strength; i += 2) { in atmel_pmecc_substitute()
466 for (i = 2, j = 1; j <= strength; i = ++j << 1) { in atmel_pmecc_substitute()
488 int strength = get_strength(user); in atmel_pmecc_get_sigma() local
489 int num = 2 * strength + 1; in atmel_pmecc_get_sigma()
534 memset(&smu[(strength + 1) * num], 0, sizeof(s16) * num); in atmel_pmecc_get_sigma()
536 for (i = 1; i <= strength; i++) { in atmel_pmecc_get_sigma()
543 tmp = ((strength - (lmu[i] >> 1) - 1) / 2); in atmel_pmecc_get_sigma()
544 if ((strength - (lmu[i] >> 1) - 1) & 0x1) in atmel_pmecc_get_sigma()
551 smu[(strength + 1) * num + j] = in atmel_pmecc_get_sigma()
554 lmu[strength + 1] = lmu[i]; in atmel_pmecc_get_sigma()
612 if (i >= strength) in atmel_pmecc_get_sigma()
638 int strength = get_strength(user); in atmel_pmecc_err_location() local
640 int num = (2 * strength) + 1; in atmel_pmecc_err_location()
646 for (i = 0; i <= user->lmu[strength + 1] >> 1; i++) { in atmel_pmecc_err_location()
647 writel_relaxed(smu[(strength + 1) * num + i], in atmel_pmecc_err_location()
657 writel((sector_size * 8) + (degree * strength), in atmel_pmecc_err_location()
672 if (roots_nbr == user->lmu[strength + 1] >> 1) in atmel_pmecc_err_location()