Skip to content

Commit a207af9

Browse files
mwallegregkh
authored andcommitted
mtd: spi-nor: winbond: fix w25q128 regression
commit d35df77707bf5ae1221b5ba1c8a88cf4fcdd4901 upstream. Commit 83e824a4a595 ("mtd: spi-nor: Correct flags for Winbond w25q128") removed the flags for non-SFDP devices. It was assumed that it wasn't in use anymore. This wasn't true. Add the no_sfdp_flags as well as the size again. We add the additional flags for dual and quad read because they have been reported to work properly by Hartmut using both older and newer versions of this flash, the similar flashes with 64Mbit and 256Mbit already have these flags and because it will (luckily) trigger our legacy SFDP parsing, so newer versions with SFDP support will still get the parameters from the SFDP tables. Reported-by: Hartmut Birr <[email protected]> Closes: https://lore.kernel.org/r/CALxbwRo_-9CaJmt7r7ELgu+vOcgk=xZcGHobnKf=oT2=u4d4aA@mail.gmail.com/ Fixes: 83e824a4a595 ("mtd: spi-nor: Correct flags for Winbond w25q128") Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Michael Walle <[email protected]> Acked-by: Tudor Ambarus <[email protected]> Reviewed-by: Esben Haabendal <[email protected]> Reviewed-by: Pratyush Yadav <[email protected]> Signed-off-by: Pratyush Yadav <[email protected]> Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] [Backported to v6.6 - vastly different due to upstream changes] Reviewed-by: Tudor Ambarus <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 1c2f04c commit a207af9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/mtd/spi-nor/winbond.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,10 @@ static const struct flash_info winbond_nor_parts[] = {
120120
NO_SFDP_FLAGS(SECT_4K) },
121121
{ "w25q80bl", INFO(0xef4014, 0, 64 * 1024, 16)
122122
NO_SFDP_FLAGS(SECT_4K) },
123-
{ "w25q128", INFO(0xef4018, 0, 0, 0)
124-
PARSE_SFDP
125-
FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) },
123+
{ "w25q128", INFO(0xef4018, 0, 64 * 1024, 256)
124+
FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
125+
NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
126+
SPI_NOR_QUAD_READ) },
126127
{ "w25q256", INFO(0xef4019, 0, 64 * 1024, 512)
127128
NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ)
128129
.fixups = &w25q256_fixups },

0 commit comments

Comments
 (0)