diff options
author | Alexander Graf <agraf@suse.de> | 2010-12-15 00:23:00 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2010-12-17 16:11:01 +0100 |
commit | 40a6238a20134a4687f67072d9be99cd97aab59a (patch) | |
tree | 85856a4343e8d7dcd4b6daf60ccbf355883ecebe /hw/ide/via.c | |
parent | 6ef2ba5ea64e9feffdd1a8ffff66749323f719c8 (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/via.c')
-rw-r--r-- | hw/ide/via.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/ide/via.c b/hw/ide/via.c index 78857e8020..2603110ced 100644 --- a/hw/ide/via.c +++ b/hw/ide/via.c @@ -78,9 +78,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); register_ioport_write(addr, 1, 1, bmdma_cmd_writeb, bm); @@ -101,7 +102,6 @@ static void via_reset(void *opaque) for (i = 0; i < 2; i++) { ide_bus_reset(&d->bus[i]); - ide_dma_reset(&d->bmdma[i]); } pci_set_word(pci_conf + PCI_COMMAND, PCI_COMMAND_WAIT); |