Lines Matching refs:mtd
17 #include <linux/mtd/mtd.h>
18 #include <linux/mtd/nand.h>
19 #include <linux/mtd/nand-ecc-mxic.h>
134 static int mxic_ecc_ooblayout_ecc(struct mtd_info *mtd, int section,
137 struct nand_device *nand = mtd_to_nanddev(mtd);
149 static int mxic_ecc_ooblayout_free(struct mtd_info *mtd, int section,
152 struct nand_device *nand = mtd_to_nanddev(mtd);
225 struct mtd_info *mtd = nanddev_to_mtd(nand);
240 if (mtd->oobsize < 64) {
245 mtd_set_ooblayout(mtd, &mxic_ecc_ooblayout_ops);
261 steps = mtd->writesize / step_size;
267 steps = mtd->writesize / conf->step_size;
289 if (spare_size[idx] * steps <= mtd->oobsize)
303 ctx->data_step_sz = mtd->writesize / steps;
304 ctx->oob_step_sz = mtd->oobsize / steps;
315 ctx->oobwithstat = kmalloc(mtd->oobsize + (ctx->steps * STAT_BYTES),
523 struct mtd_info *mtd = nanddev_to_mtd(nand);
538 mtd->ecc_stats.failed++;
544 mtd->ecc_stats.corrected += stat;
557 struct mtd_info *mtd = nanddev_to_mtd(nand);
602 mtd_ooblayout_get_eccbytes(mtd,