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/piix.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/piix.c')
-rw-r--r-- | hw/ide/piix.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/ide/piix.c b/hw/ide/piix.c index 1c0cb0cda4..a6b5d92820 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -76,9 +76,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); @@ -99,7 +100,6 @@ static void piix3_reset(void *opaque) for (i = 0; i < 2; i++) { ide_bus_reset(&d->bus[i]); - ide_dma_reset(&d->bmdma[i]); } /* TODO: this is the default. do not override. */ |