From 40a6238a20134a4687f67072d9be99cd97aab59a Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Wed, 15 Dec 2010 00:23:00 +0100 Subject: 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 Signed-off-by: Kevin Wolf --- hw/ide/cmd646.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'hw/ide/cmd646.c') diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c index ea5d2dc..e191ee6 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]); } } -- cgit v1.1