Lines Matching refs:offs
113 if (memcmp(buf + paglen + td->offs, td->pattern, td->len)) in check_pattern()
131 if (memcmp(buf + td->offs, td->pattern, td->len)) in check_short_pattern()
167 struct nand_bbt_descr *td, int offs) in read_bbt() argument
218 (loff_t)(offs + act) << in read_bbt()
220 bbt_mark_entry(this, offs + act, in read_bbt()
230 (loff_t)(offs + act) << in read_bbt()
234 bbt_mark_entry(this, offs + act, in read_bbt()
237 bbt_mark_entry(this, offs + act, in read_bbt()
267 int offs = 0; in read_abs_bbt() local
272 td, offs); in read_abs_bbt()
275 offs += targetsize >> this->bbt_erase_shift; in read_abs_bbt()
287 static int scan_read_data(struct nand_chip *this, 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 nand_chip *this, uint8_t *buf, loff_t offs, in scan_read_oob() argument
328 res = mtd_read_oob(mtd, offs, &ops); in scan_read_oob()
338 offs += mtd->writesize; in scan_read_oob()
343 static int scan_read(struct nand_chip *this, uint8_t *buf, loff_t offs, in scan_read() argument
347 return scan_read_data(this, buf, offs, td); in scan_read()
349 return scan_read_oob(this, buf, offs, len); in scan_read()
353 static int scan_write_bbt(struct nand_chip *this, loff_t offs, size_t len, in scan_write_bbt() argument
366 return mtd_write_oob(mtd, offs, &ops); in scan_write_bbt()
415 loff_t offs, uint8_t *buf) in scan_block_fast() argument
435 ret = mtd_read_oob(mtd, offs + (page_offset * mtd->writesize), in scan_block_fast()
452 loff_t offs, uint8_t *buf) in bbt_block_checkbad() argument
462 td->offs >= bd->offs && td->offs < bd->offs + bd->len) in bbt_block_checkbad()
473 if (scan_block_fast(this, bd, offs, buf) > 0) in bbt_block_checkbad()
590 loff_t offs = (loff_t)actblock << this->bbt_erase_shift; in search_bbt() local
593 if (bbt_block_checkbad(this, td, offs, buf)) in search_bbt()
597 scan_read(this, buf, offs, mtd->writesize, td); in search_bbt()
601 offs = bbt_get_ver_offs(this, td); in search_bbt()
602 td->version[i] = buf[offs]; in search_bbt()
753 int bits, page, offs, numblocks, sft, sftmsk; in write_bbt() local
843 offs = pageoffs << this->page_shift; in write_bbt()
845 memset(&buf[offs], 0xff, (size_t)(numblocks >> sft)); in write_bbt()
850 offs = td->len; in write_bbt()
853 offs++; in write_bbt()
856 len += offs; in write_bbt()
871 offs = 0; in write_bbt()
874 memcpy(&buf[ooboffs + td->offs], td->pattern, td->len); in write_bbt()
886 buf[offs + (i >> sft)] &= ~(msk[dat] << sftcnt); in write_bbt()
1074 static int nand_update_bbt(struct nand_chip *this, loff_t offs) in nand_update_bbt() argument
1095 chip = (int)(offs >> this->chip_shift); in nand_update_bbt()
1215 BUG_ON(bd->offs); in verify_bbt_descr()
1325 .offs = 8,
1335 .offs = 8,
1383 bd->offs = this->badblockpos; in nand_create_badblock_pattern()
1434 int nand_isreserved_bbt(struct nand_chip *this, loff_t offs) in nand_isreserved_bbt() argument
1438 block = (int)(offs >> this->bbt_erase_shift); in nand_isreserved_bbt()
1448 int nand_isbad_bbt(struct nand_chip *this, loff_t offs, int allowbbt) in nand_isbad_bbt() argument
1452 block = (int)(offs >> this->bbt_erase_shift); in nand_isbad_bbt()
1456 (unsigned int)offs, block, res); in nand_isbad_bbt()
1477 int nand_markbad_bbt(struct nand_chip *this, loff_t offs) in nand_markbad_bbt() argument
1481 block = (int)(offs >> this->bbt_erase_shift); in nand_markbad_bbt()
1488 ret = nand_update_bbt(this, offs); in nand_markbad_bbt()