Lines Matching refs:instr
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()
215 instr->len -= blocksize; in dataflash_erase()
217 instr->addr += priv->page_size; in dataflash_erase()
218 instr->len -= priv->page_size; in dataflash_erase()
224 instr->state = MTD_ERASE_DONE; in dataflash_erase()
225 mtd_erase_callback(instr); in dataflash_erase()