/openbmc/linux/fs/jffs2/ |
H A D | erase.c | 52 c->erasing_size -= c->sector_size; in jffs2_erase_block() 53 c->dirty_size += c->sector_size; in jffs2_erase_block() 54 jeb->dirty_size = c->sector_size; in jffs2_erase_block() 61 instr->len = c->sector_size; in jffs2_erase_block() 81 c->erasing_size -= c->sector_size; in jffs2_erase_block() 82 c->dirty_size += c->sector_size; in jffs2_erase_block() 83 jeb->dirty_size = c->sector_size; in jffs2_erase_block() 196 c->bad_size += c->sector_size; in jffs2_erase_failed() 326 if (retlen < c->sector_size) { in jffs2_block_check_erase() 449 jeb->free_size = c->sector_size; in jffs2_mark_erased_block() [all …]
|
H A D | build.c | 327 size += c->sector_size - 1; /* ... and round up */ in jffs2_calc_trigger_levels() 329 c->resv_blocks_write = c->resv_blocks_deletion + (size / c->sector_size); in jffs2_calc_trigger_levels() 353 c->nospc_dirty_size = c->sector_size + (c->flash_size / 100); in jffs2_calc_trigger_levels() 356 c->flash_size / 1024, c->sector_size / 1024, c->nr_blocks); in jffs2_calc_trigger_levels() 358 c->resv_blocks_deletion, c->resv_blocks_deletion*c->sector_size/1024); in jffs2_calc_trigger_levels() 360 c->resv_blocks_write, c->resv_blocks_write*c->sector_size/1024); in jffs2_calc_trigger_levels() 364 c->resv_blocks_gcmerge, c->resv_blocks_gcmerge*c->sector_size/1024); in jffs2_calc_trigger_levels() 366 c->resv_blocks_gcbad, c->resv_blocks_gcbad*c->sector_size/1024); in jffs2_calc_trigger_levels() 380 c->nr_blocks = c->flash_size / c->sector_size; in jffs2_do_mount_fs() 393 c->blocks[i].offset = i * c->sector_size; in jffs2_do_mount_fs() [all …]
|
H A D | scan.c | 63 if (sector_size < DEFAULT_EMPTY_SCAN_SIZE) in EMPTY_SCAN_SIZE() 64 return sector_size; in EMPTY_SCAN_SIZE() 117 try_size = c->sector_size; in jffs2_scan_medium() 232 c->bad_size += c->sector_size; in jffs2_scan_medium() 233 c->free_size -= c->sector_size; in jffs2_scan_medium() 517 if (sumlen > c->sector_size) in jffs2_scan_eraseblock() 562 buf_len = c->sector_size; in jffs2_scan_eraseblock() 564 buf_len = EMPTY_SCAN_SIZE(c->sector_size); in jffs2_scan_eraseblock() 572 max_ofs = EMPTY_SCAN_SIZE(c->sector_size); in jffs2_scan_eraseblock() 644 jeb->offset, c->sector_size, ofs, in jffs2_scan_eraseblock() [all …]
|
H A D | nodemgmt.c | 30 c->erasing_size - c->resv_blocks_write * c->sector_size in jffs2_rp_can_write() 124 c->sector_size); in jffs2_reserve_space() 141 if ( (avail / c->sector_size) <= blocksneeded) { in jffs2_reserve_space() 149 avail, blocksneeded * c->sector_size); in jffs2_reserve_space() 343 if (!(c->wbuf_ofs % c->sector_size) && !c->wbuf_len) in jffs2_find_nextblock() 438 (jeb->offset + c->sector_size - waste) | REF_OBSOLETE, in jffs2_do_reserve_space() 459 if (jeb->free_size != c->sector_size - c->cleanmarker_size) { in jffs2_do_reserve_space() 484 *len, jeb->offset + (c->sector_size - jeb->free_size)); in jffs2_do_reserve_space() 507 jeb = &c->blocks[ofs / c->sector_size]; in jffs2_add_physical_node_ref() 524 jeb->offset + (c->sector_size - jeb->free_size)); in jffs2_add_physical_node_ref() [all …]
|
/openbmc/qemu/tests/qemu-iotests/ |
H A D | 148 | 35 sector_size = 512 variable 86 (offset * sector_size, sector_size)) 94 (offset * sector_size, sector_size)) 106 (offset * sector_size, sector_size)) 114 ((offset + i) * sector_size, sector_size)) 126 ((offset + i) * sector_size, sector_size))
|
H A D | 251 | 63 sector_size=512 78 $(seq $((34 * 1024 * 1024)) $sector_size \ 79 $((34 * 1024 * 1024 + 4096 - $sector_size)))" 161 $QEMU_IO -c "write -z $ofs $sector_size" "$TEST_IMG.orig" \
|
/openbmc/u-boot/tools/ |
H A D | atmel_pmecc_params.c | 18 static int pmecc_get_ecc_bytes(int cap, int sector_size) in pmecc_get_ecc_bytes() argument 20 int m = 12 + sector_size / 512; in pmecc_get_ecc_bytes() 28 unsigned int sector_size = CONFIG_PMECC_SECTOR_SIZE; in main() local 39 pmecc_get_ecc_bytes(ecc_bits, sector_size) * sector_per_page; in main() 43 printf("sectorSize=%d,", sector_size); in main()
|
H A D | atmelimage.c | 34 int sector_size; member 85 pmecc.sector_size = strtol(param, NULL, 10); in atmel_find_pmecc_parameter_in_token() 253 switch (pmecc.sector_size) { in atmel_vrec_header() 263 pmecc.sector_size); in atmel_vrec_header()
|
/openbmc/linux/arch/x86/boot/ |
H A D | edd.c | 40 int sector_size; in read_mbr_sig() local 46 sector_size = ei->params.bytes_per_sector; in read_mbr_sig() 47 if (!sector_size) in read_mbr_sig() 48 sector_size = 512; /* Best available guess */ in read_mbr_sig() 52 mbr_base = (buf_base+sector_size-1) & ~(sector_size-1); in read_mbr_sig() 54 mbrbuf_end = mbrbuf_ptr + sector_size; in read_mbr_sig() 62 memset(mbrbuf_ptr, 0, sector_size); in read_mbr_sig()
|
/openbmc/u-boot/drivers/mtd/nand/raw/ |
H A D | atmel_nand.c | 86 int m = 12 + sector_size / 512; in pmecc_get_ecc_bytes() 406 if (sector_size == 1024) in pmecc_err_location() 697 int *cap, int *sector_size) in pmecc_choose_ecc() argument 700 *cap = *sector_size = 0; in pmecc_choose_ecc() 705 *cap, *sector_size); in pmecc_choose_ecc() 712 *sector_size = 512; in pmecc_choose_ecc() 737 if (*sector_size >= 1024) in pmecc_choose_ecc() 808 int cap, sector_size; in atmel_pmecc_nand_init_params() local 833 cap, sector_size); in atmel_pmecc_nand_init_params() 866 cap, sector_size); in atmel_pmecc_nand_init_params() [all …]
|
/openbmc/linux/block/partitions/ |
H A D | msdos.c | 138 sector_t sector_size; in parse_extended() local 181 offs = start_sect(p)*sector_size; in parse_extended() 182 size = nr_sects(p)*sector_size; in parse_extended() 215 this_sector = first_sector + start_sect(p) * sector_size; in parse_extended() 216 this_size = nr_sects(p) * sector_size; in parse_extended() 583 sector_t sector_size; in msdos_partition() local 664 sector_t start = start_sect(p)*sector_size; in msdos_partition() 665 sector_t size = nr_sects(p)*sector_size; in msdos_partition() 678 n = min(size, max(sector_size, n)); in msdos_partition() 712 subtypes[n].parse(state, start_sect(p) * sector_size, in msdos_partition() [all …]
|
/openbmc/linux/drivers/scsi/ |
H A D | sd.c | 2119 unsigned int sector_size = SCpnt->device->sector_size; in sd_done() local 2459 unsigned sector_size; in read_capacity_16() local 2537 return sector_size; in read_capacity_16() 2595 return sector_size; in read_capacity_10() 2600 return sector_size; in read_capacity_10() 2622 int sector_size; in sd_read_capacity() local 2679 sector_size = 512; in sd_read_capacity() 2689 sector_size); in sd_read_capacity() 2703 sector_size = 512; in sd_read_capacity() 2708 sdkp->device->sector_size = sector_size; in sd_read_capacity() [all …]
|
H A D | sr.c | 328 if (cd->device->sector_size == 2048) in sr_done() 390 s_size = cd->device->sector_size; in sr_init_command() 462 SCpnt->transfersize = cd->device->sector_size; in sr_init_command() 722 int sector_size; in get_sectorsize() local 742 sector_size = 2048; /* A guess, just in case */ in get_sectorsize() 757 sector_size = get_unaligned_be32(&buffer[4]); in get_sectorsize() 758 switch (sector_size) { in get_sectorsize() 768 sector_size = 2048; in get_sectorsize() 777 "unsupported sector size %d.", sector_size); in get_sectorsize() 781 cd->device->sector_size = sector_size; in get_sectorsize() [all …]
|
H A D | sd.h | 208 return blocks << (ilog2(sdev->sector_size) - 9); in logical_to_sectors() 213 return blocks * sdev->sector_size; in logical_to_bytes() 218 return bytes >> ilog2(sdev->sector_size); in bytes_to_logical() 223 return sector >> (ilog2(sdev->sector_size) - 9); in sectors_to_logical()
|
/openbmc/qemu/hw/block/dataplane/ |
H A D | xen-block.c | 64 unsigned int sector_size; member 179 request->start = request->req.sector_number * dataplane->sector_size; in xen_block_parse_request() 189 if (request->req.seg[i].last_sect * dataplane->sector_size >= in xen_block_parse_request() 230 dataplane->sector_size; in xen_block_copy_request() 235 dataplane->sector_size; in xen_block_copy_request() 240 dataplane->sector_size; in xen_block_copy_request() 334 sec_start + sec_count > INT64_MAX / dataplane->sector_size) { in xen_block_split_discard() 338 byte_offset = sec_start * dataplane->sector_size; in xen_block_split_discard() 339 byte_remaining = sec_count * dataplane->sector_size; in xen_block_split_discard() 611 unsigned int sector_size, in xen_block_dataplane_create() argument [all …]
|
/openbmc/u-boot/cmd/ |
H A D | sf.c | 55 if (round_up_len && flash->sector_size > 0) in sf_parse_len_arg() 56 *len = ROUND(len_arg, flash->sector_size); in sf_parse_len_arg() 175 offset, flash->sector_size, len); in spi_flash_update_block() 177 if (spi_flash_read(flash, offset, flash->sector_size, cmp_buf)) in spi_flash_update_block() 187 if (spi_flash_erase(flash, offset, flash->sector_size)) in spi_flash_update_block() 190 if (len != flash->sector_size) { in spi_flash_update_block() 195 if (spi_flash_write(flash, offset, flash->sector_size, ptr)) in spi_flash_update_block() 226 cmp_buf = memalign(ARCH_DMA_MINALIGN, flash->sector_size); in spi_flash_update() 231 todo = min_t(size_t, end - buf, flash->sector_size); in spi_flash_update()
|
H A D | jffs2.c | 261 u32 end_phys, start_phys, sector_size = 0, size = 0; in get_part_sector_size_nor() local 281 if (sector_size < size) in get_part_sector_size_nor() 282 sector_size = size; in get_part_sector_size_nor() 286 return sector_size; in get_part_sector_size_nor() 400 part->sector_size = get_part_sector_size(id, part); in mtdparts_init()
|
/openbmc/u-boot/drivers/dfu/ |
H A D | dfu_sf.c | 30 return (lldiv((start + offset), dfu->data.sf.dev->sector_size)) * in find_sector() 31 dfu->data.sf.dev->sector_size; in find_sector() 41 dfu->data.sf.dev->sector_size); in dfu_write_medium_sf() 128 dfu->max_buf_size = dfu->data.sf.dev->sector_size; in dfu_fill_entity_sf()
|
/openbmc/linux/drivers/md/ |
H A D | dm-crypt.c | 179 unsigned short sector_size; member 432 if (cc->sector_size != (1 << SECTOR_SHIFT)) { in crypt_iv_lmk_ctr() 590 if (cc->sector_size != (1 << SECTOR_SHIFT)) { in crypt_iv_tcw_ctr() 1008 for (i = 0; i < (cc->sector_size / 32); i++) in crypt_iv_elephant() 1369 cc->sector_size, iv); in crypt_convert_block_aead() 3193 cc->sector_size > 4096 || in crypt_ctr_optional() 3194 (cc->sector_size & (cc->sector_size - 1))) { in crypt_ctr_optional() 3260 cc->sector_size = (1 << SECTOR_SHIFT); in crypt_ctr() 3574 if (cc->sector_size != (1 << SECTOR_SHIFT)) in crypt_status() 3597 if (cc->sector_size != (1 << SECTOR_SHIFT)) in crypt_status() [all …]
|
/openbmc/linux/drivers/video/fbdev/ |
H A D | broadsheetfb.c | 593 int addr, const char *data, int sector_size) in broadsheet_spiflash_write_sector() argument 598 for (i = 0; i < sector_size; i += BS_SPIFLASH_PAGE_SIZE) { in broadsheet_spiflash_write_sector() 612 int sector_size, int data_start_addr, in broadsheet_spiflash_rewrite_sector() argument 620 sector_buffer = kzalloc(sector_size, GFP_KERNEL); in broadsheet_spiflash_rewrite_sector() 625 start_sector_addr = (data_start_addr / sector_size) * sector_size; in broadsheet_spiflash_rewrite_sector() 654 tail_len = sector_size - tail_start_addr; in broadsheet_spiflash_rewrite_sector() 672 sector_buffer, sector_size); in broadsheet_spiflash_rewrite_sector() 681 int sector_size; in broadsheet_write_spiflash() local 690 sector_size = 32*1024; in broadsheet_write_spiflash() 694 sector_size = 64*1024; in broadsheet_write_spiflash() [all …]
|
/openbmc/u-boot/fs/jffs2/ |
H A D | jffs2_1pass.c | 1340 ofs = part->sector_size - sumsize; in jffs2_sum_scan_sumnode() 1463 if (sector_size < DEFAULT_EMPTY_SCAN_SIZE) in EMPTY_SCAN_SIZE() 1464 return sector_size; in EMPTY_SCAN_SIZE() 1547 part->sector_size - sumlen, in jffs2_1pass_build_lists() 1601 if (sector_ofs + part->sector_size < in jffs2_1pass_build_lists() 1606 + part->sector_size - ofs); in jffs2_1pass_build_lists() 1620 part->sector_size)/8, in jffs2_1pass_build_lists() 1647 part->sector_size - ofs); in jffs2_1pass_build_lists() 1674 sector_ofs + part->sector_size) { in jffs2_1pass_build_lists() 1687 part->sector_size - in jffs2_1pass_build_lists() [all …]
|
/openbmc/qemu/block/ |
H A D | qcow2-threads.c | 469 uint64_t sector_size; in qcow2_co_encdec() local 473 sector_size = qcrypto_block_get_sector_size(s->crypto); in qcow2_co_encdec() 474 assert(QEMU_IS_ALIGNED(guest_offset, sector_size)); in qcow2_co_encdec() 475 assert(QEMU_IS_ALIGNED(host_offset, sector_size)); in qcow2_co_encdec() 476 assert(QEMU_IS_ALIGNED(len, sector_size)); in qcow2_co_encdec()
|
/openbmc/openbmc/poky/scripts/lib/wic/plugins/imager/ |
H A D | direct.py | 324 self.sector_size = SECTOR_SIZE 373 part.size_sec = part.disk_size * 1024 // self.sector_size 436 align_sectors = self.offset % (part.align * 1024 // self.sector_size) 441 align_sectors = (part.align * 1024 // self.sector_size) - align_sectors 452 offset = part.offset // self.sector_size 454 if offset * self.sector_size != part.offset: 455 … %s%s at offset %d with sector size %d" % (part.disk, self.numpart, part.offset, self.sector_size)) 492 part.size_sec * self.sector_size) 500 self.min_size *= self.sector_size 686 sparse_copy(source, self.path, seek=part.start * self.sector_size)
|
/openbmc/linux/drivers/nfc/s3fwrn5/ |
H A D | firmware.h | 43 __u16 sector_size; member 84 u32 sector_size; member
|
/openbmc/linux/drivers/spi/ |
H A D | spi-mtk-snfi.c | 237 u16 sector_size; member 253 .sector_size = 512, 267 .sector_size = 512, 281 .sector_size = 1024, 554 if (snf->caps->sector_size == 512) { in mtk_snand_setup_pagefmt() 567 if (snf->caps->sector_size == 512) in mtk_snand_setup_pagefmt() 573 if (snf->caps->sector_size == 512) in mtk_snand_setup_pagefmt() 579 if (snf->caps->sector_size == 512) in mtk_snand_setup_pagefmt() 595 if (snf->caps->sector_size == 1024) in mtk_snand_setup_pagefmt() 601 if (snf->caps->sector_size == 1024) in mtk_snand_setup_pagefmt() [all …]
|