diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2009-08-28 15:47:03 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-09-04 09:37:27 -0500 |
commit | f455e98cf437c7bb8f2b23888bbd302fef3a3b28 (patch) | |
tree | 453978b84f1054ecbfd4c0c18ebc05f8d89474d0 /hw/ide/pci.c | |
parent | ddd9bbd93bb2c12ade72dff1790d6d292aac073f (diff) | |
download | qemu-f455e98cf437c7bb8f2b23888bbd302fef3a3b28.zip qemu-f455e98cf437c7bb8f2b23888bbd302fef3a3b28.tar.gz qemu-f455e98cf437c7bb8f2b23888bbd302fef3a3b28.tar.bz2 |
ide: pass down DriveInfo instead of BlockDriverState
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/ide/pci.c')
-rw-r--r-- | hw/ide/pci.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/hw/ide/pci.c b/hw/ide/pci.c index a3d6bd0..0e8583a 100644 --- a/hw/ide/pci.c +++ b/hw/ide/pci.c @@ -375,7 +375,7 @@ static void cmd646_reset(void *opaque) } /* CMD646 PCI IDE controller */ -void pci_cmd646_ide_init(PCIBus *bus, BlockDriverState **hd_table, +void pci_cmd646_ide_init(PCIBus *bus, DriveInfo **hd_table, int secondary_ide_enabled) { PCIIDEState *d; @@ -443,12 +443,11 @@ static void piix3_reset(void *opaque) /* hd_table must contain 4 block drivers */ /* NOTE: for the PIIX3, the IRQs and IOports are hardcoded */ -void pci_piix3_ide_init(PCIBus *bus, BlockDriverState **hd_table, int devfn, +void pci_piix3_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn, qemu_irq *pic) { PCIIDEState *d; uint8_t *pci_conf; - int i; /* register a function 1 of PIIX3 */ d = (PCIIDEState *)pci_register_device(bus, "PIIX3 IDE", @@ -475,16 +474,12 @@ void pci_piix3_ide_init(PCIBus *bus, BlockDriverState **hd_table, int devfn, ide_init_ioport(&d->bus[0], 0x1f0, 0x3f6); ide_init_ioport(&d->bus[1], 0x170, 0x376); - for (i = 0; i < 4; i++) - if (hd_table[i]) - hd_table[i]->private = &d->dev; - register_savevm("ide", 0, 3, pci_ide_save, pci_ide_load, d); } /* hd_table must contain 4 block drivers */ /* NOTE: for the PIIX4, the IRQs and IOports are hardcoded */ -void pci_piix4_ide_init(PCIBus *bus, BlockDriverState **hd_table, int devfn, +void pci_piix4_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn, qemu_irq *pic) { PCIIDEState *d; |