summaryrefslogtreecommitdiffstats
path: root/include/hw/scsi
diff options
context:
space:
mode:
authorMark Cave-Ayland2021-03-04 23:10:24 +0100
committerMark Cave-Ayland2021-03-07 11:39:05 +0100
commiteb169c76d092b289a6a150b725e8fb2de990379b (patch)
treedab7f57fdbabc7a8afdfee73b24044ba8cfbaccd /include/hw/scsi
parentesp: rename existing ESP QOM type to SYSBUS_ESP (diff)
downloadqemu-eb169c76d092b289a6a150b725e8fb2de990379b.tar.gz
qemu-eb169c76d092b289a6a150b725e8fb2de990379b.tar.xz
qemu-eb169c76d092b289a6a150b725e8fb2de990379b.zip
esp: QOMify the internal ESP device state
Make this new QOM device state a child device of both the sysbus-esp and esp-pci implementations. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20210304221103.6369-4-mark.cave-ayland@ilande.co.uk>
Diffstat (limited to 'include/hw/scsi')
-rw-r--r--include/hw/scsi/esp.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/hw/scsi/esp.h b/include/hw/scsi/esp.h
index 8a0740e953..af23f813cb 100644
--- a/include/hw/scsi/esp.h
+++ b/include/hw/scsi/esp.h
@@ -22,7 +22,12 @@ enum pdma_origin_id {
ASYNC,
};
+#define TYPE_ESP "esp"
+OBJECT_DECLARE_SIMPLE_TYPE(ESPState, ESP)
+
struct ESPState {
+ DeviceState parent_obj;
+
uint8_t rregs[ESP_REGS];
uint8_t wregs[ESP_REGS];
qemu_irq irq;