From: Miquel Raynal <miquel.raynal@bootlin.com>
To: <Takahiro.Kuwano@infineon.com>
Cc: <naresh.solanki.2011@gmail.com>, <pratyush@kernel.org>,
<mwalle@kernel.org>, <richard@nod.at>, <vigneshr@ti.com>,
<linux-mtd@lists.infradead.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mtd: spi-nor: spansion: add SPI_NOR_HAS_LOCK to s25fl064k
Date: Thu, 03 Dec 2026 10:22:16 +0100 [thread overview]
Message-ID: <874iculnw7.fsf@bootlin.com> (raw)
In-Reply-To: <MA9PR03MB6724385A7275912DAC333B1EB4934B2@MA9PR03MB672438.eurprd03.prod.outlook.com> (Takahiro Kuwano's message of "Thu, 3 Dec 2026 06:40:40 +0000")
On 03/12/2026 at 06:40:40 GMT, <Takahiro.Kuwano@infineon.com> wrote:
> Hi,
>
>> The s25fl064k entry also matches the Winbond W25Q64, which has the same
>> ID. Both protect blocks with the BP0-2 and TB bits of the status
>> register. Commit 3b1fba74306b ("mtd: spi-nor: winbond: W25Q64JV-Q/N:
>> Fill locking information") set SPI_NOR_HAS_LOCK and SPI_NOR_HAS_TB on
>> the winbond w25q64 entry, but that entry is never used for this ID, as
>> the spansion table is searched first. Set both flags on the s25fl064k
>> entry too.
>
> Why don't we remove the redundant entry?
> We need to keep "s25fl064k" name as it is in spi_nor_dev_ids[].
>
>>
>> Without SPI_NOR_HAS_LOCK the block protection is never cleared, so on a
>> W25Q64 that ships fully protected, erases and writes silently fail.
>>
>> Signed-off-by: Naresh Solanki <naresh.solanki.2011@gmail.com>
Yes, that is true and I documented it in my previous series. I actually
commented out the Spansion part for the tests I conducted otherwise that
entry was indeed picked-up instead. I found no time to cover this
problem yet.
>> @@ -1065,6 +1065,7 @@ static const struct flash_info spansion_nor_parts[] = {
>> .id = SNOR_ID(0xef, 0x40, 0x17),
>> .name = "s25fl064k",
>> .size = SZ_8M,
>> + .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB,
>
> Do we also need to add HAS_CMP and QUAD_PP?
I don't think the Spansion entry supports CMP. For Quad PP, it does not
matter much since the extra gain is small.
Thanks,
Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
prev parent reply other threads:[~2026-12-03 9:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 7:15 [PATCH] mtd: spi-nor: spansion: add SPI_NOR_HAS_LOCK to s25fl064k Naresh Solanki
2026-12-03 6:40 ` Takahiro.Kuwano
2026-12-03 9:22 ` Miquel Raynal [this message]
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=874iculnw7.fsf@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=Takahiro.Kuwano@infineon.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=mwalle@kernel.org \
--cc=naresh.solanki.2011@gmail.com \
--cc=pratyush@kernel.org \
--cc=richard@nod.at \
--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