[PATCH 3/4] mtd: spi-nor: Remove SPI_NOR_SKIP_SFDP flag
Tudor Ambarus
tudor.ambarus at linaro.org
Tue Sep 10 09:38:50 CEST 2024
On 08.08.2024 09:00, tkuw584924 at gmail.com wrote:
> From: Takahiro Kuwano <Takahiro.Kuwano at infineon.com>
>
> This flag is not used in INFO table so checking info->flags has no
> effect.
>
> Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano at infineon.com>
this patch can be send on its own I guess. Maybe Jagan can take it now:
Reviewed-by: Tudor Ambarus <tudor.ambarus at linaro.org>
> ---
> drivers/mtd/spi/sf_internal.h | 9 ++++-----
> drivers/mtd/spi/spi-nor-core.c | 5 ++---
> 2 files changed, 6 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/mtd/spi/sf_internal.h b/drivers/mtd/spi/sf_internal.h
> index d3ef69ec74..57608750c9 100644
> --- a/drivers/mtd/spi/sf_internal.h
> +++ b/drivers/mtd/spi/sf_internal.h
> @@ -64,11 +64,10 @@ struct flash_info {
> * to support memory size above 128Mib.
> */
> #define NO_CHIP_ERASE BIT(12) /* Chip does not support chip erase */
> -#define SPI_NOR_SKIP_SFDP BIT(13) /* Skip parsing of SFDP tables */
> -#define USE_CLSR BIT(14) /* use CLSR command */
> -#define SPI_NOR_HAS_SST26LOCK BIT(15) /* Flash supports lock/unlock via BPR */
> -#define SPI_NOR_OCTAL_READ BIT(16) /* Flash supports Octal Read */
> -#define SPI_NOR_OCTAL_DTR_READ BIT(17) /* Flash supports Octal DTR Read */
> +#define USE_CLSR BIT(13) /* use CLSR command */
> +#define SPI_NOR_HAS_SST26LOCK BIT(14) /* Flash supports lock/unlock via BPR */
> +#define SPI_NOR_OCTAL_READ BIT(15) /* Flash supports Octal Read */
> +#define SPI_NOR_OCTAL_DTR_READ BIT(16) /* Flash supports Octal DTR Read */
> };
>
> extern const struct flash_info spi_nor_ids[];
> diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c
> index 54fd2869a2..feafc48a49 100644
> --- a/drivers/mtd/spi/spi-nor-core.c
> +++ b/drivers/mtd/spi/spi-nor-core.c
> @@ -3013,9 +3013,8 @@ static int spi_nor_init_params(struct spi_nor *nor,
> /* Override the parameters with data read from SFDP tables. */
> nor->addr_width = 0;
> nor->mtd.erasesize = 0;
> - if ((info->flags & (SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
> - SPI_NOR_OCTAL_DTR_READ)) &&
> - !(info->flags & SPI_NOR_SKIP_SFDP)) {
> + if (info->flags & (SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
> + SPI_NOR_OCTAL_DTR_READ)) {
> struct spi_nor_flash_parameter sfdp_params;
>
> memcpy(&sfdp_params, params, sizeof(sfdp_params));
More information about the U-Boot
mailing list