Lines Matching defs:mtd
97 #include <linux/mtd/nand.h>
156 static int nand_ooblayout_ecc_sp(struct mtd_info *mtd, int section,
159 struct nand_device *nand = mtd_to_nanddev(mtd);
167 if (mtd->oobsize == 16)
172 if (mtd->oobsize == 8)
182 static int nand_ooblayout_free_sp(struct mtd_info *mtd, int section,
188 if (mtd->oobsize == 16) {
216 static int nand_ooblayout_ecc_lp(struct mtd_info *mtd, int section,
219 struct nand_device *nand = mtd_to_nanddev(mtd);
226 oobregion->offset = mtd->oobsize - oobregion->length;
231 static int nand_ooblayout_free_lp(struct mtd_info *mtd, int section,
234 struct nand_device *nand = mtd_to_nanddev(mtd);
240 oobregion->length = mtd->oobsize - total_ecc_bytes - 2;
261 static int nand_ooblayout_ecc_lp_hamming(struct mtd_info *mtd, int section,
264 struct nand_device *nand = mtd_to_nanddev(mtd);
270 switch (mtd->oobsize) {
282 if (oobregion->offset + oobregion->length > mtd->oobsize)
288 static int nand_ooblayout_free_lp_hamming(struct mtd_info *mtd, int section,
291 struct nand_device *nand = mtd_to_nanddev(mtd);
298 switch (mtd->oobsize) {
314 oobregion->length = mtd->oobsize - oobregion->offset;
464 struct mtd_info *mtd = nanddev_to_mtd(nand);
475 corr = (mtd->writesize * conf->strength) / conf->step_size;
476 ds_corr = (mtd->writesize * reqs->strength) / reqs->step_size;