From 04dd17822334871b23ea2862f7798fb0e0007777 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Sat, 11 May 2024 08:53:19 +0000
Subject: [PATCH] change otg to host mode
---
u-boot/drivers/mtd/nand/spi/jsc.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/u-boot/drivers/mtd/nand/spi/jsc.c b/u-boot/drivers/mtd/nand/spi/jsc.c
index d0e3b24..d3f7e56 100644
--- a/u-boot/drivers/mtd/nand/spi/jsc.c
+++ b/u-boot/drivers/mtd/nand/spi/jsc.c
@@ -72,12 +72,13 @@
static int js28u1gqscahg_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