Lines Matching refs:mtd
40 static u_char au_read_byte(struct mtd_info *mtd) in au_read_byte() argument
42 struct nand_chip *this = mtd->priv; in au_read_byte()
55 static void au_write_byte(struct mtd_info *mtd, u_char byte) in au_write_byte() argument
57 struct nand_chip *this = mtd->priv; in au_write_byte()
68 static u_char au_read_byte16(struct mtd_info *mtd) in au_read_byte16() argument
70 struct nand_chip *this = mtd->priv; in au_read_byte16()
83 static void au_write_byte16(struct mtd_info *mtd, u_char byte) in au_write_byte16() argument
85 struct nand_chip *this = mtd->priv; in au_write_byte16()
96 static u16 au_read_word(struct mtd_info *mtd) in au_read_word() argument
98 struct nand_chip *this = mtd->priv; in au_read_word()
112 static void au_write_buf(struct mtd_info *mtd, const u_char *buf, int len) in au_write_buf() argument
115 struct nand_chip *this = mtd->priv; in au_write_buf()
131 static void au_read_buf(struct mtd_info *mtd, u_char *buf, int len) in au_read_buf() argument
134 struct nand_chip *this = mtd->priv; in au_read_buf()
150 static void au_write_buf16(struct mtd_info *mtd, const u_char *buf, int len) in au_write_buf16() argument
153 struct nand_chip *this = mtd->priv; in au_write_buf16()
172 static void au_read_buf16(struct mtd_info *mtd, u_char *buf, int len) in au_read_buf16() argument
175 struct nand_chip *this = mtd->priv; in au_read_buf16()
198 static void au1550_hwcontrol(struct mtd_info *mtd, int cmd) in au1550_hwcontrol() argument
200 struct au1550nd_ctx *ctx = container_of(mtd, struct au1550nd_ctx, info); in au1550_hwcontrol()
201 struct nand_chip *this = mtd->priv; 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 au1550nd_ctx *ctx = container_of(mtd, struct au1550nd_ctx, info); in au1550_command()
271 struct nand_chip *this = mtd->priv; in au1550_command()
276 au1550_hwcontrol(mtd, NAND_CTL_SETCLE); in au1550_command()
283 if (column >= mtd->writesize) { in au1550_command()
285 column -= mtd->writesize; in au1550_command()
294 ctx->write_byte(mtd, readcmd); in au1550_command()
296 ctx->write_byte(mtd, command); in au1550_command()
299 au1550_hwcontrol(mtd, NAND_CTL_CLRCLE); in au1550_command()
302 au1550_hwcontrol(mtd, NAND_CTL_SETALE); in au1550_command()
310 ctx->write_byte(mtd, column); in au1550_command()
313 ctx->write_byte(mtd, (u8)(page_addr & 0xff)); in au1550_command()
328 au1550_hwcontrol(mtd, NAND_CTL_SETNCE); in au1550_command()
331 ctx->write_byte(mtd, (u8)(page_addr >> 8)); in au1550_command()
335 ctx->write_byte(mtd, in au1550_command()
339 au1550_hwcontrol(mtd, NAND_CTL_CLRALE); in au1550_command()
368 for (i = this->chip_delay; !this->dev_ready(mtd) && i > 0; --i) in au1550_command()
372 au1550_hwcontrol(mtd, NAND_CTL_CLRNCE); in au1550_command()
379 while(!this->dev_ready(mtd)); in au1550_command()