summary refs log tree commit diff stats
path: root/include/hw/misc
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2018-02-28 20:32:41 +0000
committerDavid Gibson <david@gibson.dropbear.id.au>2018-03-06 13:16:29 +1100
commitdda12e9a6f6ffcfac2642c11a1afb27af877e2c9 (patch)
tree19fbb70819dd91df0669f2ee56149bee03ef6910 /include/hw/misc
parentf7bd7941d8c0478c123603fb4958bdbc25bdaf9a (diff)
downloadfocaccia-qemu-dda12e9a6f6ffcfac2642c11a1afb27af877e2c9.tar.gz
focaccia-qemu-dda12e9a6f6ffcfac2642c11a1afb27af877e2c9.zip
mac_newworld: use object link to pass OpenPIC object to macio
Also switch macio_newworld_realize() over to use it rather than using the pic_mem
memory region directly.

Now that both Old World and New World macio devices no longer make use of the
pic_mem memory region directly, we can remove it.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'include/hw/misc')
-rw-r--r--include/hw/misc/macio/macio.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/hw/misc/macio/macio.h b/include/hw/misc/macio/macio.h
index 843c114c07..4528282b36 100644
--- a/include/hw/misc/macio/macio.h
+++ b/include/hw/misc/macio/macio.h
@@ -29,6 +29,7 @@
 #include "hw/intc/heathrow_pic.h"
 #include "hw/misc/macio/cuda.h"
 #include "hw/ppc/mac_dbdma.h"
+#include "hw/ppc/openpic.h"
 
 #define TYPE_MACIO "macio"
 #define MACIO(obj) OBJECT_CHECK(MacIOState, (obj), TYPE_MACIO)
@@ -42,7 +43,6 @@ typedef struct MacIOState {
     CUDAState cuda;
     DBDMAState dbdma;
     ESCCState escc;
-    MemoryRegion *pic_mem;
     uint64_t frequency;
 } MacIOState;
 
@@ -70,6 +70,8 @@ typedef struct NewWorldMacIOState {
     /*< private >*/
     MacIOState parent_obj;
     /*< public >*/
+
+    OpenPICState *pic;
     qemu_irq irqs[7];
     MACIOIDEState ide[2];
 } NewWorldMacIOState;