Lines Matching refs:off

41 static int nand_dump(struct mtd_info *mtd, ulong off, int only_oob,  in nand_dump()  argument
50 off = last + mtd->writesize; in nand_dump()
52 last = off; in nand_dump()
66 off &= ~(mtd->writesize - 1); in nand_dump()
67 loff_t addr = (loff_t) off; in nand_dump()
77 printf("Error (%d) reading page %08lx\n", i, off); in nand_dump()
81 printf("Page %08lx dump:\n", off); in nand_dump()
158 ulong off; in do_nand_status() local
168 for (off = 0; off < mtd->size; off += mtd->erasesize) { in do_nand_status()
169 int s = nand_get_lock_status(mtd, off); in do_nand_status()
172 if (s != last_status && off != 0) { in do_nand_status()
173 print_status(block_start, off, mtd->erasesize, in do_nand_status()
175 block_start = off; in do_nand_status()
180 print_status(block_start, off, mtd->erasesize, last_status); in do_nand_status()
318 static int raw_access(struct mtd_info *mtd, ulong addr, loff_t off, in raw_access() argument
323 while (count && (off + mtd->writesize) <= mtd->size) { in raw_access()
328 if (mtd_is_aligned_with_block_size(mtd, off) && in raw_access()
329 mtd_block_isbad(mtd, off)) { in raw_access()
331 off & ~(mtd->erasesize - 1)); in raw_access()
332 off += mtd->erasesize; in raw_access()
346 ret = mtd_read_oob(mtd, off, &ops); in raw_access()
348 ret = mtd_write_oob(mtd, off, &ops); in raw_access()
350 ret = nand_verify_page_oob(mtd, &ops, off); in raw_access()
355 __func__, (long long)off, ret); in raw_access()
360 off += mtd->writesize; in raw_access()
396 loff_t off, size, maxsize; in do_nand() local
465 for (off = 0; off < mtd->size; off += mtd->erasesize) in do_nand()
466 if (nand_block_isbad(mtd, off)) in do_nand()
467 printf(" %08llx\n", (unsigned long long)off); in do_nand()
518 if (mtd_arg_off_size(argc - o, argv + o, &dev, &off, &size, in do_nand()
529 opts.offset = off; in do_nand()
558 off = (int)simple_strtoul(argv[2], NULL, 16); in do_nand()
559 ret = nand_dump(mtd, off, !strcmp(&cmd[4], ".oob"), repeat); in do_nand()
587 if (mtd_arg_off(argv[3], &dev, &off, &size, &maxsize, in do_nand()
617 if (mtd_arg_off_size(argc - 3, argv + 3, &dev, &off, in do_nand()
628 adjust_size_for_badblocks(&size, off, dev); in do_nand()
637 ret = nand_read_skip_bad(mtd, off, &rwsize, in do_nand()
641 ret = nand_write_skip_bad(mtd, off, &rwsize, in do_nand()
651 ret = nand_write_skip_bad(mtd, off, &rwsize, NULL, in do_nand()
664 ret = mtd_read_oob(mtd, off, &ops); in do_nand()
666 ret = mtd_write_oob(mtd, off, &ops); in do_nand()
668 ret = raw_access(mtd, addr, off, pagecount, read, in do_nand()
689 if (!str2off(argv[2], &off)) { in do_nand()
702 endoff = off + size; in do_nand()
708 off = round_down(off, mtd->erasesize); in do_nand()
710 size = endoff - off; in do_nand()
712 dev, off, size, mtd->erasesize); in do_nand()
713 while (off < endoff) { in do_nand()
714 ret = nand_torture(mtd, off); in do_nand()
717 printf(" block at 0x%llx failed\n", off); in do_nand()
721 off += mtd->erasesize; in do_nand()
790 if (mtd_arg_off_size(argc - 2, argv + 2, &dev, &off, &size, in do_nand()
800 if (!nand_unlock(mtd, off, size, allexcept)) { in do_nand()