Lines Matching defs:mtd
11 * Based on drivers/mtd/nand/nomadik_nand.c (removed in v3.8)
28 #include <linux/mtd/mtd.h>
29 #include <linux/mtd/nand-ecc-sw-hamming.h>
30 #include <linux/mtd/rawnand.h>
33 #include <linux/mtd/partitions.h>
37 #include <mtd/mtd-abi.h>
167 static int fsmc_ecc1_ooblayout_ecc(struct mtd_info *mtd, int section,
170 struct nand_chip *chip = mtd_to_nand(mtd);
181 static int fsmc_ecc1_ooblayout_free(struct mtd_info *mtd, int section,
184 struct nand_chip *chip = mtd_to_nand(mtd);
194 oobregion->length = mtd->oobsize - oobregion->offset;
210 static int fsmc_ecc4_ooblayout_ecc(struct mtd_info *mtd, int section,
213 struct nand_chip *chip = mtd_to_nand(mtd);
220 if (!section && mtd->writesize <= 512)
228 static int fsmc_ecc4_ooblayout_free(struct mtd_info *mtd, int section,
231 struct nand_chip *chip = mtd_to_nand(mtd);
241 oobregion->length = mtd->oobsize - oobregion->offset;
708 struct mtd_info *mtd = nand_to_mtd(chip);
735 ret = mtd_ooblayout_ecc(mtd, group++, &oobregion);
759 mtd->ecc_stats.failed++;
761 mtd->ecc_stats.corrected += stat;
771 * @mtd: mtd info structure
911 struct mtd_info *mtd = nand_to_mtd(nand);
929 switch (mtd->oobsize) {
939 mtd->oobsize);
943 mtd_set_ooblayout(mtd, &fsmc_ecc4_ooblayout_ops);
980 switch (mtd->oobsize) {
984 mtd_set_ooblayout(mtd,
990 mtd->oobsize);
1024 struct mtd_info *mtd;
1096 mtd = nand_to_mtd(&host->nand);
1099 mtd->dev.parent = &pdev->dev;
1136 mtd->name = "nand";
1137 ret = mtd_device_register(mtd, NULL, 0);