]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mtd: spi-nor: sfdp: introduce smpt_map_id fixup hook
authorTakahiro Kuwano <Takahiro.Kuwano@infineon.com>
Wed, 5 Nov 2025 07:47:59 +0000 (16:47 +0900)
committerPratyush Yadav <pratyush@kernel.org>
Mon, 10 Nov 2025 10:11:53 +0000 (11:11 +0100)
commitf74de390557bf2bcc5dca4a357b41c0701d3f76e
tree8d41997e5a22cb11220d39ae86768c804f68059b
parent653f6def567c81f37302f9591ffd54df3e2a11eb
mtd: spi-nor: sfdp: introduce smpt_map_id fixup hook

Certain chips have inconsistent Sector Map Parameter Table (SMPT) data,
which leads to the wrong map ID being identified, causing failures to
detect the correct sector map.

To fix this, introduce smpt_map_id() into the struct spi_nor_fixups.
This function will be called after the initial SMPT-based detection,
allowing chip-specific logic to correct the map ID.

Infineon S25FS512S needs this fixup as it has inconsistency between map
ID definition and configuration register value actually obtained.

Co-developed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Tested-by: Marek Vasut <marek.vasut+renesas@mailbox.org> # S25FS512S
Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>
Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>>
Signed-off-by: Pratyush Yadav <pratyush@kernel.org>
drivers/mtd/spi-nor/core.h
drivers/mtd/spi-nor/sfdp.c