sparc32_dma: introduce new SPARC32_DMA type container object
commit6aa62ed6b8cef3623083b1a90cecfb854f7c4a79
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Sat, 14 Oct 2017 12:22:22 +0000 (14 13:22 +0100)
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Tue, 31 Oct 2017 17:25:36 +0000 (31 17:25 +0000)
tree357eba8078725d0e94fdc4a8ce5a73a725036364
parente6ca02a46ae0fafe59544b789e9172efa1a929c1
sparc32_dma: introduce new SPARC32_DMA type container object

Create a new SPARC32_DMA container object (including an appropriate container
memory region) and add instances of the SPARC32_ESPDMA_DEVICE and
SPARC32_LEDMA_DEVICE as child objects. The benefit is that most of the gpio
wiring complexity between esp/espdma and lance/ledma is now hidden within the
SPARC32_DMA realize function.

Since the sun4m IOMMU is already QOMified we can find a reference to
it using object_resolve_path_type() allowing us to completely remove all external
references to the iommu pointer.

Finally we rework sun4m's sparc32_dma_init() to invoke the new SPARC32_DMA object
and wire up the remaining board memory regions/IRQs.

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>
hw/dma/sparc32_dma.c
hw/sparc/sun4m.c
include/hw/sparc/sparc32_dma.h