[UBOOT PATCH v3] mtd: nand: arasan: Print warning for unsupported ecc modes
Michal Simek
michal.simek at amd.com
Fri Mar 1 12:25:29 CET 2024
On 3/1/24 12:12, Venkatesh Yadav Abbarapu wrote:
> Currently only hw ecc is supported in U-Boot. If any other ecc mode is
> given in DT, it simply ignores and switches to hw ecc. So better print
> what is being done.
>
> Revert this patch once soft ecc support is fixed in future.
>
> Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma at amd.com>
> Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu at amd.com>
> ---
> Changes in v2:
> - Added the ecc mode check in the arasan driver itself.
> Changes in v3:
> - Skip the driver probe when sw-ecc mode is present in the device tree.
> ---
> drivers/mtd/nand/raw/arasan_nfc.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/mtd/nand/raw/arasan_nfc.c b/drivers/mtd/nand/raw/arasan_nfc.c
> index 14766401bf..426160c384 100644
> --- a/drivers/mtd/nand/raw/arasan_nfc.c
> +++ b/drivers/mtd/nand/raw/arasan_nfc.c
> @@ -1233,6 +1233,7 @@ static int arasan_probe(struct udevice *dev)
> struct mtd_info *mtd;
> ofnode child;
> int err = -1;
> + const char *str;
>
> info->reg = dev_read_addr_ptr(dev);
> mtd = nand_to_mtd(nand_chip);
> @@ -1263,6 +1264,12 @@ static int arasan_probe(struct udevice *dev)
> goto fail;
> }
>
> + str = ofnode_read_string(nand_chip->flash_node, "nand-ecc-mode");
> + if (strcmp(str, "hw")) {
> + printf("%s ecc is not supported, switch to hw ecc\n", str);
you are returning below. It means switch to HW ecc is not happening right?
M
More information about the U-Boot
mailing list