mtd: spi-nor: spansion: use CLPEF as an alternative to CLSR
authorTakahiro Kuwano <Takahiro.Kuwano@infineon.com>
Wed, 26 Jul 2023 07:52:47 +0000 (10:52 +0300)
committerTudor Ambarus <tudor.ambarus@linaro.org>
Wed, 26 Jul 2023 09:39:10 +0000 (12:39 +0300)
commitd534fd9787d5925d9637752410e3ea92ca7f4cfa
treef660f9c009f55019557a27fc3ab7a76c10d3fb09
parentabfac0f3a457dab837fc74e47f00d829976fb0a6
mtd: spi-nor: spansion: use CLPEF as an alternative to CLSR

Infineon S28Hx (SEMPER Octal) and S25FS256T (SEMPER Nano) support Clear
Program and Erase Failure Flags (CLPEF, 82h) instead of CLSR(30h).
Introduce a new mfr_flag together with the infrastructure to allow
manufacturer private data in the core. With this we remove the need
to have if checks in the code at runtime and instead set the correct
opcodes at probe time. S25Hx (SEMPER QSPI) supports CLSR but it may
be disabled by CFR3x[2] while CLPEF is always available. Therefore,
the mfr_flag is also applied to S25Hx for safety.

Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>
Link: https://lore.kernel.org/r/20230726075257.12985-2-tudor.ambarus@linaro.org
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
drivers/mtd/spi-nor/atmel.c
drivers/mtd/spi-nor/core.c
drivers/mtd/spi-nor/core.h
drivers/mtd/spi-nor/issi.c
drivers/mtd/spi-nor/macronix.c
drivers/mtd/spi-nor/micron-st.c
drivers/mtd/spi-nor/spansion.c
drivers/mtd/spi-nor/sst.c
drivers/mtd/spi-nor/winbond.c
drivers/mtd/spi-nor/xilinx.c