[PATCH] mtd: spi-nor: let SFDP determine the flash and sector size

Michael Walle michael at walle.cc
Sat Jul 22 05:56:20 PDT 2023


Am 2023-07-22 06:59, schrieb Tudor Ambarus:
> 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.

Great! I have a similar patch in my preparation for the flash info
cleanup, but for all the flashes.

The flash size is overwritten if PARSE_SFDP is set anyway. So
that's fine. The sector_size is used for the erase ops and the BP
locking. The erase ops should be initialized with the BFPT, too.
So whats left is the BP locking, which is just used for gd25q256.
For now we'd need to leave the sector_size there.

Would you also drop the size and sector size for all other
PARSE_SFDP flashes?

In any case:
Reviewed-by: Michael Walle <michael at walle.cc>

-michael



More information about the linux-mtd mailing list