Lines Matching refs:ofs
47 static int cfi_staa_lock(struct mtd_info *mtd, loff_t ofs, size_t len);
48 static int cfi_staa_unlock(struct mtd_info *mtd, loff_t ofs, size_t len);
385 unsigned long ofs;
389 /* ofs: offset within the first chip that the first read should start */
391 ofs = from - (chipnum << cfi->chipshift);
401 if ((len + ofs -1) >> cfi->chipshift)
402 thislen = (1<<cfi->chipshift) - ofs;
406 ret = do_read_onechip(map, &cfi->chips[chipnum], ofs, thislen, buf);
414 ofs = 0;
614 unsigned long ofs;
621 ofs = to - (chipnum << cfi->chipshift);
626 printk("%s: ofs[%x] len[%x]\n", __FUNCTION__, ofs, len);
632 int size = wbufsize - (ofs & (wbufsize-1));
638 ofs, buf, size);
642 ofs += size;
647 if (ofs >> cfi->chipshift) {
649 ofs = 0;
1127 static int cfi_staa_lock(struct mtd_info *mtd, loff_t ofs, size_t len)
1137 if (ofs & (mtd->erasesize - 1))
1143 if ((len + ofs) > mtd->size)
1146 chipnum = ofs >> cfi->chipshift;
1147 adr = ofs - (chipnum << cfi->chipshift);
1275 static int cfi_staa_unlock(struct mtd_info *mtd, loff_t ofs, size_t len)
1285 chipnum = ofs >> cfi->chipshift;
1286 adr = ofs - (chipnum << cfi->chipshift);