]> git.proxmox.com Git - mirror_qemu.git/blobdiff - hw/mips_r4k.c
qdev/isa: convert ne2000
[mirror_qemu.git] / hw / mips_r4k.c
index 476612cea5b9f82664d0ec42b2d8fb5433b4c890..aacb256dcc2d5b92a3670f2fc7662d75dba9a433 100644 (file)
@@ -17,6 +17,7 @@
 #include "flash.h"
 #include "qemu-log.h"
 #include "mips-bios.h"
+#include "ide.h"
 
 #define PHYS_TO_VIRT(x) ((x) | ~(target_ulong)0x7fffffff)
 
@@ -56,13 +57,13 @@ static uint32_t mips_qemu_readl (void *opaque, target_phys_addr_t addr)
     return 0;
 }
 
-static CPUWriteMemoryFunc *mips_qemu_write[] = {
+static CPUWriteMemoryFunc * const mips_qemu_write[] = {
     &mips_qemu_writel,
     &mips_qemu_writel,
     &mips_qemu_writel,
 };
 
-static CPUReadMemoryFunc *mips_qemu_read[] = {
+static CPUReadMemoryFunc * const mips_qemu_read[] = {
     &mips_qemu_readl,
     &mips_qemu_readl,
     &mips_qemu_readl,
@@ -155,7 +156,7 @@ void mips_r4k_init (ram_addr_t ram_size,
     RTCState *rtc_state;
     int i;
     qemu_irq *i8259;
-    BlockDriverState *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
+    DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
     DriveInfo *dinfo;
 
     /* init CPUs */
@@ -259,7 +260,7 @@ void mips_r4k_init (ram_addr_t ram_size,
     isa_vga_init();
 
     if (nd_table[0].vlan)
-        isa_ne2000_init(0x300, i8259[9], &nd_table[0]);
+        isa_ne2000_init(0x300, 9, &nd_table[0]);
 
     if (drive_get_max_bus(IF_IDE) >= MAX_IDE_BUS) {
         fprintf(stderr, "qemu: too many IDE bus\n");
@@ -267,8 +268,7 @@ void mips_r4k_init (ram_addr_t ram_size,
     }
 
     for(i = 0; i < MAX_IDE_BUS * MAX_IDE_DEVS; i++) {
-        dinfo = drive_get(IF_IDE, i / MAX_IDE_DEVS, i % MAX_IDE_DEVS);
-        hd[i] = dinfo ? dinfo->bdrv : NULL;
+        hd[i] = drive_get(IF_IDE, i / MAX_IDE_DEVS, i % MAX_IDE_DEVS);
     }
 
     for(i = 0; i < MAX_IDE_BUS; i++)