[Qemu-devel] [PATCH] m25p80: Fix WINBOND fast read command dummy bytes

Aleksey Kuleshov posted 1 patch 8 years, 5 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/4392061496853374@web26g.yandex.ru
Test FreeBSD passed
Test checkpatch passed
Test docker passed
Test s390x passed
hw/block/m25p80.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[Qemu-devel] [PATCH] m25p80: Fix WINBOND fast read command dummy bytes
Posted by Aleksey Kuleshov 8 years, 5 months ago
The original commit (3830c7a460b8252dc975f8115fdaed8c562d2d75)
stated "Datasheet states that default dummy cycles is 8 so fix it."

But since dummy cycles are handled in bytes it must be 1, not 8.

Signed-off-by: Aleksey Kuleshov <rndfax@yandex.ru>
---
 hw/block/m25p80.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c
index 190573cefa..bf36159636 100644
--- a/hw/block/m25p80.c
+++ b/hw/block/m25p80.c
@@ -793,7 +793,7 @@ static void decode_fast_read_cmd(Flash *s)
     switch (get_man(s)) {
     /* Dummy cycles - modeled with bytes writes instead of bits */
     case MAN_WINBOND:
-        s->needed_bytes += 8;
+        s->needed_bytes += 1;
         break;
     case MAN_NUMONYX:
         s->needed_bytes += extract32(s->volatile_cfg, 4, 4);
-- 
2.11.0