aboutsummaryrefslogtreecommitdiff
path: root/hw/fdc.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2012-05-11 17:22:19 +0200
committerKevin Wolf <kwolf@redhat.com>2012-06-15 14:03:42 +0200
commitdfc65f1f780622d852ca8b9fb1421735ee56c48b (patch)
tree8e619188448f018e90e2a67f5b0b04ffaa54d1c8 /hw/fdc.c
parent8aab031fc66c4cedc1c08ed346fe39a2ea2aaba7 (diff)
Un-inline fdctrl_init_isa()
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/fdc.c')
-rw-r--r--hw/fdc.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/hw/fdc.c b/hw/fdc.c
index 30d34e3f1d..bfa4e686fa 100644
--- a/hw/fdc.c
+++ b/hw/fdc.c
@@ -1888,6 +1888,26 @@ static int fdctrl_connect_drives(FDCtrl *fdctrl)
return 0;
}
+ISADevice *fdctrl_init_isa(ISABus *bus, DriveInfo **fds)
+{
+ ISADevice *dev;
+
+ dev = isa_try_create(bus, "isa-fdc");
+ if (!dev) {
+ return NULL;
+ }
+
+ if (fds[0]) {
+ qdev_prop_set_drive_nofail(&dev->qdev, "driveA", fds[0]->bdrv);
+ }
+ if (fds[1]) {
+ qdev_prop_set_drive_nofail(&dev->qdev, "driveB", fds[1]->bdrv);
+ }
+ qdev_init_nofail(&dev->qdev);
+
+ return dev;
+}
+
void fdctrl_init_sysbus(qemu_irq irq, int dma_chann,
target_phys_addr_t mmio_base, DriveInfo **fds)
{