nand_check_erased_buf (9) - Linux Man Pages
nand_check_erased_buf: check if a buffer contains (almost) only 0xff data
nand_check_erased_buf - check if a buffer contains (almost) only 0xff data
*buf, int len, int bitflips_threshold);
- buffer to test
- buffer length
- maximum number of bitflips
Check if a buffer contains only 0xff, which means the underlying region has been erased and is ready to be programmed. The bitflips_threshold specify the maximum number of bitflips before considering the region is not erased.
The logic of this function has been extracted from the memweight implementation, except that nand_check_erased_buf function exit before testing the whole buffer if the number of bitflips exceed the bitflips_threshold value.
Thomas Gleixner <tglx [at] linutronix.de>