From 52d39e5b67f0d75544837cac9c7be21873ed649f Mon Sep 17 00:00:00 2001 From: Mark Cave-Ayland Date: Sat, 14 Oct 2017 13:22:21 +0100 Subject: sparc32_dma: split esp and le into separate DMA devices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Artyom Tarasenko Acked-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- hw/sparc/sun4m.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'hw/sparc/sun4m.c') 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); -- cgit v1.1