From dda12e9a6f6ffcfac2642c11a1afb27af877e2c9 Mon Sep 17 00:00:00 2001 From: Mark Cave-Ayland Date: Wed, 28 Feb 2018 20:32:41 +0000 Subject: 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 Reviewed-by: David Gibson Signed-off-by: David Gibson --- include/hw/misc/macio/macio.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/hw/misc/macio/macio.h b/include/hw/misc/macio/macio.h index 843c114..4528282 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; -- cgit v1.1