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 | 52d39e5b67f0d75544837cac9c7be21873ed649f (patch) | |
tree | 12668623009ac63f183782d54a3d8795f3740a55 /hw/sparc | |
parent | 6a1f53f0fe51011d1222b15aa10328fce8546c76 (diff) | |
download | qemu-52d39e5b67f0d75544837cac9c7be21873ed649f.zip qemu-52d39e5b67f0d75544837cac9c7be21873ed649f.tar.gz qemu-52d39e5b67f0d75544837cac9c7be21873ed649f.tar.bz2 |
sparc32_dma: split esp and le into separate DMA devices
Due to slight differences in behaviour accessing the registers for the
esp and le devices, create two separate SPARC32_DMA_DEVICE types and
update the sun4m machine to use.
Note that by using different device types we already know the size of
the register block and the value of is_ledma at init time, allowing us to
drop the SPARC32_DMA_DEVICE realize function and the is_ledma device
property.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Artyom Tarasenko <atar4qemu@gmail.com>
Acked-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 | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c index 9276393..8593a87 100644 --- a/hw/sparc/sun4m.c +++ b/hw/sparc/sun4m.c @@ -312,9 +312,8 @@ static void *sparc32_dma_init(hwaddr daddr, qemu_irq parent_irq, DeviceState *dev; SysBusDevice *s; - dev = qdev_create(NULL, "sparc32-dma-device"); + dev = qdev_create(NULL, is_ledma ? "sparc32-ledma" : "sparc32-espdma"); qdev_prop_set_ptr(dev, "iommu_opaque", iommu); - qdev_prop_set_uint32(dev, "is_ledma", is_ledma); qdev_init_nofail(dev); s = SYS_BUS_DEVICE(dev); sysbus_connect_irq(s, 0, parent_irq); |