From 348b8d1a76b4ab4b5a9ec756500547c5f2756d9c Mon Sep 17 00:00:00 2001 From: Mark Cave-Ayland Date: Tue, 13 Oct 2020 12:49:20 +0100 Subject: 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 Message-Id: <20201013114922.2946-2-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland --- hw/ppc/mac_newworld.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'hw/ppc/mac_newworld.c') diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c index 4dfbeec0ca..6f5ef2e782 100644 --- a/hw/ppc/mac_newworld.c +++ b/hw/ppc/mac_newworld.c @@ -123,6 +123,7 @@ static void ppc_core99_init(MachineState *machine) UNINHostState *uninorth_pci; PCIBus *pci_bus; PCIDevice *macio; + ESCCState *escc; bool has_pmu, has_adb; MACIOIDEState *macio_ide; BusState *adb_bus; @@ -380,6 +381,11 @@ static void ppc_core99_init(MachineState *machine) qdev_prop_set_bit(dev, "has-adb", has_adb); 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); /* We only emulate 2 out of 3 IDE controllers for now */ -- cgit v1.2.3-55-g7522