You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The NAND flash header calculation is incorrect #124
/* try reading ONFI data */
if (nand_onfi_device_detect(&nand) && nand_onfi_check_compatibility(&nand)) {
nand_onfi_disable_internal_ecc(&nand);
nand_onfi_get_model(&model_from_onfi);
model = &model_from_onfi;
correctability = nand_onfi_get_ecc_correctability();
if (correctability != 0xff) {
/* ONFI correctability is number of ECC bits per 512 bytes of data */
correctability *= nand_onfi_get_page_size() / 512;
}
}
/* Initialize PMECC */
if (header == 0) {
header = pmecc_get_default_header(correctability);
trace_warning_wp("Using default PMECC configuration\r\n");
}
After I made some corrections, I was able to get the correct values, but the code still felt a little off.
Before:
if (correctability != 0xff) {
After:
if (correctability == 0xff) {
Activity
keyehe commentedon Dec 1, 2025
correctability != 0xff is right. SORRY!