Lines Matching refs:offs
79 static int nand_update_bbt(struct mtd_info *mtd, loff_t offs);
118 if (memcmp(buf + paglen + td->offs, td->pattern, td->len)) in check_pattern()
136 if (memcmp(buf + td->offs, td->pattern, td->len)) in check_short_pattern()
172 struct nand_bbt_descr *td, int offs) in read_bbt() argument
223 (loff_t)(offs + act) << in read_bbt()
225 bbt_mark_entry(this, offs + act, in read_bbt()
235 (loff_t)(offs + act) << in read_bbt()
239 bbt_mark_entry(this, offs + act, in read_bbt()
242 bbt_mark_entry(this, offs + act, in read_bbt()
270 int offs = 0; in read_abs_bbt() local
275 td, offs); in read_abs_bbt()
278 offs += this->chipsize >> this->bbt_erase_shift; in read_abs_bbt()
290 static int scan_read_data(struct mtd_info *mtd, uint8_t *buf, loff_t offs, in scan_read_data() argument
300 return mtd_read(mtd, offs, len, &retlen, buf); in scan_read_data()
314 static int scan_read_oob(struct mtd_info *mtd, uint8_t *buf, loff_t offs, in scan_read_oob() argument
329 res = mtd_read_oob(mtd, offs, &ops); in scan_read_oob()
339 offs += mtd->writesize; in scan_read_oob()
344 static int scan_read(struct mtd_info *mtd, uint8_t *buf, loff_t offs, in scan_read() argument
348 return scan_read_data(mtd, buf, offs, td); in scan_read()
350 return scan_read_oob(mtd, buf, offs, len); in scan_read()
354 static int scan_write_bbt(struct mtd_info *mtd, loff_t offs, size_t len, in scan_write_bbt() argument
366 return mtd_write_oob(mtd, offs, &ops); in scan_write_bbt()
414 loff_t offs, uint8_t *buf, int numpages) in scan_block_fast() argument
430 ret = mtd_read_oob(mtd, offs, &ops); in scan_block_fast()
438 offs += mtd->writesize; in scan_block_fast()
560 loff_t offs = (loff_t)actblock << this->bbt_erase_shift; in search_bbt() local
563 scan_read(mtd, buf, offs, mtd->writesize, td); in search_bbt()
567 offs = bbt_get_ver_offs(mtd, td); in search_bbt()
568 td->version[i] = buf[offs]; in search_bbt()
624 int bits, startblock, dir, page, offs, numblocks, sft, sftmsk; in write_bbt() local
739 offs = pageoffs << this->page_shift; in write_bbt()
741 memset(&buf[offs], 0xff, (size_t)(numblocks >> sft)); in write_bbt()
746 offs = td->len; in write_bbt()
749 offs++; in write_bbt()
752 len += offs; in write_bbt()
767 offs = 0; in write_bbt()
770 memcpy(&buf[ooboffs + td->offs], td->pattern, td->len); in write_bbt()
782 buf[offs + (i >> sft)] &= ~(msk[dat] << sftcnt); in write_bbt()
1046 BUG_ON(bd->offs); in verify_bbt_descr()
1148 static int nand_update_bbt(struct mtd_info *mtd, loff_t offs) in nand_update_bbt() argument
1169 chip = (int)(offs >> this->chip_shift); in nand_update_bbt()
1209 .offs = 8,
1219 .offs = 8,
1267 bd->offs = this->badblockpos; in nand_create_badblock_pattern()
1318 int nand_isreserved_bbt(struct mtd_info *mtd, loff_t offs) in nand_isreserved_bbt() argument
1323 block = (int)(offs >> this->bbt_erase_shift); in nand_isreserved_bbt()
1333 int nand_isbad_bbt(struct mtd_info *mtd, loff_t offs, int allowbbt) in nand_isbad_bbt() argument
1338 block = (int)(offs >> this->bbt_erase_shift); in nand_isbad_bbt()
1342 (unsigned int)offs, block, res); in nand_isbad_bbt()
1360 int nand_markbad_bbt(struct mtd_info *mtd, loff_t offs) in nand_markbad_bbt() argument
1365 block = (int)(offs >> this->bbt_erase_shift); in nand_markbad_bbt()
1372 ret = nand_update_bbt(mtd, offs); in nand_markbad_bbt()