summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/spi/winbond.c
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2024-10-09 14:49:59 +0200
committerMiquel Raynal <miquel.raynal@bootlin.com>2024-10-21 11:55:30 +0200
commitc1247de51cab53fc357a73804c11fb4fba55b2d9 (patch)
tree19321664706daab3f4a666d67b333165449e81f5 /drivers/mtd/nand/spi/winbond.c
parentf04ced6d545e20b3579c575b0afdbd7054db2543 (diff)
downloadlwn-c1247de51cab53fc357a73804c11fb4fba55b2d9.tar.gz
lwn-c1247de51cab53fc357a73804c11fb4fba55b2d9.zip
mtd: spinand: winbond: Fix 512GW and 02JW OOB layout
Both W25N512GW and W25N02JW chips have 64 bytes of OOB and thus cannot use the layout for 128 bytes OOB. Reference the correct layout instead. Fixes: 6a804fb72de5 ("mtd: spinand: winbond: add support for serial NAND flash") Cc: stable@vger.kernel.org Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de> Link: https://lore.kernel.org/linux-mtd/20241009125002.191109-2-miquel.raynal@bootlin.com
Diffstat (limited to 'drivers/mtd/nand/spi/winbond.c')
-rw-r--r--drivers/mtd/nand/spi/winbond.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/nand/spi/winbond.c b/drivers/mtd/nand/spi/winbond.c
index f3bb81d7e460..1d9680cc26e5 100644
--- a/drivers/mtd/nand/spi/winbond.c
+++ b/drivers/mtd/nand/spi/winbond.c
@@ -215,7 +215,7 @@ static const struct spinand_info winbond_spinand_table[] = {
&write_cache_variants,
&update_cache_variants),
0,
- SPINAND_ECCINFO(&w25n02kv_ooblayout, w25n02kv_ecc_get_status)),
+ SPINAND_ECCINFO(&w25m02gv_ooblayout, w25n02kv_ecc_get_status)),
SPINAND_INFO("W25N512GW",
SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xba, 0x20),
NAND_MEMORG(1, 2048, 64, 64, 512, 10, 1, 1, 1),
@@ -224,7 +224,7 @@ static const struct spinand_info winbond_spinand_table[] = {
&write_cache_variants,
&update_cache_variants),
0,
- SPINAND_ECCINFO(&w25n02kv_ooblayout, w25n02kv_ecc_get_status)),
+ SPINAND_ECCINFO(&w25m02gv_ooblayout, w25n02kv_ecc_get_status)),
SPINAND_INFO("W25N02KWZEIR",
SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xba, 0x22),
NAND_MEMORG(1, 2048, 128, 64, 2048, 40, 1, 1, 1),