[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 07/11] m25p80: Fix QIOR/DIOR handling for Winbond
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PULL 07/11] m25p80: Fix QIOR/DIOR handling for Winbond |
Date: |
Thu, 14 Jul 2016 17:29:39 +0100 |
From: Marcin Krzeminski <address@hidden>
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 <address@hidden>
Reviewed-by: Cédric Le Goater <address@hidden>
Message-id: address@hidden
Signed-off-by: Peter Maydell <address@hidden>
---
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 ca8c12c..9828ee6 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" */
@@ -777,7 +778,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;
@@ -816,7 +817,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;
--
1.9.1
- [Qemu-devel] [PULL 00/11] target-arm queue, Peter Maydell, 2016/07/14
- [Qemu-devel] [PULL 10/11] ast2400: pretend DMAs are done for U-boot, Peter Maydell, 2016/07/14
- [Qemu-devel] [PULL 11/11] ast2400: externalize revision numbers, Peter Maydell, 2016/07/14
- [Qemu-devel] [PULL 09/11] ast2400: replace aspeed_smc_is_implemented(), Peter Maydell, 2016/07/14
- [Qemu-devel] [PULL 08/11] hw/misc: fix typo in Aspeed SCU hw-strap2 property name, Peter Maydell, 2016/07/14
- [Qemu-devel] [PULL 04/11] gic: provide defines for v2/v3 targetlist sizes, Peter Maydell, 2016/07/14
- [Qemu-devel] [PULL 07/11] m25p80: Fix QIOR/DIOR handling for Winbond,
Peter Maydell <=
- [Qemu-devel] [PULL 05/11] hw/arm/virt: tcg: adjust MPIDR like KVM, Peter Maydell, 2016/07/14
- [Qemu-devel] [PULL 06/11] target-arm: Add missed AArch32 TLBI sytem registers, Peter Maydell, 2016/07/14
- [Qemu-devel] [PULL 03/11] target-arm: Use Neon for zero checking, Peter Maydell, 2016/07/14
- [Qemu-devel] [PULL 02/11] Revert "hw/ptimer: Perform counter wrap around if timer already expired", Peter Maydell, 2016/07/14
- [Qemu-devel] [PULL 01/11] virtio-mmio: format transport base address in BusClass.get_dev_path, Peter Maydell, 2016/07/14
- Re: [Qemu-devel] [PULL 00/11] target-arm queue, Peter Maydell, 2016/07/14