Skip to content
Unverified Commit 79a4db50 authored by Miquel Raynal's avatar Miquel Raynal Committed by Tudor Ambarus
Browse files

mtd: spi-nor: Delay the initialization of bank_size



Bank size is derived from the chip's size, which in
spi_nor_init_default_params() can still be zero if the flash size is
not specified at flash declaration. Let the flash size be updated
by parsing SFDP and do the initialization of the bank size in
spi_nor_late_init_params(). Flashes that don't define the SFDP tables
must specify the flash size at declaration.

Fixes: 9d6c5d64 ("mtd: spi-nor: Introduce the concept of bank")
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/r/20230331194620.839899-1-miquel.raynal@bootlin.com


[ta: drop superfluous initialization in spi_nor_init_default_params(),
reword commit message, add Fixes tag.]
Signed-off-by: default avatarTudor Ambarus <tudor.ambarus@linaro.org>
parent 705c9ef8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment