Lines Matching refs:mtd
33 struct mtd_info mtd; member
44 static void socrates_nand_write_buf(struct mtd_info *mtd, in socrates_nand_write_buf() argument
48 struct nand_chip *this = mtd->priv; in socrates_nand_write_buf()
64 static void socrates_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len) in socrates_nand_read_buf() argument
67 struct nand_chip *this = mtd->priv; in socrates_nand_read_buf()
84 static uint8_t socrates_nand_read_byte(struct mtd_info *mtd) in socrates_nand_read_byte() argument
87 socrates_nand_read_buf(mtd, &byte, sizeof(byte)); in socrates_nand_read_byte()
95 static uint16_t socrates_nand_read_word(struct mtd_info *mtd) in socrates_nand_read_word() argument
98 socrates_nand_read_buf(mtd, (uint8_t *)&word, sizeof(word)); in socrates_nand_read_word()
105 static void socrates_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, in socrates_nand_cmd_ctrl() argument
108 struct nand_chip *nand_chip = mtd->priv; in socrates_nand_cmd_ctrl()
131 static int socrates_nand_device_ready(struct mtd_info *mtd) in socrates_nand_device_ready() argument
133 struct nand_chip *nand_chip = mtd->priv; in socrates_nand_device_ready()
147 struct mtd_info *mtd; in socrates_nand_probe() local
163 mtd = &host->mtd; in socrates_nand_probe()
168 mtd->priv = nand_chip; in socrates_nand_probe()
169 mtd->name = "socrates_nand"; in socrates_nand_probe()
170 mtd->dev.parent = &ofdev->dev; in socrates_nand_probe()
192 if (nand_scan_ident(mtd, 1, NULL)) { in socrates_nand_probe()
198 if (nand_scan_tail(mtd)) { in socrates_nand_probe()
203 res = mtd_device_parse_register(mtd, NULL, &ppdata, NULL, 0); in socrates_nand_probe()
207 nand_release(mtd); in socrates_nand_probe()
220 struct mtd_info *mtd = &host->mtd; in socrates_nand_remove() local
222 nand_release(mtd); in socrates_nand_remove()