]> git.proxmox.com Git - mirror_qemu.git/blobdiff - hw/nand.c
hw/nand.c: correct the sense of the BUSY/READY status bit
[mirror_qemu.git] / hw / nand.c
index 4a71265ed3c63b042594aca2b09a5c61e07f0be9..61e918fa834ef2e997399e9ee264c6d371454d4a 100644 (file)
--- a/hw/nand.c
+++ b/hw/nand.c
@@ -46,7 +46,7 @@
 # define NAND_IOSTATUS_PLANE1  (1 << 2)
 # define NAND_IOSTATUS_PLANE2  (1 << 3)
 # define NAND_IOSTATUS_PLANE3  (1 << 4)
-# define NAND_IOSTATUS_BUSY    (1 << 6)
+# define NAND_IOSTATUS_READY    (1 << 6)
 # define NAND_IOSTATUS_UNPROTCT        (1 << 7)
 
 # define MAX_PAGE              0x800
@@ -231,6 +231,7 @@ static void nand_reset(DeviceState *dev)
     s->iolen = 0;
     s->offset = 0;
     s->status &= NAND_IOSTATUS_UNPROTCT;
+    s->status |= NAND_IOSTATUS_READY;
 }
 
 static inline void nand_pushio_byte(NANDFlashState *s, uint8_t value)