Commit 5ae585ba3a8bb2336d5cb6e1ef4c80a5ef445409
Committed by
Stefano Babic
1 parent
dc619924c7
Exists in
smarc_8mq_lf_v2020.04
and in
11 other branches
MTD: mxs_nand: Fix BCH read timeout error on boards requiring ECC
The LogicPD board uses a Micron Flash with ECC. To boot this from SPL, the ECC needs to be correctly configured or the BCH engine times out. Signed-off-by: Adam Ford <aford173@gmail.com> Acked-by: Stefan Agner <stefan.agner@toradex.com> Tested-by: Jörg Krause <joerg.krause@embedded.rocks> Acked-by: Tim Harvey <tharvey@gateworks.com> Tested-by: Tim Harvey <tharvey@gateworks.com>
Showing 2 changed files with 7 additions and 0 deletions Side-by-side Diff
drivers/mtd/nand/raw/mxs_nand.c
... | ... | @@ -1163,6 +1163,12 @@ |
1163 | 1163 | |
1164 | 1164 | nand_info->gpmi_regs = (struct mxs_gpmi_regs *)MXS_GPMI_BASE; |
1165 | 1165 | nand_info->bch_regs = (struct mxs_bch_regs *)MXS_BCH_BASE; |
1166 | + | |
1167 | + if (is_mx6sx() || is_mx7()) | |
1168 | + nand_info->max_ecc_strength_supported = 62; | |
1169 | + else | |
1170 | + nand_info->max_ecc_strength_supported = 40; | |
1171 | + | |
1166 | 1172 | err = mxs_nand_alloc_buffers(nand_info); |
1167 | 1173 | if (err) |
1168 | 1174 | return err; |
drivers/mtd/nand/raw/mxs_nand_spl.c