From: Huang Shijie <shijie.huang@intel.com>
To: computersforpeace@gmail.com
Cc: marex@denx.de, linux-mtd@lists.infradead.org,
dwmw2@infradead.org, Huang Shijie <shijie.huang@intel.com>
Subject: [PATCH 3/3] mtd: spi-nor: add support for s25fl128s
Date: Tue, 12 Aug 2014 08:54:56 +0800 [thread overview]
Message-ID: <1407804896-1808-3-git-send-email-shijie.huang@intel.com> (raw)
In-Reply-To: <1407804896-1808-1-git-send-email-shijie.huang@intel.com>
We need to store the six bytes ID for s25fl128s, since it shares the same
five bytes with s25fl129p1.
This patch adds a macro INFO6 which is used for the six bytes ID flash, and adds
a new item for the s25fl128s.
Signed-off-by: Huang Shijie <shijie.huang@intel.com>
---
drivers/mtd/spi-nor/spi-nor.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
index a0923b0..c130bf7 100644
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -471,6 +471,23 @@ err:
.flags = (_flags), \
})
+#define INFO6(_jedec_id, _ext_id, _sector_size, _n_sectors, _flags) \
+ ((kernel_ulong_t)&(struct flash_info) { \
+ .id = { \
+ ((_jedec_id) >> 16) & 0xff, \
+ ((_jedec_id) >> 8) & 0xff, \
+ (_jedec_id) & 0xff, \
+ ((_ext_id) >> 16) & 0xff, \
+ ((_ext_id) >> 8) & 0xff, \
+ (_ext_id) & 0xff, \
+ }, \
+ .id_len = 6, \
+ .sector_size = (_sector_size), \
+ .n_sectors = (_n_sectors), \
+ .page_size = 256, \
+ .flags = (_flags), \
+ })
+
#define CAT25_INFO(_sector_size, _n_sectors, _page_size, _addr_width, _flags) \
((kernel_ulong_t)&(struct flash_info) { \
.sector_size = (_sector_size), \
@@ -565,6 +582,7 @@ const struct spi_device_id spi_nor_ids[] = {
{ "s70fl01gs", INFO(0x010221, 0x4d00, 256 * 1024, 256, 0) },
{ "s25sl12800", INFO(0x012018, 0x0300, 256 * 1024, 64, 0) },
{ "s25sl12801", INFO(0x012018, 0x0301, 64 * 1024, 256, 0) },
+ { "s25fl128s", INFO6(0x012018, 0x4d0180, 64 * 1024, 256, SPI_NOR_QUAD_READ) },
{ "s25fl129p0", INFO(0x012018, 0x4d00, 256 * 1024, 64, 0) },
{ "s25fl129p1", INFO(0x012018, 0x4d01, 64 * 1024, 256, 0) },
{ "s25sl004a", INFO(0x010212, 0, 64 * 1024, 8, 0) },
--
1.7.7.6
next prev parent reply other threads:[~2014-08-12 0:55 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-12 0:54 [PATCH 1/3] mtd: spi-nor: add id/id_len for flash_info{} Huang Shijie
2014-08-12 0:54 ` [PATCH 2/3] mtd: spi-nor: remove the jedec_id/ext_id Huang Shijie
2014-11-05 11:16 ` Brian Norris
2014-11-05 21:35 ` Rafał Miłecki
2014-11-06 1:09 ` Huang Shijie
2014-11-06 6:21 ` Rafał Miłecki
2014-11-06 6:33 ` Huang Shijie
2014-11-06 0:44 ` Huang Shijie
2014-11-06 3:24 ` [PATCH] " Huang Shijie
2014-12-01 8:13 ` Brian Norris
2014-08-12 0:54 ` Huang Shijie [this message]
2014-10-17 18:42 ` [PATCH 3/3] mtd: spi-nor: add support for s25fl128s Fabio Estevam
2014-11-04 19:39 ` Fabio Estevam
2014-11-04 19:52 ` Brian Norris
2014-12-01 8:16 ` Brian Norris
2014-11-06 6:34 ` [PATCH V2 1/3] mtd: spi-nor: add id/id_len for flash_info{} Rafał Miłecki
2014-11-06 6:44 ` Huang Shijie
2014-12-01 8:11 ` Brian Norris
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=1407804896-1808-3-git-send-email-shijie.huang@intel.com \
--to=shijie.huang@intel.com \
--cc=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marex@denx.de \
/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).