Lines Matching refs:engine_conf

365 	struct nand_ecc_sw_hamming_conf *engine_conf = nand->ecc.ctx.priv;  in nand_ecc_sw_hamming_calculate()  local
367 bool sm_order = engine_conf ? engine_conf->sm_order : false; in nand_ecc_sw_hamming_calculate()
458 struct nand_ecc_sw_hamming_conf *engine_conf = nand->ecc.ctx.priv; in nand_ecc_sw_hamming_correct() local
460 bool sm_order = engine_conf ? engine_conf->sm_order : false; in nand_ecc_sw_hamming_correct()
470 struct nand_ecc_sw_hamming_conf *engine_conf; in nand_ecc_sw_hamming_init_ctx() local
499 engine_conf = kzalloc(sizeof(*engine_conf), GFP_KERNEL); in nand_ecc_sw_hamming_init_ctx()
500 if (!engine_conf) in nand_ecc_sw_hamming_init_ctx()
503 ret = nand_ecc_init_req_tweaking(&engine_conf->req_ctx, nand); in nand_ecc_sw_hamming_init_ctx()
507 engine_conf->code_size = 3; in nand_ecc_sw_hamming_init_ctx()
508 engine_conf->calc_buf = kzalloc(mtd->oobsize, GFP_KERNEL); in nand_ecc_sw_hamming_init_ctx()
509 engine_conf->code_buf = kzalloc(mtd->oobsize, GFP_KERNEL); in nand_ecc_sw_hamming_init_ctx()
510 if (!engine_conf->calc_buf || !engine_conf->code_buf) { in nand_ecc_sw_hamming_init_ctx()
515 nand->ecc.ctx.priv = engine_conf; in nand_ecc_sw_hamming_init_ctx()
517 nand->ecc.ctx.total = nand->ecc.ctx.nsteps * engine_conf->code_size; in nand_ecc_sw_hamming_init_ctx()
522 nand_ecc_cleanup_req_tweaking(&engine_conf->req_ctx); in nand_ecc_sw_hamming_init_ctx()
523 kfree(engine_conf->calc_buf); in nand_ecc_sw_hamming_init_ctx()
524 kfree(engine_conf->code_buf); in nand_ecc_sw_hamming_init_ctx()
526 kfree(engine_conf); in nand_ecc_sw_hamming_init_ctx()
534 struct nand_ecc_sw_hamming_conf *engine_conf = nand->ecc.ctx.priv; in nand_ecc_sw_hamming_cleanup_ctx() local
536 if (engine_conf) { in nand_ecc_sw_hamming_cleanup_ctx()
537 nand_ecc_cleanup_req_tweaking(&engine_conf->req_ctx); in nand_ecc_sw_hamming_cleanup_ctx()
538 kfree(engine_conf->calc_buf); in nand_ecc_sw_hamming_cleanup_ctx()
539 kfree(engine_conf->code_buf); in nand_ecc_sw_hamming_cleanup_ctx()
540 kfree(engine_conf); in nand_ecc_sw_hamming_cleanup_ctx()
548 struct nand_ecc_sw_hamming_conf *engine_conf = nand->ecc.ctx.priv; in nand_ecc_sw_hamming_prepare_io_req() local
551 int eccbytes = engine_conf->code_size; in nand_ecc_sw_hamming_prepare_io_req()
554 u8 *ecccalc = engine_conf->calc_buf; in nand_ecc_sw_hamming_prepare_io_req()
566 nand_ecc_tweak_req(&engine_conf->req_ctx, req); in nand_ecc_sw_hamming_prepare_io_req()
585 struct nand_ecc_sw_hamming_conf *engine_conf = nand->ecc.ctx.priv; in nand_ecc_sw_hamming_finish_io_req() local
589 int eccbytes = engine_conf->code_size; in nand_ecc_sw_hamming_finish_io_req()
591 u8 *ecccalc = engine_conf->calc_buf; in nand_ecc_sw_hamming_finish_io_req()
592 u8 *ecccode = engine_conf->code_buf; in nand_ecc_sw_hamming_finish_io_req()
607 nand_ecc_restore_req(&engine_conf->req_ctx, req); in nand_ecc_sw_hamming_finish_io_req()
636 nand_ecc_restore_req(&engine_conf->req_ctx, req); in nand_ecc_sw_hamming_finish_io_req()