/linux-3.4.99/drivers/mtd/tests/ |
D | mtd_stresstest.c | 108 loff_t addr = ebnum * mtd->erasesize; in erase_eraseblock() 113 ei.len = mtd->erasesize; in erase_eraseblock() 132 loff_t addr = ebnum * mtd->erasesize; in is_block_bad() 150 if (offs >= mtd->erasesize) in do_read() 151 offs -= mtd->erasesize; in do_read() 152 if (offs + len > mtd->erasesize) in do_read() 153 len = mtd->erasesize - offs; in do_read() 155 addr = eb * mtd->erasesize + offs; in do_read() 176 if (offs >= mtd->erasesize) { in do_write() 184 if (offs + len > mtd->erasesize) { in do_write() [all …]
|
D | mtd_speedtest.c | 75 loff_t addr = ebnum * mtd->erasesize; in erase_eraseblock() 80 ei.len = mtd->erasesize; in erase_eraseblock() 101 loff_t addr = ebnum * mtd->erasesize; in multiblock_erase() 106 ei.len = mtd->erasesize * blocks; in multiblock_erase() 144 loff_t addr = ebnum * mtd->erasesize; in write_eraseblock() 146 err = mtd_write(mtd, addr, mtd->erasesize, &written, iobuf); in write_eraseblock() 147 if (err || written != mtd->erasesize) { in write_eraseblock() 160 loff_t addr = ebnum * mtd->erasesize; in write_eraseblock_by_page() 183 loff_t addr = ebnum * mtd->erasesize; in write_eraseblock_by_2pages() 215 loff_t addr = ebnum * mtd->erasesize; in read_eraseblock() [all …]
|
D | mtd_torturetest.c | 101 loff_t addr = ebnum * mtd->erasesize; in erase_eraseblock() 106 ei.len = mtd->erasesize; in erase_eraseblock() 131 loff_t addr = ebnum * mtd->erasesize; in check_eraseblock() 132 size_t len = mtd->erasesize; in check_eraseblock() 135 addr = (ebnum + 1) * mtd->erasesize - pgcnt * pgsize; in check_eraseblock() 185 loff_t addr = ebnum * mtd->erasesize; in write_pattern() 186 size_t len = mtd->erasesize; in write_pattern() 189 addr = (ebnum + 1) * mtd->erasesize - pgcnt * pgsize; in write_pattern() 245 if (pgcnt && (pgcnt > mtd->erasesize / pgsize || pgcnt < 0)) { in tort_init() 251 patt_5A5 = kmalloc(mtd->erasesize, GFP_KERNEL); in tort_init() [all …]
|
D | mtd_pagetest.c | 73 loff_t addr = ebnum * mtd->erasesize; in erase_eraseblock() 78 ei.len = mtd->erasesize; in erase_eraseblock() 99 loff_t addr = ebnum * mtd->erasesize; in write_eraseblock() 101 set_random_data(writebuf, mtd->erasesize); in write_eraseblock() 103 err = mtd_write(mtd, addr, mtd->erasesize, &written, writebuf); in write_eraseblock() 104 if (err || written != mtd->erasesize) in write_eraseblock() 117 loff_t addr = ebnum * mtd->erasesize; in verify_eraseblock() 121 addr0 += mtd->erasesize; in verify_eraseblock() 125 addrn -= mtd->erasesize; in verify_eraseblock() 127 set_random_data(writebuf, mtd->erasesize); in verify_eraseblock() [all …]
|
D | mtd_subpagetest.c | 76 loff_t addr = ebnum * mtd->erasesize; in erase_eraseblock() 81 ei.len = mtd->erasesize; in erase_eraseblock() 120 loff_t addr = ebnum * mtd->erasesize; in write_eraseblock() 155 loff_t addr = ebnum * mtd->erasesize; in write_eraseblock2() 158 if (addr + (subpgsize * k) > (ebnum + 1) * mtd->erasesize) in write_eraseblock2() 194 loff_t addr = ebnum * mtd->erasesize; in verify_eraseblock() 255 loff_t addr = ebnum * mtd->erasesize; in verify_eraseblock2() 258 if (addr + (subpgsize * k) > (ebnum + 1) * mtd->erasesize) in verify_eraseblock2() 290 loff_t addr = ebnum * mtd->erasesize; in verify_eraseblock_ff() 293 for (j = 0; j < mtd->erasesize / subpgsize; ++j) { in verify_eraseblock_ff() [all …]
|
D | mtd_readtest.c | 49 loff_t addr = ebnum * mtd->erasesize; in read_eraseblock_by_page() 103 n = mtd->erasesize; in dump_eraseblock() 132 loff_t addr = ebnum * mtd->erasesize; in is_block_bad() 195 do_div(tmp, mtd->erasesize); in mtd_readtest_init() 197 pgcnt = mtd->erasesize / pgsize; in mtd_readtest_init() 202 (unsigned long long)mtd->size, mtd->erasesize, in mtd_readtest_init() 206 iobuf = kmalloc(mtd->erasesize, GFP_KERNEL); in mtd_readtest_init() 211 iobuf1 = kmalloc(mtd->erasesize, GFP_KERNEL); in mtd_readtest_init()
|
D | mtd_oobtest.c | 74 loff_t addr = ebnum * mtd->erasesize; in erase_eraseblock() 79 ei.len = mtd->erasesize; in erase_eraseblock() 130 loff_t addr = ebnum * mtd->erasesize; in write_eraseblock() 183 loff_t addr = ebnum * mtd->erasesize; in verify_eraseblock() 275 loff_t addr = ebnum * mtd->erasesize; in verify_eraseblock_in_one_go() 330 loff_t addr = ebnum * mtd->erasesize; in is_block_bad() 391 do_div(tmp, mtd->erasesize); in mtd_oobtest_init() 393 pgcnt = mtd->erasesize / mtd->writesize; in mtd_oobtest_init() 398 (unsigned long long)mtd->size, mtd->erasesize, in mtd_oobtest_init() 402 readbuf = kmalloc(mtd->erasesize, GFP_KERNEL); in mtd_oobtest_init() [all …]
|
/linux-3.4.99/drivers/mtd/ |
D | redboot.c | 80 offset = master->size + directory * master->erasesize; in parse_redboot_partitions() 87 offset -= master->erasesize; in parse_redboot_partitions() 90 offset = directory * master->erasesize; in parse_redboot_partitions() 92 offset += master->erasesize; in parse_redboot_partitions() 97 buf = vmalloc(master->erasesize); in parse_redboot_partitions() 105 ret = mtd_read(master, offset, master->erasesize, &retlen, in parse_redboot_partitions() 111 if (retlen != master->erasesize) { in parse_redboot_partitions() 116 numslots = (master->erasesize / sizeof(struct fis_image_desc)); in parse_redboot_partitions() 134 if (swab32(buf[i].size) == master->erasesize || in parse_redboot_partitions() 135 (buf[i].size > master->erasesize in parse_redboot_partitions() [all …]
|
D | ar7part.c | 55 unsigned int pre_size = master->erasesize, post_size = 0; in create_mtd_partitions() 66 ar7_parts[0].size = master->erasesize; in create_mtd_partitions() 71 ar7_parts[1].size = master->erasesize; in create_mtd_partitions() 84 pre_size += master->erasesize; in create_mtd_partitions() 90 ar7_parts[1].offset = master->size - master->erasesize; in create_mtd_partitions() 91 post_size = master->erasesize; in create_mtd_partitions() 119 root_offset += master->erasesize - 1; in create_mtd_partitions() 120 root_offset &= ~(master->erasesize - 1); in create_mtd_partitions()
|
D | mtdconcat.c | 390 if (instr->addr & (concat->mtd.erasesize - 1)) in concat_erase() 392 if (instr->len & (concat->mtd.erasesize - 1)) in concat_erase() 411 if (i < 0 || instr->addr & (erase_regions[i].erasesize - 1)) in concat_erase() 425 (erase_regions[i].erasesize - 1))) in concat_erase() 711 concat->mtd.erasesize = subdev[0]->erasesize; in mtd_concat_create() 810 max_erasesize = curr_erasesize = subdev[0]->erasesize; in mtd_concat_create() 815 if (subdev[i]->erasesize != curr_erasesize) { in mtd_concat_create() 818 curr_erasesize = subdev[i]->erasesize; in mtd_concat_create() 828 if (subdev[i]->eraseregions[j].erasesize != in mtd_concat_create() 833 erasesize; in mtd_concat_create() [all …]
|
D | afs.c | 74 u_int ptr = off + mtd->erasesize - sizeof(fs); in afs_read_footer() 184 for (idx = off = sz = 0; off < mtd->size; off += mtd->erasesize) { in parse_afs_partitions() 217 for (idx = off = 0; off < mtd->size; off += mtd->erasesize) { in parse_afs_partitions() 238 parts[idx].size = (iis.length + mtd->erasesize - 1) & ~(mtd->erasesize - 1); in parse_afs_partitions()
|
D | mtdoops.c | 96 u32 start_page_offset = mtd_div_by_eb(offset, mtd) * mtd->erasesize; in mtdoops_erase_block() 98 u32 erase_pages = mtd->erasesize / record_size; in mtdoops_erase_block() 109 erase.len = mtd->erasesize; in mtdoops_erase_block() 165 mod = (cxt->nextpage * record_size) % mtd->erasesize; in mtdoops_workfunc_erase() 167 cxt->nextpage = cxt->nextpage + ((mtd->erasesize - mod) / record_size); in mtdoops_workfunc_erase() 184 cxt->nextpage = cxt->nextpage + (mtd->erasesize / record_size); in mtdoops_workfunc_erase() 187 if (i == cxt->oops_pages / (mtd->erasesize / record_size)) { in mtdoops_workfunc_erase() 354 if (mtd->size < mtd->erasesize * 2) { in mtdoops_notify_add() 359 if (mtd->erasesize < record_size) { in mtdoops_notify_add()
|
D | bcm63xxpart.c | 89 cfelen = max_t(uint32_t, master->erasesize, BCM63XX_MIN_CFE_SIZE); in bcm63xx_parse_cfe_partitions() 90 nvramlen = max_t(uint32_t, master->erasesize, BCM63XX_MIN_NVRAM_SIZE); in bcm63xx_parse_cfe_partitions() 121 spareaddr = roundup(totallen, master->erasesize) + cfelen; in bcm63xx_parse_cfe_partitions()
|
D | mtdpart.c | 437 slave->offset = (mtd_div_by_eb(cur_offset, master) + 1) * master->erasesize; in allocate_partition() 492 if (slave->mtd.erasesize < regions[i].erasesize) { in allocate_partition() 493 slave->mtd.erasesize = regions[i].erasesize; in allocate_partition() 496 BUG_ON(slave->mtd.erasesize == 0); in allocate_partition() 499 slave->mtd.erasesize = master->erasesize; in allocate_partition() 526 offs += slave->mtd.erasesize; in allocate_partition()
|
D | ssfdc.c | 124 for (k = 0, offset = 0; k < 4; k++, offset += mtd->erasesize) { in get_valid_cis_sector() 311 ssfdc->cis_block = cis_sector / (mtd->erasesize >> SECTOR_SHIFT); in ssfdcr_add_mtd() 312 ssfdc->erase_size = mtd->erasesize; in ssfdcr_add_mtd() 313 ssfdc->map_len = (u32)mtd->size / mtd->erasesize; in ssfdcr_add_mtd()
|
/linux-3.4.99/drivers/mtd/devices/ |
D | lart.c | 388 if (i < 0 || (instr->addr & (mtd->eraseregions[i].erasesize - 1))) in flash_erase() 405 if (i < 0 || ((instr->addr + instr->len) & (mtd->eraseregions[i].erasesize - 1))) in flash_erase() 422 addr += mtd->eraseregions[i].erasesize; in flash_erase() 423 len -= mtd->eraseregions[i].erasesize; in flash_erase() 425 …if (addr == mtd->eraseregions[i].offset + (mtd->eraseregions[i].erasesize * mtd->eraseregions[i].n… in flash_erase() 575 .erasesize = FLASH_BLOCKSIZE_PARAM, 581 .erasesize = FLASH_BLOCKSIZE_MAIN, 626 mtd.erasesize = FLASH_BLOCKSIZE_MAIN; in lart_flash_init() 642 mtd.erasesize,mtd.erasesize / 1024, in lart_flash_init() 653 result,mtd.eraseregions[result].erasesize,mtd.eraseregions[result].erasesize / 1024, in lart_flash_init()
|
D | sst25l.c | 178 if ((uint32_t)instr->len % mtd->erasesize) in sst25l_erase() 181 if ((uint32_t)instr->addr % mtd->erasesize) in sst25l_erase() 204 addr += mtd->erasesize; in sst25l_erase() 383 flash->mtd.erasesize = flash_info->erase_size; in sst25l_probe() 398 flash->mtd.erasesize, flash->mtd.erasesize / 1024, in sst25l_probe()
|
D | m25p80.c | 253 __func__, flash->mtd.erasesize / 1024, offset); in erase_sector() 291 div_u64_rem(instr->len, mtd->erasesize, &rem); in m25p80_erase() 322 addr += mtd->erasesize; in m25p80_erase() 323 len -= mtd->erasesize; in m25p80_erase() 891 flash->mtd.erasesize = 4096; in m25p_probe() 894 flash->mtd.erasesize = info->sector_size; in m25p_probe() 923 flash->mtd.erasesize, flash->mtd.erasesize / 1024, in m25p_probe() 932 flash->mtd.eraseregions[i].erasesize, in m25p_probe() 933 flash->mtd.eraseregions[i].erasesize / 1024, in m25p_probe()
|
/linux-3.4.99/drivers/mtd/maps/ |
D | scb2_flash.c | 105 mtd->erasesize /= 2; in scb2_fixup_mtd() 108 region->erasesize /= 2; in scb2_fixup_mtd() 120 if (region->numblocks * region->erasesize > mtd->size) { in scb2_fixup_mtd() 122 region->erasesize); in scb2_fixup_mtd()
|
D | cdb89712.c | 68 flash_mtd->erasesize = 0x10000; in init_cdb89712_flash() 142 sram_mtd->erasesize = 16; in init_cdb89712_sram() 210 bootrom_mtd->erasesize = 0x10000; in init_cdb89712_bootrom()
|
/linux-3.4.99/drivers/mtd/onenand/ |
D | onenand_sim.c | 270 int erasesize, rgn; in onenand_data_handle() local 349 erasesize = mtd->eraseregions[rgn].erasesize; in onenand_data_handle() 351 erasesize = mtd->erasesize; in onenand_data_handle() 353 memset(ONENAND_CORE(flash) + offset, 0xff, erasesize); in onenand_data_handle() 355 (erasesize >> 5)); in onenand_data_handle()
|
/linux-3.4.99/drivers/mtd/ubi/ |
D | gluebi.c | 178 lnum = div_u64_rem(from, mtd->erasesize, &offs); in gluebi_read() 181 size_t to_read = mtd->erasesize - offs; in gluebi_read() 218 lnum = div_u64_rem(to, mtd->erasesize, &offs); in gluebi_write() 225 size_t to_write = mtd->erasesize - offs; in gluebi_write() 286 instr->fail_addr = (long long)lnum * mtd->erasesize; in gluebi_erase() 323 mtd->erasesize = vi->usable_leb_size; in gluebi_create()
|
/linux-3.4.99/drivers/mtd/chips/ |
D | map_ram.c | 75 mtd->erasesize = PAGE_SIZE; in map_ram_probe() 76 while(mtd->size & (mtd->erasesize - 1)) in map_ram_probe() 77 mtd->erasesize >>= 1; in map_ram_probe()
|
D | cfi_cmdset_0020.c | 203 if (mtd->erasesize < ersize) { in cfi_staa_setup() 204 mtd->erasesize = ersize; in cfi_staa_setup() 208 mtd->eraseregions[(j*cfi->cfiq->NumEraseRegions)+i].erasesize = ersize; in cfi_staa_setup() 226 mtd->eraseregions[i].erasesize, in cfi_staa_setup() 923 if (instr->addr & (regions[i].erasesize-1)) in cfi_staa_erase_varsize() 941 if ((instr->addr + instr->len) & (regions[i].erasesize-1)) in cfi_staa_erase_varsize() 956 adr += regions[i].erasesize; in cfi_staa_erase_varsize() 957 len -= regions[i].erasesize; in cfi_staa_erase_varsize() 959 …if (adr % (1<< cfi->chipshift) == (((unsigned long)regions[i].offset + (regions[i].erasesize * reg… in cfi_staa_erase_varsize() 1140 if (ofs & (mtd->erasesize - 1)) in cfi_staa_lock() [all …]
|
/linux-3.4.99/fs/logfs/ |
D | dev_mtd.c | 98 BUG_ON(len % mtd->erasesize); in logfs_mtd_erase() 157 *ofs += mtd->erasesize; in logfs_mtd_find_first_sb() 172 *ofs = mtd->size - mtd->erasesize; in logfs_mtd_find_last_sb() 174 *ofs -= mtd->erasesize; in logfs_mtd_find_last_sb() 178 *ofs = *ofs + mtd->erasesize - 0x1000; in logfs_mtd_find_last_sb()
|