Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: "Michael Walle" <mwalle@kernel.org>
Cc: "Pratyush Yadav" <pratyush@kernel.org>,
	 "Takahiro Kuwano" <takahiro.kuwano@infineon.com>,
	 "Richard Weinberger" <richard@nod.at>,
	"Vignesh Raghavendra" <vigneshr@ti.com>,
	 "Nicolas Ferre" <nicolas.ferre@microchip.com>,
	 "Alexandre Belloni" <alexandre.belloni@bootlin.com>,
	 "Claudiu Beznea" <claudiu.beznea@tuxon.dev>,
	 "Jonathan Corbet" <corbet@lwn.net>,
	 "Shuah Khan" <skhan@linuxfoundation.org>,
	 "Steam Lin" <STLin2@winbond.com>,
	"Hsin-Yi Wang" <hsinyi@chromium.org>,
	 "Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
	 <linux-mtd@lists.infradead.org>,
	<linux-arm-kernel@lists.infradead.org>,
	 <linux-kernel@vger.kernel.org>, <linux-doc@vger.kernel.org>
Subject: Re: [PATCH v3 08/23] mtd: spi-nor: winbond: Prepare introduction of W25QxxRV-Q/N parts
Date: Tue, 01 Sep 2026 11:02:56 +0200	[thread overview]
Message-ID: <87qzjd8htr.fsf@bootlin.com> (raw)
In-Reply-To: <DKOKKCF45CY6.2RXHF51EW6VV0@kernel.org> (Michael Walle's message of "Fri, 14 Aug 2026 11:46:14 +0200")

Hello,

>> +static const struct spi_nor_fixups winbond_nor_partname_fixups = {
>> +	.post_sfdp = winbond_nor_partname_post_sfdp_fixups,
>> +};
>> +
>> +static bool is_w25qxxrv(const struct spi_nor *nor)
>> +{
>> +	struct sfdp_header *sfdp_h = (struct sfdp_header *)nor->sfdp->dwords;
>
> nitpick, spi_nor_sfdp_get_header()?

Yup.

>> +	 * W25QxxRV chips re-use the same ID as the W25QxxJV family.
>> +	 *
>> +	 * Chips are very similar, W25QxxRV brings mostly performance and power
>> +	 * consumption improvements. The RV family does not require the multi
>> +	 * die fixup.
>> +	 *
>> +	 * They can be distinguished based on their SFDP minor revision:
>> +	 * W25QxxJV:        JESD216A, minor revision == 05h
>> +	 * W25Q512/01/02JV: JESD216B, minor revision == 06h
>> +	 * W25QxxRV:        JESD216F, minor revision >= 0Ah
>> +	 */
>> +	return sfdp_h->minor >= SFDP_JESD216F_MINOR;
>> +}
>> +
>> +static bool winbond_jv_match(const struct spi_nor *nor)
>> +{
>> +	return !nor->sfdp || !is_w25qxxrv(nor);
>
> So how do we know if nor->sfdp is already there for a given fixup.
> Without having looked at the code, there could potentially be fixups
> before SFDP is parsed (and the nor->sfdp is populated), right? Might
> be worth to be mentioned somewhere.

You are right, it is worth mentioning. In practice only default_init()
is too early.

Thanks,
Miquèl


  reply	other threads:[~2026-09-01  9:03 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-13 15:19 [PATCH v3 00/23] mtd: spi-nor: QE handling cleanup + fixup reworks + Winbond RV chips addition Miquel Raynal
2026-08-13 15:19 ` [PATCH v3 01/23] mtd: spi-nor: Rename BFPT_DWORD15_QER_SR2_BIT1_BUGGY Miquel Raynal
2026-08-14  7:30   ` Michael Walle
2026-08-20  5:50   ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 02/23] mtd: spi-nor: Create a structure containing the flash opcodes Miquel Raynal
2026-08-14  7:31   ` Michael Walle
2026-08-20  5:52   ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 03/23] mtd: spi-nor: Refactor Read Status/Write Status support Miquel Raynal
2026-08-14 12:25   ` Michael Walle
2026-08-13 15:19 ` [PATCH v3 04/23] mtd: spi-nor: Add support for the new JESD216 rev F QER field Miquel Raynal
2026-08-14 12:26   ` Michael Walle
2026-08-20  5:53   ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 05/23] mtd: spi-nor: Create the concept of fixup table with match function Miquel Raynal
2026-08-14  9:40   ` Michael Walle
2026-08-27 16:43     ` Miquel Raynal
2026-08-28  9:43       ` Michael Walle
2026-08-31 15:07         ` Miquel Raynal
2026-08-20  5:56   ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 06/23] mtd: spi-nor: Create an indirection on the part name Miquel Raynal
2026-08-14  9:41   ` Michael Walle
2026-08-20  5:57   ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 07/23] mtd: spi-nor: Move the SFDP header structure to a C header Miquel Raynal
2026-08-14  9:41   ` Michael Walle
2026-08-20  5:57   ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 08/23] mtd: spi-nor: winbond: Prepare introduction of W25QxxRV-Q/N parts Miquel Raynal
2026-08-14  9:46   ` Michael Walle
2026-09-01  9:02     ` Miquel Raynal [this message]
2026-08-20  5:58   ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 09/23] mtd: spi-nor: winbond: Add support for W25Q32RV-Q/N Miquel Raynal
2026-08-14  9:46   ` Michael Walle
2026-08-20  6:03   ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 10/23] mtd: spi-nor: winbond: Add support for W25Q64RV-Q/N Miquel Raynal
2026-08-14  9:46   ` Michael Walle
2026-08-20  6:03   ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 11/23] mtd: spi-nor: winbond: Add support for W25Q12RV-Q/N Miquel Raynal
2026-08-14  9:47   ` Michael Walle
2026-08-20  6:04   ` Takahiro.Kuwano
2026-08-20  7:32   ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 12/23] mtd: spi-nor: winbond: Add support for W25Q51RV-Q/N Miquel Raynal
2026-08-14  9:47   ` Michael Walle
2026-08-20  6:04   ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 13/23] mtd: spi-nor: winbond: Add support for W25Q01RV-Q/N Miquel Raynal
2026-08-14  9:47   ` Michael Walle
2026-08-20  6:15   ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 14/23] mtd: spi-nor: winbond: Add support for W25Q02RV-Q/N Miquel Raynal
2026-08-14  9:48   ` Michael Walle
2026-08-20  6:17   ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 15/23] mtd: spi-nor: winbond: Prepare introduction of W25QxxRV-M parts Miquel Raynal
2026-08-14  9:50   ` Michael Walle
2026-08-20  6:18   ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 16/23] mtd: spi-nor: winbond: Add support for W25Q32RV-M Miquel Raynal
2026-08-14  9:50   ` Michael Walle
2026-08-20  6:19   ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 17/23] mtd: spi-nor: winbond: Add support for W25Q64RV-M Miquel Raynal
2026-08-14  9:51   ` Michael Walle
2026-08-20  6:21   ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 18/23] mtd: spi-nor: winbond: Add support for W25Q12RV-M Miquel Raynal
2026-08-14  9:51   ` Michael Walle
2026-08-20  6:44   ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 19/23] mtd: spi-nor: winbond: Add support for W25Q51RV-M Miquel Raynal
2026-08-14  9:52   ` Michael Walle
2026-08-20  6:48   ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 20/23] mtd: spi-nor: winbond: Add support for W25Q01RV-M Miquel Raynal
2026-08-14  9:52   ` Michael Walle
2026-08-20  6:50   ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 21/23] mtd: spi-nor: winbond: Add support for W25Q02RV-M Miquel Raynal
2026-08-14  9:52   ` Michael Walle
2026-08-20  6:52   ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 22/23] mtd: spi-nor: winbond: Add support for W25Q51RV-Q/N/M Miquel Raynal
2026-08-14  9:53   ` Michael Walle
2026-08-20  7:42   ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 23/23] mtd: spi-nor: debugfs: Expose SR opcodes and QE mask Miquel Raynal
2026-08-20  7:03   ` Takahiro.Kuwano

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=87qzjd8htr.fsf@bootlin.com \
    --to=miquel.raynal@bootlin.com \
    --cc=STLin2@winbond.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=corbet@lwn.net \
    --cc=hsinyi@chromium.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=mwalle@kernel.org \
    --cc=nicolas.ferre@microchip.com \
    --cc=pratyush@kernel.org \
    --cc=richard@nod.at \
    --cc=skhan@linuxfoundation.org \
    --cc=takahiro.kuwano@infineon.com \
    --cc=thomas.petazzoni@bootlin.com \
    --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