From: <marcin.krzeminski@nokia.com>
To: qemu-devel@nongnu.org
Cc: crosthwaitepeter@gmail.com, pawel.lenkow@itlen.com,
rfsw-patches@mlist.emea.nsn-intra.net, peter.maydell@linaro.org,
clg@fr.ibm.com, clg@kaod.org
Subject: [Qemu-devel] [PATCH v2 10/10] m25p80.c: Fix WINBOND fast read command handling
Date: Fri, 17 Jun 2016 12:28:34 +0200 [thread overview]
Message-ID: <1466159314-28597-11-git-send-email-marcin.krzeminski@nokia.com> (raw)
In-Reply-To: <1466159314-28597-1-git-send-email-marcin.krzeminski@nokia.com>
From: Marcin Krzeminski <marcin.krzeminski@nokia.com>
This commit fix obvious bug in WINBOND command handling.
Datasheet states that default dummy cycles is 8 so fix it.
Signed-off-by: Marcin Krzeminski <marcin.krzeminski@nokia.com>
---
hw/block/m25p80.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c
index 3798152..5456c1d 100644
--- a/hw/block/m25p80.c
+++ b/hw/block/m25p80.c
@@ -731,6 +731,9 @@ static void decode_fast_read_cmd(Flash *s)
s->needed_bytes = get_addr_length(s);
switch (get_man(s)) {
/* Dummy cycles - modeled with bytes writes instead of bits */
+ case MAN_WINBOND:
+ s->needed_bytes += 8;
+ break;
case MAN_NUMONYX:
s->needed_bytes += extract32(s->volatile_cfg, 4, 4);
break;
@@ -761,7 +764,7 @@ static void decode_dio_read_cmd(Flash *s)
/* Dummy cycles modeled with bytes writes instead of bits */
switch (get_man(s)) {
case MAN_WINBOND:
- s->needed_bytes = 4;
+ s->needed_bytes += 8;
break;
case MAN_SPANSION:
s->needed_bytes += extract32(s->spansion_cr2v,
@@ -799,7 +802,7 @@ static void decode_qio_read_cmd(Flash *s)
/* Dummy cycles modeled with bytes writes instead of bits */
switch (get_man(s)) {
case MAN_WINBOND:
- s->needed_bytes = 6;
+ s->needed_bytes += 8;
break;
case MAN_SPANSION:
s->needed_bytes += extract32(s->spansion_cr2v,
--
2.7.4
prev parent reply other threads:[~2016-06-17 10:32 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-17 10:28 [Qemu-devel] [PATCH v2 00/10] m25p80: Add new 512Mbit and 1Gbit devices marcin.krzeminski
2016-06-17 10:28 ` [Qemu-devel] [PATCH v2 01/10] m25p80: Replace JEDEC ID masking with function marcin.krzeminski
2016-06-17 12:19 ` Cédric Le Goater
2016-06-17 10:28 ` [Qemu-devel] [PATCH v2 02/10] m25p80: Make a table for JEDEC ID marcin.krzeminski
2016-06-17 10:28 ` [Qemu-devel] [PATCH v2 03/10] m25p80: Allow more than four banks marcin.krzeminski
2016-06-17 10:28 ` [Qemu-devel] [PATCH v2 04/10] m25p80: Introduce COLLECTING_VAR_LEN_DATA state marcin.krzeminski
2016-06-17 10:28 ` [Qemu-devel] [PATCH v2 05/10] m25p80: Add additional flash commands: marcin.krzeminski
2016-06-17 10:28 ` [Qemu-devel] [PATCH v2 06/10] m25p80: Introduce quad and equad modes marcin.krzeminski
2016-06-17 12:33 ` Cédric Le Goater
2016-06-17 10:28 ` [Qemu-devel] [PATCH v2 07/10] m25p80: Introduce configuration registers marcin.krzeminski
2016-06-17 10:28 ` [Qemu-devel] [PATCH v2 08/10] m25p80: Fast read commands family changes marcin.krzeminski
2016-06-17 12:30 ` Cédric Le Goater
2016-06-24 7:53 ` Krzeminski, Marcin (Nokia - PL/Wroclaw)
2016-06-17 10:28 ` [Qemu-devel] [PATCH v2 09/10] m25p80: New flash devices marcin.krzeminski
2016-06-17 10:28 ` marcin.krzeminski [this message]
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=1466159314-28597-11-git-send-email-marcin.krzeminski@nokia.com \
--to=marcin.krzeminski@nokia.com \
--cc=clg@fr.ibm.com \
--cc=clg@kaod.org \
--cc=crosthwaitepeter@gmail.com \
--cc=pawel.lenkow@itlen.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rfsw-patches@mlist.emea.nsn-intra.net \
/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).