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>
This commit is contained in:
Mark Cave-Ayland 2018-02-28 20:32:41 +00:00 committed by David Gibson
parent f7bd7941d8
commit dda12e9a6f
3 changed files with 23 additions and 15 deletions

View file

@ -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;