linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Biju Das <biju.das.jz@bp.renesas.com>
To: Tudor Ambarus <tudor.ambarus@microchip.com>,
	Pratyush Yadav <p.yadav@ti.com>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Richard Weinberger <richard@nod.at>,
	Vignesh Raghavendra <vigneshr@ti.com>
Cc: Biju Das <biju.das.jz@bp.renesas.com>,
	Michael Walle <michael@walle.cc>,
	linux-mtd@lists.infradead.org,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Chris Paterson <Chris.Paterson2@renesas.com>,
	Biju Das <biju.das@bp.renesas.com>,
	Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	linux-renesas-soc@vger.kernel.org
Subject: [PATCH v2 1/2] mtd: spi-nor: Add support for SNOR_ID3 macro
Date: Fri, 15 Jul 2022 11:57:15 +0100	[thread overview]
Message-ID: <20220715105716.2415068-2-biju.das.jz@bp.renesas.com> (raw)
In-Reply-To: <20220715105716.2415068-1-biju.das.jz@bp.renesas.com>

Add SNOR_ID3 macro to get chip info by parsing sfdp.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v2:
 * New patch
---
 drivers/mtd/spi-nor/core.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h
index 61886868cd02..153c1a0b2eda 100644
--- a/drivers/mtd/spi-nor/core.h
+++ b/drivers/mtd/spi-nor/core.h
@@ -548,6 +548,15 @@ struct flash_info {
 		.n_sectors = (_n_sectors),				\
 		.page_size = 256,					\
 
+#define SNOR_ID3(_jedec_id)						\
+	.id = {								\
+		((_jedec_id) >> 16) & 0xff,				\
+		((_jedec_id) >> 8) & 0xff,				\
+		(_jedec_id) & 0xff,					\
+	},								\
+	.id_len = 3,							\
+	.parse_sfdp = true,						\
+
 #define CAT25_INFO(_sector_size, _n_sectors, _page_size, _addr_width)	\
 		.sector_size = (_sector_size),				\
 		.n_sectors = (_n_sectors),				\
-- 
2.25.1


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

  reply	other threads:[~2022-07-15 10:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-15 10:57 [PATCH v2 0/2] Add Renesas AT25QL128A serial nor flash Biju Das
2022-07-15 10:57 ` Biju Das [this message]
2022-07-15 11:57   ` [PATCH v2 1/2] mtd: spi-nor: Add support for SNOR_ID3 macro Michael Walle
2022-07-18  5:53     ` Biju Das
2022-07-15 10:57 ` [PATCH v2 2/2] mtd: spi-nor: Add Renesas AT25QL128A serial nor flash Biju Das
2022-07-15 11:55   ` Michael Walle
2022-07-19  8:53     ` Pratyush Yadav
2022-07-21  8:28   ` Tudor.Ambarus
2022-07-21  8:48     ` Biju Das
2022-07-21  9:23     ` Biju Das
2022-07-21  9:39       ` Tudor.Ambarus
2022-07-21  9:43         ` Michael Walle
2022-07-21  9:46         ` Biju Das
2022-07-21 10:00           ` Michael Walle

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=20220715105716.2415068-2-biju.das.jz@bp.renesas.com \
    --to=biju.das.jz@bp.renesas.com \
    --cc=Chris.Paterson2@renesas.com \
    --cc=biju.das@bp.renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=michael@walle.cc \
    --cc=miquel.raynal@bootlin.com \
    --cc=p.yadav@ti.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=richard@nod.at \
    --cc=tudor.ambarus@microchip.com \
    --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;
as well as URLs for NNTP newsgroup(s).