summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2018-06-22 17:19:50 +0200
committerStefano Babic <sbabic@denx.de>2018-06-27 09:07:55 +0200
commit5c69dd0730ff6bcad16e86fd93bf7a914d988a22 (patch)
tree26c9aa2d57359b0290169784a35091f16713500e
parent28897e8d21f8e197e259a91c693de09cd81f2d5a (diff)
downloadu-boot-5c69dd0730ff6bcad16e86fd93bf7a914d988a22.tar.gz
u-boot-5c69dd0730ff6bcad16e86fd93bf7a914d988a22.tar.xz
u-boot-5c69dd0730ff6bcad16e86fd93bf7a914d988a22.zip
mtd: nand: mxs_nand: report correct ECC parameters
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>
-rw-r--r--drivers/mtd/nand/mxs_nand.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mtd/nand/mxs_nand.c b/drivers/mtd/nand/mxs_nand.c
index dbf35461aa..b28d65f2d6 100644
--- a/drivers/mtd/nand/mxs_nand.c
+++ b/drivers/mtd/nand/mxs_nand.c
@@ -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);