aboutsummaryrefslogtreecommitdiff
path: root/hw/i82374.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/i82374.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/i82374.c')
-rw-r--r--hw/i82374.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/i82374.c b/hw/i82374.c
index 67298a39f5..4a922c3f4e 100644
--- a/hw/i82374.c
+++ b/hw/i82374.c
@@ -38,6 +38,7 @@ do { fprintf(stderr, "i82374 ERROR: " fmt , ## __VA_ARGS__); } while (0)
typedef struct I82374State {
uint8_t commands[8];
+ qemu_irq out;
} I82374State;
static const VMStateDescription vmstate_i82374 = {
@@ -99,7 +100,7 @@ static uint32_t i82374_read_descriptor(void *opaque, uint32_t nport)
static void i82374_init(I82374State *s)
{
- DMA_init(1, NULL);
+ DMA_init(1, &s->out);
memset(s->commands, 0, sizeof(s->commands));
}
@@ -132,6 +133,8 @@ static int i82374_isa_init(ISADevice *dev)
i82374_init(s);
+ qdev_init_gpio_out(&dev->qdev, &s->out, 1);
+
return 0;
}