Home
last modified time | relevance | path

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

1234

/linux/drivers/mtd/tests/
A Dstresstest.c82 if (offs >= mtd->erasesize) in do_read()
83 offs -= mtd->erasesize; in do_read()
85 len = mtd->erasesize - offs; in do_read()
97 if (offs >= mtd->erasesize) { in do_write()
107 len = mtd->erasesize - offs; in do_write()
120 while (offs > mtd->erasesize) { in do_write()
121 offsets[eb++] = mtd->erasesize; in do_write()
122 offs -= mtd->erasesize; in do_write()
168 do_div(tmp, mtd->erasesize); in mtd_stresstest_init()
185 bufsize = mtd->erasesize * 2; in mtd_stresstest_init()
[all …]
A Dspeedtest.c47 loff_t addr = (loff_t)ebnum * mtd->erasesize; in multiblock_erase()
51 ei.len = mtd->erasesize * blocks; in multiblock_erase()
65 loff_t addr = (loff_t)ebnum * mtd->erasesize; in write_eraseblock()
73 loff_t addr = (loff_t)ebnum * mtd->erasesize; in write_eraseblock_by_page()
91 loff_t addr = (loff_t)ebnum * mtd->erasesize; in write_eraseblock_by_2pages()
109 loff_t addr = (loff_t)ebnum * mtd->erasesize; in read_eraseblock()
117 loff_t addr = (loff_t)ebnum * mtd->erasesize; in read_eraseblock_by_page()
135 loff_t addr = (loff_t)ebnum * mtd->erasesize; in read_eraseblock_by_2pages()
209 do_div(tmp, mtd->erasesize); in mtd_speedtest_init()
211 pgcnt = mtd->erasesize / pgsize; in mtd_speedtest_init()
[all …]
A Dtorturetest.c93 loff_t addr = (loff_t)ebnum * mtd->erasesize; in check_eraseblock()
94 size_t len = mtd->erasesize; in check_eraseblock()
147 loff_t addr = (loff_t)ebnum * mtd->erasesize; in write_pattern()
148 size_t len = mtd->erasesize; in write_pattern()
213 patt_5A5 = kmalloc(mtd->erasesize, GFP_KERNEL); in tort_init()
217 patt_A5A = kmalloc(mtd->erasesize, GFP_KERNEL); in tort_init()
221 patt_FF = kmalloc(mtd->erasesize, GFP_KERNEL); in tort_init()
225 check_buf = kmalloc(mtd->erasesize, GFP_KERNEL); in tort_init()
234 memset(patt_FF, 0xFF, mtd->erasesize); in tort_init()
235 for (i = 0; i < mtd->erasesize / pgsize; i++) { in tort_init()
[all …]
A Dpagetest.c43 loff_t addr = (loff_t)ebnum * mtd->erasesize; in write_eraseblock()
55 loff_t addr = (loff_t)ebnum * mtd->erasesize; in verify_eraseblock()
59 addr0 += mtd->erasesize; in verify_eraseblock()
63 addrn -= mtd->erasesize; in verify_eraseblock()
127 addr0 += mtd->erasesize; in crosstest()
131 addrn -= mtd->erasesize; in crosstest()
199 addr0 += mtd->erasesize; in erasecrosstest()
277 addr0 += mtd->erasesize; in erasetest()
349 do_div(tmp, mtd->erasesize); in mtd_pagetest_init()
351 pgcnt = mtd->erasesize / mtd->writesize; in mtd_pagetest_init()
[all …]
A Dsubpagetest.c47 loff_t addr = (loff_t)ebnum * mtd->erasesize; in write_eraseblock()
82 loff_t addr = (loff_t)ebnum * mtd->erasesize; in write_eraseblock2()
85 if (addr + (subpgsize * k) > (loff_t)(ebnum + 1) * mtd->erasesize) in write_eraseblock2()
121 loff_t addr = (loff_t)ebnum * mtd->erasesize; in verify_eraseblock()
182 loff_t addr = (loff_t)ebnum * mtd->erasesize; in verify_eraseblock2()
185 if (addr + (subpgsize * k) > (loff_t)(ebnum + 1) * mtd->erasesize) in verify_eraseblock2()
217 loff_t addr = (loff_t)ebnum * mtd->erasesize; in verify_eraseblock_ff()
220 for (j = 0; j < mtd->erasesize / subpgsize; ++j) { in verify_eraseblock_ff()
299 do_div(tmp, mtd->erasesize); in mtd_subpagetest_init()
301 pgcnt = mtd->erasesize / mtd->writesize; in mtd_subpagetest_init()
[all …]
A Dreadtest.c38 loff_t addr = (loff_t)ebnum * mtd->erasesize; in read_eraseblock_by_page()
86 n = mtd->erasesize; in dump_eraseblock()
143 do_div(tmp, mtd->erasesize); in mtd_readtest_init()
145 pgcnt = mtd->erasesize / pgsize; in mtd_readtest_init()
150 (unsigned long long)mtd->size, mtd->erasesize, in mtd_readtest_init()
154 iobuf = kmalloc(mtd->erasesize, GFP_KERNEL); in mtd_readtest_init()
157 iobuf1 = kmalloc(mtd->erasesize, GFP_KERNEL); in mtd_readtest_init()
A Doobtest.c61 loff_t addr = (loff_t)ebnum * mtd->erasesize; in write_eraseblock()
170 loff_t addr = (loff_t)ebnum * mtd->erasesize; in verify_eraseblock()
265 loff_t addr = (loff_t)ebnum * mtd->erasesize; in verify_eraseblock_in_one_go()
368 do_div(tmp, mtd->erasesize); in mtd_oobtest_init()
370 pgcnt = mtd->erasesize / mtd->writesize; in mtd_oobtest_init()
375 (unsigned long long)mtd->size, mtd->erasesize, in mtd_oobtest_init()
379 readbuf = kmalloc(mtd->erasesize, GFP_KERNEL); in mtd_oobtest_init()
382 writebuf = kmalloc(mtd->erasesize, GFP_KERNEL); in mtd_oobtest_init()
493 addr0 += mtd->erasesize; in mtd_oobtest_init()
644 addr = (loff_t)(i + 1) * mtd->erasesize - mtd->writesize; in mtd_oobtest_init()
[all …]
A Dmtd_test.c14 loff_t addr = (loff_t)ebnum * mtd->erasesize; in mtdtest_erase_eraseblock()
18 ei.len = mtd->erasesize; in mtdtest_erase_eraseblock()
32 loff_t addr = (loff_t)ebnum * mtd->erasesize; in is_block_bad()
/linux/drivers/mtd/
A Dmtdpstore.c33 off = ALIGN_DOWN(off, mtd->erasesize); in mtdpstore_block_isbad()
34 blknum = div_u64(off, mtd->erasesize); in mtdpstore_block_isbad()
55 off = ALIGN_DOWN(off, mtd->erasesize); in mtdpstore_panic_block_isbad()
56 blknum = div_u64(off, mtd->erasesize); in mtdpstore_panic_block_isbad()
87 off = ALIGN_DOWN(off, mtd->erasesize); in mtdpstore_block_mark_unused()
114 off = ALIGN_DOWN(off, mtd->erasesize); in mtdpstore_block_is_used()
156 off = ALIGN_DOWN(off, mtd->erasesize); in mtdpstore_block_clear_removed()
172 off = ALIGN_DOWN(off, mtd->erasesize); in mtdpstore_block_is_removed()
191 erase.len = cxt->mtd->erasesize; in mtdpstore_erase_do()
244 u32 erasesize = cxt->mtd->erasesize; in mtdpstore_security() local
[all …]
A Dmtdconcat.c414 (erase_regions[i].erasesize - 1))) in concat_erase()
672 concat->mtd.erasesize = subdev[0]->erasesize; in mtd_concat_create()
783 curr_erasesize = subdev[i]->erasesize; in mtd_concat_create()
798 erasesize; in mtd_concat_create()
811 concat->mtd.erasesize = curr_erasesize; in mtd_concat_create()
823 concat->mtd.erasesize = max_erasesize; in mtd_concat_create()
841 curr_erasesize = subdev[0]->erasesize; in mtd_concat_create()
852 erase_region_p->erasesize = in mtd_concat_create()
869 erasesize != curr_erasesize) { in mtd_concat_create()
871 erase_region_p->erasesize = in mtd_concat_create()
[all …]
A Dmtdoops.c77 u32 start_page_offset = mtd_div_by_eb(offset, mtd) * mtd->erasesize; in mtdoops_erase_block()
79 u32 erase_pages = mtd->erasesize / record_size; in mtdoops_erase_block()
85 erase.len = mtd->erasesize; in mtdoops_erase_block()
132 mod = (cxt->nextpage * record_size) % mtd->erasesize; in mtdoops_workfunc_erase()
134 cxt->nextpage = cxt->nextpage + ((mtd->erasesize - mod) / record_size); in mtdoops_workfunc_erase()
144 cxt->nextpage = cxt->nextpage + (mtd->erasesize / record_size); in mtdoops_workfunc_erase()
147 if (i == cxt->oops_pages / (mtd->erasesize / record_size)) { in mtdoops_workfunc_erase()
315 if (mtd->size < mtd->erasesize * 2) { in mtdoops_notify_add()
320 if (mtd->erasesize < record_size) { in mtdoops_notify_add()
A Dmtdpart.c40 master->writesize : master->erasesize; in allocate_partition()
130 child->erasesize = parent->erasesize; in allocate_partition()
158 if (child->erasesize < regions[i].erasesize) in allocate_partition()
159 child->erasesize = regions[i].erasesize; in allocate_partition()
161 BUG_ON(child->erasesize == 0); in allocate_partition()
164 child->erasesize = master->erasesize; in allocate_partition()
173 wr_alignment = child->erasesize; in allocate_partition()
207 offs += child->erasesize; in allocate_partition()
A Dmtdcore.c169 MTD_DEVICE_ATTR_RO(erasesize);
634 mtd->erasesize /= ngroups; in add_mtd_device()
636 mtd->erasesize; in add_mtd_device()
639 if (is_power_of_2(mtd->erasesize)) in add_mtd_device()
640 mtd->erasesize_shift = ffs(mtd->erasesize) - 1; in add_mtd_device()
1247 if (!mtd->erasesize || !master->_erase) in mtd_erase()
1262 master->erasesize; in mtd_erase()
1264 master->erasesize) - in mtd_erase()
1277 instr->fail_addr *= mtd->erasesize; in mtd_erase()
1517 base += master->erasesize; in mtd_io_emulated_slc()
[all …]
/linux/drivers/mtd/parsers/
A Dredboot.c94 offset = master->size + directory * master->erasesize; in parse_redboot_partitions()
101 offset -= master->erasesize; in parse_redboot_partitions()
104 offset = directory * master->erasesize; in parse_redboot_partitions()
106 offset += master->erasesize; in parse_redboot_partitions()
111 buf = vmalloc(master->erasesize); in parse_redboot_partitions()
119 ret = mtd_read(master, offset, master->erasesize, &retlen, in parse_redboot_partitions()
125 if (retlen != master->erasesize) { in parse_redboot_partitions()
148 if (swab32(buf[i].size) == master->erasesize || in parse_redboot_partitions()
149 (buf[i].size > master->erasesize in parse_redboot_partitions()
150 && swab32(buf[i].size) < master->erasesize)) { in parse_redboot_partitions()
[all …]
A Dar7part.c38 unsigned int pre_size = master->erasesize, post_size = 0; in create_mtd_partitions()
49 ar7_parts[0].size = master->erasesize; in create_mtd_partitions()
54 ar7_parts[1].size = master->erasesize; in create_mtd_partitions()
67 pre_size += master->erasesize; in create_mtd_partitions()
73 ar7_parts[1].offset = master->size - master->erasesize; in create_mtd_partitions()
74 post_size = master->erasesize; in create_mtd_partitions()
102 root_offset += master->erasesize - 1; in create_mtd_partitions()
103 root_offset &= ~(master->erasesize - 1); in create_mtd_partitions()
A Dafs.c81 u_int ptr = off + mtd->erasesize - 12; in afs_is_v1()
101 u_int ptr = off + mtd->erasesize - 8; in afs_is_v2()
142 ptr = off + mtd->erasesize - sizeof(fs); in afs_parse_v1_partition()
205 part->size = (iis.length + mtd->erasesize - 1) & ~(mtd->erasesize - 1); in afs_parse_v1_partition()
236 off, off + mtd->erasesize); in afs_parse_v2_partition()
239 ptr = off + mtd->erasesize - sizeof(footer); in afs_parse_v2_partition()
248 ptr = off + mtd->erasesize - sizeof(footer) - footer[8]; in afs_parse_v2_partition()
306 region_end += (mtd->erasesize - 1); in afs_parse_v2_partition()
307 region_end &= ~(mtd->erasesize -1); in afs_parse_v2_partition()
333 for (i = off = sz = 0; off < mtd->size; off += mtd->erasesize) { in parse_afs_partitions()
[all …]
/linux/drivers/mtd/devices/
A Dphram.c92 static int register_device(char *name, phys_addr_t start, size_t len, uint32_t erasesize) in register_device() argument
119 new->mtd.erasesize = erasesize; in register_device()
224 uint64_t erasesize = PAGE_SIZE; in phram_setup() local
260 ret = parse_num64(&erasesize, token[3]); in phram_setup()
267 if (erasesize) in phram_setup()
268 div_u64_rem(len, (uint32_t)erasesize, &rem); in phram_setup()
270 if (len == 0 || erasesize == 0 || erasesize > len in phram_setup()
271 || erasesize > UINT_MAX || rem) { in phram_setup()
277 ret = register_device(name, start, len, (uint32_t)erasesize); in phram_setup()
281 pr_info("%s device: %#llx at %#llx for erasesize %#llx\n", name, len, start, erasesize); in phram_setup()
A Dlart.c385 if (i < 0 || (instr->addr & (mtd->eraseregions[i].erasesize - 1))) in flash_erase()
402 if (i < 0 || ((instr->addr + instr->len) & (mtd->eraseregions[i].erasesize - 1))) in flash_erase()
416 addr += mtd->eraseregions[i].erasesize; in flash_erase()
417 len -= mtd->eraseregions[i].erasesize; in flash_erase()
419 …if (addr == mtd->eraseregions[i].offset + (mtd->eraseregions[i].erasesize * mtd->eraseregions[i].n… in flash_erase()
572 .erasesize = FLASH_BLOCKSIZE_PARAM,
578 .erasesize = FLASH_BLOCKSIZE_MAIN,
623 mtd.erasesize = FLASH_BLOCKSIZE_MAIN; in lart_flash_init()
639 mtd.erasesize,mtd.erasesize / 1024, in lart_flash_init()
650 result,mtd.eraseregions[result].erasesize,mtd.eraseregions[result].erasesize / 1024, in lart_flash_init()
A Dsst25l.c173 if ((uint32_t)instr->len % mtd->erasesize) in sst25l_erase()
176 if ((uint32_t)instr->addr % mtd->erasesize) in sst25l_erase()
198 addr += mtd->erasesize; in sst25l_erase()
374 flash->mtd.erasesize = flash_info->erase_size; in sst25l_probe()
389 flash->mtd.erasesize, flash->mtd.erasesize / 1024, in sst25l_probe()
/linux/drivers/mtd/maps/
A Dscb2_flash.c104 mtd->erasesize /= 2; in scb2_fixup_mtd()
107 region->erasesize /= 2; in scb2_fixup_mtd()
119 if (region->numblocks * region->erasesize > mtd->size) { in scb2_fixup_mtd()
121 region->erasesize); in scb2_fixup_mtd()
/linux/drivers/mtd/ubi/
A Dgluebi.c160 lnum = div_u64_rem(from, mtd->erasesize, &offs); in gluebi_read()
163 size_t to_read = mtd->erasesize - offs; in gluebi_read()
200 lnum = div_u64_rem(to, mtd->erasesize, &offs); in gluebi_write()
207 size_t to_write = mtd->erasesize - offs; in gluebi_write()
265 instr->fail_addr = (long long)lnum * mtd->erasesize; in gluebi_erase()
302 mtd->erasesize = vi->usable_leb_size; in gluebi_create()
/linux/drivers/mtd/chips/
A Dcfi_cmdset_0020.c201 if (mtd->erasesize < ersize) { in cfi_staa_setup()
202 mtd->erasesize = ersize; in cfi_staa_setup()
224 mtd->eraseregions[i].erasesize, in cfi_staa_setup()
954 adr += regions[i].erasesize; in cfi_staa_erase_varsize()
955 len -= regions[i].erasesize; in cfi_staa_erase_varsize()
1136 if (ofs & (mtd->erasesize - 1)) in cfi_staa_lock()
1139 if (len & (mtd->erasesize -1)) in cfi_staa_lock()
1164 adr += mtd->erasesize; in cfi_staa_lock()
1165 len -= mtd->erasesize; in cfi_staa_lock()
1293 temp_adr += mtd->erasesize; in cfi_staa_unlock()
[all …]
A Dmap_ram.c78 mtd->erasesize = PAGE_SIZE; in map_ram_probe()
79 while(mtd->size & (mtd->erasesize - 1)) in map_ram_probe()
80 mtd->erasesize >>= 1; in map_ram_probe()
/linux/include/linux/mtd/
A Dmtd.h38 uint32_t erasesize; /* For this region */ member
243 uint32_t erasesize; member
577 do_div(sz, mtd->erasesize); in mtd_div_by_eb()
585 return do_div(sz, mtd->erasesize); in mtd_mod_by_eb()
602 if (WARN_ON(!mtd->erasesize)) in mtd_align_erase_req()
613 req->len += mtd->erasesize - mod; in mtd_align_erase_req()
635 return master->erasesize / mtd->writesize; in mtd_wunit_per_eb()
/linux/drivers/mtd/spi-nor/
A Dxilinx.c70 nor->mtd.erasesize = 8 * nor->page_size; in xilinx_nor_setup()
74 nor->mtd.erasesize = nor->info->sector_size; in xilinx_nor_setup()

Completed in 55 milliseconds

1234