diff options
author | Mark Cave-Ayland | 2020-10-13 13:49:20 +0200 |
---|---|---|
committer | Mark Cave-Ayland | 2020-10-18 17:21:42 +0200 |
commit | 348b8d1a76b4ab4b5a9ec756500547c5f2756d9c (patch) | |
tree | 7a72beff4b61ee208c7f11bfe3fb13311e7907bf /hw/ppc/mac_oldworld.c | |
parent | Merge remote-tracking branch 'remotes/ehabkost/tags/x86-next-pull-request' in... (diff) | |
download | qemu-348b8d1a76b4ab4b5a9ec756500547c5f2756d9c.tar.gz qemu-348b8d1a76b4ab4b5a9ec756500547c5f2756d9c.tar.xz qemu-348b8d1a76b4ab4b5a9ec756500547c5f2756d9c.zip |
macio: don't reference serial_hd() directly within the device
Instead use qdev_prop_set_chr() to configure the ESCC serial chardevs at the
Mac Old World and New World machine level.
Also remove the now obsolete comment referring to the use of serial_hd() and
the setting of user_creatable to false accordingly.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20201013114922.2946-2-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Diffstat (limited to 'hw/ppc/mac_oldworld.c')
-rw-r--r-- | hw/ppc/mac_oldworld.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c index f8173934a2..d6a76d06dc 100644 --- a/hw/ppc/mac_oldworld.c +++ b/hw/ppc/mac_oldworld.c @@ -96,6 +96,7 @@ static void ppc_heathrow_init(MachineState *machine) PCIBus *pci_bus; PCIDevice *macio; MACIOIDEState *macio_ide; + ESCCState *escc; SysBusDevice *s; DeviceState *dev, *pic_dev; BusState *adb_bus; @@ -281,6 +282,11 @@ static void ppc_heathrow_init(MachineState *machine) qdev_prop_set_uint64(dev, "frequency", tbfreq); object_property_set_link(OBJECT(macio), "pic", OBJECT(pic_dev), &error_abort); + + escc = ESCC(object_resolve_path_component(OBJECT(macio), "escc")); + qdev_prop_set_chr(DEVICE(escc), "chrA", serial_hd(0)); + qdev_prop_set_chr(DEVICE(escc), "chrB", serial_hd(1)); + pci_realize_and_unref(macio, pci_bus, &error_fatal); macio_ide = MACIO_IDE(object_resolve_path_component(OBJECT(macio), |