Home
last modified time | relevance | path

Searched refs:erase (Results 1 – 25 of 47) sorted by relevance

12

/drivers/mtd/devices/
Dpowernv_flash.c147 static int powernv_flash_erase(struct mtd_info *mtd, struct erase_info *erase) in powernv_flash_erase() argument
151 erase->state = MTD_ERASING; in powernv_flash_erase()
154 rc = powernv_flash_async_op(mtd, FLASH_OP_ERASE, erase->addr, in powernv_flash_erase()
155 erase->len, NULL, NULL); in powernv_flash_erase()
158 erase->fail_addr = erase->addr; in powernv_flash_erase()
159 erase->state = MTD_ERASE_FAILED; in powernv_flash_erase()
161 erase->state = MTD_ERASE_DONE; in powernv_flash_erase()
163 mtd_erase_callback(erase); in powernv_flash_erase()
Dbcm47xxsflash.c68 static int bcm47xxsflash_erase(struct mtd_info *mtd, struct erase_info *erase) in bcm47xxsflash_erase() argument
76 b47s->cc_write(b47s, BCMA_CC_FLASHADDR, erase->addr); in bcm47xxsflash_erase()
87 b47s->cc_write(b47s, BCMA_CC_FLASHADDR, erase->addr << 1); in bcm47xxsflash_erase()
94 erase->state = MTD_ERASE_FAILED; in bcm47xxsflash_erase()
96 erase->state = MTD_ERASE_DONE; in bcm47xxsflash_erase()
98 if (erase->callback) in bcm47xxsflash_erase()
99 erase->callback(erase); in bcm47xxsflash_erase()
DKconfig165 int "MTDRAM erase block size in KiB"
169 This allows you to configure the size of the erase blocks in the
/drivers/mtd/
Dmtdconcat.c341 static int concat_dev_erase(struct mtd_info *mtd, struct erase_info *erase) in concat_dev_erase() argument
352 erase->mtd = mtd; in concat_dev_erase()
353 erase->callback = concat_erase_callback; in concat_dev_erase()
354 erase->priv = (unsigned long) &waitq; in concat_dev_erase()
360 err = mtd_erase(mtd, erase); in concat_dev_erase()
364 if (erase->state != MTD_ERASE_DONE in concat_dev_erase()
365 && erase->state != MTD_ERASE_FAILED) in concat_dev_erase()
370 err = (erase->state == MTD_ERASE_FAILED) ? -EIO : 0; in concat_dev_erase()
381 struct erase_info *erase; in concat_erase() local
431 erase = kmalloc(sizeof (struct erase_info), GFP_KERNEL); in concat_erase()
[all …]
Drfd_ftl.c269 static void erase_callback(struct erase_info *erase) in erase_callback() argument
276 part = (struct partition*)erase->priv; in erase_callback()
278 i = (u32)erase->addr / part->block_size; in erase_callback()
279 if (i >= part->total_blocks || part->blocks[i].offset != erase->addr || in erase_callback()
280 erase->addr > UINT_MAX) { in erase_callback()
282 "on '%s'\n", (unsigned long long)erase->addr, part->mbd.mtd->name); in erase_callback()
286 if (erase->state != MTD_ERASE_DONE) { in erase_callback()
288 "state %d\n", (unsigned long long)erase->addr, in erase_callback()
289 part->mbd.mtd->name, erase->state); in erase_callback()
295 kfree(erase); in erase_callback()
[all …]
Dmtdoops.c99 struct erase_info erase; in mtdoops_erase_block() local
106 erase.mtd = mtd; in mtdoops_erase_block()
107 erase.callback = mtdoops_erase_callback; in mtdoops_erase_block()
108 erase.addr = offset; in mtdoops_erase_block()
109 erase.len = mtd->erasesize; in mtdoops_erase_block()
110 erase.priv = (u_long)&wait_q; in mtdoops_erase_block()
115 ret = mtd_erase(mtd, &erase); in mtdoops_erase_block()
120 (unsigned long long)erase.addr, in mtdoops_erase_block()
121 (unsigned long long)erase.len, mtddev); in mtdoops_erase_block()
Dmtdblock.c67 struct erase_info erase; in erase_write() local
78 erase.mtd = mtd; in erase_write()
79 erase.callback = erase_callback; in erase_write()
80 erase.addr = pos; in erase_write()
81 erase.len = len; in erase_write()
82 erase.priv = (u_long)&wait_q; in erase_write()
87 ret = mtd_erase(mtd, &erase); in erase_write()
Dmtdchar.c725 struct erase_info *erase; in mtdchar_ioctl() local
730 erase=kzalloc(sizeof(struct erase_info),GFP_KERNEL); in mtdchar_ioctl()
731 if (!erase) in mtdchar_ioctl()
744 kfree(erase); in mtdchar_ioctl()
747 erase->addr = einfo64.start; in mtdchar_ioctl()
748 erase->len = einfo64.length; in mtdchar_ioctl()
754 kfree(erase); in mtdchar_ioctl()
757 erase->addr = einfo32.start; in mtdchar_ioctl()
758 erase->len = einfo32.length; in mtdchar_ioctl()
760 erase->mtd = mtd; in mtdchar_ioctl()
[all …]
Dftl.c338 struct erase_info *erase; in erase_xfer() local
347 erase=kmalloc(sizeof(struct erase_info), GFP_KERNEL); in erase_xfer()
348 if (!erase) in erase_xfer()
351 erase->mtd = part->mbd.mtd; in erase_xfer()
352 erase->callback = ftl_erase_callback; in erase_xfer()
353 erase->addr = xfer->Offset; in erase_xfer()
354 erase->len = 1 << part->header.EraseUnitSize; in erase_xfer()
355 erase->priv = (u_long)part; in erase_xfer()
357 ret = mtd_erase(part->mbd.mtd, erase); in erase_xfer()
362 kfree(erase); in erase_xfer()
[all …]
Dmtdswap.c551 struct erase_info erase; in mtdswap_erase_block() local
562 memset(&erase, 0, sizeof(struct erase_info)); in mtdswap_erase_block()
564 erase.mtd = mtd; in mtdswap_erase_block()
565 erase.callback = mtdswap_erase_callback; in mtdswap_erase_block()
566 erase.addr = mtdswap_eb_offset(d, eb); in mtdswap_erase_block()
567 erase.len = mtd->erasesize; in mtdswap_erase_block()
568 erase.priv = (u_long)&wq; in mtdswap_erase_block()
570 ret = mtd_erase(mtd, &erase); in mtdswap_erase_block()
575 erase.addr, mtd->name); in mtdswap_erase_block()
581 erase.addr, mtd->name); in mtdswap_erase_block()
[all …]
Dsm_ftl.c461 struct erase_info erase; in sm_erase_block() local
463 erase.mtd = mtd; in sm_erase_block()
464 erase.callback = sm_erase_callback; in sm_erase_block()
465 erase.addr = sm_mkoffset(ftl, zone_num, block, 0); in sm_erase_block()
466 erase.len = ftl->block_size; in sm_erase_block()
467 erase.priv = (u_long)ftl; in sm_erase_block()
479 if (mtd_erase(mtd, &erase)) { in sm_erase_block()
485 if (erase.state == MTD_ERASE_PENDING) in sm_erase_block()
488 if (erase.state != MTD_ERASE_DONE) { in sm_erase_block()
DKconfig30 'images' in flash devices by putting a table one of the erase
56 erase block number. A negative value specifies a number of
171 Although most flash chips have an erase size too large to be useful
181 Later, it may be extended to perform read/erase/modify/write cycles
309 The driver provides wear leveling by storing erase counter into the
/drivers/net/ethernet/sfc/
Dmtd.c24 static int efx_mtd_erase(struct mtd_info *mtd, struct erase_info *erase) in efx_mtd_erase() argument
29 rc = efx->type->mtd_erase(mtd, erase->addr, erase->len); in efx_mtd_erase()
31 erase->state = MTD_ERASE_DONE; in efx_mtd_erase()
33 erase->state = MTD_ERASE_FAILED; in efx_mtd_erase()
34 erase->fail_addr = MTD_FAIL_ADDR_UNKNOWN; in efx_mtd_erase()
36 mtd_erase_callback(erase); in efx_mtd_erase()
/drivers/mtd/ubi/
Dattach.c249 } else if (list == &ai->erase) { in add_to_list()
665 &ai->erase); in ubi_add_to_av()
688 cmp_res & 4, &ai->erase); in ubi_add_to_av()
767 destroy_av(ai, av, &ai->erase); in ubi_remove_av()
850 list_for_each_entry_safe(aeb, tmp_aeb, &ai->erase, u.list) { in ubi_early_get_peb()
986 UBI_UNKNOWN, 0, &ai->erase); in scan_peb()
990 UBI_UNKNOWN, 1, &ai->erase); in scan_peb()
1116 UBI_UNKNOWN, ec, 1, &ai->erase); in scan_peb()
1125 ec, 1, &ai->erase); in scan_peb()
1132 UBI_UNKNOWN, ec, 1, &ai->erase); in scan_peb()
[all …]
DKconfig19 erase counter value and the lowest erase counter value of eraseblocks
21 wear leveling by means of moving data from eraseblock with low erase
22 counter to eraseblocks with high erase counter.
Dfastmap.c294 list_add_tail(&victim->u.list, &ai->erase); in update_vol()
314 list_add_tail(&new_aeb->u.list, &ai->erase); in update_vol()
534 list_for_each_entry(aeb, &ai->erase, u.list) in count_fastmap_pebs()
684 add_aeb(ai, &ai->erase, be32_to_cpu(fmec->pnum), in ubi_attach_fastmap()
780 list_move_tail(&tmp_aeb->u.list, &ai->erase); in ubi_attach_fastmap()
Dwl.c650 int erase = 0, keep = 0, vol_id = -1, lnum = -1; local
798 erase = 1;
944 if (erase) {
1606 list_for_each_entry_safe(aeb, tmp, &ai->erase, u.list) {
/drivers/misc/eeprom/
Deeprom_93xx46.c334 int erase = 0, ret; in eeprom_93xx46_store_erase() local
336 sscanf(buf, "%d", &erase); in eeprom_93xx46_store_erase()
337 if (erase) { in eeprom_93xx46_store_erase()
350 static DEVICE_ATTR(erase, S_IWUSR, NULL, eeprom_93xx46_store_erase);
DKconfig84 erase the whole EEPROM.
99 erase the whole EEPROM.
/drivers/nvme/host/
Dlightnvm.c145 struct nvme_nvm_erase_blk erase; member
542 c.erase.opcode = NVM_OP_ERASE; in nvme_nvm_erase_block()
543 c.erase.nsid = cpu_to_le32(ns->ns_id); in nvme_nvm_erase_block()
544 c.erase.spba = cpu_to_le64(rqd->ppa_addr.ppa); in nvme_nvm_erase_block()
545 c.erase.length = cpu_to_le16(rqd->nr_ppas - 1); in nvme_nvm_erase_block()
/drivers/mtd/spi-nor/
DKconfig19 bool "Use small 4096 B erase sectors"
30 4096 B erase size (e.g. UBIFS requires 15 KiB as a minimum).
/drivers/scsi/
Dgdth_ioctl.h204 int erase; /* erase event ? */ member
314 int erase; /* erase event? */ member
/drivers/input/
Dff-core.c199 if (ff->erase) { in erase_effect()
200 error = ff->erase(dev, effect_id); in erase_effect()
/drivers/scsi/megaraid/
Dmegaraid_sas.h508 u32 erase:1; member
514 u32 erase:1;
525 union MR_PROGRESS erase; member
534 u32 erase:1; member
538 u32 erase:1;
/drivers/firmware/efi/
Defi-pstore.c388 .erase = efi_pstore_erase,

12