
From: Takahiro Kuwano Takahiro.Kuwano@infineon.com
The goal of series is to port spi-nor-generic feature based on SFDP parsing. This feature will suppress the increase of spi_nor_ids{} size and reduce our effort to maintain it.
We need to rework 4-byte address mode entry/exit functions and enhance SFDP parsing to select proper 4-byte address mode method. After that, add spi-nor-generic structure and fallback logic in spi_nor_read_id().
Most of the code in this series are from Linux commits with some modification to address gap between u-boot and Linux implementation.
It may be better to sync whole SPI NOR framework with Linux. That will be done incrementally by separate series.
Tested with CYRS17B512 SPI NOR Flash which supports SFDP but not listed in spi_nor_ids[]. https://www.infineon.com/dgdl/Infineon-CYRS17B512_512_MB_64_MB_SERIAL_NOR_FL...
Takahiro Kuwano (4): mtd: spi-nor: Rework set_4byte() mtd: spi-nor: Set the 4-Byte Address Mode method based on SFDP data mtd: spi-nor: Remove SPI_NOR_SKIP_SFDP flag mtd: spi-nor: add generic flash driver
drivers/mtd/spi/sf_internal.h | 10 +- drivers/mtd/spi/spi-nor-core.c | 317 +++++++++++++++++++++++++-------- include/linux/mtd/spi-nor.h | 3 + 3 files changed, 252 insertions(+), 78 deletions(-)