Hi, On Thu, 2019-01-03 at 15:55 +0000, Stefan Agner wrote: > [this time using reply to all] > > On 03.01.19 03:36, Adam Ford wrote: > > 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 <aford...@gmail.com> > > Looks good to me, > > Acked-by: Stefan Agner <stefan.ag...@toradex.com>
Tested on a custom i.MX6ULL board with Micron NAND flash. Fixes: """ Trying to boot from NAND MXS NAND: BCH read timeout ... MXS NAND: BCH read timeout """ Tested-by: Jörg Krause <joerg.krause@embedded.rocks> > > diff --git a/drivers/mtd/nand/raw/mxs_nand.c > > b/drivers/mtd/nand/raw/mxs_nand.c > > index e3341812a2..2d84bfffe2 100644 > > --- a/drivers/mtd/nand/raw/mxs_nand.c > > +++ b/drivers/mtd/nand/raw/mxs_nand.c > > @@ -1163,6 +1163,12 @@ int mxs_nand_init_spl(struct nand_chip *nand) > > > > nand_info->gpmi_regs = (struct mxs_gpmi_regs *)MXS_GPMI_BASE; > > nand_info->bch_regs = (struct mxs_bch_regs *)MXS_BCH_BASE; > > + > > + if (is_mx6sx() || is_mx7()) > > + nand_info->max_ecc_strength_supported = 62; > > + else > > + nand_info->max_ecc_strength_supported = 40; > > + > > err = mxs_nand_alloc_buffers(nand_info); > > if (err) > > return err; > > diff --git a/drivers/mtd/nand/raw/mxs_nand_spl.c > > b/drivers/mtd/nand/raw/mxs_nand_spl.c > > index c628f3adec..ba85baac60 100644 > > --- a/drivers/mtd/nand/raw/mxs_nand_spl.c > > +++ b/drivers/mtd/nand/raw/mxs_nand_spl.c > > @@ -201,6 +201,7 @@ static int mxs_nand_init(void) > > /* setup flash layout (does not scan as we override that) */ > > mtd->size = nand_chip.chipsize; > > nand_chip.scan_bbt(mtd); > > + mxs_nand_setup_ecc(mtd); > > > > return 0; > > } > > _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot