Home
last modified time | relevance | path

Searched refs:erasesize (Results 1 – 25 of 43) sorted by relevance

12

/u-boot/drivers/mtd/nand/raw/
A Dnand_util.c75 erase.len = mtd->erasesize; in nand_erase_opts()
78 mtd->erasesize); in nand_erase_opts()
103 erase.addr += mtd->erasesize) { in nand_erase_opts()
345 if ((start & (mtd->erasesize - 1)) != 0) { in nand_unlock()
354 "size %08x!\n", mtd->erasesize); in nand_unlock()
363 length -= mtd->erasesize; in nand_unlock()
426 block_len = mtd->erasesize - block_off; in check_skip_len()
586 blocksize = mtd->erasesize; in nand_write_skip_bad()
761 offset & ~(mtd->erasesize - 1)); in nand_read_skip_bad()
827 .len = mtd->erasesize, in nand_torture()
[all …]
A Dmxs_nand_spl.c127 mtd->erasesize = le32_to_cpu(p->pages_per_block) * mtd->writesize; in mxs_flash_onfi_ident()
130 chip->chipsize *= (uint64_t)mtd->erasesize * p->lun_count; in mxs_flash_onfi_ident()
133 chip->phys_erase_shift = ffs(mtd->erasesize) - 1; in mxs_flash_onfi_ident()
138 debug("erasesize=%d (>>%d)\n", mtd->erasesize, chip->phys_erase_shift); in mxs_flash_onfi_ident()
239 nand_page_per_block = mtd->erasesize / mtd->writesize; in nand_spl_load_image()
/u-boot/drivers/dfu/
A Ddfu_mtd.c18 return !do_div(size, mtd->erasesize); in mtd_is_aligned_with_block_size()
51 mtd->erasesize); in mtd_block_op()
62 erase_op.len = mtd->erasesize; in mtd_block_op()
91 remaining -= mtd->erasesize; in mtd_block_op()
95 erase_op.addr += mtd->erasesize; in mtd_block_op()
125 off += mtd->erasesize; in mtd_block_op()
126 dfu->bad_skip += mtd->erasesize; in mtd_block_op()
213 erase_op.len = mtd->erasesize; in dfu_flush_medium_mtd()
232 remaining -= mtd->erasesize; in dfu_flush_medium_mtd()
307 mtd->erasesize); in dfu_fill_entity_mtd()
[all …]
A Ddfu_nand.c165 if ((off & (mtd->erasesize - 1)) != 0) { in dfu_flush_medium_nand()
170 off = off & ~((mtd->erasesize - 1)); in dfu_flush_medium_nand()
171 off += mtd->erasesize; in dfu_flush_medium_nand()
/u-boot/drivers/mtd/
A Daltera_qspi.c94 instr.addr = mtd->erasesize * s_first; in flash_erase()
95 instr.len = mtd->erasesize * (s_last + 1 - s_first); in flash_erase()
160 last = pdata->base + addr + mtd->erasesize; in altera_qspi_erase()
168 sect = addr / mtd->erasesize; in altera_qspi_erase()
189 addr += mtd->erasesize; in altera_qspi_erase()
250 *len = mtd->erasesize << (pow - 1); in altera_qspi_get_locked_range()
269 num_sectors = mtd->size / mtd->erasesize; in altera_qspi_lock()
270 sector_start = ofs / mtd->erasesize; in altera_qspi_lock()
271 sector_end = (ofs + len) / mtd->erasesize; in altera_qspi_lock()
334 mtd->erasesize = 0x10000; in altera_qspi_probe()
[all …]
A Dmtdconcat.c434 (erase_regions[i].erasesize - 1))) in concat_erase()
726 concat->mtd.erasesize = subdev[0]->erasesize; in mtd_concat_create()
841 curr_erasesize = subdev[i]->erasesize; in mtd_concat_create()
856 erasesize; in mtd_concat_create()
869 concat->mtd.erasesize = curr_erasesize; in mtd_concat_create()
881 concat->mtd.erasesize = max_erasesize; in mtd_concat_create()
898 curr_erasesize = subdev[0]->erasesize; in mtd_concat_create()
909 erase_region_p->erasesize = in mtd_concat_create()
926 erasesize != curr_erasesize) { in mtd_concat_create()
928 erase_region_p->erasesize = in mtd_concat_create()
[all …]
A Dcfi_mtd.c158 mtd->erasesize = sect_size_old; in cfi_mtd_set_erasesize()
174 mtd->eraseregions[regions].erasesize = sect_size_old; in cfi_mtd_set_erasesize()
196 mtd->eraseregions[regions].erasesize = sect_size_old; in cfi_mtd_set_erasesize()
199 mtd->erasesize = sect_size; in cfi_mtd_set_erasesize()
A Dmtdpart.c680 slave->offset = (mtd_div_by_eb(cur_offset, master) + 1) * master->erasesize; in allocate_partition()
735 if (slave->erasesize < regions[i].erasesize) in allocate_partition()
736 slave->erasesize = regions[i].erasesize; in allocate_partition()
738 WARN_ON(slave->erasesize == 0); in allocate_partition()
741 slave->erasesize = master->erasesize; in allocate_partition()
771 offs += slave->erasesize; in allocate_partition()
A Dmtdcore.c272 return snprintf(buf, PAGE_SIZE, "%lu\n", (unsigned long)mtd->erasesize); in mtd_erasesize_show()
275 static DEVICE_ATTR(erasesize, S_IRUGO, mtd_erasesize_show, NULL);
449 if (is_power_of_2(mtd->erasesize)) in add_mtd_device()
450 mtd->erasesize_shift = ffs(mtd->erasesize) - 1; in add_mtd_device()
842 block_len = mtd->erasesize - (offset & (mtd->erasesize - 1)); in mtd_get_len_incl_bad()
844 if (!mtd->_block_isbad(mtd, offset & ~(mtd->erasesize - 1))) in mtd_get_len_incl_bad()
1761 mtd->erasesize, mtd->name); in mtd_proc_show()
/u-boot/cmd/
A Dnand.c154 (end - start) / erasesize, in print_status()
246 if ((addr & (mtd->erasesize - 1)) != 0) { in do_nand_env_oob()
258 oob_buf[1] = addr / mtd->erasesize; in do_nand_env_oob()
304 mtd->name, mtd->erasesize >> 10); in nand_print_and_set_info()
315 env_set_hex("nand_erasesize", mtd->erasesize); in nand_print_and_set_info()
373 *size -= badblocks * mtd->erasesize; in adjust_size_for_badblocks()
674 size = mtd->erasesize; in do_nand()
688 off = round_down(off, mtd->erasesize); in do_nand()
689 endoff = round_up(endoff, mtd->erasesize); in do_nand()
692 dev, off, size, mtd->erasesize); in do_nand()
[all …]
A Dmtd.c50 return !do_div(size, mtd->erasesize); in mtd_is_aligned_with_block_size()
160 printf(" - block size: 0x%x bytes\n", mtd->erasesize); in mtd_show_device()
335 off += mtd->erasesize; in do_mtd_io()
342 off += mtd->erasesize; in do_mtd_io()
412 mtd->erasesize); in do_mtd_erase()
419 mtd->erasesize); in do_mtd_erase()
429 erase_op.len = mtd->erasesize; in do_mtd_erase()
443 len -= mtd->erasesize; in do_mtd_erase()
444 erase_op.addr += mtd->erasesize; in do_mtd_erase()
477 for (off = 0; off < mtd->size; off += mtd->erasesize) { in do_mtd_bad()
A Dmtdparts.c341 part->sector_size = mtd->erasesize; in part_validate_eraseblock()
349 if (do_div(offset, mtd->erasesize)) { in part_validate_eraseblock()
357 if (do_div(size, mtd->erasesize)) { in part_validate_eraseblock()
374 start += mtd->eraseregions[i].erasesize; in part_validate_eraseblock()
390 start += mtd->eraseregions[i].erasesize; in part_validate_eraseblock()
1241 for (i = 0; i < part->size; i += mtd->erasesize) { in net_part_size()
1243 net_size += mtd->erasesize; in net_part_size()
1463 mtd->erasesize, &padding_size, &truncated);
1467 padding_size -= mtd->erasesize;
/u-boot/drivers/mtd/spi/
A Dspi-nor-core.c582 addr += mtd->erasesize; in spi_nor_erase()
583 len -= mtd->erasesize; in spi_nor_erase()
1930 u32 erasesize; in spi_nor_parse_bfpt() local
1937 if (!erasesize) in spi_nor_parse_bfpt()
1940 erasesize = 1U << erasesize; in spi_nor_parse_bfpt()
1945 mtd->erasesize = erasesize; in spi_nor_parse_bfpt()
1949 if (!mtd->erasesize || mtd->erasesize < erasesize) { in spi_nor_parse_bfpt()
1951 mtd->erasesize = erasesize; in spi_nor_parse_bfpt()
2234 nor->mtd.erasesize = 0; in spi_nor_init_params()
2360 if (mtd->erasesize) in spi_nor_select_erase()
[all …]
A Dsf_probe.c121 if (offset % mtd->erasesize || len % mtd->erasesize) { in spi_flash_std_erase()
A Dsf_mtd.c117 sf_mtd_info.erasesize = flash->sector_size; in spi_flash_mtd_register()
/u-boot/include/mtd/
A Dmtd-abi.h120 __u32 erasesize; member
129 __u32 erasesize; /* For this region */ member
/u-boot/include/
A Dspi_flash.h157 if (offset % mtd->erasesize || len % mtd->erasesize) { in spi_flash_erase()
/u-boot/env/
A Dnand.c134 blocksize = mtd->erasesize; in writeenv()
255 blocksize = mtd->erasesize; in readenv()
300 *result = ovoid ob_buf[1] * mtd->erasesize; in get_nand_env_oob()
/u-boot/tools/env/
A Dfw_env.c987 size_t erasesize; /* erase / write length - one block on NAND, in flash_write_buf() local
1078 erasesize = blocklen; in flash_write_buf()
1080 erasesize = erase_len; in flash_write_buf()
1083 erase.length = erasesize; in flash_write_buf()
1097 if (blockstart + erasesize > environment_end(dev)) { in flash_write_buf()
1129 (unsigned long long)erasesize, in flash_write_buf()
1132 if (write(fd, data + processed, erasesize) != erasesize) { in flash_write_buf()
1143 processed += erasesize; in flash_write_buf()
1145 blockstart += erasesize; in flash_write_buf()
1672 DEVESIZE(dev) = mtdinfo.erasesize; in check_device_config()
/u-boot/arch/arm/mach-imx/
A Dcmd_nandbcb.c173 #define CONV_TO_BLOCKS(x) ((u32)(x) / (u32)(mtd->erasesize))
253 g_pages_per_stride = mtd->erasesize / mtd->writesize; in nandbcb_set_boot_config()
445 fcb->sectors = mtd->erasesize / mtd->writesize; in fill_fcb()
480 loff_t offset = (loff_t)n * mtd->erasesize; in fill_dbbt_data()
773 block_start = offset & ~(loff_t)(mtd->erasesize - 1); in check_skip_length()
774 block_off = offset & (mtd->erasesize - 1); in check_skip_length()
775 block_len = mtd->erasesize - block_off; in check_skip_length()
808 bs_cfg->next_bs_addr = (u32)(offset + used + mtd->erasesize - 1) in nandbcb_get_next_good_blk_addr()
809 / (u32)mtd->erasesize * mtd->erasesize; in nandbcb_get_next_good_blk_addr()
/u-boot/board/toradex/colibri_t20/
A Dcolibri_t20.c75 (get_nand_dev_by_index(0)->erasesize >> 10 == 512) ? in checkboard()
/u-boot/include/linux/mtd/
A Dmtd.h63 uint32_t erasesize; /* For this region */ member
160 uint32_t erasesize; member
464 do_div(sz, mtd->erasesize); in mtd_div_by_eb()
472 return do_div(sz, mtd->erasesize); in mtd_mod_by_eb()
A Ddoc2000.h182 unsigned long erasesize; member
/u-boot/drivers/mtd/onenand/
A Donenand_base.c1749 block_size = region->erasesize; in onenand_erase()
1751 + region->erasesize * region->numblocks; in onenand_erase()
1821 block_size = region->erasesize; in onenand_erase()
1823 + region->erasesize * region->numblocks; in onenand_erase()
2337 mtd->eraseregions[i].erasesize = 1 << eraseshift; in flexonenand_get_size()
2361 mtd->erasesize = 1 << this->erase_shift; in flexonenand_get_size()
2363 mtd->erasesize >>= 1; in flexonenand_get_size()
2369 mtd->eraseregions[i].erasesize, in flexonenand_get_size()
2634 mtd->erasesize = mtd->writesize << 6; in onenand_probe()
2641 mtd->erasesize <<= 1; in onenand_probe()
[all …]
/u-boot/fs/yaffs2/
A Dyaffs_uboot_glue.c191 end_block = lldiv(mtd->size, mtd->erasesize - 1); in cmd_yaffs_devconfig()
227 dev->param.chunks_per_block = mtd->erasesize / mtd->writesize; in cmd_yaffs_devconfig()

Completed in 49 milliseconds

12