]> git.proxmox.com Git - qemu.git/blobdiff - hw/tc58128.c
VMDK: open/read/write for monolithicFlat image
[qemu.git] / hw / tc58128.c
index 92adca46b08ce8bc5f1a31dd65e5243c887fb9df..61b99dd4daa9516e080219041b13725e1e7c5f35 100644 (file)
@@ -1,6 +1,5 @@
 #include "hw.h"
 #include "sh.h"
-#include "sysemu.h"
 #include "loader.h"
 
 #define CE1  0x0100
 #define RDY2 0x8000
 #define RDY(n) ((n) == 0 ? RDY1 : RDY2)
 
-typedef enum { WAIT, READ1, READ2, READ3 } e_state;
+typedef enum { WAIT, READ1, READ2, READ3 } state_t;
 
 typedef struct {
     uint8_t *flash_contents;
-    e_state state;
+    state_t state;
     uint32_t address;
     uint8_t address_cycle;
 } tc58128_dev;
@@ -82,7 +81,7 @@ static void handle_command(tc58128_dev * dev, uint8_t command)
        break;
     default:
        fprintf(stderr, "unknown flash command 0x%02x\n", command);
-       assert(0);
+        abort();
     }
 }
 
@@ -110,12 +109,12 @@ static void handle_address(tc58128_dev * dev, uint8_t data)
            break;
        default:
            /* Invalid data */
-           assert(0);
+            abort();
        }
        dev->address_cycle++;
        break;
     default:
-       assert(0);
+        abort();
     }
 }
 
@@ -164,7 +163,7 @@ static int tc58128_cb(uint16_t porta, uint16_t portb,
        *periph_pdtra &= 0xff00;
        *periph_pdtra |= handle_read(&tc58128_devs[dev]);
     } else {
-       assert(0);
+        abort();
     }
     return 1;
 }