summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Romanov <avromanov@salutedevices.com>2024-01-29 15:16:23 +0300
committerDmitry Rokosov <rockosov@rulkc.org>2026-08-13 14:41:33 +0300
commit53e9e97750811c89b0ccae9ef49619d73d47ba18 (patch)
tree15908cd2ac57fd176022eda2845f2233f7e658b6
parentc0d89d56e5805b08ab8495521b2e0137da76c6e5 (diff)
downloadlinux-53e9e97750811c89b0ccae9ef49619d73d47ba18.tar.gz
linux-53e9e97750811c89b0ccae9ef49619d73d47ba18.zip
mtd: spinand: micron: correct parameters for MT29F2G01ABAGD
Cherry-pick and adapt the reverted commit 208f50b51622 ("mtd: spinand: micron: correct MT29F2G01ABAGD parameters"). The original patch used older macro names. During the adaptation, update these to the macros provided by Miquel Raynal in the mainline kernel: - SPINAND_PAGE_READ_FROM_CACHE_DUALIO_OP -> SPINAND_PAGE_READ_FROM_CACHE_1S_2S_2S_OP() - SPINAND_PAGE_READ_FROM_CACHE_QUADIO_OP -> SPINAND_PAGE_READ_FROM_CACHE_1S_4S_4S_OP() Signed-off-by: Alexey Romanov <avromanov@salutedevices.com> Signed-off-by: Dmitry Rokosov <rockosov@rulkc.org>
-rw-r--r--drivers/mtd/nand/spi/micron.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mtd/nand/spi/micron.c b/drivers/mtd/nand/spi/micron.c
index 7a3fe2c7c3f1..1b60d8ac7279 100644
--- a/drivers/mtd/nand/spi/micron.c
+++ b/drivers/mtd/nand/spi/micron.c
@@ -35,9 +35,9 @@
(CFG_OTP_ENABLE | MICRON_MT29F2G01ABAGD_CFG_OTP_STATE)
static SPINAND_OP_VARIANTS(quadio_read_cache_variants,
- SPINAND_PAGE_READ_FROM_CACHE_1S_4S_4S_OP(0, 2, NULL, 0, 0),
+ //SPINAND_PAGE_READ_FROM_CACHE_1S_4S_4S_OP(0, 2, NULL, 0, 0),
SPINAND_PAGE_READ_FROM_CACHE_1S_1S_4S_OP(0, 1, NULL, 0, 0),
- SPINAND_PAGE_READ_FROM_CACHE_1S_2S_2S_OP(0, 1, NULL, 0, 0),
+ //SPINAND_PAGE_READ_FROM_CACHE_1S_2S_2S_OP(0, 1, NULL, 0, 0),
SPINAND_PAGE_READ_FROM_CACHE_1S_1S_2S_OP(0, 1, NULL, 0, 0),
SPINAND_PAGE_READ_FROM_CACHE_FAST_1S_1S_1S_OP(0, 1, NULL, 0, 0),
SPINAND_PAGE_READ_FROM_CACHE_1S_1S_1S_OP(0, 1, NULL, 0, 0));
@@ -83,8 +83,8 @@ static int micron_8_ooblayout_ecc(struct mtd_info *mtd, int section,
if (section)
return -ERANGE;
- region->offset = mtd->oobsize / 2;
- region->length = mtd->oobsize / 2;
+ region->offset = 64;
+ region->length = 64;
return 0;
}
@@ -97,7 +97,7 @@ static int micron_8_ooblayout_free(struct mtd_info *mtd, int section,
/* Reserve 4 bytes for the BBM. */
region->offset = 4;
- region->length = (mtd->oobsize / 2) - 4;
+ region->length = 28;
return 0;
}