staticint am_ooblayout_free(struct mtd_info *mtd, int section, struct mtd_oob_region *region)
{ int ecc_bytes;
if (section) return -ERANGE;
ecc_bytes = am_get_eccsize(mtd); if (ecc_bytes < 0) return ecc_bytes;
/* * It is unclear how many bytes are used for the bad block marker. We * reserve the common two bytes here. * * The free area in this kind of flash is divided into chunks where the * first 4 bytes of each chunk are unprotected. The number of chunks * depends on the specific model. The models with 4096+256 bytes pages * have 8 chunks, the others 4 chunks.
*/
case AM_STATUS_ECC_CORRECTED: /* * use oobsize to determine the flash model and the maximum of * correctable errors and return maximum - 1 by convention
*/ if (spinand->base.mtd.oobsize == 64) return 3; else return 7;
case AM_STATUS_ECC_ERRORED: return -EBADMSG;
case AM_STATUS_ECC_MAX_CORRECTED: /* * use oobsize to determine the flash model and the maximum of * correctable errors
*/ if (spinand->base.mtd.oobsize == 64) return 4; else return 8;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.