aboutsummaryrefslogtreecommitdiff
path: root/hw/dma.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-06-20 12:58:36 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-06-20 12:58:36 +0000
commitd7d02e3c3a50782c0fa6b17d16f9957f1cc82a65 (patch)
treef07209fb39574448a87f576dfaefb655568d1c86 /hw/dma.c
parentbb0c6722b6606ad34da75d093d95a9bdfe42bc98 (diff)
new reset API
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@938 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/dma.c')
-rw-r--r--hw/dma.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/hw/dma.c b/hw/dma.c
index 0ebb7533d8..29f2aeccc1 100644
--- a/hw/dma.c
+++ b/hw/dma.c
@@ -355,6 +355,12 @@ void DMA_schedule(int nchan)
cpu_interrupt(cpu_single_env, CPU_INTERRUPT_EXIT);
}
+static void dma_reset(void *opaque)
+{
+ struct dma_cont *d = opaque;
+ write_cont (d, (0x0d << d->dshift), 0);
+}
+
/* dshift = 0: 8 bit DMA, 1 = 16 bit DMA */
static void dma_init2(struct dma_cont *d, int base, int dshift, int page_base)
{
@@ -378,7 +384,8 @@ static void dma_init2(struct dma_cont *d, int base, int dshift, int page_base)
register_ioport_read (base + ((i + 8) << dshift), 1, 1,
read_cont, d);
}
- write_cont (d, base + (0x0d << dshift), 0);
+ qemu_register_reset(dma_reset, d);
+ dma_reset(d);
}
void DMA_init (void)