diff options
author | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-03-04 07:20:40 +0000 |
---|---|---|
committer | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-03-04 07:20:40 +0000 |
commit | 862c928064cf0f079d81b24db932a093e49d101d (patch) | |
tree | 71e0ba8dcf6f5e89b947567c103b6935d55b2e15 /hw/mac_dbdma.c | |
parent | 3c4cf5353b25d62795ecafbc88ea67e3ede4196f (diff) | |
download | qemu-862c928064cf0f079d81b24db932a093e49d101d.zip qemu-862c928064cf0f079d81b24db932a093e49d101d.tar.gz qemu-862c928064cf0f079d81b24db932a093e49d101d.tar.bz2 |
DB-DMA IDE asynchronous I/O
Signed-off-by: Laurent Vivier <Laurent@vivier.eu>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6681 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/mac_dbdma.c')
-rw-r--r-- | hw/mac_dbdma.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/hw/mac_dbdma.c b/hw/mac_dbdma.c index d6608f6..8e82a23 100644 --- a/hw/mac_dbdma.c +++ b/hw/mac_dbdma.c @@ -160,6 +160,7 @@ typedef struct DBDMA_channel { qemu_irq irq; DBDMA_io io; DBDMA_rw rw; + DBDMA_flush flush; dbdma_cmd current; int processing; } DBDMA_channel; @@ -367,7 +368,8 @@ static void dbdma_end(DBDMA_io *io) current->xfer_status = cpu_to_le16(be32_to_cpu(ch->regs[DBDMA_STATUS])); current->res_count = cpu_to_le16(be32_to_cpu(io->len)); dbdma_cmdptr_save(ch); - ch->regs[DBDMA_STATUS] &= cpu_to_be32(~FLUSH); + if (io->is_last) + ch->regs[DBDMA_STATUS] &= cpu_to_be32(~FLUSH); conditional_interrupt(ch); conditional_branch(ch); @@ -632,7 +634,7 @@ static void DBDMA_run_bh(void *opaque) } void DBDMA_register_channel(void *dbdma, int nchan, qemu_irq irq, - DBDMA_rw rw, + DBDMA_rw rw, DBDMA_flush flush, void *opaque) { DBDMA_channel *ch = ( DBDMA_channel *)dbdma + nchan; @@ -642,6 +644,7 @@ void DBDMA_register_channel(void *dbdma, int nchan, qemu_irq irq, ch->irq = irq; ch->channel = nchan; ch->rw = rw; + ch->flush = flush; ch->io.opaque = opaque; ch->io.channel = ch; } @@ -687,6 +690,8 @@ dbdma_control_write(DBDMA_channel *ch) if (status & ACTIVE) qemu_bh_schedule(dbdma_bh); + if (status & FLUSH) + ch->flush(&ch->io); } static void dbdma_writel (void *opaque, |