Searched refs:erase (Results 1 - 200 of 258) sorted by relevance

12

/linux-4.1.27/arch/mn10300/include/asm/
H A Dtermios.h6 /* intr=^C quit=^| erase=del kill=^U
/linux-4.1.27/arch/frv/include/asm/
H A Dtermios.h6 /* intr=^C quit=^| erase=del kill=^U
/linux-4.1.27/drivers/mtd/
H A Dmtdconcat.c341 static int concat_dev_erase(struct mtd_info *mtd, struct erase_info *erase) concat_dev_erase() argument
352 erase->mtd = mtd; concat_dev_erase()
353 erase->callback = concat_erase_callback; concat_dev_erase()
354 erase->priv = (unsigned long) &waitq; concat_dev_erase()
360 err = mtd_erase(mtd, erase); concat_dev_erase()
364 if (erase->state != MTD_ERASE_DONE concat_dev_erase()
365 && erase->state != MTD_ERASE_FAILED) concat_dev_erase()
370 err = (erase->state == MTD_ERASE_FAILED) ? -EIO : 0; concat_dev_erase()
381 struct erase_info *erase; concat_erase() local
384 * Check for proper erase block alignment of the to-be-erased area. concat_erase()
385 * It is easier to do this based on the super device's erase concat_erase()
390 /* the easy case: device has uniform erase block size */ concat_erase()
396 /* device has variable erase size */ concat_erase()
401 * Find the erase region where the to-be-erased area begins: concat_erase()
410 * offset is aligned to this region's erase size: concat_erase()
416 * now find the erase region where the to-be-erased area ends: concat_erase()
423 * check if the ending offset is aligned to this region's erase size concat_erase()
431 erase = kmalloc(sizeof (struct erase_info), GFP_KERNEL); concat_erase()
433 if (!erase) concat_erase()
436 *erase = *instr; concat_erase()
445 if (subdev->size <= erase->addr) { concat_erase()
446 erase->addr -= subdev->size; concat_erase()
456 /* now do the erase: */ concat_erase()
463 if (erase->addr + length > subdev->size) concat_erase()
464 erase->len = subdev->size - erase->addr; concat_erase()
466 erase->len = length; concat_erase()
468 length -= erase->len; concat_erase()
469 if ((err = concat_dev_erase(subdev, erase))) { concat_erase()
473 if (erase->fail_addr != MTD_FAIL_ADDR_UNKNOWN) concat_erase()
474 instr->fail_addr = erase->fail_addr + offset; concat_erase()
478 * erase->addr specifies the offset of the area to be concat_erase()
485 erase->addr = 0; concat_erase()
488 instr->state = erase->state; concat_erase()
489 kfree(erase); concat_erase()
796 * Combine the erase block size info of the subdevices: mtd_concat_create()
799 * many changes in erase size we have mtd_concat_create()
805 /* current subdevice has uniform erase size */ mtd_concat_create()
807 /* if it differs from the last subdevice's erase size, count it */ mtd_concat_create()
814 /* current subdevice has variable erase size */ mtd_concat_create()
818 /* walk the list of erase regions, count any changes */ mtd_concat_create()
834 * All subdevices have the same uniform erase size. mtd_concat_create()
843 * erase block size varies across the subdevices: allocate mtd_concat_create()
844 * space to store the data describing the variable erase regions mtd_concat_create()
857 ("memory allocation error while creating erase region list" mtd_concat_create()
864 * in erase region info: mtd_concat_create()
870 /* current subdevice has uniform erase size */ mtd_concat_create()
889 /* current subdevice has variable erase size */ mtd_concat_create()
892 /* walk the list of erase regions, count any changes */ mtd_concat_create()
H A Drfd_ftl.c27 MODULE_PARM_DESC(block_size, "Block size to use by RFD, defaults to erase unit size");
39 /* An erase unit should start with this value */
73 u_int block_size; /* size of erase unit */
74 u_int total_blocks; /* number of erase units */
75 u_int header_sectors_per_block; /* header sectors in erase unit */
76 u_int data_sectors_per_block; /* data sectors in erase unit */
163 /* each erase block has three bytes header, followed by the map */ scan_header()
225 printk(KERN_WARNING PREFIX "'%s': no empty erase unit found\n", scan_header()
269 static void erase_callback(struct erase_info *erase) erase_callback() argument
276 part = (struct partition*)erase->priv; erase_callback()
278 i = (u32)erase->addr / part->block_size; erase_callback()
279 if (i >= part->total_blocks || part->blocks[i].offset != erase->addr || erase_callback()
280 erase->addr > UINT_MAX) { erase_callback()
281 printk(KERN_ERR PREFIX "erase callback for unknown offset %llx " erase_callback()
282 "on '%s'\n", (unsigned long long)erase->addr, part->mbd.mtd->name); erase_callback()
286 if (erase->state != MTD_ERASE_DONE) { erase_callback()
287 printk(KERN_WARNING PREFIX "erase failed at 0x%llx on '%s', " erase_callback()
288 "state %d\n", (unsigned long long)erase->addr, erase_callback()
289 part->mbd.mtd->name, erase->state); erase_callback()
295 kfree(erase); erase_callback()
323 kfree(erase); erase_callback()
328 struct erase_info *erase; erase_block() local
331 erase = kmalloc(sizeof(struct erase_info), GFP_KERNEL); erase_block()
332 if (!erase) erase_block()
335 erase->mtd = part->mbd.mtd; erase_block()
336 erase->callback = erase_callback; erase_block()
337 erase->addr = part->blocks[block].offset; erase_block()
338 erase->len = part->block_size; erase_block()
339 erase->priv = (u_long)part; erase_block()
344 rc = mtd_erase(part->mbd.mtd, erase); erase_block()
347 printk(KERN_ERR PREFIX "erase of region %llx,%llx on '%s' " erase_block()
348 "failed\n", (unsigned long long)erase->addr, erase_block()
349 (unsigned long long)erase->len, part->mbd.mtd->name); erase_block()
350 kfree(erase); erase_block()
808 pr_debug("rfd_ftl_remove_dev:'%s': erase unit #%02d: %d erases\n", rfd_ftl_remove_dev()
H A Dmtdoops.c99 struct erase_info erase; mtdoops_erase_block() local
106 erase.mtd = mtd; mtdoops_erase_block()
107 erase.callback = mtdoops_erase_callback; mtdoops_erase_block()
108 erase.addr = offset; mtdoops_erase_block()
109 erase.len = mtd->erasesize; mtdoops_erase_block()
110 erase.priv = (u_long)&wait_q; mtdoops_erase_block()
115 ret = mtd_erase(mtd, &erase); mtdoops_erase_block()
119 printk(KERN_WARNING "mtdoops: erase of region [0x%llx, 0x%llx] on \"%s\" failed\n", mtdoops_erase_block()
120 (unsigned long long)erase.addr, mtdoops_erase_block()
121 (unsigned long long)erase.len, mtddev); mtdoops_erase_block()
125 schedule(); /* Wait for erase to finish. */ mtdoops_erase_block()
149 printk(KERN_DEBUG "mtdoops: ready %d, %d (no erase)\n", mtdoops_inc_counter()
H A Dmtdswap.c58 * Frequency value 6 means 1/6 of the GC passes will pick an erase block based
61 * The lower freq2 should be chosen so that it makes sure the maximum erase
63 * trying to make erase differences large.
156 #define MTDSWAP_ERASE_RETRIES 3 /* Before marking erase block bad */
169 * thread. The thread can consume a full erase block when moving a
189 MODULE_PARM_DESC(spare_eblocks, "Percentage of spare erase blocks for "
427 * Are there any erase blocks without MAGIC_CLEAN header, presumably
428 * because power was cut off after erase but before header write? We
429 * need to guestimate the erase count.
551 struct erase_info erase; mtdswap_erase_block() local
562 memset(&erase, 0, sizeof(struct erase_info)); mtdswap_erase_block()
564 erase.mtd = mtd; mtdswap_erase_block()
565 erase.callback = mtdswap_erase_callback; mtdswap_erase_block()
566 erase.addr = mtdswap_eb_offset(d, eb); mtdswap_erase_block()
567 erase.len = mtd->erasesize; mtdswap_erase_block()
568 erase.priv = (u_long)&wq; mtdswap_erase_block()
570 ret = mtd_erase(mtd, &erase); mtdswap_erase_block()
574 "erase of erase block %#llx on %s failed", mtdswap_erase_block()
575 erase.addr, mtd->name); mtdswap_erase_block()
580 dev_err(d->dev, "Cannot erase erase block %#llx on %s\n", mtdswap_erase_block()
581 erase.addr, mtd->name); mtdswap_erase_block()
587 ret = wait_event_interruptible(wq, erase.state == MTD_ERASE_DONE || mtdswap_erase_block()
588 erase.state == MTD_ERASE_FAILED); mtdswap_erase_block()
590 dev_err(d->dev, "Interrupted erase block %#llx erassure on %s", mtdswap_erase_block()
591 erase.addr, mtd->name); mtdswap_erase_block()
595 if (erase.state == MTD_ERASE_FAILED) { mtdswap_erase_block()
598 "erase of erase block %#llx on %s failed", mtdswap_erase_block()
599 erase.addr, mtd->name); mtdswap_erase_block()
1272 seq_printf(s, "%s:\t%5d erase blocks, erased min %d, " mtdswap_show()
1276 seq_printf(s, "%s:\t%5d erase blocks, all erased %d " mtdswap_show()
1281 seq_printf(s, "bad:\t%5u erase blocks\n", bb_cnt); mtdswap_show()
1284 seq_printf(s, "current erase block: %u pages used, %u free, " mtdswap_show()
1482 printk(KERN_ERR "%s: Not enough erase blocks. %u available, " mtdswap_add_mtd()
H A Dftl.c102 /* Maximum number of outstanding erase requests per socket */
152 partition. build_maps() reads all the erase unit headers, builds
153 the erase unit map, and then builds the virtual page map.
207 /* Set up erase unit maps */ build_maps()
252 /* Pick anything reasonable for the erase count */ build_maps()
264 printk(KERN_NOTICE "ftl_cs: format error: erase units " build_maps()
328 Erase_xfer() schedules an asynchronous erase operation for a
338 struct erase_info *erase; erase_xfer() local
344 /* Is there a free erase slot? Always in MTD. */ erase_xfer()
347 erase=kmalloc(sizeof(struct erase_info), GFP_KERNEL); erase_xfer()
348 if (!erase) erase_xfer()
351 erase->mtd = part->mbd.mtd; erase_xfer()
352 erase->callback = ftl_erase_callback; erase_xfer()
353 erase->addr = xfer->Offset; erase_xfer()
354 erase->len = 1 << part->header.EraseUnitSize; erase_xfer()
355 erase->priv = (u_long)part; erase_xfer()
357 ret = mtd_erase(part->mbd.mtd, erase); erase_xfer()
362 kfree(erase); erase_xfer()
374 static void ftl_erase_callback(struct erase_info *erase) ftl_erase_callback() argument
381 part = (partition_t *)(erase->priv); ftl_erase_callback()
384 if (part->XferInfo[i].Offset == erase->addr) break; ftl_erase_callback()
388 "erase lookup failed!\n"); ftl_erase_callback()
393 if (erase->state == MTD_ERASE_DONE) ftl_erase_callback()
397 printk(KERN_NOTICE "ftl_cs: erase failed: state = %d\n", ftl_erase_callback()
398 erase->state); ftl_erase_callback()
401 kfree(erase); ftl_erase_callback()
453 Copy_erase_unit() takes a full erase block and a transfer unit,
593 reclaim_block() picks a full erase unit and a transfer unit and
595 schedules an erase on the expired block.
597 What's a good way to decide which transfer unit and which erase
706 the BAM cache for the erase unit containing the free block. It
707 returns the block index -- the erase unit is just the currently
733 /* Find an erase unit with some free space */ find_free()
1014 pr_debug("FTL erase sector %ld for %d sectors\n", ftl_discardsect()
H A Dmtdblock.c67 struct erase_info erase; erase_write() local
74 * First, let's erase the flash block. erase_write()
78 erase.mtd = mtd; erase_write()
79 erase.callback = erase_callback; erase_write()
80 erase.addr = pos; erase_write()
81 erase.len = len; erase_write()
82 erase.priv = (u_long)&wait_q; erase_write()
87 ret = mtd_erase(mtd, &erase); erase_write()
91 printk (KERN_WARNING "mtdblock: erase of region [0x%lx, 0x%x] " erase_write()
97 schedule(); /* Wait for erase to finish. */ erase_write()
396 MODULE_DESCRIPTION("Caching read/erase/writeback block device emulation access to MTD devices");
H A Dsm_ftl.c407 /* If write fails. try to erase the block */ sm_write_block()
453 * If erase succeeds, it updates free block fifo, otherwise marks block as bad
460 struct erase_info erase; sm_erase_block() local
462 erase.mtd = mtd; sm_erase_block()
463 erase.callback = sm_erase_callback; sm_erase_block()
464 erase.addr = sm_mkoffset(ftl, zone_num, block, 0); sm_erase_block()
465 erase.len = ftl->block_size; sm_erase_block()
466 erase.priv = (u_long)ftl; sm_erase_block()
474 sm_printk("attempted to erase the CIS!"); sm_erase_block()
478 if (mtd_erase(mtd, &erase)) { sm_erase_block()
479 sm_printk("erase of block %d in zone %d failed", sm_erase_block()
484 if (erase.state == MTD_ERASE_PENDING) sm_erase_block()
487 if (erase.state != MTD_ERASE_DONE) { sm_erase_block()
488 sm_printk("erase of block %d in zone %d failed after wait", sm_erase_block()
539 /* If the block is sliced (partially erased usually) erase it */ sm_check_block()
631 /* Test for proper write,erase and oob sizes */ sm_get_media_info()
795 first sector, because erase happens in one shot */ sm_init_zone()
815 /* We can try to erase it, or mark it as bad, but sm_init_zone()
848 known which is more recent, thus just erase one of them sm_init_zone()
981 /* Write succesfull, so erase and free the old block */ sm_cache_flush()
H A Dmtdchar.c656 struct erase_info *erase; mtdchar_ioctl() local
661 erase=kzalloc(sizeof(struct erase_info),GFP_KERNEL); mtdchar_ioctl()
662 if (!erase) mtdchar_ioctl()
675 kfree(erase); mtdchar_ioctl()
678 erase->addr = einfo64.start; mtdchar_ioctl()
679 erase->len = einfo64.length; mtdchar_ioctl()
685 kfree(erase); mtdchar_ioctl()
688 erase->addr = einfo32.start; mtdchar_ioctl()
689 erase->len = einfo32.length; mtdchar_ioctl()
691 erase->mtd = mtd; mtdchar_ioctl()
692 erase->callback = mtdchar_erase_callback; mtdchar_ioctl()
693 erase->priv = (unsigned long)&waitq; mtdchar_ioctl()
704 ret = mtd_erase(mtd, erase); mtdchar_ioctl()
708 if (erase->state != MTD_ERASE_DONE && mtdchar_ioctl()
709 erase->state != MTD_ERASE_FAILED) mtdchar_ioctl()
714 ret = (erase->state == MTD_ERASE_FAILED)?-EIO:0; mtdchar_ioctl()
716 kfree(erase); mtdchar_ioctl()
H A Dnftlmount.c91 /* To be safer with BIOS, also use erase mark as discriminant */ find_boot_record()
101 #if 0 /* Some people seem to have devices without ECC or erase marks find_boot_record()
106 printk(KERN_NOTICE "ANAND header found at 0x%x in mtd%d, but erase mark not present (0x%04x,0x%04x instead)\n", find_boot_record()
301 * Update NFTL metadata. Each erase operation is checked with check_free_sectors
330 /* XXX: use async erase interface, XXX: test return code */ NFTL_formatblock()
351 * return code after the erase operation. */ NFTL_formatblock()
489 /* check_and_mark_free_block: Verify that a block is free in the NFTL sense (valid erase mark) or
502 /* check erase mark. */ check_and_mark_free_block()
509 /* if no erase mark, the block must be totally free. This is check_and_mark_free_block()
510 possible in two cases : empty filesystem or interrupted erase (very unlikely) */ check_and_mark_free_block()
514 /* free block : write erase mark */ check_and_mark_free_block()
524 /* if erase mark present, need to skip it when doing check */ check_and_mark_free_block()
535 /* skip erase mark */ check_and_mark_free_block()
H A Dinftlmount.c100 /* To be safer with BIOS, also use erase mark as discriminant */ find_boot_record()
217 * to erase the hidden block for full find_boot_record()
365 * Unit and Update INFTL metadata. Each erase operation is
387 /* Use async erase interface, test return code */ INFTL_formatblock()
407 * the return code after the erase operation. INFTL_formatblock()
434 * Since the chain is invalid then we will have to erase it from its
629 "in chain %d, chain length %d, erase " INFTL_mount()
634 * fold/erase... INFTL_mount()
H A Dsm_ftl.h56 /* Async erase stuff */
H A Dmtdpart.c495 /* Deal with variable erase size stuff */ allocate_partition()
500 /* Find the first erase regions which is part of this allocate_partition()
516 /* Single erase size */ allocate_partition()
522 /* Doesn't start on a boundary of major erase size */ allocate_partition()
524 * _minor_ erase size though */ allocate_partition()
526 printk(KERN_WARNING"mtd: partition \"%s\" doesn't start on an erase block boundary -- force read-only\n", allocate_partition()
532 printk(KERN_WARNING"mtd: partition \"%s\" doesn't end on an erase block -- force read-only\n", allocate_partition()
H A Dinftlcore.c370 * So go through and erase each unit in chain, oldest first. (This INFTL_foldchain()
374 pr_debug("INFTL: want to erase virtual chain %d\n", thisVUC); INFTL_foldchain()
392 /* Now try to erase it. */ INFTL_foldchain()
395 * Could not erase : mark block as reserved. INFTL_foldchain()
737 * Could not erase : mark block as reserved. INFTL_trydeletechain()
H A Dredboot.c121 * one erase block; if the buf[i].size field is parse_redboot_partitions()
H A Dnftlcore.c455 pr_debug("Want to erase\n"); NFTL_foldchain()
465 /* could not erase : mark block as reserved NFTL_foldchain()
/linux-4.1.27/arch/s390/include/asm/
H A Dtermios.h12 /* intr=^C quit=^\ erase=del kill=^U
/linux-4.1.27/drivers/net/ethernet/sfc/
H A Dmtd.c24 static int efx_mtd_erase(struct mtd_info *mtd, struct erase_info *erase) efx_mtd_erase() argument
29 rc = efx->type->mtd_erase(mtd, erase->addr, erase->len); efx_mtd_erase()
31 erase->state = MTD_ERASE_DONE; efx_mtd_erase()
33 erase->state = MTD_ERASE_FAILED; efx_mtd_erase()
34 erase->fail_addr = MTD_FAIL_ADDR_UNKNOWN; efx_mtd_erase()
36 mtd_erase_callback(erase); efx_mtd_erase()
/linux-4.1.27/fs/jffs2/
H A DMakefile10 jffs2-y += symlink.o build.o erase.o background.o fs.o writev.o
H A Derase.c51 jffs2_dbg(1, "%s(): erase block %#08x (range %#08x-%#08x)\n", jffs2_erase_block()
139 jffs2_dbg(1, "Starting erase of pending block 0x%08x\n", jffs2_erase_pending_blocks()
190 /* We had a device-level failure to erase. Let's see if we've jffs2_erase_failed()
356 /* Don't muck about if it won't let us point to the whole erase sector */ jffs2_block_check_erase()
381 pr_warn("Failed to allocate page buffer for verifying erase at 0x%08x. Refiling\n", jffs2_block_check_erase()
386 jffs2_dbg(1, "Verifying erase at 0x%08x\n", jeb->offset); jffs2_block_check_erase()
438 /* Write the erase complete marker */ jffs2_mark_erased_block()
477 /* Everything else got zeroed before the erase */ jffs2_mark_erased_block()
H A Dnodemgmt.c177 jffs2_dbg(1, "%s waiting for erase to complete\n", jffs2_reserve_space()
258 jffs2_dbg(1, "Adding full erase block at 0x%08x to very_dirty_list (free 0x%08x, dirty 0x%08x, used 0x%08x\n", jffs2_close_nextblock()
263 jffs2_dbg(1, "Adding full erase block at 0x%08x to dirty_list (free 0x%08x, dirty 0x%08x, used 0x%08x\n", jffs2_close_nextblock()
269 jffs2_dbg(1, "Adding full erase block at 0x%08x to clean_list (free 0x%08x, dirty 0x%08x, used 0x%08x\n", jffs2_close_nextblock()
296 jffs2_dbg(1, "%s(): Triggering erase of erasable block at 0x%08x\n", jffs2_find_nextblock()
324 /* Don't wait for it; just erase one right now */ jffs2_find_nextblock()
328 /* An erase may have failed, decreasing the jffs2_find_nextblock()
534 jffs2_dbg(1, "Adding full erase block at 0x%08x to clean_list (free 0x%08x, dirty 0x%08x, used 0x%08x\n", jffs2_add_physical_node_ref()
622 pr_notice("raw unchecked node of size 0x%08x freed from erase block %d at 0x%08x, but unchecked_size was already 0x%08x\n", jffs2_mark_node_obsolete()
633 pr_notice("raw node of size 0x%08x freed from erase block %d at 0x%08x, but used_size was already 0x%08x\n", jffs2_mark_node_obsolete()
707 /* Most of the time, we just erase it immediately. Otherwise we jffs2_mark_node_obsolete()
754 by jffs2_free_jeb_node_refs() in erase.c. Which is nice. */ jffs2_mark_node_obsolete()
H A Dscan.c33 pr_notice("Further such events for this erase block will not be printed\n"); \
164 * was entirely erased, we just queue it for erase jffs2_scan_medium()
165 * again. It will be marked as such when the erase jffs2_scan_medium()
265 pr_notice("Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes\n"); jffs2_scan_medium()
473 to decide whether to erase it or not. */ jffs2_scan_eraseblock()
588 return BLK_STATE_CLEANMARKER; /* don't bother with re-erase */ jffs2_scan_eraseblock()
590 return BLK_STATE_ALLFF; /* OK to erase if all blocks are like this */ jffs2_scan_eraseblock()
773 /* Eep. Node goes over the end of the erase block. */ jffs2_scan_eraseblock()
774 pr_warn("Node at 0x%08x with length 0x%08x would run over the end of the erase block\n", jffs2_scan_eraseblock()
776 pr_warn("Perhaps the file system was created with the wrong erase size?\n"); jffs2_scan_eraseblock()
H A Dwbuf.c38 /* max. erase failures before we mark a block bad */
123 /* Most of the time, we just erase it immediately. Otherwise we jffs2_refile_wbuf_blocks()
396 /* The summary is not recovered, so it must be disabled for this erase block */ jffs2_wbuf_recover()
819 * write at the beginning of a new erase block. Anything else, jffs2_flash_writev()
977 * it out. We keep this block, it will fail on write or erase jffs2_flash_read()
980 * power loss before the ecc write or a erase was completed. jffs2_flash_read()
1128 * Don't care about failures. This block remains on the erase-pending
1250 * - All known dataflashes have erase sizes of 528 or 1056 jffs2_dataflash_setup()
H A Djffs2_fs_sb.h111 against erase completion handler */
H A Dsummary.h162 /* Summary marker is stored at the end of every sumarized erase block */
H A Dgc.c227 /* If there are any blocks which need erasing, erase them now */ jffs2_garbage_collect_pass()
248 /* Couldn't find a free block. But maybe we can just erase one and make 'progress'? */ jffs2_garbage_collect_pass()
254 jffs2_dbg(1, "Couldn't find erase block to garbage collect!\n"); jffs2_garbage_collect_pass()
279 pr_warn("erase block at 0x%08x. free_size 0x%08x, dirty_size 0x%08x, used_size 0x%08x\n", jffs2_garbage_collect_pass()
899 /* Prevent the erase code from nicking the obsolete node refs while jffs2_garbage_collect_deletion_dirent()
916 /* Doesn't matter if there's one in the same erase block. We're going to jffs2_garbage_collect_deletion_dirent()
H A Dbuild.c303 The erase code will do that, when all the nodes are completely gone. jffs2_build_remove_unlinked_inode()
H A Dfs.c551 pr_err("Too few erase blocks (%d)\n", jffs2_do_fill_super()
H A Dnodelist.h470 /* erase.c */
/linux-4.1.27/arch/avr32/include/asm/
H A Dtermios.h13 /* intr=^C quit=^\ erase=del kill=^U
/linux-4.1.27/drivers/mtd/chips/
H A Dcfi_util.c174 /* Check that both start and end of the requested erase are cfi_varsize_frob()
180 /* Skip all erase regions which are ended before the start of cfi_varsize_frob()
181 the requested erase. Actually, to save on the calculations, cfi_varsize_frob()
182 we skip to the first erase region which starts after the cfi_varsize_frob()
183 start of the requested erase, and then go back one. cfi_varsize_frob()
190 /* OK, now i is pointing at the erase region in which this cfi_varsize_frob()
191 erase request starts. Check the start of the requested cfi_varsize_frob()
192 erase range is aligned with the erase size which is in cfi_varsize_frob()
199 /* Remember the erase region we start on */ cfi_varsize_frob()
202 /* Next, check that the end of the requested erase is aligned cfi_varsize_frob()
203 * with the erase region at that address. cfi_varsize_frob()
H A Dcfi_cmdset_0020.c274 goto sleep; /* We don't support erase suspend */ do_read_onechip()
277 /* If the flash has finished erasing, then 'erase suspend' do_read_onechip()
299 printk(KERN_ERR "Chip not ready after erase " do_read_onechip()
765 printk(KERN_ERR "waiting for chip to be ready timed out in erase\n"); do_erase_oneblock()
790 /* Now erase */ do_erase_oneblock()
805 /* Someone's suspended the erase. Sleep */ do_erase_oneblock()
824 printk(KERN_ERR "waiting for erase to complete timed out. Xstatus = %lx, status = %lx.\n", status.x[0], map_read(map, adr).x[0]); do_erase_oneblock()
869 printk(KERN_WARNING "Chip reports voltage low on erase: status 0x%x\n", chipstatus); do_erase_oneblock()
873 printk(KERN_DEBUG "Chip erase failed at 0x%08lx: status 0x%x. Retrying...\n", adr, chipstatus); do_erase_oneblock()
879 printk(KERN_DEBUG "Chip erase failed at 0x%08lx: status 0x%x\n", adr, chipstatus); do_erase_oneblock()
898 /* Check that both start and end of the requested erase are cfi_staa_erase_varsize()
904 /* Skip all erase regions which are ended before the start of cfi_staa_erase_varsize()
905 the requested erase. Actually, to save on the calculations, cfi_staa_erase_varsize()
906 we skip to the first erase region which starts after the cfi_staa_erase_varsize()
907 start of the requested erase, and then go back one. cfi_staa_erase_varsize()
914 /* OK, now i is pointing at the erase region in which this cfi_staa_erase_varsize()
915 erase request starts. Check the start of the requested cfi_staa_erase_varsize()
916 erase range is aligned with the erase size which is in cfi_staa_erase_varsize()
923 /* Remember the erase region we start on */ cfi_staa_erase_varsize()
926 /* Next, check that the end of the requested erase is aligned cfi_staa_erase_varsize()
927 * with the erase region at that address. cfi_staa_erase_varsize()
H A Dcfi_probe.c165 printk("Number of erase regions: %d\n", num_erase_regions); cfi_chip_setup()
337 printk("Typical block erase timeout: %d ms\n", 1<<cfip->BlockEraseTimeoutTyp); print_cfi_ident()
338 printk("Maximum block erase timeout: %d ms\n", (1<<cfip->BlockEraseTimeoutMax) * (1<<cfip->BlockEraseTimeoutTyp)); print_cfi_ident()
340 printk("Typical chip erase timeout: %d ms\n", 1<<cfip->ChipEraseTimeoutTyp); print_cfi_ident()
341 printk("Maximum chip erase timeout: %d ms\n", (1<<cfip->ChipEraseTimeoutMax) * (1<<cfip->ChipEraseTimeoutTyp)); print_cfi_ident()
344 printk("Chip erase not supported\n"); print_cfi_ident()
H A Dmap_ram.c120 flash erase. */ mapram_erase()
H A Dmap_rom.c36 erase_size = of_get_property(map->device_node, "erase-size", NULL); default_erasesize()
H A Dcfi_cmdset_0001.c15 * - reworked lock/unlock/erase support for var size flash
187 if (atmel_pri.Features & 0x01) /* chip erase supported */ fixup_convert_atmel_pri()
189 if (atmel_pri.Features & 0x02) /* erase suspend supported */ fixup_convert_atmel_pri()
197 if (atmel_pri.Features & 0x40) /* queued erase supported */ fixup_convert_atmel_pri()
228 "erase on write disabled.\n"); fixup_intel_strataflash()
628 printk(KERN_DEBUG "erase region %d: offset=0x%llx,size=0x%x,blocks=%d\n", cfi_intelext_setup()
832 /* If the flash has finished erasing, then 'erase suspend' chip_ready()
850 printk(KERN_ERR "%s: Chip not ready after erase " chip_ready()
902 * OK. We have possibility for contention on the write/erase get_chip()
911 * - any erase operation must own _both_ shared->writing and get_chip()
961 /* Check if we already have suspended erase get_chip()
1014 * We own the ability to erase without the ability put_chip()
1015 * to write, which means the erase was suspended put_chip()
1097 * interrupt pending then the flash erase or write operation is suspended,
1129 * Let's suspend the erase or write operation when xip_wait_for_operation()
1180 * a suspended erase state. If so let's wait xip_wait_for_operation()
1196 /* Resume the write or erase operation */ xip_wait_for_operation()
1925 /* Now erase */ do_erase_oneblock()
1939 printk(KERN_ERR "%s: block erase error: (status timeout)\n", map->name); do_erase_oneblock()
1958 printk(KERN_ERR "%s: block erase error: (bad command sequence, status 0x%lx)\n", map->name, chipstatus); do_erase_oneblock()
1965 printk(KERN_ERR "%s: block erase error: (bad VPP)\n", map->name); do_erase_oneblock()
1968 printk(KERN_DEBUG "block erase failed at 0x%08lx: status 0x%lx. Retrying...\n", adr, chipstatus); do_erase_oneblock()
1974 printk(KERN_ERR "%s: block erase failed at 0x%08lx (status 0x%lx)\n", map->name, adr, chipstatus); do_erase_oneblock()
H A Dcfi_cmdset_0002.c461 * Some revisions of the M29EW suffer from erase suspend hang ups. In
465 * erase cannot be resumed without inserting a dummy command after programming
486 * the erase was ongoing could be inconsistent with the expected values
614 printk(KERN_WARNING "%s: Swapping erase regions for top-boot CFI table.\n", map->name); cfi_cmdset_0002()
734 * Ready is one of: read mode, query mode, erase-suspend-read mode (in any
755 * Ready is one of: read mode, query mode, erase-suspend-read mode (in any
823 * commands when the erase algorithm isn't in progress. */ get_chip()
833 /* Should have suspended the erase by now. get_chip()
835 * there was an error (so leave the erase get_chip()
837 * use the erase-in-progress sector. */ get_chip()
839 printk(KERN_ERR "MTD %s(): chip not ready after erase suspend\n", __func__); get_chip()
949 * pending then the flash erase operation is suspended, array mode restored
973 * Let's suspend the erase operation when supported. xip_udelay()
1015 * a suspended erase state. If so let's wait xip_udelay()
1033 /* Resume the write or erase operation */ xip_udelay()
2231 * Handle devices with one erase region, that only implement
2232 * the chip erase command.
2277 /* Someone's suspended the erase. Sleep */ do_erase_chip()
2287 /* This erase was suspended and resumed. do_erase_chip()
2366 /* Someone's suspended the erase. Sleep */ do_erase_oneblock()
2376 /* This erase was suspended and resumed. do_erase_oneblock()
2871 * the flash is in query/program/erase mode will prevent the CPU from
H A Dgen_probe.c83 printk(KERN_WARNING "Number of erase regions is zero\n"); genprobe_ident_chips()
/linux-4.1.27/include/linux/mtd/
H A Dpfow.h41 /* device program/erase suspend register */
62 /* Defines possible value of PFOW program/erase suspend register */
74 #define DSR_ERASE_STATUS (1<<5) /* RC; erase or blank check status;
75 * 0-success erase/blank check,
77 #define DSR_ESS (1<<6) /* R; erase suspend status;
78 * 0-erase in progress/complete,
79 * 1 erase suspended */
H A Dspi-nor.h34 #define SPINOR_OP_SE 0xd8 /* Sector erase (usually 64KiB) */
45 #define SPINOR_OP_SE_4B 0xdc /* Sector erase (usually 64KiB) */
133 * @lock: the lock for the read/write/erase/lock/unlock operations
147 * read/write/erase/lock/unlock operations
149 * read/write/erase/lock/unlock operations
156 * @erase: [DRIVER-SPECIFIC] erase a sector of the SPI NOR
192 int (*erase)(struct spi_nor *nor, loff_t offs); member in struct:spi_nor
H A Dqinfo.h50 * @SuspEraseSupp - Suspend erase supported
53 * @BlockEraseTime - Block erase 2^BlockEraseTime m-sec
H A Dmtd.h41 * If the erase fails, fail_addr might indicate exactly which block failed. If
119 /* "Major" erase size for the device. Naïve users may take this
120 * to be the only erase size available, or may use the more detailed
179 /* Data for variable erase regions. If numeraseregions is zero,
H A Dpartitions.h27 * previous one ended; if MTDPART_OFS_NXTBLK, at the next erase block;
H A Dflashchip.h103 /* This is used to handle contention on write/erase operations
H A Ddoc2000.h178 /* Also some erase/write/pipeline info when we get that far */
H A Dnand.h573 * @erase: [REPLACEABLE] erase function
662 int (*erase)(struct mtd_info *mtd, int page); member in struct:nand_chip
/linux-4.1.27/drivers/misc/eeprom/
H A Deeprom_93xx46.c139 dev_err(&edev->spi->dev, "erase/write %sable error %d\n", eeprom_93xx46_ew()
216 /* erase/write enable */ eeprom_93xx46_bin_write()
240 /* erase/write disable */ eeprom_93xx46_bin_write()
277 dev_err(&edev->spi->dev, "erase error %d\n", ret); eeprom_93xx46_eral()
278 /* have to wait erase cycle time Tec ms */ eeprom_93xx46_eral()
293 int erase = 0, ret; eeprom_93xx46_store_erase() local
295 sscanf(buf, "%d", &erase); eeprom_93xx46_store_erase()
296 if (erase) { eeprom_93xx46_store_erase()
309 static DEVICE_ATTR(erase, S_IWUSR, NULL, eeprom_93xx46_store_erase);
362 dev_err(&spi->dev, "can't create erase interface\n"); eeprom_93xx46_probe()
/linux-4.1.27/drivers/mtd/devices/
H A Dlart.c336 /* erase and confirm */ erase_block()
340 /* wait for block erase to finish */ erase_block()
351 /* was the erase successful? */ erase_block()
354 printk (KERN_WARNING "%s: erase error at address 0x%.8x.\n",module_name,offset); erase_block()
371 * check that both start and end of the requested erase are flash_erase()
374 * skip all erase regions which are ended before the start of flash_erase()
375 * the requested erase. Actually, to save on the calculations, flash_erase()
376 * we skip to the first erase region which starts after the flash_erase()
377 * start of the requested erase, and then go back one. flash_erase()
383 * ok, now i is pointing at the erase region in which this flash_erase()
384 * erase request starts. Check the start of the requested flash_erase()
385 * erase range is aligned with the erase size which is in flash_erase()
391 /* Remember the erase region we start on */ flash_erase()
395 * next, check that the end of the requested erase is aligned flash_erase()
396 * with the erase region at that address. flash_erase()
413 /* now erase those blocks */ flash_erase()
H A Dbcm47xxsflash.c67 static int bcm47xxsflash_erase(struct mtd_info *mtd, struct erase_info *erase) bcm47xxsflash_erase() argument
75 b47s->cc_write(b47s, BCMA_CC_FLASHADDR, erase->addr); bcm47xxsflash_erase()
86 b47s->cc_write(b47s, BCMA_CC_FLASHADDR, erase->addr << 1); bcm47xxsflash_erase()
93 erase->state = MTD_ERASE_FAILED; bcm47xxsflash_erase()
95 erase->state = MTD_ERASE_DONE; bcm47xxsflash_erase()
97 if (erase->callback) bcm47xxsflash_erase()
98 erase->callback(erase); bcm47xxsflash_erase()
H A Dblock2mtd.c51 /* erase a specified part of the device */ _block2mtd_erase()
95 pr_err("erase failed err = %d\n", err); block2mtd_erase()
377 /* 80 for device, 12 for erase size */
383 /* 80 for device, 12 for erase size, 80 for name, 8 for timeout */ block2mtd_setup2()
422 pr_err("illegal erase size\n"); block2mtd_setup2()
H A Dmtd_dataflash.c65 /* write to buffer, then write-erase to flash */
73 /* read flash to buffer, then write-erase to flash */
122 * This usually takes 5-20 msec or so; more for sector erase.
158 pr_debug("%s: erase addr=0x%llx len 0x%llx\n", dataflash_erase()
181 /* Calculate flash page address; use block erase (for speed) if dataflash_erase()
182 * we're at a block boundary and need to erase the whole block. dataflash_erase()
202 printk(KERN_ERR "%s: erase %x, err %d\n", dataflash_erase()
220 /* Inform MTD subsystem that erase is complete */ dataflash_erase()
335 * once every 10K sibling erase/program operations. dataflash_write()
H A Dspear_smi.c43 /* MAX time out to safely come out of a erase or write busy conditions */
186 * @lock: lock to manage flash read, write and erase operations
192 * @erase_cmd: erase command may vary on different flash types
434 * spear_smi_erase_sector - erase one sector of flash
436 * @command: erase command to be send
474 dev_err(&dev->pdev->dev, "sector erase failed\n"); spear_smi_erase_sector()
487 * spear_mtd_erase - perform flash erase operation as requested by user
489 * @e_info: Provides the erase information
492 * one or more erase sectors. Return an error is there is a problem erasing.
515 /* now erase sectors in loop */ spear_mtd_erase()
570 /* wait till previous write/erase is done. */ spear_mtd_read()
H A Dmtdram.c29 MODULE_PARM_DESC(erase_size, "Device erase block size in KiB");
H A Ddocg3.c1051 * doc_get_erase_count - Get block erase count
1056 * erase times between first and second plane (which should be equal normally).
1094 * doc_get_op_status - get erase/write operation status
1115 * doc_write_erase_wait_status - wait for write or erase completion
1118 * Wait for the chip to be ready again after erase or write operation, and check
1119 * erase/write status.
1121 * Returns 0 if erase successful, -EIO if erase/write issue, -ETIMEOUT if
1151 * @block0: the first block to erase (leftmost plane)
1152 * @block1: the second block to erase (rightmost plane)
1156 * Returns 0 if erase successful, -EIO if erase issue, -ETIMEOUT if chip not
1193 * @info: the erase info
1198 * Returns 0 if erase successful, -EINVAL if addressing error, -EIO if erase
H A Dsst25l.c240 /* Wait for previous write/erase to complete */ sst25l_read()
H A Ddocg3.h254 * Status of erase and write operation
H A Dm25p80.c199 nor->erase = m25p80_erase; m25p_probe()
H A Dst_spi_fsm.c239 * Flags to tweak operation of default read/write/erase routines
1794 * one or more erase sectors. Return an error is there is a problem erasing.
1810 /* Whole-chip erase? */ stfsm_mtd_erase()
/linux-4.1.27/arch/sh/boards/
H A Dboard-secureedge5410.c32 printk("SnapGear: erase switch interrupt!\n"); eraseconfig_interrupt()
57 * IRL0 = erase switch
/linux-4.1.27/drivers/mtd/ubi/
H A Dwl.c25 * physical eraseblocks and erase counters and knows nothing about logical
31 * Physical eraseblocks returned by 'ubi_wl_get_peb()' have only erase counter
40 * physical eraseblocks with low erase counter to free physical eraseblocks
41 * with high erase counter.
43 * If the WL sub-system fails to erase a physical eraseblock, it marks it as
69 * measured in erase cycles in this case. This is implemented with help of the
72 * head of the queue on each erase operation (for any eraseblock). So the
73 * length of the queue defines how may (global) erase cycles PEBs are protected.
95 * example, when we move a PEB with low erase counter, and we need to pick the
112 * Maximum difference between two erase counters. If this threshold is
114 * eraseblocks with low erase counter to free physical eraseblocks with high
115 * erase counter.
122 * one with the highest erase counter. But in certain workloads this could lead
125 * data is written to it. So, we have a constant which limits the highest erase
127 * does not pick eraseblocks with erase counter greater than the lowest erase
149 * Note, we use (erase counter, physical eraseblock number) pairs as keys in
286 * @e will stay for %UBI_PROT_QUEUE_LEN erase operations and will be
302 * find_wl_entry - find wear-leveling entry closest to certain erase counter.
305 * @diff: maximum possible difference from the smallest erase counter
307 * This function looks for a wear leveling entry with erase counter closest to
308 * min + @diff, where min is the smallest erase counter.
345 * find_mean_wl_entry - find wear-leveling entry with medium erase counter.
349 * This function looks for a wear leveling entry with medium erase counter,
350 * but not greater or equivalent than the lowest erase counter plus
430 * sync_erase - synchronously erase a physical eraseblock.
432 * @e: the the physical eraseblock to erase
445 dbg_wl("erase PEB %d, old EC %llu", e->pnum, ec); sync_erase()
463 * erase counters internally. sync_erase()
465 ubi_err(ubi, "erase counter overflow at PEB %d, EC %llu", sync_erase()
494 * This function is called after each erase operation and removes PEBs from the
572 * schedule_erase - schedule an erase work.
574 * @e: the WL entry of the physical eraseblock to erase
607 * do_sync_erase - run the erase worker synchronously.
609 * @e: the WL entry of the physical eraseblock to erase
620 dbg_wl("sync erase of PEB %i", e->pnum); do_sync_erase()
708 * highly worn-out free physical eraseblock. If the erase
870 dbg_wl("PEB %d (LEB %d:%d) was put meanwhile, erase",
978 * lowest erase counter of used physical eraseblocks and a high ensure_wear_leveling()
979 * erase counter of free physical eraseblocks is greater than ensure_wear_leveling()
1017 * erase_worker - physical eraseblock erase worker function.
1044 dbg_wl("erase PEB %d EC %d LEB %d:%d", erase_worker()
1058 * One more erase operation has happened, take care about erase_worker()
1068 ubi_err(ubi, "failed to erase PEB %d, error %d", pnum, err); erase_worker()
1517 list_for_each_entry_safe(aeb, tmp, &ai->erase, u.list) { ubi_wl_init()
1661 * self_check_ec - make sure that the erase counter of a PEB is correct.
1664 * @ec: the erase counter to check
1666 * This function returns zero if the erase counter of physical eraseblock @pnum
H A Dattach.c40 * erased are put to the @erase list.
60 * the reason is a power cut, UBI puts this PEB to the @erase list, and all
61 * PEBs in the @erase list are scheduled for erasure later.
77 * to just erase this PEB - this is corruption type 1.
104 * @ec: erase counter of the physical eraseblock
109 * eraseblock @pnum and adds it to the "free", "erase", or "alien" lists.
114 * PEBs (corrupted due to power cuts) to the head of the erase list to make
115 * sure we erase them first and get rid of corruptions ASAP. This function
126 } else if (list == &ai->erase) { add_to_list()
127 dbg_bld("add to erase: PEB %d, EC %d", pnum, ec); add_to_list()
153 * @ec: erase counter of the physical eraseblock
438 * @ec: erase counter
538 &ai->erase); ubi_add_to_av()
561 cmp_res & 4, &ai->erase); ubi_add_to_av()
641 list_add_tail(&aeb->u.list, &ai->erase); ubi_remove_av()
650 * early_erase_peb - erase a physical eraseblock.
653 * @pnum: physical eraseblock number to erase;
654 * @ec: erase counter value to write (%UBI_UNKNOWN if it is unknown)
656 * This function erases physical eraseblock 'pnum', and writes the erase
671 * erase counters internally. early_erase_peb()
673 ubi_err(ubi, "erase counter overflow at PEB %d, EC %d", early_erase_peb()
723 * We try to erase the first physical eraseblock from the erase list ubi_early_get_peb()
724 * and pick it if we succeed, or try to erase the next one if not. And ubi_early_get_peb()
728 list_for_each_entry_safe(aeb, tmp_aeb, &ai->erase, u.list) { ubi_early_get_peb()
759 * If the corruption reason was a power cut, UBI can safely erase this PEB.
848 UBI_UNKNOWN, 0, &ai->erase); scan_peb()
852 UBI_UNKNOWN, 1, &ai->erase); scan_peb()
886 * flash. Upgrade UBI and use 64-bit erase counters scan_peb()
889 ubi_err(ubi, "erase counter overflow, max is %d", scan_peb()
944 * contains garbage because of a power cut during erase scan_peb()
964 UBI_UNKNOWN, ec, 1, &ai->erase); scan_peb()
973 ec, 1, &ai->erase); scan_peb()
980 UBI_UNKNOWN, ec, 1, &ai->erase); scan_peb()
1010 ec, 1, &ai->erase); scan_peb()
1177 list_for_each_entry_safe(aeb, aeb_tmp, &ai->erase, u.list) { destroy_ai()
1257 /* Calculate mean erase counter */ scan_all()
1266 * In case of unknown erase counter we use the mean erase counter scan_all()
1284 list_for_each_entry(aeb, &ai->erase, u.list) scan_all()
1314 INIT_LIST_HEAD(&ai->erase); alloc_ai()
1731 list_for_each_entry(aeb, &ai->erase, u.list) self_check_ai()
H A Dio.c35 * The erase counter header is always stored at offset zero. By default, the
313 * @ei: MTD erase information object.
315 * Note, even though MTD erase interface is asynchronous, all the current
324 * do_sync_erase - synchronously erase a physical eraseblock.
326 * @pnum: the physical eraseblock number to erase
338 dbg_io("erase PEB %d", pnum); do_sync_erase()
364 ubi_err(ubi, "cannot erase PEB %d, error %d", pnum, err); do_sync_erase()
383 ubi_err(ubi, "cannot erase PEB %d", pnum); do_sync_erase()
393 ubi_err(ubi, "cannot erase PEB %d (emulated)", pnum); do_sync_erase()
409 * test, a positive number of erase operations done if the test was
553 * ubi_io_sync_erase - synchronously erase a physical eraseblock.
555 * @pnum: physical eraseblock number to erase
661 * validate_ec_hdr - validate an erase counter header.
663 * @ec_hdr: the erase counter header to check
665 * This function returns zero if the erase counter header is OK, and %1 if
697 ubi_err(ubi, "bad erase counter %lld", ec); validate_ec_hdr()
711 * ubi_io_read_ec_hdr - read and check an erase counter header.
714 * @ec_hdr: a &struct ubi_ec_hdr object where to store the read erase counter
718 * This function reads erase counter header from physical eraseblock @pnum and
720 * erase counter header. The following codes may be returned:
726 * o %UBI_IO_BAD_HDR if the erase counter header is corrupted (a CRC error);
781 * This is not a valid erase counter header, and these are not ubi_io_read_ec_hdr()
827 * ubi_io_write_ec_hdr - write an erase counter header.
830 * @ec_hdr: the erase counter header to write
832 * This function writes erase counter header described by @ec_hdr to physical
1151 * self_check_ec_hdr - check if an erase counter header is all right.
1153 * @pnum: physical eraseblock number the erase counter header belongs to
1154 * @ec_hdr: the erase counter header to check
1156 * This function returns zero if the erase counter header contains valid
1190 * self_check_peb_ec_hdr - check erase counter header.
1194 * This function returns zero if the erase counter header is all right and and
H A Dfastmap-wl.c82 * ubi_wl_get_fm_peb - find a physical erase block with a given maximal number.
86 * The function returns a physical erase block with a given maximal number
108 * the wl subsystem does no longer know this erase block */ ubi_wl_get_fm_peb()
322 * ubi_is_erase_work - checks whether a work is erase work.
H A Ddebug.h108 * ubi_dbg_is_erase_failure - if its time to emulate an erase failure.
111 * Returns non-zero if an erase failure should be emulated, otherwise returns
H A Dubi.h79 * number of (global) erase cycles PEBs are protected from the wear-leveling
84 /* The volume ID/LEB number/erase counter is unknown */
169 * @ec: erase counter
373 * @emulate_io_failures: emulate write/erase failures for testing purposes
385 * @dfs_emulate_io_failures: debugfs knob to emulate write/erase failures
445 * @max_ec: current highest erase counter value
446 * @mean_ec: current mean erase counter value
631 * @ec: erase counter (%UBI_UNKNOWN if it is unknown)
699 * @erase: list of physical eraseblocks which have to be erased
712 * @min_ec: lowest erase counter value
713 * @max_ec: highest erase counter value
715 * @mean_ec: mean erase counter value
728 struct list_head erase; member in struct:ubi_attach_info
751 * @e: physical eraseblock to erase
H A Dubi-media.h38 /* The highest erase counter value supported by this implementation */
124 * struct ubi_ec_hdr - UBI erase counter header.
125 * @magic: erase counter header magic number (%UBI_EC_HDR_MAGIC)
129 * @ec: the erase counter
134 * @hdr_crc: erase counter header CRC checksum
136 * The erase counter header takes 64 bytes and has a plenty of unused space for
151 * same on all eraseblocks. UBI will ensure that all new erase counter headers
205 * 1. Because UBI may erase physical eraseblocks asynchronously, the following
413 * @block_ec: the erase counter of each used PEB
470 * struct ubi_fm_ec - stores the erase counter of a PEB
H A Dfastmap.c132 * add_aeb - create and add a attach erase block to a given list.
135 * @pnum: PEB number of the new attach erase block
314 list_add_tail(&victim->u.list, &ai->erase); update_vol()
333 list_add_tail(&new_aeb->u.list, &ai->erase); update_vol()
573 list_for_each_entry(aeb, &ai->erase, u.list) count_fastmap_pebs()
716 /* read EC values from erase list */ ubi_attach_fastmap()
723 add_aeb(ai, &ai->erase, be32_to_cpu(fmec->pnum), ubi_attach_fastmap()
814 list_move_tail(&tmp_aeb->u.list, &ai->erase); ubi_attach_fastmap()
1333 * erase_block - Manually erase a PEB.
1518 ubi_err(ubi, "could not erase old fastmap PEB"); ubi_update_fastmap()
1530 ubi_err(ubi, "could not get any free erase block"); ubi_update_fastmap()
1569 ubi_err(ubi, "could not erase old anchor PEB"); ubi_update_fastmap()
H A Dgluebi.c245 * gluebi_erase - erase operation of emulated MTD devices.
247 * @instr: the erase operation description
249 * This function calls the erase callback when finishes. Returns zero in case
270 * MTD erase operations are synchronous, so we have to make sure the gluebi_erase()
H A Ddebug.c60 * ubi_dump_ec_hdr - dump an erase counter header.
61 * @ec_hdr: the erase counter header to dump
73 pr_err("erase counter header hexdump:\n"); ubi_dump_ec_hdr()
H A Dkapi.c598 * ubi_leb_erase - erase logical eraseblock.
615 dbg_gen("erase LEB %d:%d", vol->vol_id, lnum); ubi_leb_erase()
642 * erase operation.
644 * Unlike erase, the un-map operation does not guarantee that the logical
660 * first un-map it, then write new data, rather than first erase it, then write
H A Dvtbl.c348 list_add(&new_aeb->u.list, &ai->erase); create_vtbl()
381 * a. erase LEB 0; process_lvol()
383 * c. erase LEB 1; process_lvol()
H A Dbuild.c646 * Some flashes have several erase regions. Different regions io_init()
1037 ubi_msg(ubi, "max/mean erase counter: %d/%d, WL threshold: %d, image sequence number: %u", ubi_attach_mtd_dev()
1503 "Example 3: mtd=/dev/mtd1,0,25 - attach MTD device /dev/mtd1 using default VID header offset and reserve 25*nand_size_in_blocks/1024 erase blocks for bad block handling.\n"
H A Deba.c341 dbg_eba("erase LEB %d:%d, PEB %d", vol_id, lnum, pnum); ubi_eba_unmap_leb()
773 * this physical eraseblock went bad, the erase code will handle that. ubi_eba_write_leb()
1451 ubi_move_aeb_to_list(av, aeb, &ai->erase); ubi_eba_init()
H A Dcdev.c493 dbg_gen("erase LEB %d:%d", vol->vol_id, lnum); vol_cdev_ioctl()
/linux-4.1.27/drivers/net/ethernet/intel/ixgb/
H A Dixgb_ee.h37 #define EEPROM_ERASE_OPCODE 0x7 /* EEPROM erase opcode */
38 #define EEPROM_EWEN_OPCODE 0x13 /* EEPROM erase/write enable */
39 #define EEPROM_EWDS_OPCODE 0x10 /* EEPROM erase/write disable */
H A Dixgb_ee.c386 * plus 4-bit dummy). This puts the EEPROM into write/erase mode. ixgb_write_eeprom()
407 * opcode plus 4-bit dummy). This takes the EEPROM out of write/erase ixgb_write_eeprom()
/linux-4.1.27/arch/parisc/include/asm/
H A Dtermios.h7 /* intr=^C quit=^\ erase=del kill=^U
/linux-4.1.27/arch/cris/include/asm/
H A Dtermios.h7 /* intr=^C quit=^\ erase=del kill=^U
/linux-4.1.27/arch/ia64/include/asm/
H A Dtermios.h13 /* intr=^C quit=^\ erase=del kill=^U
/linux-4.1.27/arch/m32r/include/asm/
H A Dtermios.h7 /* intr=^C quit=^\ erase=del kill=^U
/linux-4.1.27/drivers/input/
H A Dff-core.c199 if (ff->erase) { erase_effect()
200 error = ff->erase(dev, effect_id); erase_effect()
214 * input_ff_erase - erase a force-feedback effect from device
215 * @dev: input device to erase effect from
221 * file handle that is requesting erase.
240 * flush_effects - erase all effects owned by a file handle
307 * Once ff device is created you need to setup its upload, erase,
/linux-4.1.27/arch/mips/include/uapi/asm/
H A Dtermbits.h76 #define VWERASE 14 /* Word-erase character [ICANON]. */
191 #define ICANON 0000002 /* Do erase and kill processing. */
194 #define ECHOE 0000020 /* Visual erase for ERASE. */
200 #define ECHOPRT 0002000 /* Hardcopy visual erase. */
201 #define ECHOKE 0004000 /* Visual erase for KILL. */
H A Dtermios.h38 char t_werasc; /* word erase */
/linux-4.1.27/lib/
H A Drbtree_test.c41 static inline void erase(struct test_node *node, struct rb_root *root) erase() function
191 erase(nodes + j, &root); rbtree_test_init()
208 erase(nodes + j, &root); rbtree_test_init()
/linux-4.1.27/drivers/mtd/tests/
H A Dspeedtest.c73 pr_err("some erase error occurred at EB %d," multiblock_erase()
380 pr_info("Testing erase speed\n"); mtd_speedtest_init()
387 pr_info("erase speed is %ld KiB/s\n", speed); mtd_speedtest_init()
389 /* Multi-block erase all eraseblocks */ mtd_speedtest_init()
392 pr_info("Testing %dx multi-block erase speed\n", mtd_speedtest_init()
415 pr_info("%dx multi-block erase speed is %ld KiB/s\n", mtd_speedtest_init()
H A Dmtd_test.c27 pr_info("some erase error occurred at EB %d\n", ebnum); mtdtest_erase_eraseblock()
H A Dtorturetest.c65 MODULE_PARM_DESC(cycles_count, "how many erase cycles to do "
78 /* How many erase cycles were done */
338 pr_info("%08u erase cycles done, took %lu " tort_init()
349 pr_info("finished after %u erase cycles\n", tort_init()
H A Dnandbiterrs.c26 * FLASH endurance. Only a maximum of two erase operations will be performed.
/linux-4.1.27/arch/s390/kernel/
H A Drelocate_kernel.S96 sr %r1,%r1 # erase register r1
97 sr %r2,%r2 # erase register r2
/linux-4.1.27/drivers/scsi/
H A Dgdth_ioctl.h204 int erase; /* erase event ? */ member in struct:__anon8932::__anon8933::__anon8937
314 int erase; /* erase event? */ member in struct:__anon8954
H A Dinitio.c333 * initio_se2_ew_en - Enable erase/write
336 * Enable erase/write state of serial EEPROM
347 * initio_se2_ew_ds - Disable erase/write
350 * Disable erase/write state of serial EEPROM
/linux-4.1.27/arch/tile/include/hv/
H A Ddrv_srom_intf.h36 * erase a sector. Any write data is ignored, but there must be at least
/linux-4.1.27/drivers/char/
H A Dnwflash.c184 * # of 64K blocks to erase and write flash_write()
203 * first we have to erase the block(s), where we will write... flash_write()
214 printk(KERN_ERR "flash_write: erase error %x\n", rc); flash_write()
317 * so just go ahead and erase, what requested!
344 * erase a block... erase_block()
355 * erase erase_block()
391 * check if erase errors were reported erase_block()
/linux-4.1.27/drivers/staging/mt29f_spinand/
H A Dmt29f_spinand.c141 * After read, write, or erase, the Nand device is expected to set the
144 * write, and erase.
285 * spinand_write_enable- send command 0x06 to enable write or erase the
288 * Before write and erase the Nand cells, the write enable has to be set.
289 * After the write or erase, the write enable bit is automatically
549 * spinand_erase_block_erase--to erase a page with:
550 * @block_id: the physical block location to erase.
553 * The command used here is 0xd8--indicating an erase command to erase
572 * spinand_erase_block--to erase a page with:
573 * @block_id: the physical block location to erase.
576 * The commands used here are 0x06 and 0xd8--indicating an erase
577 * command to erase one block--64 pages
579 * and then send the 0xd8 erase command
604 "erase error, block %d\n", block_id); spinand_erase_block()
/linux-4.1.27/fs/logfs/
H A Dlogfs_abi.h181 * @ec: erase count for this segment
182 * @gec: global erase count at time of writing
300 * LOGFS_INO_SEGFILE - per-segment used bytes and erase count
401 * @ec_level: erase count and level
479 * @ds_gec: global erase count
539 * struct logfs_je_journal_ec - erase counts for all journal segments
541 * @ec: erase count
552 * struct logfs_je_free_segments - list of free segmetns with erase count
H A Dlogfs.h112 * @a_erase_count: erase count
131 * @erase_segment: erase and setup segment
145 * @erase: erase one segment
147 * @erase: erase part of the device
156 int (*erase)(struct super_block *sb, loff_t ofs, size_t len, member in struct:logfs_device_ops
179 * @erase_count: erase count of segment
362 u64 s_gec; /* global erase count */
H A Ddev_mtd.c60 * For as long as I can remember (since about 2001) mtd->erase has been an
258 .erase = logfs_mtd_erase,
H A Dgc.c13 * Wear leveling needs to kick in when the difference between low erase
14 * counts and high erase counts gets too big. A good value for "too big"
15 * may be somewhat below 10% of maximum erase count for the device.
H A Ddev_bdev.c295 .erase = bdev_erase,
H A Djournal.c384 /* erase count is stored globally and incremented in journal_get_erase_count()
732 * erase all journal segments except the one containing the most recent commit.
/linux-4.1.27/arch/mn10300/proc-mn2ws0050/include/proc/
H A Dnand-regs.h53 #define FCOMMAND_FCMD_ERASE1 0x60 /* erase 1st command */
54 #define FCOMMAND_FCMD_ERASE2 0xd0 /* erase 2nd command */
/linux-4.1.27/include/linux/
H A Dpstore.h70 int (*erase)(enum pstore_type_id type, u64 id, member in struct:pstore_info
H A Dconsole_struct.h58 unsigned short vc_video_erase_char; /* Background erase character */
H A Dinput.h477 * @erase: Called to erase an effect from device
493 * methods; erase() is optional. set_gain() and set_autocenter() need
504 int (*erase)(struct input_dev *dev, int effect_id); member in struct:ff_device
H A Drbtree_augmented.h146 * Case 1: node to erase has no more than 1 child (easy!) __rb_erase_augmented()
/linux-4.1.27/arch/mips/include/asm/
H A Dtermios.h16 * intr=^C quit=^\ erase=del kill=^U
/linux-4.1.27/arch/alpha/include/asm/
H A Dtermios.h6 /* eof=^D eol=\0 eol2=\0 erase=del
/linux-4.1.27/include/asm-generic/
H A Dtermios.h8 /* intr=^C quit=^\ erase=del kill=^U
/linux-4.1.27/drivers/mtd/lpddr/
H A Dqinfo_probe.c50 {5, 1, "SuspEraseSupp", "Suspend erase supported"},
54 {10, 2, "BlockEraseTime", "Block erase 2^n m-sec"},
55 {10, 3, "FullChipEraseTime", "Full chip erase 2^n m-sec"},
H A Dlpddr_cmds.c3 * erase, lock/unlock support for LPDDR flash memories
193 * OK. We have possibility for contension on the write/erase get_chip()
202 * - any erase operation must own _both_ shared->writing and get_chip()
252 /* Check if we have suspended erase on this chip. get_chip()
358 * We own the ability to erase without the ability put_chip()
359 * to write, which means the erase was suspended put_chip()
H A Dlpddr2_nvm.c2 * LPDDR2-NVM MTD driver. This module provides read, write, erase, lock/unlock
379 * lpddr2_nvm driver erase method
/linux-4.1.27/drivers/mtd/maps/
H A Dscb2_flash.c95 * things like lock/unlock/erase by eraseregions, we need to scb2_fixup_mtd()
97 * * send an erase to an address scb2_fixup_mtd()
112 * the chip, so all our erase-region info is wrong. Start cutting from scb2_fixup_mtd()
/linux-4.1.27/drivers/mtd/spi-nor/
H A Dspi-nor.c27 #define MAX_READY_WAIT_JIFFIES (40 * HZ) /* M25P16 specs 40s max chip erase */
51 #define SPI_NOR_NO_ERASE 0x02 /* No erase command needed */
297 * one or more erase sectors. Return an error is there is a problem erasing.
320 /* whole-chip erase? */ spi_nor_erase()
335 * to use "small sector erase", but that's not always optimal. spi_nor_erase()
338 /* "sector"-at-a-time erase */ spi_nor_erase()
343 if (nor->erase(nor, addr)) { spi_nor_erase()
618 /* SST -- large erase sizes are "overlays", "sectors" are 4K */
984 !nor->read_reg || !nor->write_reg || !nor->erase) { spi_nor_check()
1085 /* prefer "small sector" erase if possible */ spi_nor_scan()
1176 /* No small sector erase for 4-byte command set */ spi_nor_scan()
H A Dfsl-quadspi.c888 nor->erase = fsl_qspi_erase; fsl_qspi_probe()
/linux-4.1.27/include/uapi/mtd/
H A Dubi-user.h85 * Logical eraseblock erase
88 * To erase a logical eraseblock, the %UBI_IOCEBER ioctl command of the
118 * the "LEB erase" command, it does not wait for the physical eraseblock being
230 * user to directly write and erase individual
397 * UBI tried to pick a PEB with lower erase counter for short term data and a
398 * PEB with higher erase counter for long term data. But this was not really
H A Dmtd-abi.h104 #define MTD_NO_ERASE 0x1000 /* No erase necessary */
168 /* Get the number of different erase regions */
170 /* Get information about the erase region for a specific index */
/linux-4.1.27/drivers/staging/goldfish/
H A Dgoldfish_nand.c116 pr_err("goldfish_nand_erase: erase failed, start %llx, len %x, dev_size %llx, erase_size %x\n", goldfish_nand_erase()
127 pr_err("goldfish_nand_erase: invalid erase, start %llx, len %x, dev_size %llx, erase_size %x\n", goldfish_nand_erase()
325 "goldfish nand dev%d: size %llx, page %d, extra %d, erase %d\n", goldfish_nand_init_device()
/linux-4.1.27/fs/pstore/
H A Dinode.c189 * platform driver to erase the record from persistent store.
200 if (p->psi->erase) pstore_unlink()
201 p->psi->erase(p->type, p->id, p->count, pstore_unlink()
H A Dram.c354 .erase = ramoops_pstore_erase,
/linux-4.1.27/drivers/mtd/nand/
H A Dsm_common.c50 /* As long as this function is called on erase block boundaries sm_block_markbad()
H A Dnandsim.c150 MODULE_PARM_DESC(erase_delay, "Sector erase delay (milliseconds)");
157 MODULE_PARM_DESC(parts, "Partition sizes (in erase blocks) separated by commas");
158 /* Page and erase block positions for the following parameters are independent of any partitions */
160 MODULE_PARM_DESC(weakblocks, "Weak erase blocks [: remaining erase cycles (defaults to 3)]"
171 "The size is specified in erase blocks and as the exponent of a power of two"
172 " e.g. 5 means a size of 32 erase blocks");
224 #define STATE_CMD_ERASE1 0x00000006 /* sector erase first command */
228 #define STATE_CMD_ERASE2 0x0000000B /* sector erase second command */
259 #define ACTION_SECERASE 0x00300000 /* erase sector */
332 uint32_t secsz; /* flash sector (erase block) size, bytes */
488 seq_printf(m, "Number of erase blocks: %u\n", wear_eb_count); nandsim_debugfs_show()
496 seq_printf(m, "Number of ebs with erase counts from %lu to %lu : %lu\n", nandsim_debugfs_show()
1022 NS_ERR("Too many erase blocks for wear reporting\n"); setup_wear_reporting()
1027 NS_ERR("Too many erase blocks for wear reporting\n"); setup_wear_reporting()
1046 NS_ERR("Erase counter overflow for erase block %u\n", erase_block_no); update_wear()
1665 NS_ERR("do_state_action: device is write-protected, ignore sector erase\n"); do_state_action()
1681 NS_DBG("do_state_action: erase sector at address %#x, off = %d\n", do_state_action()
1683 NS_LOG("erase sector %u\n", erase_block_no); do_state_action()
1693 NS_WARN("simulating erase failure in erase block %u\n", erase_block_no); do_state_action()
H A Dnand_base.c425 * (1) erase the affected block, to allow OOB marker to be written cleanly
440 /* Attempt erase before marking OOB */ nand_block_markbad_lowlevel()
645 * Program and erase have their own busy handlers status and sequential nand_command()
740 * Program and erase have their own busy handlers status, sequential nand_command_lp()
889 * Wait for command done. This applies to erase and program only. Erase can
1008 * eg. erase/program a locked block nand_unlock()
1067 * eg. erase/program a locked block nand_lock()
2471 /* We still need to erase leftover OOB data */ nand_do_write_ops()
2697 * single_erase - [GENERIC] NAND standard block erase command function
2701 * Standard erase command for NAND chips. Returns NAND status.
2706 /* Send commands to erase a block */ single_erase()
2714 * nand_erase - [MTD Interface] erase block(s)
2716 * @instr: erase instruction
2726 * nand_erase_nand - [INTERN] erase block(s)
2728 * @instr: erase instruction
2774 /* Check if we have a bad block, we do not erase bad blocks! */ nand_erase_nand()
2777 pr_warn("%s: attempt to erase a bad block at page 0x%08x\n", nand_erase_nand()
2784 * Invalidate the page cache, if we erase the block which nand_erase_nand()
2791 status = chip->erase(mtd, page & chip->pagemask); nand_erase_nand()
2801 /* See if block erase succeeded */ nand_erase_nand()
2803 pr_debug("%s: failed erase, page 0x%08x\n", nand_erase_nand()
3776 chip->erase = single_erase; nand_get_flash_type()
3795 pr_info("%d MiB, %s, erase size: %d KiB, page size: %d, OOB size: %d\n", nand_get_flash_type()
H A Dtmio_nand.c185 *erase and write, we enable it to wake us up. The irq handler
205 nand_chip->state == FL_ERASING ? "erase" : "program", tmio_nand_wait()
H A Ddocg4.c178 /* good status values read after read/write/erase operations */
268 * register. Operations known to take a long time (e.g., block erase) poll_status()
890 /* only 2 bytes of address are written to specify erase block */ docg4_erase_block()
1036 * For an unknown reason, block erase always fails if it's the first read_factory_bbt()
1241 nand->erase = docg4_erase_block; init_mtd_structs()
H A Ddenali.c913 * instability with the controller if you do a block erase read_oob_data()
914 * and the last transaction was a SPARE_ACCESS. Block erase read_oob_data()
1277 /* wait for erase to complete or failure to occur */ denali_erase()
1591 denali->nand.erase = denali_erase; denali_init()
H A Ddiskonchip.c724 * program and erase have their own busy handlers doc2001plus_command()
1107 printk(KERN_INFO "Setting virtual erase size to %d\n", mtd->erasesize); nftl_partscan()
1212 printk(KERN_ERR "Writeable BBTs spanning more than one erase block are not yet supported. FIX ME!\n"); inftl_partscan()
H A Dau1550nd.c343 * Program and erase have their own busy handlers. au1550_command()
H A Dmpc5121_nfc.c790 /* Set erase block size */ mpc5121_nfc_probe()
H A Domap2.c995 * Wait function is called during Program and erase operations and
997 * chip is ready after the programming/erase operation has completed.
H A Dfsmc_nand.c803 * This is a temporary erase check. A newly erased page read fsmc_bch8_correct_data()
/linux-4.1.27/drivers/sbus/char/
H A Djsflash.c12 * TODO: do not allow erase/programming if file systems are mounted.
326 jsf_outl(p, 0x10101010); /* Chip erase */ jsf_ioctl_erase()
341 printk("jsf0: erase timeout with 0x%08x\n", x); jsf_ioctl_erase()
343 printk("jsf0: erase done with 0x%08x\n", x); jsf_ioctl_erase()
/linux-4.1.27/drivers/usb/serial/
H A Dempeg.c110 | ICANON /* disable erase, kill, werase, and rprnt special characters */ empeg_init_termios()
H A Dwhiteheat.h190 #define WHITEHEAT_TEST_ERASE_EEPROM 0x09 /* erase eeprom */
/linux-4.1.27/drivers/video/fbdev/
H A Dmaxinefb.c142 /* erase hardware cursor */ maxinefb_init()
/linux-4.1.27/arch/powerpc/platforms/powermac/
H A Dnvram.c293 printk(KERN_ERR "nvram: Sharp/Micron flash erase timeout !\n"); sm_erase_bank()
304 printk(KERN_ERR "nvram: Sharp/Micron flash erase failed !\n"); sm_erase_bank()
373 printk(KERN_ERR "nvram: AMD flash erase timeout !\n"); amd_erase_bank()
384 printk(KERN_ERR "nvram: AMD flash erase failed !\n"); amd_erase_bank()
/linux-4.1.27/arch/m68k/include/asm/
H A Dbootstd.h16 #define __BN_erase 5 /* erase sector(s) of FLASH */
H A Dtlbflush.h131 /* erase all of the userspace pmeg maps, we've clobbered them flush_tlb_all()
/linux-4.1.27/include/linux/mmc/
H A Dcard.h76 unsigned int sec_erase_mult; /* Secure erase multiplier */
279 #define MMC_QUIRK_SEC_ERASE_TRIM_BROKEN (1<<10) /* Skip secure for erase/trim */
282 unsigned int erase_size; /* erase size in sectors */
283 unsigned int erase_shift; /* if erase unit is power 2 */
H A Dmmc.h207 } erase; member in struct:_mmc_csd
241 #define CCC_ERASE (1<<5) /* (5) Ability to erase blocks */
H A Dhost.h247 #define MMC_CAP_ERASE (1 << 10) /* Allow erase/trim commands */
274 #define MMC_CAP2_HC_ERASE_SZ (1 << 9) /* High-capacity erase size */
/linux-4.1.27/drivers/mtd/onenand/
H A Donenand_base.c38 * Multiblock erase if number of blocks to erase is 2 or more.
39 * Maximum number of blocks for simultaneous erase is 64.
345 * flexonenand_region - [Flex-OneNAND] Return erase region of addr
347 * @param addr address whose erase region needs to be identified
522 * Read can take up to 30us, erase up to 2ms and program up to 350us
575 printk(KERN_ERR "%s: mb erase timeout! ctrl=0x%04x intr=0x%04x\n", onenand_wait()
2262 * onenand_multiblock_erase - [INTERN] erase block(s) using multiblock erase
2264 * @param instr erase instruction
2265 * @param region erase region
2290 /* Check if we have a bad block, we do not erase bad blocks */ onenand_multiblock_erase()
2292 printk(KERN_WARNING "%s: attempt to erase a bad block " onenand_multiblock_erase()
2332 printk(KERN_ERR "%s: Failed multiblock erase, " onenand_multiblock_erase()
2353 printk(KERN_ERR "%s: Failed erase, block %d\n", onenand_multiblock_erase()
2378 * onenand_block_by_block_erase - [INTERN] erase block(s) using regular erase
2380 * @param instr erase instruction
2381 * @param region erase region
2382 * @param block_size erase block size
2408 /* Check if we have a bad block, we do not erase bad blocks */ onenand_block_by_block_erase()
2410 printk(KERN_WARNING "%s: attempt to erase a bad block " onenand_block_by_block_erase()
2424 printk(KERN_ERR "%s: Failed erase, block %d\n", onenand_block_by_block_erase()
2454 * onenand_erase - [MTD Interface] erase block(s)
2456 * @param instr erase instruction
2505 /* region is set for Flex-OneNAND (no mb erase) */ onenand_erase()
3599 /* Expose MLC erase size except when all blocks are SLC */ flexonenand_get_size()
3623 * @param start - first erase block to check
3624 * @param end - last erase block to check
3711 printk(KERN_ERR "%s: Please erase blocks " flexonenand_set_boundary()
3741 printk(KERN_ERR "%s: Failed PI erase for Die %d\n", flexonenand_set_boundary()
3846 /* Maximum possible erase regions */ onenand_probe()
3873 * Expose MLC erase size to find erase_shift and page_mask. onenand_probe()
3895 * We emulate the 4KiB page and 256KiB erase block size onenand_probe()
H A Donenand_bbt.c197 /* Set erase shift */ onenand_scan_bbt()
/linux-4.1.27/drivers/usb/storage/
H A Dsddr09.c35 * EA: erase
119 char blockshift; /* 1<<bs pages in an erase block */
523 * bytes 6-9: erase address (big-endian, counting shorts, sector aligned).
534 usb_stor_dbg(us, "erase address %lu\n", Eaddress); sddr09_erase()
560 * from E9. Maybe it does not erase? However, it will also write to
571 * bytes 6-9: erase address (big-endian, counting shorts, sector aligned).
574 * If write address equals erase address, the erase is done first,
575 * otherwise the write is done first. When erase address equals zero
576 * no erase is done?
621 /* erase address, write same address */
/linux-4.1.27/include/uapi/linux/
H A Dhdreg.h175 #define CFA_WRITE_SECT_WO_ERASE 0x38 /* CFA Write Sectors without erase */
226 #define CFA_WRITE_MULTI_WO_ERASE 0xCD /* CFA Write multiple without erase */
564 unsigned short trseuc; /* time required for security erase */
565 unsigned short trsEuc; /* time required for enhanced erase */
610 * 5 enhanced erase
H A Dmtio.h43 #define MTERASE 13 /* erase tape -- be careful! */
/linux-4.1.27/drivers/block/mtip32xx/
H A Dmtip32xx.h36 /* check for erase mode support during secure erase */
135 MTIP_PF_SE_ACTIVE_BIT = 2, /* secure erase */
/linux-4.1.27/drivers/iio/temperature/
H A Dmlx90614.c50 #define MLX90614_TIMING_EEPROM 20 /* time for EEPROM write/erase to complete */
/linux-4.1.27/drivers/mmc/core/
H A Dcore.c1828 * It is possible to erase an arbitrarily large area of an SD or MMC mmc_init_erase()
1840 * can end up taking longer to erase. mmc_init_erase()
1976 * qty is used to calculate the erase timeout which depends on how many mmc_do_erase()
1977 * erase groups (or allocation units in SD terminology) are affected. mmc_do_erase()
1978 * We count erasing part of an erase group as one erase group. mmc_do_erase()
1980 * erase group size is almost certainly also power of 2, but it does not mmc_do_erase()
1986 * number of erase groups specified is the same as the total of all mmc_do_erase()
2041 pr_err("mmc_erase: erase error %d, status %#x\n", mmc_do_erase()
2082 * mmc_erase - erase sectors.
2083 * @card: card to erase
2084 * @from: first sector to erase
2085 * @nr: number of sectors to erase
2086 * @arg: erase command argument (SD supports only %MMC_ERASE_ARG)
2262 * Without erase_group_def set, MMC erase timeout depends on clock mmc_calc_max_discard()
2264 * just the preferred erase size. mmc_calc_max_discard()
H A Dmmc.c1365 * This will affect the erase size, so mmc_init_card()
1366 * here need to reset erase size mmc_init_card()
/linux-4.1.27/drivers/misc/c2port/
H A Dcore.c285 int ret, timeout = 10000; /* erase flash needs long time... */ c2port_poll_out_ready()
559 /* Send device erase command */ __c2port_write_flash_erase()
581 /* Send a three-byte arming sequence to enable the device erase. __c2port_write_flash_erase()
622 dev_err(c2dev->dev, "cannot erase %s flash\n", c2dev->name); c2port_store_flash_erase()
/linux-4.1.27/drivers/s390/char/
H A Dtape_std.h27 #define DATA_SEC_ERASE 0x97 /* Data security erase */
H A Dtape.h81 TO_DSE, /* Data security erase */
H A Dcon3270.c231 /* Use erase write alternate to initialize display. */ con3270_update()
H A Dtape_34xx.c542 /* Data security erase failure. */ tape_34xx_unit_check()
545 /* Data security erase failure, but no such command issued. */ tape_34xx_unit_check()
H A Dtty3270.c366 /* Use erase write alternate to erase display. */ tty3270_update()
/linux-4.1.27/arch/sparc/include/asm/
H A Dtermios.h18 /* intr=^C quit=^\ erase=del kill=^U
/linux-4.1.27/arch/unicore32/kernel/
H A Dasm-offsets.c30 * initialisation in fs/jffs2/erase.c
/linux-4.1.27/crypto/
H A Dsha512_generic.c130 /* erase our data */ sha512_transform()
/linux-4.1.27/drivers/tty/
H A Dn_tty.c669 * in order to erase the tab. __process_echoes()
872 * echo_erase_tab - add operation to erase a tab
877 * Add an operation to the echo buffer to erase a tab.
950 * finish_erasing - complete erase
963 * eraser - handle erase function
967 * Perform erase and necessary output when an erase character is
1012 /* erase a single possibly multibyte character */ eraser()
1018 /* do not partially erase */ eraser()
1721 * that erase characters will be handled. Other excess n_tty_receive_buf_common()
/linux-4.1.27/drivers/media/usb/gspca/m5602/
H A Dm5602_ov9650.h287 /* Enable denoise, and white-pixel erase */
/linux-4.1.27/drivers/staging/rtl8712/
H A Drtl871x_eeprom.c170 /* Erase this particular word. Write the erase opcode and register r8712_eeprom_write16()
/linux-4.1.27/drivers/firmware/efi/
H A Defi-pstore.c364 .erase = efi_pstore_erase,
/linux-4.1.27/fs/ubifs/
H A Dorphan.c432 * erase_deleted - erase the orphans marked for deletion.
482 * ubifs_clear_orphans - erase all LEBs used for orphans.
700 * ubifs_mount_orphans - delete orphan inodes and erase LEBs that recorded them.
705 * This function is called when mounting to erase orphans from the previous
/linux-4.1.27/arch/arm/kernel/
H A Dasm-offsets.c43 * initialisation in fs/jffs2/erase.c
/linux-4.1.27/drivers/memstick/core/
H A Dms_block.c847 pr_err("erase failed, marking pba %d as bad", pba); msb_erase_block()
851 dbg_verbose("erase success, marking pba %d as unused", pba); msb_erase_block()
1067 pr_err("write failed, trying to erase the pba %d", pba); msb_write_block()
1399 "oob of pba %d damaged, will try to erase it", pba); msb_ftl_scan()
1434 dbg("pba %05d -> [temp table] - will erase", pba); msb_ftl_scan()
1450 pr_notice("pba %05d -> [bad lba %05d] - will erase", msb_ftl_scan()
/linux-4.1.27/include/linux/ssb/
H A Dssb_driver_chipcommon.h533 #define SSB_CHIPCO_FLASHCTL_AT_BUF1_WRER_PRGM 0x0382 /* Write erase program */
534 #define SSB_CHIPCO_FLASHCTL_AT_BUF2_WRER_PRGM 0x0385 /* Write erase program */
/linux-4.1.27/drivers/net/ethernet/intel/e1000e/
H A Dich8lan.c3251 * This function does initial flash setup so that a new read/write/erase cycle
3327 * e1000_flash_cycle_ich8lan - Starts flash cycle (read/write/erase)
3645 * write to bank 0 etc. We also need to erase the segment that e1000_update_nvm_checksum_spt()
3722 * erase as well since these bits are 11 to start with e1000_update_nvm_checksum_spt()
3742 * done without an erase because flash erase sets all bits e1000_update_nvm_checksum_spt()
3743 * to 1's. We can write 1's to 0's without an erase e1000_update_nvm_checksum_spt()
3813 * write to bank 0 etc. We also need to erase the segment that e1000_update_nvm_checksum_ich8lan()
3886 * erase as well since these bits are 11 to start with e1000_update_nvm_checksum_ich8lan()
3903 * done without an erase because flash erase sets all bits e1000_update_nvm_checksum_ich8lan()
3904 * to 1's. We can write 1's to 0's without an erase e1000_update_nvm_checksum_ich8lan()
3988 * To prevent malicious write/erase of the NVM, set it to be read-only
3989 * so that the hardware ignores all write/erase cycles of the NVM via
4306 * 00: The Hw sector is 256 bytes, hence we need to erase 16 e1000_erase_flash_bank_ich8lan()
4309 * 01: The Hw sector is 4K bytes, hence we need to erase 1 sector. e1000_erase_flash_bank_ich8lan()
/linux-4.1.27/arch/m68k/sun3/
H A Dmmu_emu.c203 /* erase the mappings for a dead context. Uses the pg_dir for hints
/linux-4.1.27/drivers/hid/usbhid/
H A Dhid-pidff.c543 * Stop and erase effect with effect_id
550 hid_dbg(pidff->hid, "starting to erase %d/%d\n", pidff_erase_effect()
1319 ff->erase = pidff_erase_effect; hid_pidff_init()
/linux-4.1.27/arch/arc/mm/
H A Dtlb.c43 * -Multiple copies of TLB erase code seperated into a "single" function
106 * Utility Routine to erase a J-TLB entry
214 * Un-conditionally (without lookup) erase the entire MMU contents
/linux-4.1.27/drivers/mmc/card/
H A Dmmc_test.c38 * Limit the test area size to the maximum MMC HC erase group size. Note that
1566 static int mmc_test_area_init(struct mmc_test_card *test, int erase, int fill) mmc_test_area_init() argument
1616 if (erase) { mmc_test_area_init()
1636 * Prepare for large transfers. Do not erase the test area.
1644 * Prepare for large transfers. Do erase the test area.
/linux-4.1.27/drivers/scsi/qla2xxx/
H A Dqla_sup.c971 "FDT[%s]: (0x%x/0x%x) erase=0x%x " qla2xxx_get_fdt_info()
1256 "Unable to erase erase sector: address=%x.\n", qla24xx_write_flash_data()
2161 /* Wait for erase to complete. */ qla2x00_erase_flash()
2168 * @addr: Flash sector to erase
2192 /* Wait for erase to complete. */ qla2x00_erase_flash_sector()
2495 /* Then erase it */ qla2x00_write_optrom_data()
H A Dqla_nx2.c3606 "%s: Poll flash status after erase failed..\n", __func__); qla8044_erase_flash_sector()
3824 "Done erase of sector=0x%x.\n", qla8044_write_optrom_data()
3828 "Failed to erase the sector having address: " qla8044_write_optrom_data()
/linux-4.1.27/drivers/video/console/
H A Dfbcon.c567 int cnt, erase = vc->vc_video_erase_char, step; fbcon_prepare_logo() local
577 * remove underline attribute from erase character fbcon_prepare_logo()
581 erase &= ~0x400; fbcon_prepare_logo()
594 scr_memsetw(save, erase, logo_lines * new_cols * 2); fbcon_prepare_logo()
619 erase, fbcon_prepare_logo()
2014 * Recursive invocations don't need to erase the cursor over and fbcon_bmove()
/linux-4.1.27/drivers/media/rc/
H A Dite-cir.c732 /* erase the FIFO */ it87_disable()
960 /* erase the FIFO */ it8708_disable()
1256 /* erase the FIFO */ it8709_disable()
/linux-4.1.27/drivers/md/bcache/
H A Dextents.c5 * All allocation is done in buckets, which should match the erase block size
/linux-4.1.27/drivers/media/pci/solo6x10/
H A Dsolo6x10-v4l2.c55 /* First time around, assert erase off */ erase_off()
/linux-4.1.27/drivers/net/wireless/mwifiex/
H A Dsta_event.c121 /* Need to erase the current SSID and BSSID info */ mwifiex_reset_connect_state()
/linux-4.1.27/drivers/input/joystick/iforce/
H A Diforce-main.c440 ff->erase = iforce_erase_effect; iforce_init_device()
/linux-4.1.27/drivers/scsi/bfa/
H A Dbfi.h908 * Flash erase request
977 * Flash erase response
/linux-4.1.27/drivers/hid/
H A Dhid-picolcd_debugfs.c243 /* erase block aligned to 64bytes boundary */ _picolcd_flash_erase64()
513 /* 3 data bytes with pointer inside erase block */ picolcd_debug_out_report()
/linux-4.1.27/drivers/tty/vt/
H A Dvt.c1159 case 0: /* erase from cursor to end of display */ csi_J()
1163 case 1: /* erase from start to cursor */ csi_J()
1167 case 3: /* erase scroll-back buffer (and whole display) */ csi_J()
1174 case 2: /* erase whole display */ csi_J()
1193 case 0: /* erase from cursor to end of line */ csi_K()
1197 case 1: /* erase from start of line to cursor */ csi_K()
1201 case 2: /* erase whole line */ csi_K()
1214 static void csi_X(struct vc_data *vc, int vpar) /* erase the following vpar positions */ csi_X()
/linux-4.1.27/fs/jbd2/
H A Dcommit.c410 /* Do we need to erase the effects of a prior jbd2_journal_flush? */ jbd2_journal_commit_transaction()
912 * erase checkpointed transactions from the log by updating journal jbd2_journal_commit_transaction()
/linux-4.1.27/drivers/scsi/csiostor/
H A Dcsio_hw.h198 SF_ERASE_SECTOR = 0xd8, /* erase sector */
/linux-4.1.27/drivers/net/wireless/ath/wil6210/
H A Dcfg80211.c437 * elements. Send it also in case it's empty, to erase previously set wil_cfg80211_connect()
/linux-4.1.27/drivers/input/misc/
H A Duinput.c272 dev->ff->erase = uinput_dev_erase_effect; uinput_create_device()
/linux-4.1.27/arch/parisc/kernel/
H A Dtraps.c663 erase the changes to said register. Instead we have to handle_interruption()
/linux-4.1.27/net/batman-adv/
H A Dsysfs.c520 /* erase bits not covered by the mask */ batadv_store_isolation_mark()
/linux-4.1.27/net/ipv6/
H A Dah6.c508 * To erase AH: ah6_input()
/linux-4.1.27/net/9p/
H A Dtrans_rdma.c525 * because doing if after could erase the REQ_STATUS_RCVD rdma_request()
/linux-4.1.27/sound/usb/caiaq/
H A Dinput.c88 MASCHINE_BUTTON(31), /* erase */
/linux-4.1.27/tools/perf/
H A Dbuiltin-lock.c298 /* returns left most element of result, and erase it */ pop_from_result()
/linux-4.1.27/drivers/mmc/host/
H A Dmmc_spi.c96 * the CSD values. The R1B value is for card erase (e.g. the "I forgot the
357 * and less-common stuff like various erase operations. mmc_spi_response_get()
/linux-4.1.27/drivers/net/ethernet/
H A Dfealnx.c545 /* Reset the chip to erase previous misconfiguration. */ fealnx_init_one()
1136 /* Reset the chip to erase previous misconfiguration. */ reset_and_disable_rxtx()
/linux-4.1.27/drivers/net/ethernet/smsc/
H A Dsmc911x.c1668 /* Enable erase */ smc911x_ethtool_seteeprom()
1672 /* erase byte */ smc911x_ethtool_seteeprom()
/linux-4.1.27/drivers/usb/core/
H A Dmessage.c1056 * @reset_hardware: flag to erase any endpoint state stored in the
1117 * @reset_hardware: flag to erase any endpoint state stored in the
/linux-4.1.27/include/linux/mfd/
H A Dcros_ec_commands.h804 uint32_t offset; /* Byte offset to erase */
805 uint32_t size; /* Size to erase in bytes */
/linux-4.1.27/drivers/net/ethernet/chelsio/cxgb3/
H A Dt3_hw.c748 SF_ERASE_SECTOR = 0xd8, /* erase sector */
1057 * t3_flash_erase_sectors - erase a range of flash sectors
1059 * @start: the first sector to erase
1060 * @end: the last sector to erase
/linux-4.1.27/drivers/media/platform/omap3isp/
H A Dispstat.c960 * Driver may need to erase current data prior to __stat_isr()

Completed in 4213 milliseconds

12