[PATCH] mtd: spi-nor: core: Check read CR support
Miquel Raynal
miquel.raynal at bootlin.com
Wed Sep 10 05:04:42 PDT 2025
Hi Jakub,
> diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
> index ac4b960101cc..79deee3a50d3 100644
> --- a/drivers/mtd/spi-nor/core.c
> +++ b/drivers/mtd/spi-nor/core.c
> @@ -2608,6 +2608,10 @@ static int spi_nor_setup(struct spi_nor *nor,
> }
> }
>
> + /* Some SPI controllers might not support CR read opcode. */
> + if (spi_nor_read_cr(nor, nor->bouncebuf) == -EOPNOTSUPP)
There is a spi_nor_spimem_check_op() helper which might be better suited
for this purpose?
Thanks,
Miquèl
More information about the linux-mtd
mailing list