Lines Matching defs:mtd
22 #include <linux/mtd/mtd.h>
23 #include <linux/mtd/partitions.h>
24 #include <linux/mtd/rawnand.h>
396 struct mtd_info *mtd = nand_to_mtd(chip);
398 unsigned int len = mtd->writesize + (oob_required ? mtd->oobsize : 0);
442 ret = nand_change_read_column_op(chip, mtd->writesize, chip->oob_poi,
443 mtd->oobsize, 0);
460 &chip->oob_poi[mtd->oobsize - anand->ecc_total],
477 mtd->ecc_stats.corrected += bf;
487 mtd->ecc_stats.corrected += bf;
491 mtd->ecc_stats.failed++;
515 struct mtd_info *mtd = nand_to_mtd(chip);
516 unsigned int len = mtd->writesize + (oob_required ? mtd->oobsize : 0);
1111 struct mtd_info *mtd = nand_to_mtd(chip);
1116 switch (mtd->writesize) {
1124 dev_err(nfc->dev, "Unsupported page size %d\n", mtd->writesize);
1128 ret = nand_ecc_choose_conf(chip, &anfc_hw_ecc_caps, mtd->oobsize);
1164 mtd_set_ooblayout(mtd, nand_get_large_page_ooblayout());
1166 ecc->steps = mtd->writesize / ecc->size;
1171 ecc_offset = mtd->writesize + mtd->oobsize - anand->ecc_total;
1200 struct mtd_info *mtd = nand_to_mtd(chip);
1203 if (mtd->writesize <= SZ_512)
1213 switch (mtd->writesize) {
1276 struct mtd_info *mtd;
1317 mtd = nand_to_mtd(chip);
1318 mtd->dev.parent = nfc->dev;
1324 if (!mtd->name) {
1335 ret = mtd_device_register(mtd, NULL, 0);