[PATCH v2 1/2] mtd: spi-nor: Add support for SNOR_ID3 macro
Biju Das
biju.das.jz at bp.renesas.com
Fri Jul 15 03:57:15 PDT 2022
Add SNOR_ID3 macro to get chip info by parsing sfdp.
Signed-off-by: Biju Das <biju.das.jz at 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
More information about the linux-mtd
mailing list