diff options
author | Mark Cave-Ayland | 2017-10-14 14:22:22 +0200 |
---|---|---|
committer | Mark Cave-Ayland | 2017-10-31 18:25:36 +0100 |
commit | 1b13a60c1c15d7d69164f6d89465915838ddc07b (patch) | |
tree | c020569292156855b49d6245029f0fff9c3c15e8 /include/hw/scsi | |
parent | sparc32_dma: use object link instead of qdev property to pass IOMMU reference (diff) | |
download | qemu-1b13a60c1c15d7d69164f6d89465915838ddc07b.tar.gz qemu-1b13a60c1c15d7d69164f6d89465915838ddc07b.tar.xz qemu-1b13a60c1c15d7d69164f6d89465915838ddc07b.zip |
esp: move TYPE_ESP and SysBusESPState from esp.c to esp.h
This enables them to be used outside of esp.c.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
CC: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Artyom Tarasenko <atar4qemu@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'include/hw/scsi')
-rw-r--r-- | include/hw/scsi/esp.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/hw/scsi/esp.h b/include/hw/scsi/esp.h index d2c48869e1..3b160f858c 100644 --- a/include/hw/scsi/esp.h +++ b/include/hw/scsi/esp.h @@ -2,6 +2,7 @@ #define QEMU_HW_ESP_H #include "hw/scsi/scsi.h" +#include "hw/sysbus.h" /* esp.c */ #define ESP_MAX_DEVS 7 @@ -52,6 +53,19 @@ struct ESPState { void (*dma_cb)(ESPState *s); }; +#define TYPE_ESP "esp" +#define ESP_STATE(obj) OBJECT_CHECK(SysBusESPState, (obj), TYPE_ESP) + +typedef struct { + /*< private >*/ + SysBusDevice parent_obj; + /*< public >*/ + + MemoryRegion iomem; + uint32_t it_shift; + ESPState esp; +} SysBusESPState; + #define ESP_TCLO 0x0 #define ESP_TCMID 0x1 #define ESP_FIFO 0x2 |