public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: <Tudor.Ambarus@microchip.com>
To: <sudip.mukherjee@sifive.com>, <p.yadav@ti.com>,
	<michael@walle.cc>, <miquel.raynal@bootlin.com>, <richard@nod.at>,
	<vigneshr@ti.com>
Cc: <greentime.hu@sifive.com>, <jude.onyenegecha@sifive.com>,
	<william.salmon@sifive.com>, <adnan.chowdhury@sifive.com>,
	<ben.dooks@sifive.com>, <linux-mtd@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/3] mtd: spi-nor: add support for Quad Page Program to no_sfdp_flags
Date: Mon, 18 Jul 2022 17:02:17 +0000	[thread overview]
Message-ID: <3a9877d0-3cc5-6452-764b-d07b38c72b00@microchip.com> (raw)
In-Reply-To: <20220712163823.428126-3-sudip.mukherjee@sifive.com>

On 7/12/22 19:38, Sudip Mukherjee wrote:
> [You don't often get email from sudip.mukherjee@sifive.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
> 
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> Some flash chips which does not have a SFDP table can support Quad
> Input Page Program. Enable it in hwcaps if defined.
> 
> Signed-off-by: Sudip Mukherjee <sudip.mukherjee@sifive.com>
> ---
>  drivers/mtd/spi-nor/core.c | 5 +++++
>  drivers/mtd/spi-nor/core.h | 2 ++
>  2 files changed, 7 insertions(+)
> 
> diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
> index e5f7691c5bd40..e299fc8fdd3d4 100644
> --- a/drivers/mtd/spi-nor/core.c
> +++ b/drivers/mtd/spi-nor/core.c
> @@ -2375,6 +2375,11 @@ static void spi_nor_no_sfdp_init_params(struct spi_nor *nor)
>                 spi_nor_set_pp_settings(&params->page_programs[SNOR_CMD_PP_8_8_8_DTR],
>                                         SPINOR_OP_PP, SNOR_PROTO_8_8_8_DTR);
>         }
> +       if (no_sfdp_flags & SPI_NOR_QUAD_PP) {
> +               params->hwcaps.mask |= SNOR_HWCAPS_PP_1_1_4;
> +               spi_nor_set_pp_settings(&params->page_programs[SNOR_CMD_PP_1_1_4],
> +                                       SPINOR_OP_PP_1_1_4, SNOR_PROTO_1_1_4);
> +       }
> 
>         /*
>          * Sector Erase settings. Sort Erase Types in ascending order, with the
> diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h
> index 58fbedc94080f..dde636bdb1a7c 100644
> --- a/drivers/mtd/spi-nor/core.h
> +++ b/drivers/mtd/spi-nor/core.h
> @@ -462,6 +462,7 @@ struct spi_nor_fixups {
>   *   SPI_NOR_OCTAL_READ:      flash supports Octal Read.
>   *   SPI_NOR_OCTAL_DTR_READ:  flash supports octal DTR Read.
>   *   SPI_NOR_OCTAL_DTR_PP:    flash supports Octal DTR Page Program.
> + *   SPI_NOR_QUAD_PP:         flash supports Quad Input Page Program.

You don't need this flag if your flash supports the 4-byte Address
Instruction Table. Does you flash support it? Can you dump all the
SFDP tables, please?

Thanks,
ta
>   *
>   * @fixup_flags:    flags that indicate support that can be discovered via SFDP
>   *                  ideally, but can not be discovered for this particular flash
> @@ -509,6 +510,7 @@ struct flash_info {
>  #define SPI_NOR_OCTAL_READ             BIT(5)
>  #define SPI_NOR_OCTAL_DTR_READ         BIT(6)
>  #define SPI_NOR_OCTAL_DTR_PP           BIT(7)
> +#define SPI_NOR_QUAD_PP                        BIT(8)
> 
>         u8 fixup_flags;
>  #define SPI_NOR_4B_OPCODES             BIT(0)
> --
> 2.30.2
> 

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

  reply	other threads:[~2022-07-18 17:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-12 16:38 [PATCH 0/3] Add Quad Input Page Program to chips with no SFDP table Sudip Mukherjee
2022-07-12 16:38 ` [PATCH 1/3] mtd: spi-nor: extend no_sfdp_flags to use u16 Sudip Mukherjee
2022-07-18 16:58   ` Tudor.Ambarus
2022-07-12 16:38 ` [PATCH 2/3] mtd: spi-nor: add support for Quad Page Program to no_sfdp_flags Sudip Mukherjee
2022-07-18 17:02   ` Tudor.Ambarus [this message]
2022-07-18 18:49     ` Sudip Mukherjee
2022-07-22 10:24       ` Sudip Mukherjee
2022-07-29  7:48         ` Tudor.Ambarus
2022-07-29  8:10           ` Ben Dooks
2022-07-29 10:07             ` Tudor.Ambarus
2022-07-29  7:35       ` Tudor.Ambarus
2022-07-12 16:38 ` [PATCH 3/3] mtd: spi-nor: issi: is25wp256: Enable Quad Input Page Program Sudip Mukherjee
2022-07-18  7:39   ` Michael Walle
2022-07-18 14:56     ` Sudip Mukherjee

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=3a9877d0-3cc5-6452-764b-d07b38c72b00@microchip.com \
    --to=tudor.ambarus@microchip.com \
    --cc=adnan.chowdhury@sifive.com \
    --cc=ben.dooks@sifive.com \
    --cc=greentime.hu@sifive.com \
    --cc=jude.onyenegecha@sifive.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=sudip.mukherjee@sifive.com \
    --cc=vigneshr@ti.com \
    --cc=william.salmon@sifive.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