]> git.itanic.dy.fi Git - linux-stable/commit
mtd: spi-nor: make sector_size optional
authorMichael Walle <mwalle@kernel.org>
Fri, 8 Sep 2023 10:16:28 +0000 (12:16 +0200)
committerTudor Ambarus <tudor.ambarus@linaro.org>
Tue, 19 Sep 2023 15:56:29 +0000 (18:56 +0300)
commit6dec24b1a34c0ba7b09a400b4dfdbf63318f60c0
tree9adb4e954297c1b34eca1bea7c03f2381c935d9c
parent9b6bb07eadaf2a98a86b6bc1ab4410c72d6ba572
mtd: spi-nor: make sector_size optional

Most of the (old, non-SFDP) flashes use a sector size of 64k. Make that
a default value so it can be optional in the flash_info database.

As a preparation for conversion to the new database format, set the
sector size to zero if the default value is used. This way, the actual
change is happening with this patch ant not with a later conversion
patch.

Signed-off-by: Michael Walle <mwalle@kernel.org>
Link: https://lore.kernel.org/r/20230807-mtd-flash-info-db-rework-v3-10-e60548861b10@kernel.org
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
drivers/mtd/spi-nor/core.c
drivers/mtd/spi-nor/core.h
drivers/mtd/spi-nor/spansion.c
drivers/mtd/spi-nor/swp.c