/drivers/mtd/ubi/ |
D | gluebi.c | 207 static int gluebi_erase(struct mtd_info *mtd, struct erase_info *instr) in gluebi_erase() argument 213 dbg_gen("erase %llu bytes at offset %llu", (unsigned long long)instr->len, in gluebi_erase() 214 (unsigned long long)instr->addr); in gluebi_erase() 216 if (instr->addr < 0 || instr->addr > mtd->size - mtd->erasesize) in gluebi_erase() 219 if (instr->len < 0 || instr->addr + instr->len > mtd->size) in gluebi_erase() 222 if (mtd_mod_by_ws(instr->addr, mtd) || mtd_mod_by_ws(instr->len, mtd)) in gluebi_erase() 225 lnum = mtd_div_by_eb(instr->addr, mtd); in gluebi_erase() 226 count = mtd_div_by_eb(instr->len, mtd); in gluebi_erase() 248 instr->state = MTD_ERASE_DONE; in gluebi_erase() 249 mtd_erase_callback(instr); in gluebi_erase() [all …]
|
/drivers/mtd/ |
D | inftlmount.c | 219 struct erase_info *instr = &inftl->instr; in find_boot_record() local 221 instr->mtd = inftl->mbd.mtd; in find_boot_record() 230 instr->addr = ip->Reserved0 * inftl->EraseSize; in find_boot_record() 231 instr->len = inftl->EraseSize; in find_boot_record() 232 mtd->erase(mtd, instr); in find_boot_record() 385 struct erase_info *instr = &inftl->instr; in INFTL_formatblock() local 392 memset(instr, 0, sizeof(struct erase_info)); in INFTL_formatblock() 398 instr->mtd = inftl->mbd.mtd; in INFTL_formatblock() 399 instr->addr = block * inftl->EraseSize; in INFTL_formatblock() 400 instr->len = inftl->mbd.mtd->erasesize; in INFTL_formatblock() [all …]
|
D | mtdconcat.c | 344 static void concat_erase_callback(struct erase_info *instr) in concat_erase_callback() argument 346 wake_up((wait_queue_head_t *) instr->priv); in concat_erase_callback() 383 static int concat_erase(struct mtd_info *mtd, struct erase_info *instr) in concat_erase() argument 394 if (instr->addr > concat->mtd.size) in concat_erase() 397 if (instr->len + instr->addr > concat->mtd.size) in concat_erase() 408 if (instr->addr & (concat->mtd.erasesize - 1)) in concat_erase() 410 if (instr->len & (concat->mtd.erasesize - 1)) in concat_erase() 421 instr->addr >= erase_regions[i].offset; i++) ; in concat_erase() 429 if (instr->addr & (erase_regions[i].erasesize - 1)) in concat_erase() 436 (instr->addr + instr->len) >= erase_regions[i].offset; in concat_erase() [all …]
|
D | mtdpart.c | 206 static int part_erase(struct mtd_info *mtd, struct erase_info *instr) in part_erase() argument 212 if (instr->addr >= mtd->size) in part_erase() 214 instr->addr += part->offset; in part_erase() 215 ret = part->master->erase(part->master, instr); in part_erase() 217 if (instr->fail_addr != MTD_FAIL_ADDR_UNKNOWN) in part_erase() 218 instr->fail_addr -= part->offset; in part_erase() 219 instr->addr -= part->offset; in part_erase() 224 void mtd_erase_callback(struct erase_info *instr) in mtd_erase_callback() argument 226 if (instr->mtd->erase == part_erase) { in mtd_erase_callback() 227 struct mtd_part *part = PART(instr->mtd); in mtd_erase_callback() [all …]
|
D | nftlmount.c | 306 struct erase_info *instr = &nftl->instr; in NFTL_formatblock() local 322 memset(instr, 0, sizeof(struct erase_info)); in NFTL_formatblock() 325 instr->mtd = nftl->mbd.mtd; in NFTL_formatblock() 326 instr->addr = block * nftl->EraseSize; in NFTL_formatblock() 327 instr->len = nftl->EraseSize; in NFTL_formatblock() 328 mtd->erase(mtd, instr); in NFTL_formatblock() 330 if (instr->state == MTD_ERASE_FAILED) { in NFTL_formatblock() 346 if (check_free_sectors(nftl, instr->addr, nftl->EraseSize, 1) != 0) in NFTL_formatblock() 357 nftl->mbd.mtd->block_markbad(nftl->mbd.mtd, instr->addr); in NFTL_formatblock()
|
/drivers/mtd/devices/ |
D | lart.c | 366 static int flash_erase (struct mtd_info *mtd,struct erase_info *instr) in flash_erase() argument 372 printk (KERN_DEBUG "%s(addr = 0x%.8x, len = %d)\n", __func__, instr->addr, instr->len); in flash_erase() 376 if (instr->addr + instr->len > mtd->size) return (-EINVAL); in flash_erase() 387 for (i = 0; i < mtd->numeraseregions && instr->addr >= mtd->eraseregions[i].offset; i++) ; in flash_erase() 396 if (instr->addr & (mtd->eraseregions[i].erasesize - 1)) return (-EINVAL); in flash_erase() 408 … for (; i < mtd->numeraseregions && instr->addr + instr->len >= mtd->eraseregions[i].offset; i++) ; in flash_erase() 412 if ((instr->addr + instr->len) & (mtd->eraseregions[i].erasesize - 1)) return (-EINVAL); in flash_erase() 414 addr = instr->addr; in flash_erase() 415 len = instr->len; in flash_erase() 424 instr->state = MTD_ERASE_FAILED; in flash_erase() [all …]
|
D | mtdram.c | 36 static int ram_erase(struct mtd_info *mtd, struct erase_info *instr) in ram_erase() argument 38 if (instr->addr + instr->len > mtd->size) in ram_erase() 41 memset((char *)mtd->priv + instr->addr, 0xff, instr->len); in ram_erase() 43 instr->state = MTD_ERASE_DONE; in ram_erase() 44 mtd_erase_callback(instr); in ram_erase()
|
D | mtd_dataflash.c | 148 static int dataflash_erase(struct mtd_info *mtd, struct erase_info *instr) in dataflash_erase() argument 159 dev_name(&spi->dev), (long long)instr->addr, in dataflash_erase() 160 (long long)instr->len); in dataflash_erase() 163 if (instr->addr + instr->len > mtd->size) in dataflash_erase() 165 div_u64_rem(instr->len, priv->page_size, &rem); in dataflash_erase() 168 div_u64_rem(instr->addr, priv->page_size, &rem); in dataflash_erase() 179 while (instr->len > 0) { in dataflash_erase() 187 pageaddr = div_u64(instr->len, priv->page_size); in dataflash_erase() 188 do_block = (pageaddr & 0x7) == 0 && instr->len >= blocksize; in dataflash_erase() 214 instr->addr += blocksize; in dataflash_erase() [all …]
|
D | phram.c | 36 static int phram_erase(struct mtd_info *mtd, struct erase_info *instr) in phram_erase() argument 40 if (instr->addr + instr->len > mtd->size) in phram_erase() 43 memset(start + instr->addr, 0xff, instr->len); in phram_erase() 50 instr->state = MTD_ERASE_DONE; in phram_erase() 52 mtd_erase_callback(instr); in phram_erase()
|
D | m25p80.c | 232 static int m25p80_erase(struct mtd_info *mtd, struct erase_info *instr) in m25p80_erase() argument 240 (long long)instr->addr, (long long)instr->len); in m25p80_erase() 243 if (instr->addr + instr->len > flash->mtd.size) in m25p80_erase() 245 div_u64_rem(instr->len, mtd->erasesize, &rem); in m25p80_erase() 249 addr = instr->addr; in m25p80_erase() 250 len = instr->len; in m25p80_erase() 256 instr->state = MTD_ERASE_FAILED; in m25p80_erase() 269 instr->state = MTD_ERASE_FAILED; in m25p80_erase() 281 instr->state = MTD_ERASE_DONE; in m25p80_erase() 282 mtd_erase_callback(instr); in m25p80_erase()
|
D | pmc551.c | 105 static int pmc551_erase(struct mtd_info *mtd, struct erase_info *instr) in pmc551_erase() argument 115 printk(KERN_DEBUG "pmc551_erase(pos:%ld, len:%ld)\n", (long)instr->addr, in pmc551_erase() 116 (long)instr->len); in pmc551_erase() 119 end = instr->addr + instr->len - 1; in pmc551_erase() 131 soff_hi = instr->addr & ~(priv->asize - 1); in pmc551_erase() 133 soff_lo = instr->addr & (priv->asize - 1); in pmc551_erase() 135 pmc551_point(mtd, instr->addr, instr->len, &retlen, in pmc551_erase() 141 memset(ptr, 0xff, instr->len); in pmc551_erase() 163 instr->state = MTD_ERASE_DONE; in pmc551_erase() 168 mtd_erase_callback(instr); in pmc551_erase()
|
D | slram.c | 83 static int slram_erase(struct mtd_info *mtd, struct erase_info *instr) in slram_erase() argument 87 if (instr->addr + instr->len > mtd->size) { in slram_erase() 91 memset(priv->start + instr->addr, 0xff, instr->len); in slram_erase() 98 instr->state = MTD_ERASE_DONE; in slram_erase() 100 mtd_erase_callback(instr); in slram_erase()
|
D | block2mtd.c | 76 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 instr->state = MTD_ERASE_DONE; in block2mtd_erase() 94 mtd_erase_callback(instr); in block2mtd_erase()
|
D | doc2001.c | 40 static int doc_erase (struct mtd_info *mtd, struct erase_info *instr); 758 int doc_erase (struct mtd_info *mtd, struct erase_info *instr) in doc_erase() argument 762 __u32 ofs = instr->addr; in doc_erase() 763 __u32 len = instr->len; in doc_erase() 781 instr->state = MTD_ERASE_PENDING; in doc_erase() 792 instr->state = MTD_ERASING; in doc_erase() 805 instr->state = MTD_ERASE_FAILED; in doc_erase() 807 instr->state = MTD_ERASE_DONE; in doc_erase() 810 mtd_erase_callback(instr); in doc_erase()
|
D | doc2001plus.c | 44 static int doc_erase (struct mtd_info *mtd, struct erase_info *instr); 1019 int doc_erase(struct mtd_info *mtd, struct erase_info *instr) in doc_erase() argument 1023 __u32 ofs = instr->addr; in doc_erase() 1024 __u32 len = instr->len; in doc_erase() 1044 instr->state = MTD_ERASE_PENDING; in doc_erase() 1056 instr->state = MTD_ERASING; in doc_erase() 1066 instr->state = MTD_ERASE_FAILED; in doc_erase() 1068 instr->state = MTD_ERASE_DONE; in doc_erase() 1075 mtd_erase_callback(instr); in doc_erase()
|
D | goldfish_nand.c | 95 static int goldfish_nand_erase(struct mtd_info *mtd, struct erase_info *instr) in goldfish_nand_erase() argument 97 loff_t ofs = instr->addr; in goldfish_nand_erase() 98 uint32_t len = instr->len; in goldfish_nand_erase() 118 instr->state = MTD_ERASE_DONE; in goldfish_nand_erase() 119 mtd_erase_callback(instr); in goldfish_nand_erase()
|
D | doc2000.c | 61 static int doc_erase (struct mtd_info *mtd, struct erase_info *instr); 1108 static int doc_erase(struct mtd_info *mtd, struct erase_info *instr) in doc_erase() argument 1111 __u32 ofs = instr->addr; in doc_erase() 1112 __u32 len = instr->len; in doc_erase() 1125 instr->state = MTD_ERASING; in doc_erase() 1158 instr->state = MTD_ERASE_FAILED; in doc_erase() 1164 instr->state = MTD_ERASE_DONE; in doc_erase() 1167 mtd_erase_callback(instr); in doc_erase()
|
/drivers/mtd/chips/ |
D | map_ram.c | 100 static int mapram_erase (struct mtd_info *mtd, struct erase_info *instr) in mapram_erase() argument 110 for (i=0; i<instr->len; i += map_bankwidth(map)) in mapram_erase() 111 map_write(map, allff, instr->addr + i); in mapram_erase() 113 instr->state = MTD_ERASE_DONE; in mapram_erase() 115 mtd_erase_callback(instr); in mapram_erase()
|
D | cfi_cmdset_0020.c | 895 struct erase_info *instr) in cfi_staa_erase_varsize() argument 903 if (instr->addr > mtd->size) in cfi_staa_erase_varsize() 906 if ((instr->len + instr->addr) > mtd->size) in cfi_staa_erase_varsize() 921 while (i < mtd->numeraseregions && instr->addr >= regions[i].offset) in cfi_staa_erase_varsize() 931 if (instr->addr & (regions[i].erasesize-1)) in cfi_staa_erase_varsize() 941 while (i<mtd->numeraseregions && (instr->addr + instr->len) >= regions[i].offset) in cfi_staa_erase_varsize() 949 if ((instr->addr + instr->len) & (regions[i].erasesize-1)) in cfi_staa_erase_varsize() 952 chipnum = instr->addr >> cfi->chipshift; in cfi_staa_erase_varsize() 953 adr = instr->addr - (chipnum << cfi->chipshift); in cfi_staa_erase_varsize() 954 len = instr->len; in cfi_staa_erase_varsize() [all …]
|
/drivers/media/common/ |
D | ir-functions.c | 340 u32 instr = RC5_INSTR(rc5); in ir_rc5_timer_end() local 344 instr != RC5_INSTR(ir->last_rc5)) { in ir_rc5_timer_end() 345 dprintk(1, "ir-common: instruction %x, toggle %x\n", instr, in ir_rc5_timer_end() 348 ir_input_keydown(ir->dev, &ir->ir, instr, in ir_rc5_timer_end() 349 instr); in ir_rc5_timer_end()
|
/drivers/staging/mimio/ |
D | mimio.c | 104 unsigned char instr; member 579 const char *const instr[], in handle_mimio_rx_penupdown() argument 597 penid = mimio->pktbuf.instr = *(mimio->pktbuf.p + 2); in handle_mimio_rx_penupdown() 601 MIMIO_PEN_MAX, (int)mimio->pktbuf.instr); in handle_mimio_rx_penupdown() 602 penid = mimio->pktbuf.instr = 0; in handle_mimio_rx_penupdown() 608 dev_dbg(&mimio->idev->dev, "%s (id %d, code %d) %s.\n", instr[penid], in handle_mimio_rx_penupdown() 662 static const char * const instr[] = { in mimio_rx_handler() local 696 instr, instr_ofst)) in mimio_rx_handler() 720 if (instr_ofst[mimio->pktbuf.instr] >= 0) { in mimio_rx_handler()
|
/drivers/mtd/nand/ |
D | nand_base.c | 2000 static int nand_erase(struct mtd_info *mtd, struct erase_info *instr) in nand_erase() argument 2002 return nand_erase_nand(mtd, instr, 0); in nand_erase() 2014 int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr, in nand_erase_nand() argument 2024 (unsigned long long)instr->addr, (unsigned long long)instr->len); in nand_erase_nand() 2027 if (instr->addr & ((1 << chip->phys_erase_shift) - 1)) { in nand_erase_nand() 2033 if (instr->len & ((1 << chip->phys_erase_shift) - 1)) { in nand_erase_nand() 2040 if ((instr->len + instr->addr) > mtd->size) { in nand_erase_nand() 2046 instr->fail_addr = MTD_FAIL_ADDR_UNKNOWN; in nand_erase_nand() 2052 page = (int)(instr->addr >> chip->page_shift); in nand_erase_nand() 2053 chipnr = (int)(instr->addr >> chip->chip_shift); in nand_erase_nand() [all …]
|
D | alauda.c | 500 static int __alauda_erase(struct mtd_info *mtd, struct erase_info *instr) in __alauda_erase() argument 503 u32 ofs = instr->addr; in __alauda_erase() 504 u32 len = instr->len; in __alauda_erase() 528 static int alauda_erase(struct mtd_info *mtd, struct erase_info *instr) in alauda_erase() argument 532 err = __alauda_erase(mtd, instr); in alauda_erase() 533 instr->state = err ? MTD_ERASE_FAILED : MTD_ERASE_DONE; in alauda_erase() 534 mtd_erase_callback(instr); in alauda_erase()
|
/drivers/mtd/onenand/ |
D | onenand_base.c | 1767 static int onenand_erase(struct mtd_info *mtd, struct erase_info *instr) in onenand_erase() argument 1775 …: start = 0x%012llx, len = %llu\n", (unsigned long long) instr->addr, (unsigned long long) instr->… in onenand_erase() 1780 if (unlikely(instr->addr & (block_size - 1))) { in onenand_erase() 1786 if (unlikely(instr->len & (block_size - 1))) { in onenand_erase() 1792 if (unlikely((instr->len + instr->addr) > mtd->size)) { in onenand_erase() 1797 instr->fail_addr = MTD_FAIL_ADDR_UNKNOWN; in onenand_erase() 1803 len = instr->len; in onenand_erase() 1804 addr = instr->addr; in onenand_erase() 1806 instr->state = MTD_ERASING; in onenand_erase() 1814 instr->state = MTD_ERASE_FAILED; in onenand_erase() [all …]
|
/drivers/scsi/aic7xxx/aicasm/ |
D | aicasm_gram.y | 1653 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()
|