Skip to content

Commit

Permalink
mtd: spi-nor: extend description of size member of struct flash_info
Browse files Browse the repository at this point in the history
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 <tudor.ambarus@linaro.org>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Michael Walle <mwalle@kernel.org>
Signed-off-by: Pratyush Yadav <pratyush@kernel.org>
Link: https://lore.kernel.org/r/20241219-spi-nor-flash-info-size-desc-v1-1-6b53cf011027@linaro.org
  • Loading branch information
Tudor Ambarus authored and Pratyush Yadav committed Jan 13, 2025
1 parent 93e00cc commit ef26284
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/mtd/spi-nor/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,11 @@ struct spi_nor_id {
* @id: pointer to struct spi_nor_id or NULL, which means "no ID" (mostly
* older chips).
* @name: (obsolete) the name of the flash. Do not set it for new additions.
* @size: the size of the flash in bytes.
* @size: the size of the flash in bytes. The flash size is one
* property parsed by the SFDP. We use it as an indicator
* whether we need SFDP parsing for a particular flash.
* I.e. non-legacy flash entries in flash_info will have
* a size of zero iff SFDP should be used.
* @sector_size: (optional) the size listed here is what works with
* SPINOR_OP_SE, which isn't necessarily called a "sector" by
* the vendor. Defaults to 64k.
Expand Down

0 comments on commit ef26284

Please sign in to comment.