diff options
author | Michael Walle <mwalle@kernel.org> | 2023-09-08 12:16:25 +0200 |
---|---|---|
committer | Tudor Ambarus <tudor.ambarus@linaro.org> | 2023-09-19 18:49:46 +0300 |
commit | 9983e6da917d7a8e367be05be167b1eeb6c8f120 (patch) | |
tree | fa4c79b75d0d0619ff0640119ebf9deaf74803cb /drivers/mtd/spi-nor/core.h | |
parent | d0cfd228b34c125b76a9a7fd2d69ebf9ff7e5534 (diff) |
mtd: spi-nor: store .n_banks in struct spi_nor_flash_parameter
First, fixups might want to replace the n_banks parameter, thus we need
it in the (writable) parameter struct. Secondly, this way we can have a
default in the core and just skip setting the n_banks in the flash_info
database. Most of the flashes doesn't have more than one bank.
Signed-off-by: Michael Walle <mwalle@kernel.org>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/r/20230807-mtd-flash-info-db-rework-v3-7-e60548861b10@kernel.org
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Diffstat (limited to 'drivers/mtd/spi-nor/core.h')
-rw-r--r-- | drivers/mtd/spi-nor/core.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h index 25bc18197614..2fc999f2787c 100644 --- a/drivers/mtd/spi-nor/core.h +++ b/drivers/mtd/spi-nor/core.h @@ -358,6 +358,7 @@ struct spi_nor_otp { * in octal DTR mode. * @rdsr_addr_nbytes: dummy address bytes needed for Read Status Register * command in octal DTR mode. + * @n_banks: number of banks. * @n_dice: number of dice in the flash memory. * @vreg_offset: volatile register offset for each die. * @hwcaps: describes the read and page program hardware @@ -394,6 +395,7 @@ struct spi_nor_flash_parameter { u8 addr_mode_nbytes; u8 rdsr_dummy; u8 rdsr_addr_nbytes; + u8 n_banks; u8 n_dice; u32 *vreg_offset; |