Parcourir la source

ramips: mt7621_nand: fix writing upper half of fdm data

Since the loop iterates from 0-3, subtracting 4 from the shift
multiplier does not make any sense

Signed-off-by: Felix Fietkau <[email protected]>
Felix Fietkau il y a 4 ans
Parent
commit
3c78fabb0d

+ 1 - 1
target/linux/ramips/patches-5.10/410-mtd-rawnand-add-driver-support-for-MT7621-nand-flash.patch

@@ -1022,7 +1022,7 @@ Signed-off-by: Weijie Gao <[email protected]>
 +			vall |= (u32)oobptr[j] << (j * 8);
 +
 +		for (j = 0; j < 4; j++)
-+			valm |= (u32)oobptr[j + 4] << ((j - 4) * 8);
++			valm |= (u32)oobptr[j + 4] << (j * 8);
 +
 +		nfi_write32(nfc, NFI_FDML(i), vall);
 +		nfi_write32(nfc, NFI_FDMM(i), valm);