[PATCH v2] mtd: nand: support BENAND (Built-in ECC NAND)

katsuki.uwatoko at toshiba.co.jp katsuki.uwatoko at toshiba.co.jp
Fri Feb 22 01:23:09 EST 2013


Hi,

> > +       case NAND_ECC_BENAND:
> > +               if (!IS_ENABLED(CONFIG_MTD_NAND_BENAND)) {
> > +                       pr_warn("CONFIG_MTD_BENAND not enabled\n");
> > +                       BUG();
> > +               }
> > +
> > +               chip->ecc.read_page = nand_read_page_benand;
> > +               chip->ecc.write_page = nand_write_page_raw;
> > +               chip->ecc.read_page_raw = nand_read_page_raw;
> > +               chip->ecc.write_page_raw = nand_write_page_raw;
> > +               chip->ecc.read_oob = nand_read_oob_std;
> > +               chip->ecc.write_oob = nand_write_oob_std;
> > +
> Do you have a way to disable internal ecc ?

Does "internal ecc" mean the BENAND's ECC function? If so, we cannot disable it.
This means that we cannot read the raw data, which is not corrected, 
unless there are too many bitflips for BENAND to correct.

> If not read_page_raw and write_page_raw won't do what is expected :
> - read without ecc correction
> - write without writing ecc or write custom ecc
> 
> I don't know if it could cause some problem.

I think that "writing ecc/ecc correction" would be just waste
and any other problems do not happen as long as these functions
do not destroy the OOB for BENAND ECC. 
-- 
UWATOKO Katsuki



More information about the linux-mtd mailing list