Lines Matching refs:mtd
14 * can be found in Documentation/driver-api/mtd/nand_ecc.rst
20 #include <linux/mtd/nand.h>
21 #include <linux/mtd/nand-ecc-sw-hamming.h>
471 struct mtd_info *mtd = nanddev_to_mtd(nand);
474 if (!mtd->ooblayout) {
475 switch (mtd->oobsize) {
478 mtd_set_ooblayout(mtd, nand_get_small_page_ooblayout());
482 mtd_set_ooblayout(mtd,
508 engine_conf->calc_buf = kzalloc(mtd->oobsize, GFP_KERNEL);
509 engine_conf->code_buf = kzalloc(mtd->oobsize, GFP_KERNEL);
516 nand->ecc.ctx.nsteps = mtd->writesize / conf->step_size;
549 struct mtd_info *mtd = nanddev_to_mtd(nand);
578 return mtd_ooblayout_set_eccbytes(mtd, ecccalc, (void *)req->oobbuf.out,
586 struct mtd_info *mtd = nanddev_to_mtd(nand);
612 ret = mtd_ooblayout_get_eccbytes(mtd, ecccode, req->oobbuf.in, 0,
629 mtd->ecc_stats.failed++;
631 mtd->ecc_stats.corrected += stat;