RE: [PATCH v1 8/8] mtd: spi-nor: rework flash parameter initialization

From: Takahiro.Kuwano

Date: Thu Jul 09 2026 - 22:50:57 EST


Hi,

> Rework how the flash parameters are initialized. It used to make a
> difference whether a flash is in the in-kernel database, whether it
> supports multi I/O and so on. Recently, that makes more and more
> problems because flash IDs are reused among legacy flashes (w/o SFDP
> support) and newer flashes [1,2,3,4].
>
> Simplify the whole parameter initialization, by starting with the
> parameters we have in the in-kernel database and the try to parse SFDP
> (and let it override any settings).
>
> This has the consequence that all the flashes now get a RDSFPD opcode
> which might be an unknown opcode from the perspective of the flash. With
> the generic SPI NOR flash driver, this was already the case for any
> flashes not listed in the in-kernel database. So far, there was not a
> single complaint.
>
> [1] https://lore.kernel.org/linux-mtd/CAAyq3SYX9UPwhC_Ume_S2yxhQwimRvB=Y6O_+FFqokhNmw7jQg@xxxxxxxxxxxxxx/
> [2] https://lore.kernel.org/linux-mtd/DGB4745HRCFI.1DRYTHXURWZJO@xxxxxxxxxx/
> [3] https://lore.kernel.org/linux-mtd/DD10GE4EOCD7.CPTN7198QFUV@xxxxxxxxxx/
> [4] https://lore.kernel.org/linux-mtd/DD6SI06QNEE4.2YCRTWJHEAAQM@xxxxxxxxxx/
>
> Signed-off-by: Michael Walle <mwalle@xxxxxxxxxx>
> Tested-by: Cheng Ming Lin <chengminglin@xxxxxxxxxxx>
> Tested-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx> # w/ W25Q02JVFIM
> ---

Tested-by: Takahiro Kuwano <takahiro.kuwano@xxxxxxxxxxxx>

Test log is here (I forgot a tag).
https://lore.kernel.org/linux-mtd/28461250e841436e98e67fd7b0d02313@xxxxxxxxxxxx/