summaryrefslogtreecommitdiffstats
path: root/hw/ppc/mac.h
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-01-23 23:04:01 +0000
committerAlexander Graf <agraf@suse.de>2013-01-25 22:02:54 +0100
commit07a7484e5d713f1eb7c1c37b18a8ab0d56d88875 (patch)
tree2c768cca41786f5fb08683c48e5066635c9cded6 /hw/ppc/mac.h
parent95ed3b7cf1677dc9f995a6e1fcc7bf377cf94a0e (diff)
downloadhqemu-07a7484e5d713f1eb7c1c37b18a8ab0d56d88875.zip
hqemu-07a7484e5d713f1eb7c1c37b18a8ab0d56d88875.tar.gz
ide/macio: QOM'ify MacIO IDE
It was not qdev'ified before. Turn it into a SysBusDevice. Embed them into the MacIO devices. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/ppc/mac.h')
-rw-r--r--hw/ppc/mac.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/hw/ppc/mac.h b/hw/ppc/mac.h
index 581e95c..3e390d3 100644
--- a/hw/ppc/mac.h
+++ b/hw/ppc/mac.h
@@ -27,6 +27,7 @@
#include "exec/memory.h"
#include "hw/sysbus.h"
+#include "hw/ide/internal.h"
/* SMP is not enabled, for now */
#define MAX_CPUS 1
@@ -48,10 +49,30 @@ void cuda_init (MemoryRegion **cuda_mem, qemu_irq irq);
/* MacIO */
#define TYPE_OLDWORLD_MACIO "macio-oldworld"
#define TYPE_NEWWORLD_MACIO "macio-newworld"
+
+#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 >*/
+
+ qemu_irq irq;
+ qemu_irq dma_irq;
+
+ MemoryRegion mem;
+ IDEBus bus;
+ BlockDriverAIOCB *aiocb;
+} MACIOIDEState;
+
+void macio_ide_init_drives(MACIOIDEState *ide, DriveInfo **hd_table);
+void macio_ide_register_dma(MACIOIDEState *ide, void *dbdma, int channel);
+
void macio_init(PCIDevice *dev,
- MemoryRegion *pic_mem, MemoryRegion *dbdma_mem,
+ MemoryRegion *pic_mem,
MemoryRegion *cuda_mem,
- int nb_ide, MemoryRegion **ide_mem, MemoryRegion *escc_mem);
+ MemoryRegion *escc_mem);
/* Heathrow PIC */
qemu_irq *heathrow_pic_init(MemoryRegion **pmem,
OpenPOWER on IntegriCloud