From cde9070d9970eef1f7ec2360586c802a16230ad8 Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Fri, 10 May 2024 07:43:50 +0000 Subject: [PATCH] rtl88x2CE_WiFi_linux driver --- u-boot/drivers/mtd/nand/spi/unim.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/u-boot/drivers/mtd/nand/spi/unim.c b/u-boot/drivers/mtd/nand/spi/unim.c index 8dd0b9b..b4e3e5b 100644 --- a/u-boot/drivers/mtd/nand/spi/unim.c +++ b/u-boot/drivers/mtd/nand/spi/unim.c @@ -71,12 +71,13 @@ static int tx25g01_ecc_get_status(struct spinand_device *spinand, u8 status) { - u8 eccsr = (status & GENMASK(6, 4)) >> 2; + struct nand_device *nand = spinand_to_nand(spinand); + u8 eccsr = (status & GENMASK(6, 4)) >> 4; - if (eccsr <= 7) + if (eccsr < 4) return eccsr; - else if (eccsr == 12) - return 8; + else if (eccsr == 4) + return nand->eccreq.strength; else return -EBADMSG; } -- Gitblit v1.6.2