From: Zhiqiang Hou <B48286-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
To: <linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Cc: <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
<B21284-KZfg59tc24xl57MIdRCFDg@public.gmane.org>,
Hou Zhiqiang <B48286-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Subject: [PATCH 2/3] mtd: m25p80: Initialize the addr_width field of spi_message
Date: Sun, 10 May 2015 22:47:32 +0800 [thread overview]
Message-ID: <1431269253-22890-2-git-send-email-B48286@freescale.com> (raw)
In-Reply-To: <1431269253-22890-1-git-send-email-B48286-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
From: Hou Zhiqiang <B48286-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Add the addr_width information of spi_nor delivery to SPI controller.
For the Freescale eSPI controller, the address width is needed to do
the correct operations.
Signed-off-by: Hou Zhiqiang <B48286-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
---
drivers/mtd/devices/m25p80.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 7c8b169..0ae72a0 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -85,6 +85,7 @@ static void m25p80_write(struct spi_nor *nor, loff_t to, size_t len,
int cmd_sz = m25p_cmdsz(nor);
spi_message_init(&m);
+ m.addr_width = flash->spi_nor.addr_width;
if (nor->program_opcode == SPINOR_OP_AAI_WP && nor->sst_write_second)
cmd_sz = 1;
@@ -134,6 +135,7 @@ static int m25p80_read(struct spi_nor *nor, loff_t from, size_t len,
dummy /= 8;
spi_message_init(&m);
+ m.addr_width = flash->spi_nor.addr_width;
memset(t, 0, (sizeof t));
flash->command[0] = nor->read_opcode;
--
2.1.0.27.g96db324
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-05-10 14:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-10 14:47 [PATCH 1/3] spi: Add addr_width field to struct spi_message Zhiqiang Hou
[not found] ` <1431269253-22890-1-git-send-email-B48286-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2015-05-10 14:47 ` Zhiqiang Hou [this message]
2015-05-10 14:47 ` [PATCH 3/3] spi/fsl-espi: Add the 4Byte address width device support Zhiqiang Hou
[not found] ` <1431269253-22890-3-git-send-email-B48286-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2015-05-11 7:45 ` Geert Uytterhoeven
2015-05-11 7:43 ` [PATCH 1/3] spi: Add addr_width field to struct spi_message Geert Uytterhoeven
[not found] ` <CAMuHMdUakeDgLZ4hXe0DBu97Xx4eiC9K_Qfc-imkDBrDBXNs6A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-11 16:17 ` Mark Brown
2015-05-12 8:06 ` Hou Zhiqiang
[not found] ` <CY1PR0301MB0780A4057DBB4DEBC45A631F8BDA0-YrwGdl+PljnwWZenWrSUgZwN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2015-05-12 8:11 ` Geert Uytterhoeven
[not found] ` <CAMuHMdUzkr6_evPD5y-gaH=rtEgyZ+bHAddD+UmpTssQXZry1g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-12 8:27 ` Hou Zhiqiang
[not found] ` <CY1PR0301MB078056CF0855A97334FD96458BDA0-YrwGdl+PljnwWZenWrSUgZwN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2015-05-12 8:57 ` Geert Uytterhoeven
[not found] ` <CAMuHMdXFY_W6Rd37rNeNUnztZ=8xUcZBS3=eLQwK52N6byGgBg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-12 10:23 ` Mark Brown
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=1431269253-22890-2-git-send-email-B48286@freescale.com \
--to=b48286-kzfg59tc24xl57midrcfdg@public.gmane.org \
--cc=B21284-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/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).