[][openwrt][update the patches in accordance with the new naming rules]
[Description]
Change all mtk patches in accordance with the new naming rules
"999-20xx-" : Basic Part
"999-21xx-" : Slow Speed I/O
"999-22xx-" : Slow Speed I/O
"999-23xx-" : SPI & Storage
"999-24xx-" : SPI & Storage
"999-25xx-" : Advanced features
"999-26xx-" : High Speed I/O
"999-27xx-" : Networking
"999-28xx-" : MISC
"999-29xx-" : Uncategorized
[Release-log]
N/A
Change-Id: I245da3b0e5b7299b42473c20cc6f0899cffc1ad2
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/7530987
diff --git a/target/linux/generic/backport-5.4/999-2318-mtd-spinand-micron-Generalize-the-OOB-layout-structure-and-function-names.patch b/target/linux/generic/backport-5.4/999-2318-mtd-spinand-micron-Generalize-the-OOB-layout-structure-and-function-names.patch
new file mode 100644
index 0000000..2e888d3
--- /dev/null
+++ b/target/linux/generic/backport-5.4/999-2318-mtd-spinand-micron-Generalize-the-OOB-layout-structure-and-function-names.patch
@@ -0,0 +1,79 @@
+From aebf853ada4f73280d4cf7a1799cb0ebf84f87e1 Mon Sep 17 00:00:00 2001
+From: Sam Shih <sam.shih@mediatek.com>
+Date: Fri, 2 Jun 2023 13:06:11 +0800
+Subject: [PATCH]
+ [spi-and-storage][999-2318-mtd-spinand-micron-Generalize-the-OOB-layout-structure-and-function-names.patch]
+
+---
+ drivers/mtd/nand/spi/micron.c | 28 ++++++++++++++--------------
+ 1 file changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/drivers/mtd/nand/spi/micron.c b/drivers/mtd/nand/spi/micron.c
+index f56f81325..cc1ee6842 100644
+--- a/drivers/mtd/nand/spi/micron.c
++++ b/drivers/mtd/nand/spi/micron.c
+@@ -34,38 +34,38 @@ static SPINAND_OP_VARIANTS(update_cache_variants,
+ SPINAND_PROG_LOAD_X4(false, 0, NULL, 0),
+ SPINAND_PROG_LOAD(false, 0, NULL, 0));
+
+-static int mt29f2g01abagd_ooblayout_ecc(struct mtd_info *mtd, int section,
+- struct mtd_oob_region *region)
++static int micron_8_ooblayout_ecc(struct mtd_info *mtd, int section,
++ struct mtd_oob_region *region)
+ {
+ if (section)
+ return -ERANGE;
+
+- region->offset = 64;
+- region->length = 64;
++ region->offset = mtd->oobsize / 2;
++ region->length = mtd->oobsize / 2;
+
+ return 0;
+ }
+
+-static int mt29f2g01abagd_ooblayout_free(struct mtd_info *mtd, int section,
+- struct mtd_oob_region *region)
++static int micron_8_ooblayout_free(struct mtd_info *mtd, int section,
++ struct mtd_oob_region *region)
+ {
+ if (section)
+ return -ERANGE;
+
+ /* Reserve 2 bytes for the BBM. */
+ region->offset = 2;
+- region->length = 62;
++ region->length = (mtd->oobsize / 2) - 2;
+
+ return 0;
+ }
+
+-static const struct mtd_ooblayout_ops mt29f2g01abagd_ooblayout = {
+- .ecc = mt29f2g01abagd_ooblayout_ecc,
+- .free = mt29f2g01abagd_ooblayout_free,
++static const struct mtd_ooblayout_ops micron_8_ooblayout = {
++ .ecc = micron_8_ooblayout_ecc,
++ .free = micron_8_ooblayout_free,
+ };
+
+-static int mt29f2g01abagd_ecc_get_status(struct spinand_device *spinand,
+- u8 status)
++static int micron_8_ecc_get_status(struct spinand_device *spinand,
++ u8 status)
+ {
+ switch (status & MICRON_STATUS_ECC_MASK) {
+ case STATUS_ECC_NO_BITFLIPS:
+@@ -99,8 +99,8 @@ static const struct spinand_info micron_spinand_table[] = {
+ &write_cache_variants,
+ &update_cache_variants),
+ 0,
+- SPINAND_ECCINFO(&mt29f2g01abagd_ooblayout,
+- mt29f2g01abagd_ecc_get_status)),
++ SPINAND_ECCINFO(µn_8_ooblayout,
++ micron_8_ecc_get_status)),
+ };
+
+ static const struct spinand_manufacturer_ops micron_spinand_manuf_ops = {
+--
+2.34.1
+