mtd: spi-nor: Introduce spi_nor_init_fixup_flags()
authorTudor Ambarus <tudor.ambarus@microchip.com>
Tue, 7 Dec 2021 14:02:48 +0000 (16:02 +0200)
committerTudor Ambarus <tudor.ambarus@microchip.com>
Tue, 7 Dec 2021 15:05:11 +0000 (17:05 +0200)
commita1ede1cce4935f8aa2c44560d8404890350cd0ca
tree64a16e6b1bdf5fcd40cbc7648d40cc55e8d1c5c5
parent5429300db98c7983f4d260fce40d663f5cf0732e
mtd: spi-nor: Introduce spi_nor_init_fixup_flags()

Group NOR flags initialization. Introduce a dedicated function for
setting the fixup_flags and emphasise when those flash_info flags
should be set: when the SNOR_F_4B_OPCODES/SNOR_F_IO_MODE_EN_VOLATILE
setttings can not be discovered by SFDP for this particular flash
because the SFDP table that indicates this support is not defined
in the flash.
In case the table for his support is defined but has wrong values,
one should instead use a post_sfdp() hook to set the SNOR_F equivalent
flag.

No functional change intended in this patch.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Pratyush Yadav <p.yadav@ti.com>
Link: https://lore.kernel.org/r/20211207140254.87681-9-tudor.ambarus@microchip.com
drivers/mtd/spi-nor/core.c