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

From: Michael Walle
Date: Sat Jul 22 2023 - 08:56:45 EST


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@xxxxxxxx>

-michael