Lines Matching refs:mtd
66 struct mtd_info mtd; member
80 static struct platform_device *mtd_to_platdev(struct mtd_info *mtd) in mtd_to_platdev() argument
82 struct nand_chip *chip = mtd->priv; in mtd_to_platdev()
106 static uint8_t txx9ndfmc_read_byte(struct mtd_info *mtd) in txx9ndfmc_read_byte() argument
108 struct platform_device *dev = mtd_to_platdev(mtd); in txx9ndfmc_read_byte()
113 static void txx9ndfmc_write_buf(struct mtd_info *mtd, const uint8_t *buf, in txx9ndfmc_write_buf() argument
116 struct platform_device *dev = mtd_to_platdev(mtd); in txx9ndfmc_write_buf()
126 static void txx9ndfmc_read_buf(struct mtd_info *mtd, uint8_t *buf, int len) in txx9ndfmc_read_buf() argument
128 struct platform_device *dev = mtd_to_platdev(mtd); in txx9ndfmc_read_buf()
135 static void txx9ndfmc_cmd_ctrl(struct mtd_info *mtd, int cmd, in txx9ndfmc_cmd_ctrl() argument
138 struct nand_chip *chip = mtd->priv; in txx9ndfmc_cmd_ctrl()
167 static int txx9ndfmc_dev_ready(struct mtd_info *mtd) in txx9ndfmc_dev_ready() argument
169 struct platform_device *dev = mtd_to_platdev(mtd); in txx9ndfmc_dev_ready()
174 static int txx9ndfmc_calculate_ecc(struct mtd_info *mtd, const uint8_t *dat, in txx9ndfmc_calculate_ecc() argument
177 struct platform_device *dev = mtd_to_platdev(mtd); in txx9ndfmc_calculate_ecc()
178 struct nand_chip *chip = mtd->priv; in txx9ndfmc_calculate_ecc()
195 static int txx9ndfmc_correct_data(struct mtd_info *mtd, unsigned char *buf, in txx9ndfmc_correct_data() argument
198 struct nand_chip *chip = mtd->priv; in txx9ndfmc_correct_data()
215 static void txx9ndfmc_enable_hwecc(struct mtd_info *mtd, int mode) in txx9ndfmc_enable_hwecc() argument
217 struct platform_device *dev = mtd_to_platdev(mtd); in txx9ndfmc_enable_hwecc()
258 static int txx9ndfmc_nand_scan(struct mtd_info *mtd) in txx9ndfmc_nand_scan() argument
260 struct nand_chip *chip = mtd->priv; in txx9ndfmc_nand_scan()
263 ret = nand_scan_ident(mtd, 1, NULL); in txx9ndfmc_nand_scan()
265 if (mtd->writesize >= 512) { in txx9ndfmc_nand_scan()
270 ret = nand_scan_tail(mtd); in txx9ndfmc_nand_scan()
316 struct mtd_info *mtd; in txx9ndfmc_probe() local
325 mtd = &txx9_priv->mtd; in txx9ndfmc_probe()
326 mtd->dev.parent = &dev->dev; in txx9ndfmc_probe()
328 mtd->priv = chip; in txx9ndfmc_probe()
366 if (txx9ndfmc_nand_scan(mtd)) { in txx9ndfmc_probe()
371 mtd->name = txx9_priv->mtdname; in txx9ndfmc_probe()
373 mtd_device_parse_register(mtd, NULL, NULL, NULL, 0); in txx9ndfmc_probe()
374 drvdata->mtds[i] = mtd; in txx9ndfmc_probe()
388 struct mtd_info *mtd = drvdata->mtds[i]; in txx9ndfmc_remove() local
392 if (!mtd) in txx9ndfmc_remove()
394 chip = mtd->priv; in txx9ndfmc_remove()
397 nand_release(mtd); in txx9ndfmc_remove()