aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Krzeminski <marcin.krzeminski@nokia.com>2016-06-27 15:37:34 +0100
committerPeter Maydell <peter.maydell@linaro.org>2016-06-27 15:37:34 +0100
commit3830c7a460b8252dc975f8115fdaed8c562d2d75 (patch)
tree1d00454103726adb3afd3404545f26fcfb39894d
parentdadb2f9078f6ec23140acebd8dbcbc7f0e9289b9 (diff)
downloadqemu-arm-pull-target-arm-20160627.tar.gz
m25p80: Fix WINBOND fast read command handlingpull-target-arm-20160627
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> Message-id: 1466755631-25201-11-git-send-email-marcin.krzeminski@nokia.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--hw/block/m25p80.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c
index fd86d4c845..326b688e83 100644
--- a/hw/block/m25p80.c
+++ b/hw/block/m25p80.c
@@ -738,6 +738,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;
@@ -768,7 +771,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 += SPANSION_CONTINUOUS_READ_MODE_CMD_LEN;
@@ -807,7 +810,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 += SPANSION_CONTINUOUS_READ_MODE_CMD_LEN;