Lines Matching defs:blocksize
125 uint offset, blocksize, mask, blk_offset, off;
168 blocksize = mtd->erasesize;
169 mask = blocksize - 1;
173 for (blk_idx = good_bytes/blocksize; blk_idx < mtd->eraseregions->numblocks; blk_idx++) {
175 skip_bytes += blocksize;
179 good_bytes += blocksize;
186 blk_offset = blocksize * blk_idx;
192 if (off >= (blk_offset + blocksize)) {
193 blk_offset += blocksize;
197 skip_bytes += blocksize;
198 blk_offset += blocksize;
251 uint offset, blocksize, mask, blk_offset, off;
277 blocksize = mtd->erasesize;
278 r_blocksize = reciprocal_value(blocksize);
280 if (!(block = kmalloc(blocksize, GFP_KERNEL)))
285 mask = blocksize - 1;
294 skip_bytes += blocksize;
298 good_bytes += blocksize;
305 blk_offset = blocksize * blk_idx;
313 if (((offset & (blocksize-1)) != 0) || (len < blocksize)) {
314 ret = _nflash_mtd_read(mtd, part, from, blocksize,
318 if (read_len != blocksize) {
324 copy_len = min(len, blocksize - (offset & mask));
332 skip_bytes += blocksize;
338 write_len = blocksize;
345 skip_bytes += blocksize;
363 blk_offset += blocksize;
367 skip_bytes += blocksize;
368 blk_offset += blocksize;
391 uint addr, len, blocksize;
399 blocksize = mtd->erasesize;
400 reciprocal_blocksize = reciprocal_value(blocksize);
409 if (addr & (blocksize - 1))
427 part_start_blk = reciprocal_divide(part->offset & ~(blocksize-1),
429 part_end_blk = reciprocal_divide(((part->offset + part->size) + (blocksize-1)),
432 new_addr = part_start_blk * blocksize;
440 new_addr += blocksize;
442 new_addr += blocksize;
448 erase_blknum = reciprocal_divide(len + (blocksize-1), reciprocal_blocksize);
450 if ((new_addr + (erase_blknum * blocksize)) > (part->offset + part->size)) {
455 for (i = new_addr; erase_blknum; i += blocksize) {
464 nflash->map[i / blocksize] = 1;
520 nflash.region.erasesize = info->blocksize;
549 if (hndnand_checkbadb(nflash.nfl, (i * info->blocksize)) != 0) {