Skip to content

Commit c1247de

Browse files
committed
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: 6a804fb ("mtd: spinand: winbond: add support for serial NAND flash") Cc: [email protected] Signed-off-by: Miquel Raynal <[email protected]> Reviewed-by: Frieder Schrempf <[email protected]> Link: https://lore.kernel.org/linux-mtd/[email protected]
1 parent f04ced6 commit c1247de

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/mtd/nand/spi/winbond.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ static const struct spinand_info winbond_spinand_table[] = {
215215
&write_cache_variants,
216216
&update_cache_variants),
217217
0,
218-
SPINAND_ECCINFO(&w25n02kv_ooblayout, w25n02kv_ecc_get_status)),
218+
SPINAND_ECCINFO(&w25m02gv_ooblayout, w25n02kv_ecc_get_status)),
219219
SPINAND_INFO("W25N512GW",
220220
SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xba, 0x20),
221221
NAND_MEMORG(1, 2048, 64, 64, 512, 10, 1, 1, 1),
@@ -224,7 +224,7 @@ static const struct spinand_info winbond_spinand_table[] = {
224224
&write_cache_variants,
225225
&update_cache_variants),
226226
0,
227-
SPINAND_ECCINFO(&w25n02kv_ooblayout, w25n02kv_ecc_get_status)),
227+
SPINAND_ECCINFO(&w25m02gv_ooblayout, w25n02kv_ecc_get_status)),
228228
SPINAND_INFO("W25N02KWZEIR",
229229
SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xba, 0x22),
230230
NAND_MEMORG(1, 2048, 128, 64, 2048, 40, 1, 1, 1),

0 commit comments

Comments
 (0)