]> git.dujemihanovic.xyz Git - u-boot.git/commit
mtd: rawnand: brcmnand: Add support for getting ecc setting from strap
authorWilliam Zhang <william.zhang@broadcom.com>
Mon, 16 Sep 2024 09:58:49 +0000 (11:58 +0200)
committerTom Rini <trini@konsulko.com>
Sat, 5 Oct 2024 17:19:24 +0000 (11:19 -0600)
commit7ed8bcdcfb1b0c4979b8be3b8831eb71ab7bf53e
treecfb8ab65dc7a9e69025eecaf93afb543ef64f3ed
parent337cf1ce0d35fecb11aad0b303b09fa06e43b52e
mtd: rawnand: brcmnand: Add support for getting ecc setting from strap

Backport from the upstream Linux kernel
commit c2cf7e25eb2a3c915a420fb8ceed8912add7f36c
"mtd: rawnand: brcmnand: Add support for getting ecc setting from strap"

Note: the upstream kernel introduces a new
bool brcmnand_get_sector_size_1k() function because the int
version in U-Boot has been removed in Linux. I kept the old
int-returning version that is already in U-Boot as we depend
on that in other code.

BCMBCA broadband SoC based board design does not specify ecc setting in
dts but rather use the SoC NAND strap info to obtain the ecc strength
and spare area size setting. Add brcm,nand-ecc-use-strap dts propety for
this purpose and update driver to support this option. However these two
options can not be used at the same time.

Signed-off-by: William Zhang <william.zhang@broadcom.com>
Reviewed-by: David Regan <dregan@broadcom.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20240301173308.226004-1-william.zhang@broadcom.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: William Zhang <william.zhang@broadcom.com>
Tested-by: William Zhang <william.zhang@broadcom.com>
drivers/mtd/nand/raw/brcmnand/brcmnand.c