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 1/3] mtd: spi-nor: extend no_sfdp_flags to use u16
Date: Mon, 18 Jul 2022 16:58:09 +0000 [thread overview]
Message-ID: <d3903d95-d76f-b9cd-b927-d175afab31a7@microchip.com> (raw)
In-Reply-To: <20220712163823.428126-2-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
>
> Currently no_sfdp_flags is u8 and all the bits have been used. Extend
> it to use u16 so that we can add more support.
>
> Signed-off-by: Sudip Mukherjee <sudip.mukherjee@sifive.com>
> ---
> drivers/mtd/spi-nor/core.c | 2 +-
> drivers/mtd/spi-nor/core.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
> index ce5d69317d46c..e5f7691c5bd40 100644
> --- a/drivers/mtd/spi-nor/core.c
> +++ b/drivers/mtd/spi-nor/core.c
> @@ -2335,7 +2335,7 @@ static void spi_nor_no_sfdp_init_params(struct spi_nor *nor)
> {
> struct spi_nor_flash_parameter *params = nor->params;
> struct spi_nor_erase_map *map = ¶ms->erase_map;
> - const u8 no_sfdp_flags = nor->info->no_sfdp_flags;
> + const u16 no_sfdp_flags = nor->info->no_sfdp_flags;
> u8 i, erase_mask;
>
> if (no_sfdp_flags & SPI_NOR_DUAL_READ) {
> diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h
> index 61886868cd022..58fbedc94080f 100644
> --- a/drivers/mtd/spi-nor/core.h
> +++ b/drivers/mtd/spi-nor/core.h
> @@ -501,7 +501,7 @@ struct flash_info {
> #define NO_CHIP_ERASE BIT(7)
> #define SPI_NOR_NO_FR BIT(8)
>
> - u8 no_sfdp_flags;
> + u16 no_sfdp_flags;
> #define SPI_NOR_SKIP_SFDP BIT(0)
> #define SECT_4K BIT(1)
> #define SPI_NOR_DUAL_READ BIT(3)
> --
> 2.30.2
>
you can extend this when introducing a new flag, if needed.
No need for a dedicated patch just for this.
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2022-07-18 16:58 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 [this message]
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
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=d3903d95-d76f-b9cd-b927-d175afab31a7@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;
as well as URLs for NNTP newsgroup(s).