Hi On Thu, Jul 25, 2024 at 11:36 AM <balamanikandan.gunasun...@microchip.com> wrote: > > Acked-by: Balamanikandan Gunasundar > <balamanikandan.gunasun...@microchip.com> > > On 22/07/24 3:15 am, Zixun LI wrote: > > [Some people who received this message don't often get email from > > ad...@hifiphile.com. Learn why this is important at > > https://aka.ms/LearnAboutSenderIdentification ] > > > > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > > content is safe > > > > When ECC parameters are not specified in DT, first try ONFI ECC parameters > > before fallback to maximum strength. > > > > It's the Linux driver behavior since the driver rewriting in f88fc12. > > > > From then 2 nand system refactors have been done in 6a1b66d6 and 53576c7b, > > chip->ecc_strength_ds and chip->ecc_step_ds became > > nanddev_get_ecc_requirements(). U-Boot didn't follow the refactor and > > always use these 2 fields. > > > > v2: Fix formatting, add upstream commit hash. > > > > Signed-off-by: Zixun LI <z...@ogga.fr> > > --- > > drivers/mtd/nand/raw/atmel/nand-controller.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/drivers/mtd/nand/raw/atmel/nand-controller.c > > b/drivers/mtd/nand/raw/atmel/nand-controller.c > > index ee4ec6da58..817fab4ca3 100644 > > --- a/drivers/mtd/nand/raw/atmel/nand-controller.c > > +++ b/drivers/mtd/nand/raw/atmel/nand-controller.c > > @@ -1029,11 +1029,15 @@ static int atmel_nand_pmecc_init(struct nand_chip > > *chip) > > req.ecc.strength = ATMEL_PMECC_MAXIMIZE_ECC_STRENGTH; > > else if (chip->ecc.strength) > > req.ecc.strength = chip->ecc.strength; > > + else if (chip->ecc_strength_ds) > > + req.ecc.strength = chip->ecc_strength_ds; > > else > > req.ecc.strength = ATMEL_PMECC_MAXIMIZE_ECC_STRENGTH; > > > > if (chip->ecc.size) > > req.ecc.sectorsize = chip->ecc.size; > > + else if (chip->ecc_step_ds) > > + req.ecc.sectorsize = chip->ecc_step_ds; > > else > > req.ecc.sectorsize = ATMEL_PMECC_SECTOR_SIZE_AUTO; > > > > -- > > 2.45.2 > > >
Feel free to apply on microchip uboot branch if you are on hurry Michael -- Michael Nazzareno Trimarchi Co-Founder & Chief Executive Officer M. +39 347 913 2170 mich...@amarulasolutions.com __________________________________ Amarula Solutions BV Joop Geesinkweg 125, 1114 AB, Amsterdam, NL T. +31 (0)85 111 9172 i...@amarulasolutions.com www.amarulasolutions.com