Lines Matching defs:ofs
44 static int cfi_staa_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
45 static int cfi_staa_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
382 unsigned long ofs;
386 /* ofs: offset within the first chip that the first read should start */
388 ofs = from - (chipnum << cfi->chipshift);
398 if ((len + ofs -1) >> cfi->chipshift)
399 thislen = (1<<cfi->chipshift) - ofs;
403 ret = do_read_onechip(map, &cfi->chips[chipnum], ofs, thislen, buf);
411 ofs = 0;
611 unsigned long ofs;
618 ofs = to - (chipnum << cfi->chipshift);
623 printk("%s: ofs[%x] len[%x]\n", __func__, ofs, len);
629 int size = wbufsize - (ofs & (wbufsize-1));
635 ofs, buf, size);
639 ofs += size;
644 if (ofs >> cfi->chipshift) {
646 ofs = 0;
1126 static int cfi_staa_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len)
1136 if (ofs & (mtd->erasesize - 1))
1142 if ((len + ofs) > mtd->size)
1145 chipnum = ofs >> cfi->chipshift;
1146 adr = ofs - (chipnum << cfi->chipshift);
1274 static int cfi_staa_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len)
1284 chipnum = ofs >> cfi->chipshift;
1285 adr = ofs - (chipnum << cfi->chipshift);