Lines Matching refs:offs

113 	if (memcmp(buf + paglen + td->offs, td->pattern, td->len))
131 if (memcmp(buf + td->offs, td->pattern, td->len))
162 * @offs: block number offset in the table
167 struct nand_bbt_descr *td, int offs)
218 (loff_t)(offs + act) <<
220 bbt_mark_entry(this, offs + act,
230 (loff_t)(offs + act) <<
234 bbt_mark_entry(this, offs + act,
237 bbt_mark_entry(this, offs + act,
267 int offs = 0;
272 td, offs);
275 offs += targetsize >> this->bbt_erase_shift;
287 static int scan_read_data(struct nand_chip *this, uint8_t *buf, loff_t offs,
298 return mtd_read(mtd, offs, len, &retlen, buf);
305 * @offs: offset at which to scan
312 static int scan_read_oob(struct nand_chip *this, uint8_t *buf, loff_t offs,
328 res = mtd_read_oob(mtd, offs, &ops);
338 offs += mtd->writesize;
343 static int scan_read(struct nand_chip *this, uint8_t *buf, loff_t offs,
347 return scan_read_data(this, buf, offs, td);
349 return scan_read_oob(this, buf, offs, len);
353 static int scan_write_bbt(struct nand_chip *this, loff_t offs, size_t len,
366 return mtd_write_oob(mtd, offs, &ops);
415 loff_t offs, uint8_t *buf)
435 ret = mtd_read_oob(mtd, offs + (page_offset * mtd->writesize),
452 loff_t offs, uint8_t *buf)
462 td->offs >= bd->offs && td->offs < bd->offs + bd->len)
473 if (scan_block_fast(this, bd, offs, buf) > 0)
589 loff_t offs = (loff_t)actblock << this->bbt_erase_shift;
592 if (bbt_block_checkbad(this, td, offs, buf))
596 scan_read(this, buf, offs, mtd->writesize, td);
600 offs = bbt_get_ver_offs(this, td);
601 td->version[i] = buf[offs];
752 int bits, page, offs, numblocks, sft, sftmsk;
842 offs = pageoffs << this->page_shift;
844 memset(&buf[offs], 0xff, (size_t)(numblocks >> sft));
849 offs = td->len;
852 offs++;
855 len += offs;
870 offs = 0;
873 memcpy(&buf[ooboffs + td->offs], td->pattern, td->len);
885 buf[offs + (i >> sft)] &= ~(msk[dat] << sftcnt);
1069 * @offs: the offset of the newly marked block
1073 static int nand_update_bbt(struct nand_chip *this, loff_t offs)
1094 chip = (int)(offs >> this->chip_shift);
1214 BUG_ON(bd->offs);
1324 .offs = 8,
1334 .offs = 8,
1382 bd->offs = this->badblockpos;
1431 * @offs: offset in the device
1433 int nand_isreserved_bbt(struct nand_chip *this, loff_t offs)
1437 block = (int)(offs >> this->bbt_erase_shift);
1444 * @offs: offset in the device
1447 int nand_isbad_bbt(struct nand_chip *this, loff_t offs, int allowbbt)
1451 block = (int)(offs >> this->bbt_erase_shift);
1454 pr_debug("nand_isbad_bbt(): bbt info for offs 0x%08x: (block %d) 0x%02x\n",
1455 (unsigned int)offs, block, res);
1474 * @offs: offset of the bad block
1476 int nand_markbad_bbt(struct nand_chip *this, loff_t offs)
1480 block = (int)(offs >> this->bbt_erase_shift);
1487 ret = nand_update_bbt(this, offs);