Lines Matching refs:nand

105 int nand_ecc_init_ctx(struct nand_device *nand)  in nand_ecc_init_ctx()  argument
107 if (!nand->ecc.engine->ops->init_ctx) in nand_ecc_init_ctx()
110 return nand->ecc.engine->ops->init_ctx(nand); in nand_ecc_init_ctx()
118 void nand_ecc_cleanup_ctx(struct nand_device *nand) in nand_ecc_cleanup_ctx() argument
120 if (nand->ecc.engine->ops->cleanup_ctx) in nand_ecc_cleanup_ctx()
121 nand->ecc.engine->ops->cleanup_ctx(nand); in nand_ecc_cleanup_ctx()
130 int nand_ecc_prepare_io_req(struct nand_device *nand, in nand_ecc_prepare_io_req() argument
133 if (!nand->ecc.engine->ops->prepare_io_req) in nand_ecc_prepare_io_req()
136 return nand->ecc.engine->ops->prepare_io_req(nand, req); in nand_ecc_prepare_io_req()
145 int nand_ecc_finish_io_req(struct nand_device *nand, in nand_ecc_finish_io_req() argument
148 if (!nand->ecc.engine->ops->finish_io_req) in nand_ecc_finish_io_req()
151 return nand->ecc.engine->ops->finish_io_req(nand, req); in nand_ecc_finish_io_req()
159 struct nand_device *nand = mtd_to_nanddev(mtd); in nand_ooblayout_ecc_sp() local
160 unsigned int total_ecc_bytes = nand->ecc.ctx.total; in nand_ooblayout_ecc_sp()
219 struct nand_device *nand = mtd_to_nanddev(mtd); in nand_ooblayout_ecc_lp() local
220 unsigned int total_ecc_bytes = nand->ecc.ctx.total; in nand_ooblayout_ecc_lp()
234 struct nand_device *nand = mtd_to_nanddev(mtd); in nand_ooblayout_free_lp() local
235 unsigned int total_ecc_bytes = nand->ecc.ctx.total; in nand_ooblayout_free_lp()
264 struct nand_device *nand = mtd_to_nanddev(mtd); in nand_ooblayout_ecc_lp_hamming() local
265 unsigned int total_ecc_bytes = nand->ecc.ctx.total; in nand_ooblayout_ecc_lp_hamming()
291 struct nand_device *nand = mtd_to_nanddev(mtd); in nand_ooblayout_free_lp_hamming() local
292 unsigned int total_ecc_bytes = nand->ecc.ctx.total; in nand_ooblayout_free_lp_hamming()
421 void of_get_nand_ecc_user_config(struct nand_device *nand) in of_get_nand_ecc_user_config() argument
423 struct device_node *dn = nanddev_get_of_node(nand); in of_get_nand_ecc_user_config()
426 nand->ecc.user_conf.engine_type = of_get_nand_ecc_engine_type(dn); in of_get_nand_ecc_user_config()
427 nand->ecc.user_conf.algo = of_get_nand_ecc_algo(dn); in of_get_nand_ecc_user_config()
428 nand->ecc.user_conf.placement = of_get_nand_ecc_placement(dn); in of_get_nand_ecc_user_config()
432 nand->ecc.user_conf.strength = strength; in of_get_nand_ecc_user_config()
436 nand->ecc.user_conf.step_size = size; in of_get_nand_ecc_user_config()
439 nand->ecc.user_conf.flags |= NAND_ECC_MAXIMIZE_STRENGTH; in of_get_nand_ecc_user_config()
460 bool nand_ecc_is_strong_enough(struct nand_device *nand) in nand_ecc_is_strong_enough() argument
462 const struct nand_ecc_props *reqs = nanddev_get_ecc_requirements(nand); in nand_ecc_is_strong_enough()
463 const struct nand_ecc_props *conf = nanddev_get_ecc_conf(nand); in nand_ecc_is_strong_enough()
464 struct mtd_info *mtd = nanddev_to_mtd(nand); in nand_ecc_is_strong_enough()