diff options
author | Mark Cave-Ayland | 2018-08-29 18:59:05 +0200 |
---|---|---|
committer | David Gibson | 2018-08-30 02:42:18 +0200 |
commit | 9b164a466767ccc3bd9ac2c6f16e4f0bb39e258a (patch) | |
tree | b63e6501c7dc96201516eff50bf95d6b295bbb45 /include/hw/misc | |
parent | spapr_pci: fix potential NULL pointer dereference (diff) | |
download | qemu-9b164a466767ccc3bd9ac2c6f16e4f0bb39e258a.tar.gz qemu-9b164a466767ccc3bd9ac2c6f16e4f0bb39e258a.tar.xz qemu-9b164a466767ccc3bd9ac2c6f16e4f0bb39e258a.zip |
macio: move MACIOIDEState type declarations to macio.h
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'include/hw/misc')
-rw-r--r-- | include/hw/misc/macio/macio.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/hw/misc/macio/macio.h b/include/hw/misc/macio/macio.h index cfaa145500..0c3964ec12 100644 --- a/include/hw/misc/macio/macio.h +++ b/include/hw/misc/macio/macio.h @@ -34,6 +34,32 @@ #include "hw/ppc/mac_dbdma.h" #include "hw/ppc/openpic.h" +/* MacIO IDE */ +#define TYPE_MACIO_IDE "macio-ide" +#define MACIO_IDE(obj) OBJECT_CHECK(MACIOIDEState, (obj), TYPE_MACIO_IDE) + +typedef struct MACIOIDEState { + /*< private >*/ + SysBusDevice parent_obj; + /*< public >*/ + uint32_t channel; + qemu_irq real_ide_irq; + qemu_irq real_dma_irq; + qemu_irq ide_irq; + qemu_irq dma_irq; + + MemoryRegion mem; + IDEBus bus; + IDEDMA dma; + void *dbdma; + bool dma_active; + uint32_t timing_reg; + uint32_t irq_reg; +} MACIOIDEState; + +void macio_ide_init_drives(MACIOIDEState *ide, DriveInfo **hd_table); +void macio_ide_register_dma(MACIOIDEState *ide); + #define TYPE_MACIO "macio" #define MACIO(obj) OBJECT_CHECK(MacIOState, (obj), TYPE_MACIO) |