diff options
| author | Dim Fish | 2025-07-03 15:06:18 +0000 |
|---|---|---|
| committer | Chuanhong Guo | 2025-07-04 09:38:50 +0000 |
| commit | edc7cb910433e05eac61b13d94163f1e07fa6af4 (patch) | |
| tree | 5bb9b5b789512dbc74f65dac63f63cffa4508077 | |
| parent | b5c90ed1bdf84550b9b350e28a0de9d88fc74c04 (diff) | |
| download | openwrt-edc7cb910433e05eac61b13d94163f1e07fa6af4.tar.gz | |
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@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17963
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
| -rw-r--r-- | target/linux/mediatek/patches-6.12/411-mtd-spinand-fix-support-for-FORESEE.patch | 19 | ||||
| -rw-r--r-- | target/linux/mediatek/patches-6.6/411-mtd-spinand-fix-support-for-FORESEE.patch | 19 |
2 files changed, 38 insertions, 0 deletions
diff --git a/target/linux/mediatek/patches-6.12/411-mtd-spinand-fix-support-for-FORESEE.patch b/target/linux/mediatek/patches-6.12/411-mtd-spinand-fix-support-for-FORESEE.patch new file mode 100644 index 0000000000..48a6515b56 --- /dev/null +++ b/target/linux/mediatek/patches-6.12/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@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) 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@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) |