mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <Tudor.Ambarus@microchip.com>
To: <p.yadav@ti.com>, <michael@walle.cc>
Cc: <miquel.raynal@bootlin.com>, <richard@nod.at>, <vigneshr@ti.com>,
	<linux-mtd@lists.infradead.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 4/5] mtd: spi-nor Favor the BFPT-parsed Quad Enable method
Date: Wed, 9 Mar 2022 14:22:21 +0000	[thread overview]
Message-ID: <7fcecd56-494d-a0d2-2cca-989d13cebae6@microchip.com> (raw)
In-Reply-To: <20220309141702.173879-5-tudor.ambarus@microchip.com>

On 3/9/22 16:17, Tudor Ambarus wrote:
> JESD216 SFDP defines in the BFPT standard methods to enable Quad Mode. The
> flash parameters and settings that are retrieved from SFDP have higher
> precedence than the static initialized ones, because they should be more
> accurate and less error prone than those initialized statically. Favor the
> BFPT-parsed Quad Enable method and use the generic core methods where
> possible.
> This patch may introduce regressions in case BFPT contains wrong data. The
> fix is to introduce a post_bfpt() fixup hook and update the wrong BFPT
> data.
> 
> Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
> ---
>  drivers/mtd/spi-nor/core.c     |  5 +++--
>  drivers/mtd/spi-nor/issi.c     |  4 ++--
>  drivers/mtd/spi-nor/macronix.c | 14 ++++++--------
>  3 files changed, 11 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
> index 5de46a786cc5..9a5299a7b212 100644
> --- a/drivers/mtd/spi-nor/core.c
> +++ b/drivers/mtd/spi-nor/core.c
> @@ -2427,9 +2427,11 @@ static void spi_nor_late_init_params(struct spi_nor *nor)
>  	if (nor->info->fixups && nor->info->fixups->late_init)
>  		nor->info->fixups->late_init(nor);
>  
> -	/* Default method kept for backward compatibility. */
> +	/* Default methods kept for backward compatibility. */
>  	if (!params->set_4byte_addr_mode)
>  		params->set_4byte_addr_mode = spi_nor_set_4byte_addr_mode_brwr;
> +	if (!params->quad_enable)
> +		params->quad_enable = spi_nor_sr2_bit1_quad_enable;
>  

oops, this will break micron-st since they explicitly clear the quad_enable
method. Let me respin this patch.

  reply	other threads:[~2022-03-09 14:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-09 14:16 [PATCH 0/5] mtd: spi-nor: Parse BFPT to determine the 4-Byte Address Mode Tudor Ambarus
2022-03-09 14:16 ` [PATCH 1/5] mtd: spi-nor: Parse BFPT to determine the 4-Byte Address Mode methods Tudor Ambarus
2022-03-09 14:16 ` [PATCH 2/5] mtd: spi-nor: Update name and description of the set_4byte_addr_mode BFPT methods Tudor Ambarus
2022-03-09 14:17 ` [PATCH 3/5] mtd: spi-nor: Favor the BFPT-parsed set_4byte_addr_mode method Tudor Ambarus
2022-03-09 14:17 ` [PATCH 4/5] mtd: spi-nor Favor the BFPT-parsed Quad Enable method Tudor Ambarus
2022-03-09 14:22   ` Tudor.Ambarus [this message]
2022-03-09 14:17 ` [PATCH 5/5] mtd: spi-nor: sfdp: Keep SFDP definitions private Tudor Ambarus

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=7fcecd56-494d-a0d2-2cca-989d13cebae6@microchip.com \
    --to=tudor.ambarus@microchip.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=michael@walle.cc \
    --cc=miquel.raynal@bootlin.com \
    --cc=p.yadav@ti.com \
    --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

all inboxes | Powered by JetHome®