Lines Matching refs:mtd
39 static u_char au_read_byte(struct mtd_info *mtd) in au_read_byte() argument
41 struct nand_chip *this = mtd_to_nand(mtd); in au_read_byte()
54 static void au_write_byte(struct mtd_info *mtd, u_char byte) in au_write_byte() argument
56 struct nand_chip *this = mtd_to_nand(mtd); in au_write_byte()
67 static u_char au_read_byte16(struct mtd_info *mtd) in au_read_byte16() argument
69 struct nand_chip *this = mtd_to_nand(mtd); in au_read_byte16()
82 static void au_write_byte16(struct mtd_info *mtd, u_char byte) in au_write_byte16() argument
84 struct nand_chip *this = mtd_to_nand(mtd); in au_write_byte16()
95 static u16 au_read_word(struct mtd_info *mtd) in au_read_word() argument
97 struct nand_chip *this = mtd_to_nand(mtd); in au_read_word()
111 static void au_write_buf(struct mtd_info *mtd, const u_char *buf, int len) in au_write_buf() argument
114 struct nand_chip *this = mtd_to_nand(mtd); in au_write_buf()
130 static void au_read_buf(struct mtd_info *mtd, u_char *buf, int len) in au_read_buf() argument
133 struct nand_chip *this = mtd_to_nand(mtd); in au_read_buf()
149 static void au_write_buf16(struct mtd_info *mtd, const u_char *buf, int len) in au_write_buf16() argument
152 struct nand_chip *this = mtd_to_nand(mtd); in au_write_buf16()
171 static void au_read_buf16(struct mtd_info *mtd, u_char *buf, int len) in au_read_buf16() argument
174 struct nand_chip *this = mtd_to_nand(mtd); in au_read_buf16()
197 static void au1550_hwcontrol(struct mtd_info *mtd, int cmd) in au1550_hwcontrol() argument
199 struct nand_chip *this = mtd_to_nand(mtd); in au1550_hwcontrol()
240 int au1550_device_ready(struct mtd_info *mtd) in au1550_device_ready() argument
257 static void au1550_select_chip(struct mtd_info *mtd, int chip) in au1550_select_chip() argument
268 static void au1550_command(struct mtd_info *mtd, unsigned command, int column, int page_addr) in au1550_command() argument
270 struct nand_chip *this = mtd_to_nand(mtd); in au1550_command()
277 au1550_hwcontrol(mtd, NAND_CTL_SETCLE); in au1550_command()
284 if (column >= mtd->writesize) { in au1550_command()
286 column -= mtd->writesize; in au1550_command()
295 ctx->write_byte(mtd, readcmd); in au1550_command()
297 ctx->write_byte(mtd, command); in au1550_command()
300 au1550_hwcontrol(mtd, NAND_CTL_CLRCLE); in au1550_command()
303 au1550_hwcontrol(mtd, NAND_CTL_SETALE); in au1550_command()
311 ctx->write_byte(mtd, column); in au1550_command()
314 ctx->write_byte(mtd, (u8)(page_addr & 0xff)); in au1550_command()
329 au1550_hwcontrol(mtd, NAND_CTL_SETNCE); in au1550_command()
332 ctx->write_byte(mtd, (u8)(page_addr >> 8)); in au1550_command()
336 ctx->write_byte(mtd, in au1550_command()
340 au1550_hwcontrol(mtd, NAND_CTL_CLRALE); in au1550_command()
369 for (i = this->chip_delay; !this->dev_ready(mtd) && i > 0; --i) in au1550_command()
373 au1550_hwcontrol(mtd, NAND_CTL_CLRNCE); in au1550_command()
380 while(!this->dev_ready(mtd)); in au1550_command()
409 struct mtd_info *mtd; in au1550nd_probe() local
443 mtd = nand_to_mtd(this); in au1550nd_probe()
444 mtd->dev.parent = &pdev->dev; in au1550nd_probe()
473 ret = nand_scan(mtd, 1); in au1550nd_probe()
479 mtd_device_register(mtd, pd->parts, pd->num_parts); in au1550nd_probe()