Lines Matching refs:ctx

200 	struct au1550nd_ctx *ctx = container_of(mtd, struct au1550nd_ctx, info);  in au1550_hwcontrol()  local
206 this->IO_ADDR_W = ctx->base + MEM_STNAND_CMD; in au1550_hwcontrol()
210 this->IO_ADDR_W = ctx->base + MEM_STNAND_DATA; in au1550_hwcontrol()
214 this->IO_ADDR_W = ctx->base + MEM_STNAND_ADDR; in au1550_hwcontrol()
218 this->IO_ADDR_W = ctx->base + MEM_STNAND_DATA; in au1550_hwcontrol()
226 alchemy_wrsmem((1 << (4 + ctx->cs)), AU1000_MEM_STNDCTL); in au1550_hwcontrol()
270 struct au1550nd_ctx *ctx = container_of(mtd, struct au1550nd_ctx, info); in au1550_command() local
294 ctx->write_byte(mtd, readcmd); in au1550_command()
296 ctx->write_byte(mtd, command); in au1550_command()
310 ctx->write_byte(mtd, column); in au1550_command()
313 ctx->write_byte(mtd, (u8)(page_addr & 0xff)); in au1550_command()
331 ctx->write_byte(mtd, (u8)(page_addr >> 8)); in au1550_command()
335 ctx->write_byte(mtd, in au1550_command()
406 struct au1550nd_ctx *ctx; in au1550nd_probe() local
417 ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); in au1550nd_probe()
418 if (!ctx) in au1550nd_probe()
433 ctx->base = ioremap_nocache(r->start, 0x1000); in au1550nd_probe()
434 if (!ctx->base) { in au1550nd_probe()
440 this = &ctx->chip; in au1550nd_probe()
441 ctx->info.priv = this; in au1550nd_probe()
442 ctx->info.dev.parent = &pdev->dev; in au1550nd_probe()
451 ctx->cs = cs; in au1550nd_probe()
465 ctx->write_byte = (pd->devwidth) ? au_write_byte16 : au_write_byte; in au1550nd_probe()
470 ret = nand_scan(&ctx->info, 1); in au1550nd_probe()
476 mtd_device_register(&ctx->info, pd->parts, pd->num_parts); in au1550nd_probe()
478 platform_set_drvdata(pdev, ctx); in au1550nd_probe()
483 iounmap(ctx->base); in au1550nd_probe()
487 kfree(ctx); in au1550nd_probe()
493 struct au1550nd_ctx *ctx = platform_get_drvdata(pdev); in au1550nd_remove() local
496 nand_release(&ctx->info); in au1550nd_remove()
497 iounmap(ctx->base); in au1550nd_remove()
499 kfree(ctx); in au1550nd_remove()