aboutsummaryrefslogtreecommitdiff
path: root/hw/i82378.c
diff options
context:
space:
mode:
authorHervé Poussineau <hpoussin@reactos.org>2012-03-17 15:39:41 +0100
committerAndreas Färber <andreas.faerber@web.de>2012-04-28 20:51:40 +0200
commit049a9f7b946fe1d3ff97127f8905881dbb78cb00 (patch)
tree5439705ea9f36a2f8abb7fd04fff8711d6b4ea3a /hw/i82378.c
parent42fe1c245f0239ebcdc084740a1777ac3699d071 (diff)
i82378/i82374: Do not create DMA controller twice
This fixes a crash in PReP emulation when using DMA controller to access floppy drive. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Diffstat (limited to 'hw/i82378.c')
-rw-r--r--hw/i82378.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/i82378.c b/hw/i82378.c
index faad1a365b..9b11d907eb 100644
--- a/hw/i82378.c
+++ b/hw/i82378.c
@@ -170,6 +170,7 @@ static void i82378_init(DeviceState *dev, I82378State *s)
{
ISABus *isabus = DO_UPCAST(ISABus, qbus, qdev_get_child_bus(dev, "isa.0"));
ISADevice *pit;
+ ISADevice *isa;
qemu_irq *out0_irq;
/* This device has:
@@ -199,8 +200,8 @@ static void i82378_init(DeviceState *dev, I82378State *s)
pcspk_init(isabus, pit);
/* 2 82C37 (dma) */
- DMA_init(1, &s->out[1]);
- isa_create_simple(isabus, "i82374");
+ isa = isa_create_simple(isabus, "i82374");
+ qdev_connect_gpio_out(&isa->qdev, 0, s->out[1]);
/* timer */
isa_create_simple(isabus, "mc146818rtc");