Lines Matching refs:mtd
40 struct mtd_info mtd; member
48 static void ndfc_select_chip(struct mtd_info *mtd, int chip) in ndfc_select_chip() argument
51 struct nand_chip *nchip = mtd->priv; in ndfc_select_chip()
63 static void ndfc_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl) in ndfc_hwcontrol() argument
65 struct nand_chip *chip = mtd->priv; in ndfc_hwcontrol()
77 static int ndfc_ready(struct mtd_info *mtd) in ndfc_ready() argument
79 struct nand_chip *chip = mtd->priv; in ndfc_ready()
85 static void ndfc_enable_hwecc(struct mtd_info *mtd, int mode) in ndfc_enable_hwecc() argument
88 struct nand_chip *chip = mtd->priv; in ndfc_enable_hwecc()
97 static int ndfc_calculate_ecc(struct mtd_info *mtd, in ndfc_calculate_ecc() argument
100 struct nand_chip *chip = mtd->priv; in ndfc_calculate_ecc()
122 static void ndfc_read_buf(struct mtd_info *mtd, uint8_t *buf, int len) in ndfc_read_buf() argument
124 struct nand_chip *chip = mtd->priv; in ndfc_read_buf()
132 static void ndfc_write_buf(struct mtd_info *mtd, const uint8_t *buf, int len) in ndfc_write_buf() argument
134 struct nand_chip *chip = mtd->priv; in ndfc_write_buf()
171 ndfc->mtd.priv = chip; in ndfc_chip_init()
172 ndfc->mtd.dev.parent = &ndfc->ofdev->dev; in ndfc_chip_init()
179 ndfc->mtd.name = kasprintf(GFP_KERNEL, "%s.%s", in ndfc_chip_init()
181 if (!ndfc->mtd.name) { in ndfc_chip_init()
186 ret = nand_scan(&ndfc->mtd, 1); in ndfc_chip_init()
190 ret = mtd_device_parse_register(&ndfc->mtd, NULL, &ppdata, NULL, 0); in ndfc_chip_init()
195 kfree(ndfc->mtd.name); in ndfc_chip_init()
263 nand_release(&ndfc->mtd); in ndfc_remove()
264 kfree(ndfc->mtd.name); in ndfc_remove()