[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <874j8vvu96.fsf@geanix.com>
Date: Fri, 12 Jul 2024 11:23:33 +0200
From: Esben Haabendal <esben@...nix.com>
To: Tudor Ambarus <tudor.ambarus@...aro.org>
Cc: Pratyush Yadav <pratyush@...nel.org>, Michael Walle
<mwalle@...nel.org>, Miquel Raynal <miquel.raynal@...tlin.com>, Richard
Weinberger <richard@....at>, Vignesh Raghavendra <vigneshr@...com>,
Nicolas Ferre <nicolas.ferre@...rochip.com>, Alexandre Belloni
<alexandre.belloni@...tlin.com>, Claudiu Beznea
<claudiu.beznea@...on.dev>, linux-mtd@...ts.infradead.org,
linux-kernel@...r.kernel.org, Rasmus Villemoes
<rasmus.villemoes@...vas.dk>, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v3 14/15] mtd: spi-nor: Drop deprecated mechanism for
optional SFDP parsing
Esben Haabendal <esben@...nix.com> writes:
> 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 <esben@...nix.com>
> ---
> 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
Powered by blists - more mailing lists