From: Felix Fietkau Date: Wed, 12 Jan 2022 19:56:04 +0000 (+0100) Subject: ramips: mt7621_nand: fix writing upper half of fdm data X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=3c78fabb0de1591489e63e429a7af794303f211b;p=openwrt%2Fstaging%2Faparcar.git 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 --- diff --git a/target/linux/ramips/patches-5.10/410-mtd-rawnand-add-driver-support-for-MT7621-nand-flash.patch b/target/linux/ramips/patches-5.10/410-mtd-rawnand-add-driver-support-for-MT7621-nand-flash.patch index a37426edec..8049dbde14 100644 --- a/target/linux/ramips/patches-5.10/410-mtd-rawnand-add-driver-support-for-MT7621-nand-flash.patch +++ b/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 + 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);