diff options
author | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2017-10-14 13:22:21 +0100 |
---|---|---|
committer | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2017-10-31 17:25:35 +0000 |
commit | f542ad03888ff0fad87db269186b79fe2ce1823b (patch) | |
tree | 52dc390d6fb457031957b09c640daa542d823bba /hw/sparc | |
parent | 9227f296a9be63f946bf8e552f24527a63a75b6d (diff) |
sparc32_dma: use object link instead of qdev property to pass IOMMU reference
This enables us to remove the last remaining (opaque) qdev property. Whilst we
are here, also update iommu_init() to use TYPE_SUN4M_IOMMU instead of a
hardcoded string.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Artyom Tarasenko <atar4qemu@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'hw/sparc')
-rw-r--r-- | hw/sparc/sun4m.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c index 67d771ce5d..e06e408390 100644 --- a/hw/sparc/sun4m.c +++ b/hw/sparc/sun4m.c @@ -296,7 +296,7 @@ static void *iommu_init(hwaddr addr, uint32_t version, qemu_irq irq) DeviceState *dev; SysBusDevice *s; - dev = qdev_create(NULL, "iommu"); + dev = qdev_create(NULL, TYPE_SUN4M_IOMMU); qdev_prop_set_uint32(dev, "version", version); qdev_init_nofail(dev); s = SYS_BUS_DEVICE(dev); @@ -312,7 +312,7 @@ static void *sparc32_dma_init(hwaddr daddr, void *iommu, int is_ledma) SysBusDevice *s; dev = qdev_create(NULL, is_ledma ? "sparc32-ledma" : "sparc32-espdma"); - qdev_prop_set_ptr(dev, "iommu_opaque", iommu); + object_property_set_link(OBJECT(dev), OBJECT(iommu), "iommu", &error_abort); qdev_init_nofail(dev); s = SYS_BUS_DEVICE(dev); sysbus_mmio_map(s, 0, daddr); |