sparc32_dma: make esp device child of espdma device

This makes it possible to reference the esp device from the espdma device as
required, and by wiring up the device ourselves in sun4m.c we can drop use
of the esp_init() function.

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>
This commit is contained in:
Mark Cave-Ayland 2017-10-14 13:22:22 +01:00
parent 1b13a60c1c
commit 7f773ff5d0
3 changed files with 37 additions and 11 deletions

View file

@ -2,6 +2,7 @@
#define SPARC32_DMA_H
#include "hw/sysbus.h"
#include "hw/scsi/esp.h"
#define DMA_REGS 4
@ -28,6 +29,8 @@ struct DMADeviceState {
typedef struct ESPDMADeviceState {
DMADeviceState parent_obj;
SysBusESPState *esp;
} ESPDMADeviceState;
#define TYPE_SPARC32_LEDMA_DEVICE "sparc32-ledma"