linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Revert "mtd: spi-nor: Add 4B_OPCODES flag to w25q256"
@ 2020-04-04 12:58 Chuanhong Guo
  2020-04-06  5:18 ` Chuanhong Guo
  0 siblings, 1 reply; 5+ messages in thread
From: Chuanhong Guo @ 2020-04-04 12:58 UTC (permalink / raw)
  To: linux-mtd
  Cc: Vignesh Raghavendra, Tudor Ambarus, Richard Weinberger,
	linux-kernel, Robert Marko, Miquel Raynal, Chuanhong Guo

This reverts commit 10050a02f7d508fa88f70fcfceefbacd13488ca7.

Winbond W25Q256FV and W25Q256JV both uses 0xef4019 as JEDEC ID,
but only the latter has proper 4B_OPCODES support.
W25Q256FV has all 4B read instructions but it lacks a 4B page program
instruction, causing the entire flash to be read-only.
Disable 4B_OPCODES for W25Q256 completely.
Users can use broken-flash-reset as a temporary workaround.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
---
"line over 80 characters" warning produced by checkpatch.pl isn't
fixed because I think a revert commit should bring a file back to
what it was before.
I don't have a w25q256jv available and can't compare SFDP table
to create a fix similar to mx25l25635 one.

 drivers/mtd/spi-nor/winbond.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/mtd/spi-nor/winbond.c b/drivers/mtd/spi-nor/winbond.c
index 17deabad57e1..9673ec7fa003 100644
--- a/drivers/mtd/spi-nor/winbond.c
+++ b/drivers/mtd/spi-nor/winbond.c
@@ -52,9 +52,7 @@ static const struct flash_info winbond_parts[] = {
 	{ "w25q80", INFO(0xef5014, 0, 64 * 1024,  16, SECT_4K) },
 	{ "w25q80bl", INFO(0xef4014, 0, 64 * 1024,  16, SECT_4K) },
 	{ "w25q128", INFO(0xef4018, 0, 64 * 1024, 256, SECT_4K) },
-	{ "w25q256", INFO(0xef4019, 0, 64 * 1024, 512,
-			  SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
-			  SPI_NOR_4B_OPCODES) },
+	{ "w25q256", INFO(0xef4019, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
 	{ "w25q256jvm", INFO(0xef7019, 0, 64 * 1024, 512,
 			     SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
 	{ "w25q256jw", INFO(0xef6019, 0, 64 * 1024, 512,
-- 
2.25.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-04-20 10:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-04 12:58 [PATCH] Revert "mtd: spi-nor: Add 4B_OPCODES flag to w25q256" Chuanhong Guo
2020-04-06  5:18 ` Chuanhong Guo
2020-04-06 12:23   ` Robert Marko
2020-04-06 12:49     ` Chuanhong Guo
2020-04-20 10:53     ` Tudor.Ambarus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).