aboutsummaryrefslogtreecommitdiff
path: root/hw/misc
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2017-09-24 15:47:43 +0100
committerDavid Gibson <david@gibson.dropbear.id.au>2017-09-27 13:05:41 +1000
commit0fc84331d631ea434fb846f4916f216aeb5b5f91 (patch)
treee8eac21c01add4e246445f2f4f03b23454b0c71a /hw/misc
parentecba28dbf2f832e82ef016b8e57c9da0a3023bfd (diff)
macio: pass channel into MACIOIDEState via qdev property
One of the reasons macio_ide_register_dma() needs to exist is because the channel id isn't passed into the MACIO_IDE object. Pass in the channel id using a qdev property to remove this requirement. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/misc')
-rw-r--r--hw/misc/macio/macio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c
index f459f17f2f..41b377e7a0 100644
--- a/hw/misc/macio/macio.c
+++ b/hw/misc/macio/macio.c
@@ -159,7 +159,9 @@ static void macio_realize_ide(MacIOState *s, MACIOIDEState *ide,
sysbus_dev = SYS_BUS_DEVICE(ide);
sysbus_connect_irq(sysbus_dev, 0, irq0);
sysbus_connect_irq(sysbus_dev, 1, irq1);
- macio_ide_register_dma(ide, s->dbdma, dmaid);
+ qdev_prop_set_uint32(DEVICE(ide), "channel", dmaid);
+ macio_ide_register_dma(ide, s->dbdma);
+
object_property_set_bool(OBJECT(ide), true, "realized", errp);
}