Lines Matching refs:offs

77 static int nand_update_bbt(struct mtd_info *mtd, loff_t offs);
116 if (memcmp(buf + paglen + td->offs, td->pattern, td->len)) in check_pattern()
134 if (memcmp(buf + td->offs, td->pattern, td->len)) in check_short_pattern()
170 struct nand_bbt_descr *td, int offs) in read_bbt() argument
221 (loff_t)(offs + act) << in read_bbt()
223 bbt_mark_entry(this, offs + act, in read_bbt()
233 (loff_t)(offs + act) << in read_bbt()
237 bbt_mark_entry(this, offs + act, in read_bbt()
240 bbt_mark_entry(this, offs + act, in read_bbt()
268 int offs = 0; in read_abs_bbt() local
273 td, offs); in read_abs_bbt()
276 offs += this->chipsize >> this->bbt_erase_shift; in read_abs_bbt()
288 static int scan_read_data(struct mtd_info *mtd, uint8_t *buf, loff_t offs, in scan_read_data() argument
298 return mtd_read(mtd, offs, len, &retlen, buf); in scan_read_data()
312 static int scan_read_oob(struct mtd_info *mtd, uint8_t *buf, loff_t offs, in scan_read_oob() argument
327 res = mtd_read_oob(mtd, offs, &ops); in scan_read_oob()
337 offs += mtd->writesize; in scan_read_oob()
342 static int scan_read(struct mtd_info *mtd, uint8_t *buf, loff_t offs, in scan_read() argument
346 return scan_read_data(mtd, buf, offs, td); in scan_read()
348 return scan_read_oob(mtd, buf, offs, len); in scan_read()
352 static int scan_write_bbt(struct mtd_info *mtd, loff_t offs, size_t len, in scan_write_bbt() argument
364 return mtd_write_oob(mtd, offs, &ops); in scan_write_bbt()
412 loff_t offs, uint8_t *buf, int numpages) in scan_block_fast() argument
428 ret = mtd_read_oob(mtd, offs, &ops); in scan_block_fast()
436 offs += mtd->writesize; in scan_block_fast()
558 loff_t offs = (loff_t)actblock << this->bbt_erase_shift; in search_bbt() local
561 scan_read(mtd, buf, offs, mtd->writesize, td); in search_bbt()
565 offs = bbt_get_ver_offs(mtd, td); in search_bbt()
566 td->version[i] = buf[offs]; in search_bbt()
622 int bits, startblock, dir, page, offs, numblocks, sft, sftmsk; in write_bbt() local
737 offs = pageoffs << this->page_shift; in write_bbt()
739 memset(&buf[offs], 0xff, (size_t)(numblocks >> sft)); in write_bbt()
744 offs = td->len; in write_bbt()
747 offs++; in write_bbt()
750 len += offs; in write_bbt()
765 offs = 0; in write_bbt()
768 memcpy(&buf[ooboffs + td->offs], td->pattern, td->len); in write_bbt()
780 buf[offs + (i >> sft)] &= ~(msk[dat] << sftcnt); in write_bbt()
1044 BUG_ON(bd->offs); in verify_bbt_descr()
1146 static int nand_update_bbt(struct mtd_info *mtd, loff_t offs) in nand_update_bbt() argument
1167 chip = (int)(offs >> this->chip_shift); in nand_update_bbt()
1207 .offs = 8,
1217 .offs = 8,
1265 bd->offs = this->badblockpos; in nand_create_badblock_pattern()
1316 int nand_isreserved_bbt(struct mtd_info *mtd, loff_t offs) in nand_isreserved_bbt() argument
1321 block = (int)(offs >> this->bbt_erase_shift); in nand_isreserved_bbt()
1331 int nand_isbad_bbt(struct mtd_info *mtd, loff_t offs, int allowbbt) in nand_isbad_bbt() argument
1336 block = (int)(offs >> this->bbt_erase_shift); in nand_isbad_bbt()
1340 (unsigned int)offs, block, res); in nand_isbad_bbt()
1358 int nand_markbad_bbt(struct mtd_info *mtd, loff_t offs) in nand_markbad_bbt() argument
1363 block = (int)(offs >> this->bbt_erase_shift); in nand_markbad_bbt()
1370 ret = nand_update_bbt(mtd, offs); in nand_markbad_bbt()