[U-Boot] Clarification ECC bytes
Fernando AE
fernando.ae2017 at gmail.com
Wed Jul 18 08:35:24 UTC 2018
Hello all,
I'm rebasing our internal code over v2017.11 and I found an unexpected
change in drivers/mtd/nand/nand_base.c:
In the function nand_scan_tail:
-----
(...)
case NAND_ECC_SOFT_BCH:
(...)
/*
* Board driver should supply ecc.size and ecc.strength values
* to select how many bits are correctable. Otherwise, default
* to 4 bits for large page devices.
*/
if (!ecc->size && (mtd->oobsize >= 64)) {
ecc->size = 512;
ecc->strength = 4;
}
/* See nand_bch_init() for details. */
ecc->bytes = 0;
ecc->priv = nand_bch_init(mtd);
-----
This means that ecc->bytes = 0 is overwritting the board driver
supplied value. Actually, back in v2014.03, that specific line
(ecc->bytes = 0) did not exit. I also checked today in v2018.07 and
master, and this potential bug is still there.
Could someone kindly help me here? Removing this line is safe? Or I'm
missing something?
Thanks in advance,
Fernando
More information about the U-Boot
mailing list