u-boot/drivers/mtd/nand/spi/jsc.c
.. .. @@ -72,12 +72,13 @@ 72 72 static int js28u1gqscahg_ecc_get_status(struct spinand_device *spinand, 73 73 u8 status) 74 74 { 75 - u8 eccsr = (status & GENMASK(6, 4)) >> 2;75 + struct nand_device *nand = spinand_to_nand(spinand);76 + u8 eccsr = (status & GENMASK(6, 4)) >> 4;76 77 77 - if (eccsr <= 7)78 + if (eccsr < 4)78 79 return eccsr; 79 - else if (eccsr == 12)80 - return 8;80 + else if (eccsr == 4)81 + return nand->eccreq.strength;81 82 else 82 83 return -EBADMSG; 83 84 }