Searched refs:erase_block_no (Results 1 - 1 of 1) sorted by relevance

/linux-4.4.14/drivers/mtd/nand/
H A Dnandsim.c421 unsigned int erase_block_no; member in struct:weak_block
819 unsigned int erase_block_no; parse_badblocks() local
827 erase_block_no = simple_strtoul(w, &w, 0); parse_badblocks()
828 if (!zero_ok && !erase_block_no) { parse_badblocks()
832 offset = (loff_t)erase_block_no * ns->geom.secsz; parse_badblocks()
847 unsigned int erase_block_no; parse_weakblocks() local
856 erase_block_no = simple_strtoul(w, &w, 0); parse_weakblocks()
857 if (!zero_ok && !erase_block_no) { parse_weakblocks()
873 wb->erase_block_no = erase_block_no; parse_weakblocks()
880 static int erase_error(unsigned int erase_block_no) erase_error() argument
885 if (wb->erase_block_no == erase_block_no) { erase_error()
1032 static void update_wear(unsigned int erase_block_no) update_wear() argument
1043 erase_block_wear[erase_block_no] += 1; update_wear()
1044 if (erase_block_wear[erase_block_no] == 0) update_wear()
1045 NS_ERR("Erase counter overflow for erase block %u\n", erase_block_no); update_wear()
1618 unsigned int erase_block_no, page_no; do_state_action() local
1678 erase_block_no = ns->regs.row >> (ns->geom.secshift - ns->geom.pgshift); do_state_action()
1682 NS_LOG("erase sector %u\n", erase_block_no); do_state_action()
1689 update_wear(erase_block_no); do_state_action()
1691 if (erase_error(erase_block_no)) { do_state_action()
1692 NS_WARN("simulating erase failure in erase block %u\n", erase_block_no); do_state_action()

Completed in 58 milliseconds