summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaibo Chen <haibo.chen@nxp.com>2025-11-12 19:05:10 +0800
committerPratyush Yadav <pratyush@kernel.org>2025-11-18 13:01:37 +0100
commit9437a14ae2167124ce8741aed8c8922de8ae01e5 (patch)
treeb21b940ebe281e6e8a5d40240ced9c0c865e4d8b
parent74883accfa4a717337413c3ca243e997cc384a55 (diff)
mtd: spi-nor: micron-st: move set_octal_dtr to late_init()
Move params->set_octal_dtr from flash_info->fixups->default_init() to spi_nor_manufacturer-> fixups-> late_init(), this can cover all Micorn and ST chips without repeat in each chip's flash_info. Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org> Signed-off-by: Haibo Chen <haibo.chen@nxp.com> Signed-off-by: Pratyush Yadav <pratyush@kernel.org>
-rw-r--r--drivers/mtd/spi-nor/micron-st.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/mtd/spi-nor/micron-st.c b/drivers/mtd/spi-nor/micron-st.c
index 92eb14ca76c5..81a9bead1434 100644
--- a/drivers/mtd/spi-nor/micron-st.c
+++ b/drivers/mtd/spi-nor/micron-st.c
@@ -159,11 +159,6 @@ static int micron_st_nor_two_die_late_init(struct spi_nor *nor)
return spi_nor_set_4byte_addr_mode(nor, true);
}
-static void mt35xu512aba_default_init(struct spi_nor *nor)
-{
- nor->params->set_octal_dtr = micron_st_nor_set_octal_dtr;
-}
-
static int mt35xu512aba_post_sfdp_fixup(struct spi_nor *nor)
{
/* Set the Fast Read settings. */
@@ -187,7 +182,6 @@ static int mt35xu512aba_post_sfdp_fixup(struct spi_nor *nor)
}
static const struct spi_nor_fixups mt35xu512aba_fixups = {
- .default_init = mt35xu512aba_default_init,
.post_sfdp = mt35xu512aba_post_sfdp_fixup,
};
@@ -635,6 +629,8 @@ static int micron_st_nor_late_init(struct spi_nor *nor)
if (!params->set_4byte_addr_mode)
params->set_4byte_addr_mode = spi_nor_set_4byte_addr_mode_wren_en4b_ex4b;
+ params->set_octal_dtr = micron_st_nor_set_octal_dtr;
+
return 0;
}