ramips: fix NAND flash driver ECC bit position mask
authorFelix Fietkau <nbd@nbd.name>
Wed, 16 Feb 2022 20:25:13 +0000 (21:25 +0100)
committerFelix Fietkau <nbd@nbd.name>
Wed, 16 Feb 2022 20:26:27 +0000 (21:26 +0100)
The bit position mask was accidentally made too wide, overlapping with the LSB
from the byte position mask. This caused ECC calculation to fail for odd bytes

Signed-off-by: Chad Monroe <chad.monroe@smartrg.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
target/linux/ramips/patches-5.10/410-mtd-rawnand-add-driver-support-for-MT7621-nand-flash.patch

index 8049dbde142b9d22e925e13274bfe57db3e8de6d..3314013420e3f690f1067a1c49f080f99ad680a7 100644 (file)
@@ -233,7 +233,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
 +#define   DEC_EL_EVEN_S                       0
 +#define   DEC_EL_M                    0x1fff
 +#define   DEC_EL_BYTE_POS_S           3
-+#define   DEC_EL_BIT_POS_M            GENMASK(3, 0)
++#define   DEC_EL_BIT_POS_M            GENMASK(2, 0)
 +
 +#define ECC_FDMADDR                   0x13c
 +