Lines Matching full:this

28  * @this:	NAND chip object
32 static u_char au_read_byte(struct nand_chip *this) in au_read_byte() argument
34 u_char ret = readb(this->legacy.IO_ADDR_R); in au_read_byte()
41 * @this: NAND chip object
46 static void au_write_byte(struct nand_chip *this, u_char byte) in au_write_byte() argument
48 writeb(byte, this->legacy.IO_ADDR_W); in au_write_byte()
54 * @this: NAND chip object
58 static u_char au_read_byte16(struct nand_chip *this) in au_read_byte16() argument
60 u_char ret = (u_char) cpu_to_le16(readw(this->legacy.IO_ADDR_R)); in au_read_byte16()
67 * @this: NAND chip object
72 static void au_write_byte16(struct nand_chip *this, u_char byte) in au_write_byte16() argument
74 writew(le16_to_cpu((u16) byte), this->legacy.IO_ADDR_W); in au_write_byte16()
80 * @this: NAND chip object
86 static void au_write_buf(struct nand_chip *this, const u_char *buf, int len) in au_write_buf() argument
91 writeb(buf[i], this->legacy.IO_ADDR_W); in au_write_buf()
98 * @this: NAND chip object
104 static void au_read_buf(struct nand_chip *this, u_char *buf, int len) in au_read_buf() argument
109 buf[i] = readb(this->legacy.IO_ADDR_R); in au_read_buf()
116 * @this: NAND chip object
122 static void au_write_buf16(struct nand_chip *this, const u_char *buf, int len) in au_write_buf16() argument
129 writew(p[i], this->legacy.IO_ADDR_W); in au_write_buf16()
137 * @this: NAND chip object
143 static void au_read_buf16(struct nand_chip *this, u_char *buf, int len) in au_read_buf16() argument
150 p[i] = readw(this->legacy.IO_ADDR_R); in au_read_buf16()
170 struct nand_chip *this = mtd_to_nand(mtd); in au1550_hwcontrol() local
171 struct au1550nd_ctx *ctx = container_of(this, struct au1550nd_ctx, in au1550_hwcontrol()
177 this->legacy.IO_ADDR_W = ctx->base + MEM_STNAND_CMD; in au1550_hwcontrol()
181 this->legacy.IO_ADDR_W = ctx->base + MEM_STNAND_DATA; in au1550_hwcontrol()
185 this->legacy.IO_ADDR_W = ctx->base + MEM_STNAND_ADDR; in au1550_hwcontrol()
189 this->legacy.IO_ADDR_W = ctx->base + MEM_STNAND_DATA; in au1550_hwcontrol()
190 /* FIXME: Nobody knows why this is necessary, in au1550_hwcontrol()
206 this->legacy.IO_ADDR_R = this->legacy.IO_ADDR_W; in au1550_hwcontrol()
211 int au1550_device_ready(struct nand_chip *this) in au1550_device_ready() argument
218 * Forbid driving -CE manually permitting the NAND controller to do this.
225 * @this: NAND chip object
228 static void au1550_select_chip(struct nand_chip *this, int chip) in au1550_select_chip() argument
234 * @this: NAND chip object
236 * @column: the column address for this command, -1 if none
237 * @page_addr: the page address for this command, -1 if none
239 static void au1550_command(struct nand_chip *this, unsigned command, in au1550_command() argument
242 struct mtd_info *mtd = nand_to_mtd(this); in au1550_command()
243 struct au1550nd_ctx *ctx = container_of(this, struct au1550nd_ctx, in au1550_command()
267 ctx->write_byte(this, readcmd); in au1550_command()
269 ctx->write_byte(this, command); in au1550_command()
280 if (this->options & NAND_BUSWIDTH_16 && in au1550_command()
283 ctx->write_byte(this, column); in au1550_command()
286 ctx->write_byte(this, (u8)(page_addr & 0xff)); in au1550_command()
295 * are allowed while we do this as we don't in au1550_command()
304 ctx->write_byte(this, (u8)(page_addr >> 8)); in au1550_command()
306 if (this->options & NAND_ROW_ADDR_3) in au1550_command()
307 ctx->write_byte(this, in au1550_command()
340 for (i = this->legacy.chip_delay; in au1550_command()
341 !this->legacy.dev_ready(this) && i > 0; --i) in au1550_command()
349 /* Apply this short delay always to ensure that we do wait tWB. */ in au1550_command()
352 while(!this->legacy.dev_ready(this)); in au1550_command()
365 /* figure out the decoded range of this CS */ in find_nand_cs()
380 struct nand_chip *this; in au1550nd_probe() local
414 this = &ctx->chip; in au1550nd_probe()
415 mtd = nand_to_mtd(this); in au1550nd_probe()
427 this->legacy.dev_ready = au1550_device_ready; in au1550nd_probe()
428 this->legacy.select_chip = au1550_select_chip; in au1550nd_probe()
429 this->legacy.cmdfunc = au1550_command; in au1550nd_probe()
432 this->legacy.chip_delay = 30; in au1550nd_probe()
433 this->ecc.mode = NAND_ECC_SOFT; in au1550nd_probe()
434 this->ecc.algo = NAND_ECC_HAMMING; in au1550nd_probe()
437 this->options |= NAND_BUSWIDTH_16; in au1550nd_probe()
439 this->legacy.read_byte = (pd->devwidth) ? au_read_byte16 : au_read_byte; in au1550nd_probe()
441 this->legacy.write_buf = (pd->devwidth) ? au_write_buf16 : au_write_buf; in au1550nd_probe()
442 this->legacy.read_buf = (pd->devwidth) ? au_read_buf16 : au_read_buf; in au1550nd_probe()
444 ret = nand_scan(this, 1); in au1550nd_probe()