public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Haibo Chen <haibo.chen@nxp.com>
To: Tudor Ambarus <tudor.ambarus@linaro.org>,
	 Pratyush Yadav <pratyush@kernel.org>,
	Michael Walle <mwalle@kernel.org>,
	 Miquel Raynal <miquel.raynal@bootlin.com>,
	 Richard Weinberger <richard@nod.at>,
	Vignesh Raghavendra <vigneshr@ti.com>
Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
	 Haibo Chen <haibo.chen@nxp.com>,
	imx@lists.linux.dev
Subject: [PATCH v4 2/5] mtd: spi-nor: micron-st: move set_octal_dtr to late_init()
Date: Wed, 12 Nov 2025 19:05:10 +0800	[thread overview]
Message-ID: <20251112-nor-v4-2-e4637be82a0a@nxp.com> (raw)
In-Reply-To: <20251112-nor-v4-0-e4637be82a0a@nxp.com>

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>
---
 drivers/mtd/spi-nor/micron-st.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/mtd/spi-nor/micron-st.c b/drivers/mtd/spi-nor/micron-st.c
index 92eb14ca76c57f29ece1edb3fe652c56d1c2888f..81a9bead1434056cce0893c97bd35ea248c15894 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;
 }
 

-- 
2.34.1


  parent reply	other threads:[~2025-11-12 11:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-12 11:05 [PATCH v4 0/5] mtd: spi-nor: micron-st: few clean up for micron spi nor chip Haibo Chen
2025-11-12 11:05 ` [PATCH v4 1/5] mtd: spi-nor: micron-st: rename the die_late_init functions Haibo Chen
2025-11-12 11:05 ` Haibo Chen [this message]
2025-11-12 11:05 ` [PATCH v4 3/5] mtd: spi-nor: micron-st: use SFDP of mt35xu512aba Haibo Chen
2025-11-12 11:05 ` [PATCH v4 4/5] mtd: spi-nor: micron-st: add mt35xu01gbba support Haibo Chen
2025-11-12 12:14   ` Tudor Ambarus
2025-11-12 11:05 ` [PATCH v4 5/5] mtd: spi-nor: micron-st: add comment for mt35xu02gcba Haibo Chen
2025-11-13 14:47   ` Pratyush Yadav
2025-11-13 15:42     ` Tudor Ambarus
2025-11-14 15:14       ` Pratyush Yadav
2025-11-18 12:12 ` [PATCH v4 0/5] mtd: spi-nor: micron-st: few clean up for micron spi nor chip Pratyush Yadav

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251112-nor-v4-2-e4637be82a0a@nxp.com \
    --to=haibo.chen@nxp.com \
    --cc=imx@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=mwalle@kernel.org \
    --cc=pratyush@kernel.org \
    --cc=richard@nod.at \
    --cc=tudor.ambarus@linaro.org \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox