From: Tudor Ambarus Date: Tue, 7 Dec 2021 14:02:51 +0000 (+0200) Subject: mtd: spi-nor: winbond: w25q256jvm: Init flash based on SFDP X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=1c513c986b0a4c7151cb4571e568136f16c9dc58;p=linux.git mtd: spi-nor: winbond: w25q256jvm: Init flash based on SFDP Get rid of the static initialization of the flash parameters and init them when parsing SFDP. Generated a 256 Kbyte random data and did an erase, write, read back and compare test. The flash uses for reads SPINOR_OP_READ_1_4_4 0xeb, for erases SPINOR_OP_BE_4K 0x20, and for writes SPINOR_OP_PP 0x02. Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20211207140254.87681-12-tudor.ambarus@microchip.com --- diff --git a/drivers/mtd/spi-nor/winbond.c b/drivers/mtd/spi-nor/winbond.c index 421509406368f..a7573df0a62d9 100644 --- a/drivers/mtd/spi-nor/winbond.c +++ b/drivers/mtd/spi-nor/winbond.c @@ -117,8 +117,7 @@ static const struct flash_info winbond_parts[] = { NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) .fixups = &w25q256_fixups }, { "w25q256jvm", INFO(0xef7019, 0, 64 * 1024, 512) - NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | - SPI_NOR_QUAD_READ) }, + PARSE_SFDP }, { "w25q256jw", INFO(0xef6019, 0, 64 * 1024, 512) NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },