Commit 721c908
mtd: spi-nor: add support to non-uniform SPI NOR flash memories
This patch is a first step in introducing the support of SPI memories
with non-uniform erase sizes like Spansion s25fs512s.
It introduces the memory erase map which splits the memory array into one
or many erase regions. Each erase region supports up to 4 erase commands,
as defined by the JEDEC JESD216B (SFDP) specification.
In turn, an erase command is defined by an op code and a sector size.
To be backward compatible, the erase map of uniform SPI NOR flash memories
is initialized so it contains only one erase region and this erase region
supports only one erase command. Hence a single size is used to erase any
sector/block of the memory.
Besides, since the algorithm used to erase sectors on non-uniform SPI NOR
flash memories is quite expensive, when possible, the erase map is tuned
to come back to the uniform case.
This is a transitional patch: non-uniform erase maps will be used later
when initialized based on the SFDP data.
Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
[tudor.ambarus@microchip.com: solved conflicts]
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>1 parent ef26b7d commit 721c908
2 files changed
Lines changed: 411 additions & 14 deletions
0 commit comments