All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael Walle" <mwalle@kernel.org>
To: <tkuw584924@gmail.com>,
	"Tudor Ambarus" <tudor.ambarus@linaro.org>,
	"Pratyush Yadav" <pratyush@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>,
	"Takahiro Kuwano" <takahiro.kuwano@infineon.com>
Subject: Re: [PATCH v2 2/2] mtd: spi-nor: spansion: add die erase support in s28hx-t
Date: Wed, 27 May 2026 15:02:51 +0200	[thread overview]
Message-ID: <DITH9ULJ3A8X.1Y9MP83UY2MHB@kernel.org> (raw)
In-Reply-To: <36045be168c5e9525f9c649986b0f1a54dcb2be1.1779872008.git.takahiro.kuwano@infineon.com>


[-- Attachment #1.1: Type: text/plain, Size: 1269 bytes --]

On Wed May 27, 2026 at 11:05 AM CEST, tkuw584924 wrote:
> From: Takahiro Kuwano <takahiro.kuwano@infineon.com>
>
> S28Hx-T family has multi-die devices that support die erase opcode.
> Update die erase opcode when the device is multi-die.
>
> Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
> Reviewed-by: Pratyush Yadav <pratyush@kernel.org>
> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
> Signed-off-by: Takahiro Kuwano <takahiro.kuwano@infineon.com>
> ---
>  drivers/mtd/spi-nor/spansion.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c
> index b6023076903a..65227d989de1 100644
> --- a/drivers/mtd/spi-nor/spansion.c
> +++ b/drivers/mtd/spi-nor/spansion.c
> @@ -762,6 +762,9 @@ static int s28hx_t_late_init(struct spi_nor *nor)
>  	params->ready = cypress_nor_sr_ready_and_clear;
>  	cypress_nor_ecc_init(nor);
>  
> +	if (params->n_dice > 1)
> +		params->die_erase_opcode = SPINOR_OP_CYPRESS_DIE_ERASE;
> +

So this seems to be a common theme for the spansion/cypress flashes.
Does it make sense to have a .mfr_flag USE_DIE_ERASE or
SUPPORTS_DIE_ERASE that can be set in the flash entry instead of
having many different fixups?

-michael

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 297 bytes --]

[-- Attachment #2: Type: text/plain, Size: 144 bytes --]

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

WARNING: multiple messages have this Message-ID (diff)
From: "Michael Walle" <mwalle@kernel.org>
To: <tkuw584924@gmail.com>,
	"Tudor Ambarus" <tudor.ambarus@linaro.org>,
	"Pratyush Yadav" <pratyush@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>,
	"Takahiro Kuwano" <takahiro.kuwano@infineon.com>
Subject: Re: [PATCH v2 2/2] mtd: spi-nor: spansion: add die erase support in s28hx-t
Date: Wed, 27 May 2026 15:02:51 +0200	[thread overview]
Message-ID: <DITH9ULJ3A8X.1Y9MP83UY2MHB@kernel.org> (raw)
In-Reply-To: <36045be168c5e9525f9c649986b0f1a54dcb2be1.1779872008.git.takahiro.kuwano@infineon.com>

[-- Attachment #1: Type: text/plain, Size: 1269 bytes --]

On Wed May 27, 2026 at 11:05 AM CEST, tkuw584924 wrote:
> From: Takahiro Kuwano <takahiro.kuwano@infineon.com>
>
> S28Hx-T family has multi-die devices that support die erase opcode.
> Update die erase opcode when the device is multi-die.
>
> Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
> Reviewed-by: Pratyush Yadav <pratyush@kernel.org>
> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
> Signed-off-by: Takahiro Kuwano <takahiro.kuwano@infineon.com>
> ---
>  drivers/mtd/spi-nor/spansion.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c
> index b6023076903a..65227d989de1 100644
> --- a/drivers/mtd/spi-nor/spansion.c
> +++ b/drivers/mtd/spi-nor/spansion.c
> @@ -762,6 +762,9 @@ static int s28hx_t_late_init(struct spi_nor *nor)
>  	params->ready = cypress_nor_sr_ready_and_clear;
>  	cypress_nor_ecc_init(nor);
>  
> +	if (params->n_dice > 1)
> +		params->die_erase_opcode = SPINOR_OP_CYPRESS_DIE_ERASE;
> +

So this seems to be a common theme for the spansion/cypress flashes.
Does it make sense to have a .mfr_flag USE_DIE_ERASE or
SUPPORTS_DIE_ERASE that can be set in the flash entry instead of
having many different fixups?

-michael

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 297 bytes --]

  reply	other threads:[~2026-05-27 13:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-27  9:05 [PATCH v2 0/2] mtd: spi-nor: spansion: fix die erase support tkuw584924
2026-05-27  9:05 ` tkuw584924
2026-05-27  9:05 ` [PATCH v2 1/2] mtd: spi-nor: spansion: use die erase for multi-die devices only tkuw584924
2026-05-27  9:05   ` tkuw584924
2026-05-27 13:03   ` Michael Walle
2026-05-27 13:03     ` Michael Walle
2026-05-27  9:05 ` [PATCH v2 2/2] mtd: spi-nor: spansion: add die erase support in s28hx-t tkuw584924
2026-05-27  9:05   ` tkuw584924
2026-05-27 13:02   ` Michael Walle [this message]
2026-05-27 13:02     ` Michael Walle
2026-05-28  5:45     ` Takahiro.Kuwano
2026-05-28  5:45       ` Takahiro.Kuwano
2026-05-28 13:58 ` [PATCH v2 0/2] mtd: spi-nor: spansion: fix die erase support Pratyush Yadav
2026-05-28 13:58   ` 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=DITH9ULJ3A8X.1Y9MP83UY2MHB@kernel.org \
    --to=mwalle@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=pratyush@kernel.org \
    --cc=richard@nod.at \
    --cc=takahiro.kuwano@infineon.com \
    --cc=tkuw584924@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.