Re: [PATCH v3 14/15] mtd: spi-nor: Drop deprecated mechanism for optional SFDP parsing
From: Esben Haabendal <hidden>
Date: 2024-07-12 09:23:39
Also in:
lkml
Esben Haabendal [off-list ref] writes:
quoted hunk
With all drivers converted to the new SPI_NOR_TRY_SFDP flag, we can remove the old deprecated mechanism for triggering optional SFDP parsing. New flashes must use SPI_NOR_TRY_SFDP to get this behavior. Hopefully, all new drivers will be fore pure SFDP flashes, so no or at least very few new users of this flag is expected. Signed-off-by: Esben Haabendal <redacted> --- drivers/mtd/spi-nor/core.h | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-)diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h index dfc81716e068..f4a76f42051a 100644 --- a/drivers/mtd/spi-nor/core.h +++ b/drivers/mtd/spi-nor/core.h@@ -719,24 +719,7 @@ static inline bool spi_nor_needs_sfdp(const struct spi_nor *nor) */ static inline bool spi_nor_try_sfdp(const struct spi_nor *nor) { - if (nor->info->no_sfdp_flags & SPI_NOR_SKIP_SFDP) - return false; - if (nor->info->no_sfdp_flags & SPI_NOR_TRY_SFDP) - return true; - - /* Deprecated/legacy way for triggering optional SFDP parsing. - * If one of the no_sfdp_flags indicating dual, quad or octal read is - * set, SFDP parsing will be tried. - * When all drivers have been converted to set SPI_NOR_TRY_SFDP where - * needed, this deprecated mechanism can be removed. - */ - if (nor->info->no_sfdp_flags & (SPI_NOR_DUAL_READ | - SPI_NOR_QUAD_READ | - SPI_NOR_OCTAL_READ | - SPI_NOR_OCTAL_DTR_READ)) - return true; - - return false; + return (nor->info->no_sfdp_flags & SPI_NOR_TRY_SFDP)
Sorry. Bad cherry-pick here. Due to other reasons, I am testing out of tree :( The missing semicolon will be added in v4. I assume we can still discuss the idea here in this version. /Esben