On Tue, Mar 21, 2023 at 10:13:09PM +0100, Linus Walleij wrote: > For BRCMNAND with 1-bit BCH ECC (BCH-1) such as used on the > D-Link DIR-885L and DIR-890L routers, we need to explicitly > select the ECC like this in the device tree: > > nand-ecc-algo = "bch"; > nand-ecc-strength = <1>; > nand-ecc-step-size = <512>; > > This is handled by the Linux kernel but U-Boot core does > not respect this. Fix it up by parsing the algorithm and > preserve the behaviour using this property to select > software BCH as far as possible. > > Reviewed-by: Michael Trimarchi <mich...@amarulasolutions.com> > Acked-by: William Zhang <william.zh...@broadcom.com> > Signed-off-by: Linus Walleij <linus.wall...@linaro.org> > --- > ChangeLog v2->v3: > - Collect review tags from Michael and William > - Resend with the NorthStar enablement patches > ChangeLog v1->v2: > - Drop pointless check for ecc_algo >= 0, it is always > >= 0. > --- > drivers/mtd/nand/raw/nand_base.c | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-)
On am335x_evm, this leads to: CPU : AM335X-GP rev 2.1 Model: TI AM335x EVM DRAM: 1 GiB Core: 156 devices, 17 uclasses, devicetree: separate WDT: Started wdt@44e35000 with servicing every 1000ms (60s timeout) NAND: ... hang ... and arch/arm/dts/am335x-evm.dts nand@0,0 describes the chip correctly and worked prior to this change. -- Tom
signature.asc
Description: PGP signature