]> git.sur5r.net Git - u-boot/commitdiff
mtd: nand: mxs_nand: report correct ECC parameters
authorStefan Agner <stefan.agner@toradex.com>
Fri, 22 Jun 2018 15:19:50 +0000 (17:19 +0200)
committerStefano Babic <sbabic@denx.de>
Wed, 27 Jun 2018 07:07:55 +0000 (09:07 +0200)
Report correct ECC parameters back to the stack. Do not report
bytes as we have it not immeaditly available and the Linux version
also does not report it. It seems to have no aversive effect.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
drivers/mtd/nand/mxs_nand.c

index dbf35461aa4758cc6712f08b11ee0584ec91d68e..b28d65f2d666753fea7ab3d3fa7b4894657d46b8 100644 (file)
@@ -1253,9 +1253,8 @@ void board_nand_init(void)
 
        nand->ecc.layout        = &fake_ecc_layout;
        nand->ecc.mode          = NAND_ECC_HW;
-       nand->ecc.bytes         = 9;
-       nand->ecc.size          = 512;
-       nand->ecc.strength      = 8;
+       nand->ecc.size          = nand_info->bch_geometry.ecc_chunk_size;
+       nand->ecc.strength      = nand_info->bch_geometry.ecc_strength;
 
        /* second phase scan */
        err = nand_scan_tail(mtd);