hw/dma/xlnx-zdma Always expect 'dma' link property to be set

Simplify by always passing a MemoryRegion property to the device.
Doing so we can move the AddressSpace field to the device struct,
removing need for heap allocation.

Update the Xilinx ZynqMP / Versal SoC models to pass the default
system memory instead of a NULL value.

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20210819163422.2863447-5-philmd@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Philippe Mathieu-Daudé 2021-08-19 18:34:22 +02:00 committed by Peter Maydell
parent c31b7f5901
commit 783dbab19f
4 changed files with 23 additions and 13 deletions

View file

@ -56,7 +56,7 @@ struct XlnxZDMA {
MemoryRegion iomem;
MemTxAttrs attr;
MemoryRegion *dma_mr;
AddressSpace *dma_as;
AddressSpace dma_as;
qemu_irq irq_zdma_ch_imr;
struct {