]> git.proxmox.com Git - mirror_qemu.git/blobdiff - hw/nand.c
Fix typos and misspellings
[mirror_qemu.git] / hw / nand.c
index 6054f4658109686a61832f71112ed0b03efabb36..de3e502596f080de222bc055d6a042a3bea1cdeb 100644 (file)
--- a/hw/nand.c
+++ b/hw/nand.c
 
 #ifndef NAND_IO
 
-# include "hw.h"
-# include "flash.h"
+# include "hw/hw.h"
+# include "hw/flash.h"
 # include "sysemu/blockdev.h"
-# include "sysbus.h"
+# include "hw/sysbus.h"
 #include "qemu/error-report.h"
 
 # define NAND_CMD_READ0                0x00
@@ -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
@@ -224,13 +224,14 @@ static const struct {
 
 static void nand_reset(DeviceState *dev)
 {
-    NANDFlashState *s = FROM_SYSBUS(NANDFlashState, sysbus_from_qdev(dev));
+    NANDFlashState *s = FROM_SYSBUS(NANDFlashState, SYS_BUS_DEVICE(dev));
     s->cmd = NAND_CMD_READ0;
     s->addr = 0;
     s->addrlen = 0;
     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)