[openwrt/openwrt] mediatek: spinand: force update_cache_variants to use reset for Foresee NAND
LEDE Commits
lede-commits at lists.infradead.org
Sun Jul 6 08:36:36 PDT 2025
hauke pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/5096c7624fe00abfa593e21b4437bb632c303f85
commit 5096c7624fe00abfa593e21b4437bb632c303f85
Author: Dim Fish <dimfish at gmail.com>
AuthorDate: Thu Jul 3 18:06:18 2025 +0300
mediatek: spinand: force update_cache_variants to use reset for Foresee NAND
Force update_cache_variantsvariants to use reset for Foresee NAND with bad blocks.
Tested on Xiaomi AX3000T + F35SQA001G with bad blocks and without bad blocks
Signed-off-by: Dim Fish <dimfish at gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17963
Signed-off-by: Chuanhong Guo <gch981213 at gmail.com>
(cherry picked from commit edc7cb910433e05eac61b13d94163f1e07fa6af4)
[drop patch for linux kernel 6.12]
Fixes: https://github.com/openwrt/openwrt/issues/17962
Signed-off-by: Mikhail Zhilkin <csharper2005 at gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19297
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
.../411-mtd-spinand-fix-support-for-FORESEE.patch | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/target/linux/mediatek/patches-6.6/411-mtd-spinand-fix-support-for-FORESEE.patch b/target/linux/mediatek/patches-6.6/411-mtd-spinand-fix-support-for-FORESEE.patch
new file mode 100644
index 0000000000..48a6515b56
--- /dev/null
+++ b/target/linux/mediatek/patches-6.6/411-mtd-spinand-fix-support-for-FORESEE.patch
@@ -0,0 +1,19 @@
+Force update_cache_variants to use reset for Foresee NAND with bad blocks
+
+Tested on Xiaomi AX3000T + F35SQA001G with bad blocks and without bad blocks
+
+Signed-off-by: Dim Fish <dimfish at gmail.com>
+
+--- a/drivers/mtd/nand/spi/foresee.c
++++ b/drivers/mtd/nand/spi/foresee.c
+@@ -22,8 +22,8 @@ static SPINAND_OP_VARIANTS(write_cache_v
+ SPINAND_PROG_LOAD(true, 0, NULL, 0));
+
+ static SPINAND_OP_VARIANTS(update_cache_variants,
+- SPINAND_PROG_LOAD_X4(false, 0, NULL, 0),
+- SPINAND_PROG_LOAD(false, 0, NULL, 0));
++ SPINAND_PROG_LOAD_X4(true, 0, NULL, 0),
++ SPINAND_PROG_LOAD(true, 0, NULL, 0));
+
+ static int f35sqa002g_ooblayout_ecc(struct mtd_info *mtd, int section,
+ struct mtd_oob_region *region)
More information about the lede-commits
mailing list