Home
last modified time | relevance | path

Searched refs:instr (Results 1 – 25 of 40) sorted by relevance

12

/drivers/mtd/
Dinftlmount.c210 struct erase_info *instr = &inftl->instr; in find_boot_record() local
212 instr->mtd = inftl->mbd.mtd; in find_boot_record()
221 instr->addr = ip->Reserved0 * inftl->EraseSize; in find_boot_record()
222 instr->len = inftl->EraseSize; in find_boot_record()
223 mtd_erase(mtd, instr); in find_boot_record()
377 struct erase_info *instr = &inftl->instr; in INFTL_formatblock() local
383 memset(instr, 0, sizeof(struct erase_info)); in INFTL_formatblock()
389 instr->mtd = inftl->mbd.mtd; in INFTL_formatblock()
390 instr->addr = block * inftl->EraseSize; in INFTL_formatblock()
391 instr->len = inftl->mbd.mtd->erasesize; in INFTL_formatblock()
[all …]
Dmtdconcat.c335 static void concat_erase_callback(struct erase_info *instr) in concat_erase_callback() argument
337 wake_up((wait_queue_head_t *) instr->priv); in concat_erase_callback()
374 static int concat_erase(struct mtd_info *mtd, struct erase_info *instr) in concat_erase() argument
390 if (instr->addr & (concat->mtd.erasesize - 1)) in concat_erase()
392 if (instr->len & (concat->mtd.erasesize - 1)) in concat_erase()
403 instr->addr >= erase_regions[i].offset; i++) ; in concat_erase()
411 if (i < 0 || instr->addr & (erase_regions[i].erasesize - 1)) in concat_erase()
418 (instr->addr + instr->len) >= erase_regions[i].offset; in concat_erase()
424 if (i < 0 || ((instr->addr + instr->len) & in concat_erase()
435 *erase = *instr; in concat_erase()
[all …]
Dmtdpart.c226 static int part_erase(struct mtd_info *mtd, struct erase_info *instr) in part_erase() argument
231 instr->addr += part->offset; in part_erase()
232 ret = part->master->_erase(part->master, instr); in part_erase()
234 if (instr->fail_addr != MTD_FAIL_ADDR_UNKNOWN) in part_erase()
235 instr->fail_addr -= part->offset; in part_erase()
236 instr->addr -= part->offset; in part_erase()
241 void mtd_erase_callback(struct erase_info *instr) in mtd_erase_callback() argument
243 if (instr->mtd->_erase == part_erase) { in mtd_erase_callback()
244 struct mtd_part *part = PART(instr->mtd); in mtd_erase_callback()
246 if (instr->fail_addr != MTD_FAIL_ADDR_UNKNOWN) in mtd_erase_callback()
[all …]
Dnftlmount.c308 struct erase_info *instr = &nftl->instr; in NFTL_formatblock() local
324 memset(instr, 0, sizeof(struct erase_info)); in NFTL_formatblock()
327 instr->mtd = nftl->mbd.mtd; in NFTL_formatblock()
328 instr->addr = block * nftl->EraseSize; in NFTL_formatblock()
329 instr->len = nftl->EraseSize; in NFTL_formatblock()
330 mtd_erase(mtd, instr); in NFTL_formatblock()
332 if (instr->state == MTD_ERASE_FAILED) { in NFTL_formatblock()
348 if (check_free_sectors(nftl, instr->addr, nftl->EraseSize, 1) != 0) in NFTL_formatblock()
359 mtd_block_markbad(nftl->mbd.mtd, instr->addr); in NFTL_formatblock()
Dmtdcore.c692 int mtd_erase(struct mtd_info *mtd, struct erase_info *instr) in mtd_erase() argument
694 if (instr->addr > mtd->size || instr->len > mtd->size - instr->addr) in mtd_erase()
698 instr->fail_addr = MTD_FAIL_ADDR_UNKNOWN; in mtd_erase()
699 if (!instr->len) { in mtd_erase()
700 instr->state = MTD_ERASE_DONE; in mtd_erase()
701 mtd_erase_callback(instr); in mtd_erase()
704 return mtd->_erase(mtd, instr); in mtd_erase()
/drivers/mtd/devices/
Dlart.c361 static int flash_erase (struct mtd_info *mtd,struct erase_info *instr) in flash_erase() argument
367 printk (KERN_DEBUG "%s(addr = 0x%.8x, len = %d)\n", __func__, instr->addr, instr->len); in flash_erase()
379 for (i = 0; i < mtd->numeraseregions && instr->addr >= mtd->eraseregions[i].offset; i++) ; in flash_erase()
388 if (i < 0 || (instr->addr & (mtd->eraseregions[i].erasesize - 1))) in flash_erase()
401 … for (; i < mtd->numeraseregions && instr->addr + instr->len >= mtd->eraseregions[i].offset; i++) ; in flash_erase()
405 if (i < 0 || ((instr->addr + instr->len) & (mtd->eraseregions[i].erasesize - 1))) in flash_erase()
408 addr = instr->addr; in flash_erase()
409 len = instr->len; in flash_erase()
418 instr->state = MTD_ERASE_FAILED; in flash_erase()
428 instr->state = MTD_ERASE_DONE; in flash_erase()
[all …]
Dmtdram.c35 static int ram_erase(struct mtd_info *mtd, struct erase_info *instr) in ram_erase() argument
37 memset((char *)mtd->priv + instr->addr, 0xff, instr->len); in ram_erase()
38 instr->state = MTD_ERASE_DONE; in ram_erase()
39 mtd_erase_callback(instr); in ram_erase()
Dmtd_dataflash.c153 static int dataflash_erase(struct mtd_info *mtd, struct erase_info *instr) in dataflash_erase() argument
164 dev_name(&spi->dev), (long long)instr->addr, in dataflash_erase()
165 (long long)instr->len); in dataflash_erase()
167 div_u64_rem(instr->len, priv->page_size, &rem); in dataflash_erase()
170 div_u64_rem(instr->addr, priv->page_size, &rem); in dataflash_erase()
181 while (instr->len > 0) { in dataflash_erase()
189 pageaddr = div_u64(instr->addr, priv->page_size); in dataflash_erase()
190 do_block = (pageaddr & 0x7) == 0 && instr->len >= blocksize; in dataflash_erase()
216 instr->addr += blocksize; in dataflash_erase()
217 instr->len -= blocksize; in dataflash_erase()
[all …]
Dpmc551.c139 static int pmc551_erase(struct mtd_info *mtd, struct erase_info *instr) in pmc551_erase() argument
149 printk(KERN_DEBUG "pmc551_erase(pos:%ld, len:%ld)\n", (long)instr->addr, in pmc551_erase()
150 (long)instr->len); in pmc551_erase()
153 end = instr->addr + instr->len - 1; in pmc551_erase()
155 soff_hi = instr->addr & ~(priv->asize - 1); in pmc551_erase()
157 soff_lo = instr->addr & (priv->asize - 1); in pmc551_erase()
159 pmc551_point(mtd, instr->addr, instr->len, &retlen, in pmc551_erase()
165 memset(ptr, 0xff, instr->len); in pmc551_erase()
187 instr->state = MTD_ERASE_DONE; in pmc551_erase()
192 mtd_erase_callback(instr); in pmc551_erase()
Dsst25l.c171 static int sst25l_erase(struct mtd_info *mtd, struct erase_info *instr) in sst25l_erase() argument
178 if ((uint32_t)instr->len % mtd->erasesize) in sst25l_erase()
181 if ((uint32_t)instr->addr % mtd->erasesize) in sst25l_erase()
184 addr = instr->addr; in sst25l_erase()
185 end = addr + instr->len; in sst25l_erase()
199 instr->state = MTD_ERASE_FAILED; in sst25l_erase()
209 instr->state = MTD_ERASE_DONE; in sst25l_erase()
210 mtd_erase_callback(instr); in sst25l_erase()
Dblock2mtd.c76 static int block2mtd_erase(struct mtd_info *mtd, struct erase_info *instr) in block2mtd_erase() argument
79 size_t from = instr->addr; in block2mtd_erase()
80 size_t len = instr->len; in block2mtd_erase()
83 instr->state = MTD_ERASING; in block2mtd_erase()
89 instr->state = MTD_ERASE_FAILED; in block2mtd_erase()
91 instr->state = MTD_ERASE_DONE; in block2mtd_erase()
93 mtd_erase_callback(instr); in block2mtd_erase()
Dphram.c36 static int phram_erase(struct mtd_info *mtd, struct erase_info *instr) in phram_erase() argument
40 memset(start + instr->addr, 0xff, instr->len); in phram_erase()
47 instr->state = MTD_ERASE_DONE; in phram_erase()
48 mtd_erase_callback(instr); in phram_erase()
Dslram.c82 static int slram_erase(struct mtd_info *mtd, struct erase_info *instr) in slram_erase() argument
86 memset(priv->start + instr->addr, 0xff, instr->len); in slram_erase()
91 instr->state = MTD_ERASE_DONE; in slram_erase()
92 mtd_erase_callback(instr); in slram_erase()
Dm25p80.c281 static int m25p80_erase(struct mtd_info *mtd, struct erase_info *instr) in m25p80_erase() argument
288 __func__, (long long)instr->addr, in m25p80_erase()
289 (long long)instr->len); in m25p80_erase()
291 div_u64_rem(instr->len, mtd->erasesize, &rem); in m25p80_erase()
295 addr = instr->addr; in m25p80_erase()
296 len = instr->len; in m25p80_erase()
303 instr->state = MTD_ERASE_FAILED; in m25p80_erase()
317 instr->state = MTD_ERASE_FAILED; in m25p80_erase()
329 instr->state = MTD_ERASE_DONE; in m25p80_erase()
330 mtd_erase_callback(instr); in m25p80_erase()
Ddoc2001.c39 static int doc_erase (struct mtd_info *mtd, struct erase_info *instr);
740 int doc_erase (struct mtd_info *mtd, struct erase_info *instr) in doc_erase() argument
744 __u32 ofs = instr->addr; in doc_erase()
745 __u32 len = instr->len; in doc_erase()
763 instr->state = MTD_ERASE_PENDING; in doc_erase()
774 instr->state = MTD_ERASING; in doc_erase()
787 instr->state = MTD_ERASE_FAILED; in doc_erase()
789 instr->state = MTD_ERASE_DONE; in doc_erase()
792 mtd_erase_callback(instr); in doc_erase()
Ddoc2001plus.c43 static int doc_erase (struct mtd_info *mtd, struct erase_info *instr);
1000 int doc_erase(struct mtd_info *mtd, struct erase_info *instr) in doc_erase() argument
1004 __u32 ofs = instr->addr; in doc_erase()
1005 __u32 len = instr->len; in doc_erase()
1025 instr->state = MTD_ERASE_PENDING; in doc_erase()
1037 instr->state = MTD_ERASING; in doc_erase()
1047 instr->state = MTD_ERASE_FAILED; in doc_erase()
1049 instr->state = MTD_ERASE_DONE; in doc_erase()
1056 mtd_erase_callback(instr); in doc_erase()
Dgoldfish_nand.c86 static int goldfish_nand_erase(struct mtd_info *mtd, struct erase_info *instr) in goldfish_nand_erase() argument
88 loff_t ofs = instr->addr; in goldfish_nand_erase()
89 uint32_t len = instr->len; in goldfish_nand_erase()
110 instr->state = MTD_ERASE_DONE; in goldfish_nand_erase()
111 mtd_erase_callback(instr); in goldfish_nand_erase()
Ddoc2000.c60 static int doc_erase (struct mtd_info *mtd, struct erase_info *instr);
1084 static int doc_erase(struct mtd_info *mtd, struct erase_info *instr) in doc_erase() argument
1087 __u32 ofs = instr->addr; in doc_erase()
1088 __u32 len = instr->len; in doc_erase()
1101 instr->state = MTD_ERASING; in doc_erase()
1134 instr->state = MTD_ERASE_FAILED; in doc_erase()
1140 instr->state = MTD_ERASE_DONE; in doc_erase()
1143 mtd_erase_callback(instr); in doc_erase()
/drivers/mtd/ubi/
Dgluebi.c252 static int gluebi_erase(struct mtd_info *mtd, struct erase_info *instr) in gluebi_erase() argument
257 if (mtd_mod_by_ws(instr->addr, mtd) || mtd_mod_by_ws(instr->len, mtd)) in gluebi_erase()
260 lnum = mtd_div_by_eb(instr->addr, mtd); in gluebi_erase()
261 count = mtd_div_by_eb(instr->len, mtd); in gluebi_erase()
280 instr->state = MTD_ERASE_DONE; in gluebi_erase()
281 mtd_erase_callback(instr); in gluebi_erase()
285 instr->state = MTD_ERASE_FAILED; in gluebi_erase()
286 instr->fail_addr = (long long)lnum * mtd->erasesize; in gluebi_erase()
/drivers/mtd/chips/
Dmap_ram.c116 static int mapram_erase (struct mtd_info *mtd, struct erase_info *instr) in mapram_erase() argument
125 for (i=0; i<instr->len; i += map_bankwidth(map)) in mapram_erase()
126 map_write(map, allff, instr->addr + i); in mapram_erase()
127 instr->state = MTD_ERASE_DONE; in mapram_erase()
128 mtd_erase_callback(instr); in mapram_erase()
Dcfi_cmdset_0020.c893 struct erase_info *instr) in cfi_staa_erase_varsize() argument
913 while (i < mtd->numeraseregions && instr->addr >= regions[i].offset) in cfi_staa_erase_varsize()
923 if (instr->addr & (regions[i].erasesize-1)) in cfi_staa_erase_varsize()
933 while (i<mtd->numeraseregions && (instr->addr + instr->len) >= regions[i].offset) in cfi_staa_erase_varsize()
941 if ((instr->addr + instr->len) & (regions[i].erasesize-1)) in cfi_staa_erase_varsize()
944 chipnum = instr->addr >> cfi->chipshift; in cfi_staa_erase_varsize()
945 adr = instr->addr - (chipnum << cfi->chipshift); in cfi_staa_erase_varsize()
946 len = instr->len; in cfi_staa_erase_varsize()
971 instr->state = MTD_ERASE_DONE; in cfi_staa_erase_varsize()
972 mtd_erase_callback(instr); in cfi_staa_erase_varsize()
/drivers/mtd/onenand/
Donenand_base.c2242 struct erase_info *instr) in onenand_multiblock_erase_verify() argument
2245 loff_t addr = instr->addr; in onenand_multiblock_erase_verify()
2246 int len = instr->len; in onenand_multiblock_erase_verify()
2256 instr->state = MTD_ERASE_FAILED; in onenand_multiblock_erase_verify()
2257 instr->fail_addr = addr; in onenand_multiblock_erase_verify()
2275 struct erase_info *instr, in onenand_multiblock_erase() argument
2279 loff_t addr = instr->addr; in onenand_multiblock_erase()
2280 int len = instr->len; in onenand_multiblock_erase()
2285 instr->state = MTD_ERASING; in onenand_multiblock_erase()
2300 instr->state = MTD_ERASE_FAILED; in onenand_multiblock_erase()
[all …]
/drivers/mtd/nand/
Dalauda.c491 static int __alauda_erase(struct mtd_info *mtd, struct erase_info *instr) in __alauda_erase() argument
494 u32 ofs = instr->addr; in __alauda_erase()
495 u32 len = instr->len; in __alauda_erase()
519 static int alauda_erase(struct mtd_info *mtd, struct erase_info *instr) in alauda_erase() argument
523 err = __alauda_erase(mtd, instr); in alauda_erase()
524 instr->state = err ? MTD_ERASE_FAILED : MTD_ERASE_DONE; in alauda_erase()
525 mtd_erase_callback(instr); in alauda_erase()
/drivers/scsi/aic7xxx/aicasm/
Daicasm_gram.y1653 struct instruction *instr; in format_1_instr() local
1669 instr = seq_alloc(); in format_1_instr()
1670 f1_instr = &instr->format.format1; in format_1_instr()
1730 struct instruction *instr; in format_2_instr() local
1742 instr = seq_alloc(); in format_2_instr()
1743 f2_instr = &instr->format.format2; in format_2_instr()
1791 struct instruction *instr; in format_3_instr() local
1799 instr = seq_alloc(); in format_3_instr()
1800 f3_instr = &instr->format.format3; in format_3_instr()
1807 instr->patch_label = address->symbol; in format_3_instr()
/drivers/mtd/lpddr/
Dlpddr_cmds.c38 static int lpddr_erase(struct mtd_info *mtd, struct erase_info *instr);
680 static int lpddr_erase(struct mtd_info *mtd, struct erase_info *instr) in lpddr_erase() argument
688 ofs = instr->addr; in lpddr_erase()
689 len = instr->len; in lpddr_erase()
698 instr->state = MTD_ERASE_DONE; in lpddr_erase()
699 mtd_erase_callback(instr); in lpddr_erase()

12