From: <marcin.krzeminski@nokia.com>
To: qemu-devel@nongnu.org
Cc: crosthwaitepeter@gmail.com, rfsw-patches@mlist.nokia.com,
peter.maydell@linaro.org, clg@fr.ibm.com, clg@kaod.org
Subject: [Qemu-devel] [PATCH] m25p80: Fix QIOR/DIOR handling for Winbond
Date: Wed, 6 Jul 2016 14:43:56 +0200 [thread overview]
Message-ID: <1467809036-6986-1-git-send-email-marcin.krzeminski@nokia.com> (raw)
From: Marcin Krzeminski <marcin.krzeminski@nokia.com>
Winbond also support continuous read mode, but as an opposite for other
flash type read mode clock cycles are included to dummy cycles number.
This path add proper handling of read mode byte and update needed
dummy cycles. QPI mode and dummy cycles configuration are not supported.
Signed-off-by: Marcin Krzeminski <marcin.krzeminski@nokia.com>
---
hw/block/m25p80.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c
index d9b2793..a349544 100644
--- a/hw/block/m25p80.c
+++ b/hw/block/m25p80.c
@@ -149,6 +149,7 @@ typedef struct FlashPartInfo {
*/
#define SPANSION_CONTINUOUS_READ_MODE_CMD_LEN 1
+#define WINBOND_CONTINUOUS_READ_MODE_CMD_LEN 1
static const FlashPartInfo known_devices[] = {
/* Atmel -- some are (confusingly) marketed as "DataFlash" */
@@ -775,7 +776,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 += 8;
+ s->needed_bytes += WINBOND_CONTINUOUS_READ_MODE_CMD_LEN;
break;
case MAN_SPANSION:
s->needed_bytes += SPANSION_CONTINUOUS_READ_MODE_CMD_LEN;
@@ -814,7 +815,8 @@ 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 += 8;
+ s->needed_bytes += WINBOND_CONTINUOUS_READ_MODE_CMD_LEN;
+ s->needed_bytes += 4;
break;
case MAN_SPANSION:
s->needed_bytes += SPANSION_CONTINUOUS_READ_MODE_CMD_LEN;
--
2.7.4
next reply other threads:[~2016-07-07 2:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-06 12:43 marcin.krzeminski [this message]
2016-07-07 12:57 ` [Qemu-devel] [PATCH] m25p80: Fix QIOR/DIOR handling for Winbond Cédric Le Goater
2016-07-07 13:04 ` Krzeminski, Marcin (Nokia - PL/Wroclaw)
2016-07-11 18:05 ` Peter Maydell
2016-07-12 8:24 ` Cédric Le Goater
2016-07-12 14:16 ` Peter Maydell
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=1467809036-6986-1-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=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rfsw-patches@mlist.nokia.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).