aboutsummaryrefslogtreecommitdiff
path: root/hw/ide/cmd646.c
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2010-12-15 00:23:00 +0100
committerKevin Wolf <kwolf@redhat.com>2010-12-17 16:11:01 +0100
commit40a6238a20134a4687f67072d9be99cd97aab59a (patch)
tree85856a4343e8d7dcd4b6daf60ccbf355883ecebe /hw/ide/cmd646.c
parent6ef2ba5ea64e9feffdd1a8ffff66749323f719c8 (diff)
ide: Split out BMDMA code from ATA core
The ATA core is currently heavily intertwined with BMDMA code. Let's loosen that a bit, so we can happily replace the DMA backend with different implementations. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/ide/cmd646.c')
-rw-r--r--hw/ide/cmd646.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c
index ea5d2dc84f..e191ee6c5f 100644
--- a/hw/ide/cmd646.c
+++ b/hw/ide/cmd646.c
@@ -167,9 +167,10 @@ static void bmdma_map(PCIDevice *pci_dev, int region_num,
for(i = 0;i < 2; i++) {
BMDMAState *bm = &d->bmdma[i];
- d->bus[i].bmdma = bm;
+ bmdma_init(&d->bus[i], bm);
bm->bus = d->bus+i;
- qemu_add_vm_change_state_handler(ide_dma_restart_cb, bm);
+ qemu_add_vm_change_state_handler(d->bus[i].dma->ops->restart_cb,
+ &bm->dma);
if (i == 0) {
register_ioport_write(addr, 4, 1, bmdma_writeb_0, d);
@@ -218,7 +219,6 @@ static void cmd646_reset(void *opaque)
for (i = 0; i < 2; i++) {
ide_bus_reset(&d->bus[i]);
- ide_dma_reset(&d->bmdma[i]);
}
}