Lines Matching refs:nuc900_nand
58 struct nuc900_nand { struct
82 struct nuc900_nand *nand; in nuc900_nand_read_byte() argument
84 nand = container_of(mtd, struct nuc900_nand, mtd); in nuc900_nand_read_byte()
95 struct nuc900_nand *nand; in nuc900_nand_read_buf()
97 nand = container_of(mtd, struct nuc900_nand, mtd); in nuc900_nand_read_buf()
107 struct nuc900_nand *nand; in nuc900_nand_write_buf()
109 nand = container_of(mtd, struct nuc900_nand, mtd); in nuc900_nand_write_buf()
119 struct nuc900_nand *nand; in nuc900_verify_buf()
121 nand = container_of(mtd, struct nuc900_nand, mtd); in nuc900_verify_buf()
131 static int nuc900_check_rb(struct nuc900_nand *nand) in nuc900_check_rb()
144 struct nuc900_nand *nand; in nuc900_nand_devready()
147 nand = container_of(mtd, struct nuc900_nand, mtd); in nuc900_nand_devready()
157 struct nuc900_nand *nand; in nuc900_nand_command_lp()
159 nand = container_of(mtd, struct nuc900_nand, mtd); in nuc900_nand_command_lp()
244 static void nuc900_nand_enable(struct nuc900_nand *nand) in nuc900_nand_enable()
267 struct nuc900_nand *nuc900_nand; in nuc900_nand_probe() local
274 nuc900_nand = kzalloc(sizeof(struct nuc900_nand), GFP_KERNEL); in nuc900_nand_probe()
275 if (!nuc900_nand) in nuc900_nand_probe()
277 chip = &(nuc900_nand->chip); in nuc900_nand_probe()
279 nuc900_nand->mtd.priv = chip; in nuc900_nand_probe()
280 nuc900_nand->mtd.owner = THIS_MODULE; in nuc900_nand_probe()
281 spin_lock_init(&nuc900_nand->lock); in nuc900_nand_probe()
283 nuc900_nand->clk = clk_get(&pdev->dev, NULL); in nuc900_nand_probe()
284 if (IS_ERR(nuc900_nand->clk)) { in nuc900_nand_probe()
288 clk_enable(nuc900_nand->clk); in nuc900_nand_probe()
311 nuc900_nand->reg = ioremap(res->start, resource_size(res)); in nuc900_nand_probe()
312 if (!nuc900_nand->reg) { in nuc900_nand_probe()
317 nuc900_nand_enable(nuc900_nand); in nuc900_nand_probe()
319 if (nand_scan(&(nuc900_nand->mtd), 1)) { in nuc900_nand_probe()
324 add_mtd_partitions(&(nuc900_nand->mtd), partitions, in nuc900_nand_probe()
327 platform_set_drvdata(pdev, nuc900_nand); in nuc900_nand_probe()
331 fail3: iounmap(nuc900_nand->reg); in nuc900_nand_probe()
333 fail1: kfree(nuc900_nand); in nuc900_nand_probe()
339 struct nuc900_nand *nuc900_nand = platform_get_drvdata(pdev); in nuc900_nand_remove() local
342 iounmap(nuc900_nand->reg); in nuc900_nand_remove()
347 clk_disable(nuc900_nand->clk); in nuc900_nand_remove()
348 clk_put(nuc900_nand->clk); in nuc900_nand_remove()
350 kfree(nuc900_nand); in nuc900_nand_remove()