[PATCH v2] mtd: nand: support BENAND (Built-in ECC NAND)
Matthieu CASTET
matthieu.castet at parrot.com
Thu Feb 21 04:50:15 EST 2013
katsuki.uwatoko at toshiba.co.jp a écrit :
> This enables support for BENAND, which is an SLC NAND flash solution
> with embedded error correction code (ECC), currently supports only
> 128bytes OOB type.
>
> In the read sequence, "status read command" is executed to check the
> ECC status after read data. If bitflips occur, these are
> automatically corrected by BENAND and the status indicates the result.
>
> The write sequence is the same as raw write and the ECC data are
> automatically written to OOB by BENAND.
>
> Signed-off-by: UWATOKO Katsuki <katsuki.uwatoko at toshiba.co.jp>
> + 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 ?
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.
Matthieu
More information about the linux-mtd
mailing list