Lines Matching defs:ofs
26 static int lpddr_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
27 static int lpddr_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
538 unsigned long ofs, last_end = 0;
545 /* ofs: offset within the first chip that the first read should start */
546 ofs = adr - (chipnum << lpddr->chipshift);
547 *mtdbuf = (void *)map->virt + chip->start + ofs;
561 if ((len + ofs - 1) >> lpddr->chipshift)
562 thislen = (1<<lpddr->chipshift) - ofs;
577 ofs = 0;
590 unsigned long ofs;
592 /* ofs: offset within the first chip that the first read should start */
593 ofs = adr - (chipnum << lpddr->chipshift);
603 if ((len + ofs - 1) >> lpddr->chipshift)
604 thislen = (1<<lpddr->chipshift) - ofs;
623 ofs = 0;
649 unsigned long ofs, vec_seek, i;
661 ofs = to;
666 int size = wbufsize - (ofs & (wbufsize-1));
672 ofs, &vecs, &vec_seek, size);
676 ofs += size;
691 unsigned long ofs, len;
697 ofs = instr->addr;
701 ret = do_erase_oneblock(mtd, ofs);
704 ofs += size;
748 static int lpddr_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len)
750 return do_xxlock(mtd, ofs, len, DO_XXLOCK_LOCK);
753 static int lpddr_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len)
755 return do_xxlock(mtd, ofs, len, DO_XXLOCK_UNLOCK);