Lines Matching refs:mtd

42 	struct mtd_info mtd;  member
50 static void ndfc_select_chip(struct mtd_info *mtd, int chip) in ndfc_select_chip() argument
53 struct nand_chip *nchip = mtd->priv; in ndfc_select_chip()
65 static void ndfc_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl) in ndfc_hwcontrol() argument
67 struct nand_chip *chip = mtd->priv; in ndfc_hwcontrol()
79 static int ndfc_ready(struct mtd_info *mtd) in ndfc_ready() argument
81 struct nand_chip *chip = mtd->priv; in ndfc_ready()
87 static void ndfc_enable_hwecc(struct mtd_info *mtd, int mode) in ndfc_enable_hwecc() argument
90 struct nand_chip *chip = mtd->priv; in ndfc_enable_hwecc()
99 static int ndfc_calculate_ecc(struct mtd_info *mtd, in ndfc_calculate_ecc() argument
102 struct nand_chip *chip = mtd->priv; in ndfc_calculate_ecc()
124 static void ndfc_read_buf(struct mtd_info *mtd, uint8_t *buf, int len) in ndfc_read_buf() argument
126 struct nand_chip *chip = mtd->priv; in ndfc_read_buf()
134 static void ndfc_write_buf(struct mtd_info *mtd, const uint8_t *buf, int len) in ndfc_write_buf() argument
136 struct nand_chip *chip = mtd->priv; in ndfc_write_buf()
173 ndfc->mtd.priv = chip; in ndfc_chip_init()
174 ndfc->mtd.owner = THIS_MODULE; in ndfc_chip_init()
181 ndfc->mtd.name = kasprintf(GFP_KERNEL, "%s.%s", in ndfc_chip_init()
183 if (!ndfc->mtd.name) { in ndfc_chip_init()
188 ret = nand_scan(&ndfc->mtd, 1); in ndfc_chip_init()
192 ret = mtd_device_parse_register(&ndfc->mtd, NULL, &ppdata, NULL, 0); in ndfc_chip_init()
197 kfree(ndfc->mtd.name); in ndfc_chip_init()
265 nand_release(&ndfc->mtd); in ndfc_remove()
266 kfree(ndfc->mtd.name); in ndfc_remove()