[PATCH 11/11] mtd: spi-nor: Call stacked/parallel post init fixups
Takahiro Kuwano via B4 Relay
devnull+Takahiro.Kuwano.infineon.com at kernel.org
Wed Nov 19 06:13:10 CET 2025
From: Takahiro Kuwano <Takahiro.Kuwano at infineon.com>
Add support for stacked/parallel mode by calling post_init_fixups() from
core.
Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano at infineon.com>
---
drivers/mtd/spi/sf_internal.h | 3 +++
drivers/mtd/spi/spi-nor-core.c | 10 ++++++++++
2 files changed, 13 insertions(+)
diff --git a/drivers/mtd/spi/sf_internal.h b/drivers/mtd/spi/sf_internal.h
index 8b1a48f045a..a9825a0b317 100644
--- a/drivers/mtd/spi/sf_internal.h
+++ b/drivers/mtd/spi/sf_internal.h
@@ -108,4 +108,7 @@ int clean_bar(struct spi_nor *nor);
int sst_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen,
const u_char *buf);
+int spi_nor_stacked_post_init_fixups(struct spi_nor *nor);
+int spi_nor_parallel_post_init_fixups(struct spi_nor *nor);
+
#endif /* _SF_INTERNAL_H_ */
diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c
index acfbc0bb702..f9b6971e535 100644
--- a/drivers/mtd/spi/spi-nor-core.c
+++ b/drivers/mtd/spi/spi-nor-core.c
@@ -4363,6 +4363,16 @@ int spi_nor_scan(struct spi_nor *nor)
if (ret)
return ret;
+#if CONFIG_IS_ENABLED(SPI_STACKED_PARALLEL)
+ ret = spi_nor_stacked_post_init_fixups(nor);
+ if (ret)
+ return ret;
+
+ ret = spi_nor_parallel_post_init_fixups(nor);
+ if (ret)
+ return ret;
+#endif
+
nor->rdsr_dummy = params.rdsr_dummy;
nor->rdsr_addr_nbytes = params.rdsr_addr_nbytes;
nor->name = info->name;
--
2.34.1
More information about the U-Boot
mailing list