Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f8b04746 authored by Boris Brezillon's avatar Boris Brezillon
Browse files

mtd: nand: sunxi: fix the NFC_ECC_ERR_CNT() macro



NFC_ECC_ERR_CNT() is not taking into account the case when the NAND chip
contains more than 4 ECC blocks (NANDs with 4kB+ pages).

Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
parent ece03cfd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -154,7 +154,7 @@
/* define bit use in NFC_ECC_ST */
#define NFC_ECC_ERR(x)		BIT(x)
#define NFC_ECC_PAT_FOUND(x)	BIT(x + 16)
#define NFC_ECC_ERR_CNT(b, x)	(((x) >> ((b) * 8)) & 0xff)
#define NFC_ECC_ERR_CNT(b, x)	(((x) >> (((b) % 4) * 8)) & 0xff)

#define NFC_DEFAULT_TIMEOUT_MS	1000