summaryrefslogtreecommitdiffstats
path: root/hw/pc_piix.c
diff options
context:
space:
mode:
authorAnthony Liguori2011-12-12 21:29:38 +0100
committerAnthony Liguori2011-12-15 16:20:49 +0100
commitd0c5be58704640850fad02c0ff38135f2e9aa589 (patch)
tree6b77a63d82cc9e56b4d0160334eeea3dca444818 /hw/pc_piix.c
parentdev: add an anonymous peripheral container (diff)
downloadqemu-d0c5be58704640850fad02c0ff38135f2e9aa589.tar.gz
qemu-d0c5be58704640850fad02c0ff38135f2e9aa589.tar.xz
qemu-d0c5be58704640850fad02c0ff38135f2e9aa589.zip
rtc: make piix3 set the rtc as a child (v2)
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/pc_piix.c')
-rw-r--r--hw/pc_piix.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/hw/pc_piix.c b/hw/pc_piix.c
index 970f43c99c..2d5ea2c5ad 100644
--- a/hw/pc_piix.c
+++ b/hw/pc_piix.c
@@ -205,6 +205,17 @@ static void pc_init1(MemoryRegion *system_memory,
}
}
+ /* FIXME there's some major spaghetti here. Somehow we create the devices
+ * on the PIIX before we actually create it. We create the PIIX3 deep in
+ * the recess of the i440fx creation too and then lose the DeviceState.
+ *
+ * For now, let's "fix" this by making judicious use of paths. This is not
+ * generally the right way to do this.
+ */
+
+ qdev_property_add_child(qdev_resolve_path("/i440fx/piix3", NULL),
+ "rtc", (DeviceState *)rtc_state, NULL);
+
audio_init(gsi, pci_enabled ? pci_bus : NULL);
pc_cmos_init(below_4g_mem_size, above_4g_mem_size, boot_device,