diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2014-03-19 21:45:41 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2014-03-19 21:45:42 +0000 |
| commit | 037b7addb7f9ad5dc52c3d05da8b2f60386252ff (patch) | |
| tree | 2eccb0dca91eb017d45abdf184a562b09f980940 /hw/dma/xilinx_axidma.c | |
| parent | f71e769d0754dc9a593a9e17ec6693a261b29f82 (diff) | |
| parent | abdffd1fb78c1b98bda925d3d59123beca6761a3 (diff) | |
| download | focaccia-qemu-037b7addb7f9ad5dc52c3d05da8b2f60386252ff.tar.gz focaccia-qemu-037b7addb7f9ad5dc52c3d05da8b2f60386252ff.zip | |
Merge remote-tracking branch 'remotes/afaerber/tags/qom-devices-for-2.0' into staging
QOM/QTest infrastructure fixes * QOM machine memory and build fixes * QOM link<> and child<> property reference counting fixes # gpg: Signature made Wed 19 Mar 2014 21:44:04 GMT using RSA key ID 3E7E013F # gpg: Good signature from "Andreas Färber <afaerber@suse.de>" # gpg: aka "Andreas Färber <afaerber@suse.com>" * remotes/afaerber/tags/qom-devices-for-2.0: virtio-rng: Avoid default_backend refcount leak qom: Add check() argument to object_property_add_link() qom: Make QOM link property unref optional qom: Don't make link NULL on object_property_set_link() failure qom: Split object_property_set_link() vl.c: Fix OpenBSD compilation issue due to namespace collisions vl.c: Fix memory leak in qemu_register_machine() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/dma/xilinx_axidma.c')
| -rw-r--r-- | hw/dma/xilinx_axidma.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/hw/dma/xilinx_axidma.c b/hw/dma/xilinx_axidma.c index 19f07b3b25..14b887bfa8 100644 --- a/hw/dma/xilinx_axidma.c +++ b/hw/dma/xilinx_axidma.c @@ -537,9 +537,15 @@ static void xilinx_axidma_realize(DeviceState *dev, Error **errp) Error *local_errp = NULL; object_property_add_link(OBJECT(ds), "dma", TYPE_XILINX_AXI_DMA, - (Object **)&ds->dma, &local_errp); + (Object **)&ds->dma, + object_property_allow_set_link, + OBJ_PROP_LINK_UNREF_ON_RELEASE, + &local_errp); object_property_add_link(OBJECT(cs), "dma", TYPE_XILINX_AXI_DMA, - (Object **)&cs->dma, &local_errp); + (Object **)&cs->dma, + object_property_allow_set_link, + OBJ_PROP_LINK_UNREF_ON_RELEASE, + &local_errp); if (local_errp) { goto xilinx_axidma_realize_fail; } @@ -571,10 +577,16 @@ static void xilinx_axidma_init(Object *obj) SysBusDevice *sbd = SYS_BUS_DEVICE(obj); object_property_add_link(obj, "axistream-connected", TYPE_STREAM_SLAVE, - (Object **)&s->tx_data_dev, &error_abort); + (Object **)&s->tx_data_dev, + qdev_prop_allow_set_link_before_realize, + OBJ_PROP_LINK_UNREF_ON_RELEASE, + &error_abort); object_property_add_link(obj, "axistream-control-connected", TYPE_STREAM_SLAVE, - (Object **)&s->tx_control_dev, &error_abort); + (Object **)&s->tx_control_dev, + qdev_prop_allow_set_link_before_realize, + OBJ_PROP_LINK_UNREF_ON_RELEASE, + &error_abort); object_initialize(&s->rx_data_dev, sizeof(s->rx_data_dev), TYPE_XILINX_AXI_DMA_DATA_STREAM); |