[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 09/15] hw/nand: Support multiple reads following REA
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PATCH 09/15] hw/nand: Support multiple reads following READ STATUS |
Date: |
Fri, 29 Jul 2011 16:35:22 +0100 |
From: Juha Riihimäki <address@hidden>
After receiving READ STATUS command all subsequent IO reads should return
the status register value until another command is issued.
Signed-off-by: Juha Riihimäki <address@hidden>
[Riku Voipio: Fixes and restructuring patchset]
Signed-off-by: Riku Voipio <address@hidden>
[Peter Maydell: More fixes and cleanups for upstream submission]
Signed-off-by: Peter Maydell <address@hidden>
---
hw/nand.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/hw/nand.c b/hw/nand.c
index 2e98f25..e6c551d 100644
--- a/hw/nand.c
+++ b/hw/nand.c
@@ -496,9 +496,14 @@ uint32_t nand_getio(NANDFlashState *s)
for (offset = s->buswidth; offset--;) {
x |= s->ioaddr[offset] << (offset << 3);
}
- s->addr += s->buswidth;
- s->ioaddr += s->buswidth;
- s->iolen -= s->buswidth;
+ /* after receiving READ STATUS command all subsequent reads will
+ * return the status register value until another command is issued
+ */
+ if (s->cmd != NAND_CMD_READSTATUS) {
+ s->addr += s->buswidth;
+ s->ioaddr += s->buswidth;
+ s->iolen -= s->buswidth;
+ }
return x;
}
--
1.7.1
- [Qemu-devel] [PATCH 06/15] hw/nand: Pass block device state to init function, (continued)
- [Qemu-devel] [PATCH 06/15] hw/nand: Pass block device state to init function, Peter Maydell, 2011/07/29
- [Qemu-devel] [PATCH 14/15] onenand: Ignore zero writes to boot command space, Peter Maydell, 2011/07/29
- [Qemu-devel] [PATCH 01/15] hw/omap_l4.c: Add helper function omap_l4_region_base, Peter Maydell, 2011/07/29
- [Qemu-devel] [PATCH 08/15] hw/nand: Support devices wider than 8 bits, Peter Maydell, 2011/07/29
- [Qemu-devel] [PATCH 02/15] hw/omap_gpio.c: Don't complain about some writes to r/o registers, Peter Maydell, 2011/07/29
- [Qemu-devel] [PATCH 11/15] hw/nand: qdevify, Peter Maydell, 2011/07/29
- [Qemu-devel] [PATCH 15/15] hw/onenand: program actions can only clear bits, Peter Maydell, 2011/07/29
- [Qemu-devel] [PATCH 09/15] hw/nand: Support multiple reads following READ STATUS,
Peter Maydell <=
- [Qemu-devel] [PATCH 13/15] onenand: Handle various ID fields separately, Peter Maydell, 2011/07/29
- [Qemu-devel] [PATCH 04/15] hw/omap_gpio.c: Convert to qdev, Peter Maydell, 2011/07/29
- [Qemu-devel] [PATCH 07/15] hw/nand: Support large NAND devices, Peter Maydell, 2011/07/29
- [Qemu-devel] [PATCH 05/15] lm832x: Take DeviceState pointer in lm832x_key_event(), Peter Maydell, 2011/07/29
- [Qemu-devel] [PATCH 12/15] onenand: Pass BlockDriverState to init function, Peter Maydell, 2011/07/29
- [Qemu-devel] [PATCH 03/15] hw/omap_clk: Add the clock for the OMAP2430-specific fifth GPIO module, Peter Maydell, 2011/07/29