mtd: spi-nor: spansion: let SFDP determine the flash and sector size
authorTudor Ambarus <tudor.ambarus@linaro.org>
Wed, 26 Jul 2023 07:52:55 +0000 (10:52 +0300)
committerTudor Ambarus <tudor.ambarus@linaro.org>
Wed, 26 Jul 2023 09:39:11 +0000 (12:39 +0300)
commit39133e5f559e748904aeb6b74063882242076a61
treeff144dfe6ac9b473f400e762f5111530b7bbf6fb
parent68a86d18339081a11be86e27fcaf3bc986d8fab7
mtd: spi-nor: spansion: let SFDP determine the flash and sector size

sector_size is used to determine the flash size and the erase size in
case of uniform erase. n_sectors is used to determine the flash_size.
But the flash size and the erase sizes are determined when parsing SFDP,
let SFDP determine them.

Tested-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>
Link: https://lore.kernel.org/r/20230726075257.12985-10-tudor.ambarus@linaro.org
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
drivers/mtd/spi-nor/spansion.c