diff options
author | Mark Cave-Ayland | 2017-09-24 16:47:44 +0200 |
---|---|---|
committer | David Gibson | 2017-09-27 05:05:41 +0200 |
commit | e451b85f1bf3c8140be51e2b03eb71ab96c246a5 (patch) | |
tree | 46ba653d5824aa763d0321c03094177ebd1c9e56 /hw/misc/macio | |
parent | macio: pass channel into MACIOIDEState via qdev property (diff) | |
download | qemu-e451b85f1bf3c8140be51e2b03eb71ab96c246a5.tar.gz qemu-e451b85f1bf3c8140be51e2b03eb71ab96c246a5.tar.xz qemu-e451b85f1bf3c8140be51e2b03eb71ab96c246a5.zip |
macio: use object link between MACIO_IDE and MAC_DBDMA object
Using a standard QOM object link we can pass a reference to the MAC_DBDMA
controller to the MACIO_IDE object which removes the last external parameter
to macio_ide_register_dma().
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/macio')
-rw-r--r-- | hw/misc/macio/macio.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c index 41b377e7a0..9aa7e7559b 100644 --- a/hw/misc/macio/macio.c +++ b/hw/misc/macio/macio.c @@ -160,7 +160,8 @@ static void macio_realize_ide(MacIOState *s, MACIOIDEState *ide, sysbus_connect_irq(sysbus_dev, 0, irq0); sysbus_connect_irq(sysbus_dev, 1, irq1); qdev_prop_set_uint32(DEVICE(ide), "channel", dmaid); - macio_ide_register_dma(ide, s->dbdma); + object_property_set_link(OBJECT(ide), OBJECT(s->dbdma), "dbdma", errp); + macio_ide_register_dma(ide); object_property_set_bool(OBJECT(ide), true, "realized", errp); } |