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()
313 static int raw_access(struct mtd_info *mtd, ulong addr, loff_t off, in raw_access() argument
329 ret = mtd_read_oob(mtd, off, &ops); in raw_access()
331 ret = mtd_write_oob(mtd, off, &ops); in raw_access()
333 ret = nand_verify_page_oob(mtd, &ops, off); in raw_access()
338 __func__, (long long)off, ret); in raw_access()
343 off += mtd->writesize; in raw_access()
378 loff_t off, size, maxsize; in do_nand() local
447 for (off = 0; off < mtd->size; off += mtd->erasesize) in do_nand()
448 if (nand_block_isbad(mtd, off)) in do_nand()
449 printf(" %08llx\n", (unsigned long long)off); in do_nand()
500 if (mtd_arg_off_size(argc - o, argv + o, &dev, &off, &size, in do_nand()
511 opts.offset = off; in do_nand()
540 off = (int)simple_strtoul(argv[2], NULL, 16); in do_nand()
541 ret = nand_dump(mtd, off, !strcmp(&cmd[4], ".oob"), repeat); in do_nand()
569 if (mtd_arg_off(argv[3], &dev, &off, &size, &maxsize, in do_nand()
599 if (mtd_arg_off_size(argc - 3, argv + 3, &dev, &off, in do_nand()
610 adjust_size_for_badblocks(&size, off, dev); in do_nand()
619 ret = nand_read_skip_bad(mtd, off, &rwsize, in do_nand()
623 ret = nand_write_skip_bad(mtd, off, &rwsize, in do_nand()
633 ret = nand_write_skip_bad(mtd, off, &rwsize, NULL, in do_nand()
646 ret = mtd_read_oob(mtd, off, &ops); in do_nand()
648 ret = mtd_write_oob(mtd, off, &ops); in do_nand()
650 ret = raw_access(mtd, addr, off, pagecount, read, in do_nand()
671 if (!str2off(argv[2], &off)) { in do_nand()
684 endoff = off + size; in do_nand()
690 off = round_down(off, mtd->erasesize); in do_nand()
692 size = endoff - off; in do_nand()
694 dev, off, size, mtd->erasesize); in do_nand()
695 while (off < endoff) { in do_nand()
696 ret = nand_torture(mtd, off); in do_nand()
699 printf(" block at 0x%llx failed\n", off); in do_nand()
703 off += mtd->erasesize; in do_nand()
772 if (mtd_arg_off_size(argc - 2, argv + 2, &dev, &off, &size, in do_nand()
782 if (!nand_unlock(mtd, off, size, allexcept)) { in do_nand()