linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] introduce SNOR_ID3()
@ 2022-05-10 14:02 Michael Walle
  2022-05-10 14:02 ` [PATCH 1/2] mtd: spi-nor: " Michael Walle
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Michael Walle @ 2022-05-10 14:02 UTC (permalink / raw)
  To: Tudor Ambarus, Pratyush Yadav, Miquel Raynal, Richard Weinberger,
	Vignesh Raghavendra, Shaik Sajida Bhanu
  Cc: linux-mtd, linux-kernel, Michael Walle

For support which rely solely on the SFDP data, all we need to know is its
JEDEC ID. All further information should be fetched from SFDP. For this,
introduce a SNOR_ID3() macro which should be used for all new flashes with
SFDP.

The dropped information are page size, number of sectors and sector size.
The number of sectors (together with sector size) is only used to calculate
the total flash size. In case of SFDP, this is read from there. The sector
size is also used to select a proper erase opcode. We can just keep that
one zero and the selection algorithm will select the same erase opcode;
that is the opcode for the largest erase size (which is btw rather odd..).
The page size is also taken from SFDP. There is one exception: older SFDP
tables. These doesn't contain this data. So if there will be flashes with
that, we should assume some sane value.

Shaik, could you please re-test your w25q512nwm support with this patch. I
read through the SFDP data and it should behave exactly the same as before.

Michael Walle (2):
  mtd: spi-nor: introduce SNOR_ID3()
  mtd: spi-nor: winbond: use SNOR_ID3() for w25q512nwm

 drivers/mtd/spi-nor/core.c    | 7 +++++--
 drivers/mtd/spi-nor/core.h    | 9 +++++++++
 drivers/mtd/spi-nor/winbond.c | 3 +--
 3 files changed, 15 insertions(+), 4 deletions(-)

-- 
2.30.2


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

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

end of thread, other threads:[~2022-07-28 14:04 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-10 14:02 [PATCH 0/2] introduce SNOR_ID3() Michael Walle
2022-05-10 14:02 ` [PATCH 1/2] mtd: spi-nor: " Michael Walle
2022-06-05 15:00   ` Tom Fitzhenry
2022-07-12  7:23   ` Pratyush Yadav
2022-07-15 12:19     ` Biju Das
2022-07-19  5:57   ` Tudor.Ambarus
2022-07-19  7:07     ` Michael Walle
2022-07-19  7:33       ` Tudor.Ambarus
2022-07-19  7:57         ` Michael Walle
2022-07-19  8:30           ` Tudor.Ambarus
2022-07-28  3:24     ` Tudor.Ambarus
2022-07-28 13:12       ` Michael Walle
2022-07-28 13:31         ` Tudor.Ambarus
2022-07-28 13:56           ` Michael Walle
2022-05-10 14:02 ` [PATCH 2/2] mtd: spi-nor: winbond: use SNOR_ID3() for w25q512nwm Michael Walle
2022-07-12  8:40   ` Tudor.Ambarus
2022-07-18  7:21     ` Michael Walle
2022-07-18  7:25     ` Michael Walle
2022-07-19  6:00       ` Tudor.Ambarus
2022-07-19  7:02         ` Michael Walle
2022-07-19  7:24           ` Tudor.Ambarus
2022-05-10 14:03 ` [PATCH 0/2] mtd: spi-nor: introduce SNOR_ID3() Michael Walle

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).