• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/mtd/nand/

Lines Matching defs:ofs

111 					loff_t ofs, uint64_t len)
117 if (ofs & ((1 << chip->phys_erase_shift) - 1)) {
130 if (ofs + len > mtd->size) {
338 * @ofs: offset from device start
343 static int nand_block_bad(struct mtd_info *mtd, loff_t ofs, int getchip)
350 ofs += mtd->erasesize - mtd->writesize;
352 page = (int)(ofs >> chip->page_shift) & chip->pagemask;
355 chipnr = (int)(ofs >> chip->chip_shift);
390 * @ofs: offset from device start
395 static int nand_default_block_markbad(struct mtd_info *mtd, loff_t ofs)
402 ofs += mtd->erasesize - mtd->writesize;
405 block = (int)(ofs >> chip->bbt_erase_shift);
411 ret = nand_update_bbt(mtd, ofs);
426 ret = nand_do_write_oob(mtd, ofs, &chip->ops);
431 ret = nand_do_write_oob(mtd, ofs, &chip->ops);
434 ofs += mtd->writesize;
469 * @ofs: offset from device start
476 static int nand_block_checkbad(struct mtd_info *mtd, loff_t ofs, int getchip,
482 return chip->block_bad(mtd, ofs, getchip);
485 return nand_isbad_bbt(mtd, ofs, allowbbt);
895 * @ofs: offset to start unlock from
904 static int __nand_unlock(struct mtd_info *mtd, loff_t ofs,
912 page = ofs >> chip->page_shift;
916 page = (ofs + len) >> chip->page_shift;
937 * @ofs: offset to start unlock from
942 int nand_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len)
949 __func__, (unsigned long long)ofs, len);
951 if (check_offs_len(mtd, ofs, len))
955 if (ofs + len == mtd->size)
961 chipnr = ofs >> chip->chip_shift;
973 ret = __nand_unlock(mtd, ofs, len, 0);
988 * @ofs: offset to start unlock from
999 int nand_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len)
1006 __func__, (unsigned long long)ofs, len);
1008 if (check_offs_len(mtd, ofs, len))
1014 chipnr = ofs >> chip->chip_shift;
1028 page = ofs >> chip->page_shift;
1042 ret = __nand_unlock(mtd, ofs, len, 0x1);
2702 * @ofs: offset relative to mtd start
2704 static int nand_block_markbad(struct mtd_info *mtd, loff_t ofs)
2709 if ((ret = nand_block_isbad(mtd, ofs))) {
2716 return chip->block_markbad(mtd, ofs);