aboutsummaryrefslogtreecommitdiff
path: root/hw/sun4m.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2009-09-22 13:53:18 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-10-05 09:32:49 -0500
commitfd8014e132f7ce794cc7c913b583c7b2d0f747af (patch)
tree0b8f1e7dd34ddae1dd699c04e85ace7ded1b11a0 /hw/sun4m.c
parentef80b466230021da9fe490175cd542a58dcabe94 (diff)
floppy: add drive properties.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/sun4m.c')
-rw-r--r--hw/sun4m.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/hw/sun4m.c b/hw/sun4m.c
index a869d15a81..01c7cb4a78 100644
--- a/hw/sun4m.c
+++ b/hw/sun4m.c
@@ -758,9 +758,8 @@ static void sun4m_hw_init(const struct sun4m_hwdef *hwdef, ram_addr_t RAM_size,
qemu_irq fdc_tc;
qemu_irq *cpu_halt;
unsigned long kernel_size;
- BlockDriverState *fd[MAX_FD];
+ DriveInfo *fd[MAX_FD];
void *fw_cfg;
- DriveInfo *dinfo;
/* init CPUs */
if (!cpu_model)
@@ -834,10 +833,7 @@ static void sun4m_hw_init(const struct sun4m_hwdef *hwdef, ram_addr_t RAM_size,
if (hwdef->fd_base) {
/* there is zero or one floppy drive */
memset(fd, 0, sizeof(fd));
- dinfo = drive_get(IF_FLOPPY, 0, 0);
- if (dinfo)
- fd[0] = dinfo->bdrv;
-
+ fd[0] = drive_get(IF_FLOPPY, 0, 0);
sun4m_fdctrl_init(slavio_irq[22], hwdef->fd_base, fd,
&fdc_tc);
}
@@ -1562,11 +1558,10 @@ static void sun4c_hw_init(const struct sun4c_hwdef *hwdef, ram_addr_t RAM_size,
qemu_irq esp_reset;
qemu_irq fdc_tc;
unsigned long kernel_size;
- BlockDriverState *fd[MAX_FD];
+ DriveInfo *fd[MAX_FD];
void *fw_cfg;
DeviceState *dev;
unsigned int i;
- DriveInfo *dinfo;
/* init CPU */
if (!cpu_model)
@@ -1618,10 +1613,7 @@ static void sun4c_hw_init(const struct sun4c_hwdef *hwdef, ram_addr_t RAM_size,
if (hwdef->fd_base != (target_phys_addr_t)-1) {
/* there is zero or one floppy drive */
memset(fd, 0, sizeof(fd));
- dinfo = drive_get(IF_FLOPPY, 0, 0);
- if (dinfo)
- fd[0] = dinfo->bdrv;
-
+ fd[0] = drive_get(IF_FLOPPY, 0, 0);
sun4m_fdctrl_init(slavio_irq[1], hwdef->fd_base, fd,
&fdc_tc);
}