Skip to content

Commit ef26284

Browse files
ambarusPratyush Yadav
authored andcommitted
mtd: spi-nor: extend description of size member of struct flash_info
We use the size as an indicator whether to parse SFDP or not. We don't introduce a dedicated member for SFDP parsing because we'd like to keep the struct size at a minimum, as it's used for every flash declaration. Ideally we won't have flash entries at all, but there are still flash parameters that aren't defined by SFDP, thus we need to statically specify them. Signed-off-by: Tudor Ambarus <[email protected]> Reviewed-by: Miquel Raynal <[email protected]> Reviewed-by: Michael Walle <[email protected]> Signed-off-by: Pratyush Yadav <[email protected]> Link: https://lore.kernel.org/r/20241219-spi-nor-flash-info-size-desc-v1-1-6b53cf011027@linaro.org
1 parent 93e00cc commit ef26284

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/mtd/spi-nor/core.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,11 @@ struct spi_nor_id {
448448
* @id: pointer to struct spi_nor_id or NULL, which means "no ID" (mostly
449449
* older chips).
450450
* @name: (obsolete) the name of the flash. Do not set it for new additions.
451-
* @size: the size of the flash in bytes.
451+
* @size: the size of the flash in bytes. The flash size is one
452+
* property parsed by the SFDP. We use it as an indicator
453+
* whether we need SFDP parsing for a particular flash.
454+
* I.e. non-legacy flash entries in flash_info will have
455+
* a size of zero iff SFDP should be used.
452456
* @sector_size: (optional) the size listed here is what works with
453457
* SPINOR_OP_SE, which isn't necessarily called a "sector" by
454458
* the vendor. Defaults to 64k.

0 commit comments

Comments
 (0)