Lines Matching defs:blocksize
89 uint offset, blocksize, mask, blk_offset, off;
129 blocksize = mtd->erasesize;
130 mask = blocksize - 1;
134 for (blk_idx = good_bytes/blocksize; blk_idx < mtd->eraseregions->numblocks; blk_idx++) {
136 skip_bytes += blocksize;
140 good_bytes += blocksize;
147 blk_offset = blocksize * blk_idx;
153 if (off >= (blk_offset + blocksize)) {
154 blk_offset += blocksize;
158 skip_bytes += blocksize;
159 blk_offset += blocksize;
211 uint offset, blocksize, mask, blk_offset, off;
237 blocksize = mtd->erasesize;
238 r_blocksize = reciprocal_value(blocksize);
240 if (!(block = kmalloc(blocksize, GFP_KERNEL)))
245 mask = blocksize - 1;
254 skip_bytes += blocksize;
258 good_bytes += blocksize;
265 blk_offset = blocksize * blk_idx;
273 if (((offset & (blocksize-1)) != 0) || (len < blocksize)) {
274 ret = _nflash_mtd_read(mtd, part, from, blocksize,
278 if (read_len != blocksize) {
284 copy_len = min(len, blocksize - (offset & mask));
292 skip_bytes += blocksize;
298 write_len = blocksize;
305 skip_bytes += blocksize;
323 blk_offset += blocksize;
327 skip_bytes += blocksize;
328 blk_offset += blocksize;
351 uint addr, len, blocksize;
359 blocksize = mtd->erasesize;
360 reciprocal_blocksize = reciprocal_value(blocksize);
369 if (addr & (blocksize - 1))
387 part_start_blk = reciprocal_divide(part->offset & ~(blocksize-1),
389 part_end_blk = reciprocal_divide(((part->offset + part->size) + (blocksize-1)),
392 new_addr = part_start_blk * blocksize;
400 new_addr += blocksize;
402 new_addr += blocksize;
408 erase_blknum = reciprocal_divide(len + (blocksize-1), reciprocal_blocksize);
410 if ((new_addr + (erase_blknum * blocksize)) > (part->offset + part->size)) {
415 for (i = new_addr; erase_blknum; i += blocksize) {
424 nflash->map[i / blocksize] = 1;
480 nflash.region.erasesize = info->blocksize;
509 if (hndnand_checkbadb(nflash.nfl, (i * info->blocksize)) != 0) {